Compare commits

...

1 Commits

Author SHA1 Message Date
Hans Mackowiak
33633ebd50 StaticAbilityAlternativeCost: split Mayplay stuff 2021-03-09 08:49:57 +01:00
323 changed files with 1003 additions and 1203 deletions

View File

@@ -1000,7 +1000,7 @@ public class AiController {
}
// move snap-casted spells to front
if (source.isInZone(ZoneType.Graveyard)) {
if (sa.getMayPlay() != null && source.mayPlay(sa.getMayPlay()) != null) {
if (!sa.getMayPlayList().isEmpty()) {
p += 50;
}
}
@@ -1395,22 +1395,8 @@ public class AiController {
if (ComputerUtil.getDamageFromETB(player, land) < player.getLife() || !player.canLoseLife()
|| player.cantLoseForZeroOrLessLife() ) {
if (!game.getPhaseHandler().is(PhaseType.MAIN1) || !isSafeToHoldLandDropForMain2(land)) {
final List<SpellAbility> abilities = Lists.newArrayList();
final List<SpellAbility> abilities = GameActionUtil.getAlternativeCosts(land.getFirstSpellAbility(), player);
LandAbility la = new LandAbility(land, player, null);
la.setCardState(land.getCurrentState());
if (la.canPlay()) {
abilities.add(la);
}
// add mayPlay option
for (CardPlayOption o : land.mayPlay(player)) {
la = new LandAbility(land, player, o.getAbility());
la.setCardState(land.getCurrentState());
if (la.canPlay()) {
abilities.add(la);
}
}
if (!abilities.isEmpty()) {
return abilities;
}

View File

@@ -1952,10 +1952,10 @@ public class ComputerUtil {
ComputerUtilCombat.combatantWouldBeDestroyed(ai, source, game.getCombat())) {
return true;
}
} else if (zone.getZoneType() == ZoneType.Exile && sa.getMayPlay() != null) {
} else if (zone.getZoneType() == ZoneType.Exile) {
// play cards in exile that can only be played that turn
if (game.getPhaseHandler().getPhase() == PhaseType.MAIN2) {
if (source.mayPlay(sa.getMayPlay()) != null) {
if (!sa.getMayPlayList().isEmpty()) {
return true;
}
}

View File

@@ -1,6 +1,8 @@
package forge.ai;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import forge.card.CardStateName;
import forge.game.Game;
@@ -12,6 +14,7 @@ import forge.game.card.CardCollectionView;
import forge.game.card.CardLists;
import forge.game.card.CardPredicates.Presets;
import forge.game.player.Player;
import forge.game.spellability.LandAbility;
import forge.game.spellability.OptionalCostValue;
import forge.game.spellability.SpellAbility;
import forge.game.spellability.SpellAbilityStackInstance;
@@ -53,7 +56,8 @@ public class ComputerUtilAbility {
if (!(crd.isLand() || (crd.isFaceDown() && crd.getState(CardStateName.Original).getType().isLand()))) {
continue;
}
if (!crd.mayPlay(player).isEmpty()) {
if (Iterables.any(crd.getAllPossibleAbilities(player, true), Predicates.instanceOf(LandAbility.class))) {
landList.add(crd);
}
}
@@ -116,7 +120,7 @@ public class ComputerUtilAbility {
newAbilities.add(sa);
newAbilities.addAll(otherAltSa);
}
final List<SpellAbility> result = Lists.newArrayList();
for (SpellAbility sa : newAbilities) {
sa.setActivatingPlayer(player);

View File

@@ -31,7 +31,6 @@ import forge.game.replacement.ReplacementType;
import forge.game.spellability.AbilityManaPart;
import forge.game.spellability.AbilitySub;
import forge.game.spellability.SpellAbility;
import forge.game.staticability.StaticAbility;
import forge.game.trigger.Trigger;
import forge.game.trigger.TriggerType;
import forge.game.zone.ZoneType;
@@ -604,13 +603,10 @@ public class ComputerUtilMana {
int testEnergyPool = ai.getCounters(CounterEnumType.ENERGY);
boolean ignoreColor = false, ignoreType = false;
StaticAbility mayPlay = sa.getMayPlay();
if (mayPlay != null) {
if (mayPlay.hasParam("MayPlayIgnoreColor")) {
ignoreColor = true;
} else if (mayPlay.hasParam("MayPlayIgnoreType")) {
ignoreType = true;
}
if (sa.isIgnoreManaCostType()) {
ignoreType = true;
} else if (sa.isIgnoreManaCostColor()) {
ignoreColor = true;
}
List<SpellAbility> paymentList = Lists.newArrayList();

View File

@@ -142,7 +142,7 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView,
*
* @return a boolean.
*/
public final boolean isSecondary() {
public boolean isSecondary() {
return getParamOrDefault("Secondary", "False").equals("True");
}

View File

@@ -8,7 +8,6 @@ import forge.game.card.CardState;
import forge.game.cost.Cost;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.staticability.StaticAbility;
import forge.util.Expressions;
public class ForgeScript {
@@ -163,12 +162,6 @@ public class ForgeScript {
return sa.isForetelling();
} else if (property.equals("Foretold")) {
return sa.isForetold();
} else if (property.equals("MayPlaySource")) {
StaticAbility m = sa.getMayPlay();
if (m == null) {
return false;
}
return source.equals(m.getHostCard());
} else if (property.startsWith("IsTargeting")) {
String[] k = property.split(" ", 2);
boolean found = false;

View File

@@ -21,14 +21,14 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import forge.card.MagicColor;
import forge.GameCommand;
import forge.card.mana.ManaCost;
import forge.card.mana.ManaCostParser;
import forge.game.ability.AbilityFactory;
import forge.game.ability.AbilityUtils;
import forge.game.ability.ApiType;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.*;
import forge.game.card.CardPlayOption.PayManaCost;
import forge.game.cost.Cost;
import forge.game.keyword.Keyword;
import forge.game.keyword.KeywordInterface;
@@ -38,8 +38,8 @@ import forge.game.replacement.ReplacementEffect;
import forge.game.replacement.ReplacementHandler;
import forge.game.replacement.ReplacementLayer;
import forge.game.spellability.*;
import forge.game.staticability.StaticAbilityAlternativeCost;
import forge.game.trigger.Trigger;
import forge.game.trigger.TriggerHandler;
import forge.game.trigger.TriggerType;
import forge.game.zone.ZoneType;
import forge.util.Lang;
@@ -86,7 +86,7 @@ public final class GameActionUtil {
if (sa.isSpell() && !source.isInZone(ZoneType.Battlefield)) {
boolean lkicheck = false;
Card newHost = ((Spell)sa).getAlternateHost(source);
Card newHost = sa.getAlternateHost(source);
if (newHost != null) {
source = newHost;
lkicheck = true;
@@ -100,61 +100,8 @@ public final class GameActionUtil {
game.getAction().checkStaticAbilities(false, Sets.newHashSet(source), preList);
}
for (CardPlayOption o : source.mayPlay(activator)) {
// do not appear if it can be cast with SorcerySpeed
if (o.getAbility().hasParam("MayPlayNotSorcerySpeed") && activator.couldCastSorcery(sa)) {
continue;
}
// non basic are only allowed if PayManaCost is yes
if (!sa.isBasicSpell() && o.getPayManaCost() == PayManaCost.NO) {
continue;
}
final Card host = o.getHost();
SpellAbility newSA = null;
boolean changedManaCost = false;
if (o.getPayManaCost() == PayManaCost.NO) {
newSA = sa.copyWithNoManaCost(activator);
newSA.setBasicSpell(false);
changedManaCost = true;
} else if (o.getAltManaCost() != null) {
newSA = sa.copyWithManaCostReplaced(activator, o.getAltManaCost());
newSA.setBasicSpell(false);
changedManaCost = true;
} else {
newSA = sa.copy(activator);
}
final SpellAbilityRestriction sar = newSA.getRestrictions();
if (o.isWithFlash()) {
sar.setInstantSpeed(true);
}
sar.setZone(null);
newSA.setMayPlay(o.getAbility());
if (changedManaCost) {
if ("0".equals(sa.getParam("ActivationLimit")) && sa.getHostCard().getManaCost().isNoCost()) {
sar.setLimitToCheck(null);
}
}
final StringBuilder sb = new StringBuilder(sa.getDescription());
if (!source.equals(host)) {
sb.append(" by ");
if ((host.isEmblem() || host.getType().hasSubtype("Effect"))
&& host.getEffectSource() != null) {
sb.append(host.getEffectSource());
} else {
sb.append(host);
}
}
if (o.getAbility().hasParam("MayPlayText")) {
sb.append(" (").append(o.getAbility().getParam("MayPlayText")).append(")");
}
sb.append(o.toString(false));
newSA.setDescription(sb.toString());
alternatives.add(newSA);
}
// Add Alternate Cost
alternatives.addAll(StaticAbilityAlternativeCost.getAlternativeCostAndZones(sa, source, activator));
// need to be done there before static abilities does reset the card
if (sa.isBasicSpell()) {
@@ -244,6 +191,18 @@ public final class GameActionUtil {
}
}
if (sa.isLandAbility() && !source.isInZone(ZoneType.Battlefield)) {
Card newHost = sa.getAlternateHost(source);
if (newHost != null) {
source = newHost;
}
// check if LKI stuff needs to be run for checks
// Add Alternate Cost
alternatives.addAll(StaticAbilityAlternativeCost.getAlternativeCostAndZones(sa, source, activator));
}
if (sa.isManaAbility() && sa.isActivatedAbility() && activator.hasKeyword("Piracy") && source.isLand() && source.isInPlay() && !activator.equals(source.getController()) && sa.getPayCosts().hasTapCost()) {
SpellAbility newSA = sa.copy(activator);
// to bypass Activator restriction, set Activator to Player
@@ -501,15 +460,9 @@ public final class GameActionUtil {
public static Card createETBCountersEffect(Card sourceCard, Card c, Player controller, String counter, String amount) {
final Game game = sourceCard.getGame();
final Card eff = new Card(game.nextCardId(), game);
eff.setTimestamp(game.getNextTimestamp());
eff.setName(sourceCard.getName() + "'s Effect");
eff.addType("Effect");
eff.setOwner(controller);
eff.setImageKey(sourceCard.getImageKey());
eff.setColor(MagicColor.COLORLESS);
eff.setImmutable(true);
final Card eff = SpellAbilityEffect.createEffect(sourceCard, controller, sourceCard.getName() + "'s Effect", sourceCard.getImageKey());
// try to get the SpellAbility from the mana ability
//eff.setEffectSource((SpellAbility)null);
@@ -536,26 +489,59 @@ public final class GameActionUtil {
eff.addReplacementEffect(re);
// Forgot Trigger
String trig = "Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Stack | Destination$ Any | TriggerZones$ Command | Static$ True";
String forgetEffect = "DB$ Pump | ForgetObjects$ TriggeredCard";
String exileEffect = "DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile"
+ " | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0";
SpellAbility saForget = AbilityFactory.getAbility(forgetEffect, eff);
AbilitySub saExile = (AbilitySub) AbilityFactory.getAbility(exileEffect, eff);
saForget.setSubAbility(saExile);
final Trigger parsedTrigger = TriggerHandler.parseTrigger(trig, eff, true);
parsedTrigger.setOverridingAbility(saForget);
eff.addTrigger(parsedTrigger);
eff.updateStateForView();
SpellAbilityEffect.addForgetOnMovedTrigger(eff, "Stack");
// TODO: Add targeting to the effect so it knows who it's dealing with
game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
game.getAction().moveTo(ZoneType.Command, eff, null);
game.getTriggerHandler().clearSuppression(TriggerType.ChangesZone);
return eff;
}
public static Card createReplaceGraveyardEffect(Card c, Player controller, CardTraitBase ctb, String zone) {
Card sourceCard = ctb.getHostCard();
final Game game = sourceCard.getGame();
final Card eff = SpellAbilityEffect.createEffect(sourceCard, controller, sourceCard.getName() + "'s Effect", sourceCard.getImageKey());
eff.addRemembered(c);
String repeffstr = "Event$ Moved | ValidCard$ Card.IsRemembered " +
"| Origin$ Stack | Destination$ Graveyard " +
"| Description$ If that card would be put into your graveyard this turn, exile it instead.";
String effect = "DB$ ChangeZone | Defined$ ReplacedCard | Origin$ Stack | Destination$ " + zone;
ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, eff, true);
re.setLayer(ReplacementLayer.Other);
re.setOverridingAbility(AbilityFactory.getAbility(effect, eff));
eff.addReplacementEffect(re);
SpellAbilityEffect.addForgetOnMovedTrigger(eff, "Stack");
// Copy text changes
if (ctb.isIntrinsic()) {
eff.copyChangedTextFrom(sourceCard);
}
final GameCommand endEffect = new GameCommand() {
private static final long serialVersionUID = -5861759814760561373L;
@Override
public void run() {
game.getAction().exile(eff, null);
}
};
game.getEndOfTurn().addUntil(endEffect);
// TODO: Add targeting to the effect so it knows who it's dealing with
game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
game.getAction().moveTo(ZoneType.Command, eff, null);
game.getTriggerHandler().clearSuppression(TriggerType.ChangesZone);
return eff;
}

View File

@@ -25,10 +25,8 @@ import forge.game.player.Player;
import forge.game.staticability.StaticAbility;
import java.util.List;
import java.util.Map;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
/**
* <p>
@@ -46,8 +44,6 @@ public class StaticEffect {
private List<Player> affectedPlayers = Lists.newArrayList();
private long timestamp = -1;
private Map<String, String> mapParams = Maps.newTreeMap();
StaticEffect(final Card source) {
this.source = source;
}
@@ -63,7 +59,6 @@ public class StaticEffect {
copy.affectedCards = map.mapCollection(this.affectedCards);
copy.affectedPlayers = map.mapList(this.affectedPlayers);
copy.timestamp = this.timestamp;
copy.mapParams = this.mapParams;
return copy;
}
@@ -139,31 +134,12 @@ public class StaticEffect {
this.affectedPlayers = list;
}
/**
* setParams. TODO Write javadoc for this method.
*
* @param params
* a HashMap
*/
public final void setParams(final Map<String, String> params) {
this.mapParams = params;
}
/**
* Gets the params.
*
* @return the params
*/
public final Map<String, String> getParams() {
return this.mapParams;
}
public boolean hasParam(final String key) {
return this.mapParams.containsKey(key);
return this.ability.hasParam(key);
}
public String getParam(final String key) {
return this.mapParams.get(key);
return this.ability.getParam(key);
}
/**
@@ -175,28 +151,12 @@ public class StaticEffect {
final CardCollectionView affectedCards = getAffectedCards();
final List<Player> affectedPlayers = getAffectedPlayers();
String changeColorWordsTo = null;
boolean setPT = false;
String[] addHiddenKeywords = null;
boolean removeMayPlay = false;
if (hasParam("ChangeColorWordsTo")) {
changeColorWordsTo = getParam("ChangeColorWordsTo");
}
if (hasParam("SetPower") || hasParam("SetToughness")) {
setPT = true;
}
if (hasParam("AddHiddenKeyword")) {
addHiddenKeywords = getParam("AddHiddenKeyword").split(" & ");
}
if (hasParam("MayPlay")) {
removeMayPlay = true;
}
if (hasParam("IgnoreEffectCost")) {
getSource().removeChangedCardTraits(getTimestamp());
}
@@ -224,12 +184,12 @@ public class StaticEffect {
}
// Revert changed color words
if (changeColorWordsTo != null) {
if (hasParam("ChangeColorWordsTo")) {
affectedCard.removeChangedTextColorWord(getTimestamp());
}
// remove set P/T
if (setPT) {
if (hasParam("SetPower") || hasParam("SetToughness")) {
affectedCard.removeNewPT(getTimestamp());
}
@@ -277,9 +237,6 @@ public class StaticEffect {
if (hasParam("MayLookAt")) {
affectedCard.removeMayLookAt(getTimestamp());
}
if (removeMayPlay) {
affectedCard.removeMayPlay(ability);
}
if (hasParam("GainTextOf")) {
affectedCard.removeTextChangeState(getTimestamp());

View File

@@ -349,7 +349,7 @@ public abstract class SpellAbilityEffect {
return saForget;
}
protected static void addForgetOnMovedTrigger(final Card card, final String zone) {
public static void addForgetOnMovedTrigger(final Card card, final String zone) {
String trig = "Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ " + zone + " | ExcludedDestinations$ Stack | Destination$ Any | TriggerZones$ Command | Static$ True";
final Trigger parsedTrigger = TriggerHandler.parseTrigger(trig, card, true);
@@ -437,11 +437,8 @@ public abstract class SpellAbilityEffect {
re.setOverridingAbility(AbilityFactory.getAbility(effect, eff));
eff.addReplacementEffect(re);
}
// create a basic template for Effect to be used somewhere else
protected static Card createEffect(final SpellAbility sa, final Player controller, final String name,
public static Card createEffect(final Card hostCard, final Player controller, final String name,
final String image) {
final Card hostCard = sa.getHostCard();
final Game game = hostCard.getGame();
final Card eff = new Card(game.nextCardId(), game);
eff.setTimestamp(game.getNextTimestamp());
@@ -465,8 +462,13 @@ public abstract class SpellAbilityEffect {
eff.setColor(hostCard.determineColor().getColor());
}
eff.setImmutable(true);
return eff;
}
// create a basic template for Effect to be used somewhere else
public static Card createEffect(final SpellAbility sa, final Player controller, final String name,
final String image) {
Card eff = createEffect(sa.getHostCard(), controller, name, image);
eff.setEffectSource(sa);
return eff;
}

View File

@@ -1296,6 +1296,9 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
if (sa.hasParam("ExileFaceDown")) {
movedCard.turnFaceDown(true);
}
if (sa.hasParam("ExilePeek")) {
movedCard.addMayLookTemp(player);
}
if (sa.hasParam("Foretold")) {
movedCard.setForetold(true);
movedCard.setForetoldThisTurn(true);

View File

@@ -3,9 +3,12 @@ package forge.game.ability.effects;
import com.google.common.collect.Lists;
import forge.game.Game;
import forge.game.ability.AbilityUtils;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.Card;
import forge.game.card.CardZoneTable;
import forge.game.card.CounterType;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
@@ -21,12 +24,20 @@ public class PermanentEffect extends SpellAbilityEffect {
@Override
public void resolve(SpellAbility sa) {
final Card host = sa.getHostCard();
final Player player = sa.getActivatingPlayer();
final Game game = host.getGame();
CardZoneTable table = new CardZoneTable();
ZoneType previousZone = host.getZone().getZoneType();
host.setController(sa.getActivatingPlayer(), 0);
// Alternate Costs entering With Counters
if (sa.hasParam("WithCountersType")) {
CounterType cType = CounterType.getType(sa.getParam("WithCountersType"));
int cAmount = AbilityUtils.calculateAmount(host, sa.getParamOrDefault("WithCountersAmount", "1"), sa);
host.addEtbCounter(cType, cAmount, player);
}
final Card c = game.getAction().moveToPlay(host, sa);
sa.setHostCard(c);

View File

@@ -11,10 +11,10 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import forge.GameCommand;
import forge.StaticData;
import forge.card.CardRulesPredicates;
import forge.game.Game;
import forge.game.GameActionUtil;
import forge.game.ability.AbilityFactory;
import forge.game.ability.AbilityUtils;
import forge.game.ability.SpellAbilityEffect;
@@ -321,50 +321,7 @@ public class PlayEffect extends SpellAbilityEffect {
protected void addReplaceGraveyardEffect(Card c, SpellAbility sa, String zone) {
final Card hostCard = sa.getHostCard();
final Game game = hostCard.getGame();
final Player controller = sa.getActivatingPlayer();
final String name = hostCard.getName() + "'s Effect";
final String image = hostCard.getImageKey();
final Card eff = createEffect(sa, controller, name, image);
eff.addRemembered(c);
String repeffstr = "Event$ Moved | ValidCard$ Card.IsRemembered " +
"| Origin$ Stack | Destination$ Graveyard " +
"| Description$ If that card would be put into your graveyard this turn, exile it instead.";
String effect = "DB$ ChangeZone | Defined$ ReplacedCard | Origin$ Stack | Destination$ " + zone;
ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, eff, true);
re.setLayer(ReplacementLayer.Other);
re.setOverridingAbility(AbilityFactory.getAbility(effect, eff));
eff.addReplacementEffect(re);
addExileOnMovedTrigger(eff, "Stack");
// Copy text changes
if (sa.isIntrinsic()) {
eff.copyChangedTextFrom(hostCard);
}
final GameCommand endEffect = new GameCommand() {
private static final long serialVersionUID = -5861759814760561373L;
@Override
public void run() {
game.getAction().exile(eff, null);
}
};
game.getEndOfTurn().addUntil(endEffect);
eff.updateStateForView();
// TODO: Add targeting to the effect so it knows who it's dealing with
game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
game.getAction().moveTo(ZoneType.Command, eff, sa);
game.getTriggerHandler().clearSuppression(TriggerType.ChangesZone);
GameActionUtil.createReplaceGraveyardEffect(c, sa.getActivatingPlayer(), sa, zone);
}

View File

@@ -62,7 +62,7 @@ public class PlayLandVariantEffect extends SpellAbilityEffect {
PaperCard ran = Aggregates.random(cards);
Card random = CardFactory.getCard(ran, activator, source.getGame());
// if activator cannot play the random land, loop
while (!activator.canPlayLand(random, false) && !cards.isEmpty()) {
while (!activator.canPlayLand(random, false, random.getFirstSpellAbility()) && !cards.isEmpty()) {
cards.remove(ran);
if (cards.isEmpty()) return;
ran = Aggregates.random(cards);

View File

@@ -111,8 +111,6 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
private GameEntity mustAttackEntity = null;
private GameEntity mustAttackEntityThisTurn = null;
private final Map<StaticAbility, CardPlayOption> mayPlay = Maps.newHashMap();
// changes by AF animate and continuous static effects - timestamp is the key of maps
private final Map<Long, CardChangedType> changedCardTypes = Maps.newTreeMap();
private final NavigableMap<Long, String> changedCardNames = Maps.newTreeMap();
@@ -293,6 +291,9 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
private final Table<SpellAbility, StaticAbility, List<String>> chosenModesTurnStatic = HashBasedTable.create();
private final Table<SpellAbility, StaticAbility, List<String>> chosenModesGameStatic = HashBasedTable.create();
private final Map<StaticAbility, Integer> mayPlayThisTurn = Maps.newHashMap();
// Enumeration for CMC request types
public enum SplitCMCMode {
CurrentSideCMC,
@@ -1136,7 +1137,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
newTop = c;
}
}
if (newTop != null) {
removeMutatedStates();
newTop.mergedCards = mergedCards;
@@ -1902,8 +1903,6 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
final String[] upkeepCostParams = keyword.split(":");
sbLong.append(upkeepCostParams.length > 2 ? "" + upkeepCostParams[2] : ManaCostParser.parse(upkeepCostParams[1]));
sbLong.append("\r\n");
} else if (keyword.startsWith("Alternative Cost")) {
sbLong.append("Has alternative cost.");
} else if (keyword.startsWith("AlternateAdditionalCost")) {
final String costString1 = keyword.split(":")[1];
final String costString2 = keyword.split(":")[2];
@@ -2106,11 +2105,6 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
final CardTypeView type = state.getType();
final StringBuilder sb = new StringBuilder();
if (!mayPlay.isEmpty()) {
sb.append("May be played by: ");
sb.append(Lang.joinHomogenous(mayPlay.values()));
sb.append("\r\n");
}
if (type.isInstant() || type.isSorcery()) {
sb.append(abilityTextInstantSorcery(state));
@@ -3099,35 +3093,6 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
getView().setPlayerMayLook(result);
}
public final CardPlayOption mayPlay(final StaticAbility sta) {
if (sta == null) {
return null;
}
return mayPlay.get(sta);
}
public final List<CardPlayOption> mayPlay(final Player player) {
List<CardPlayOption> result = Lists.newArrayList();
for (CardPlayOption o : mayPlay.values()) {
if (o.getPlayer().equals(player)) {
result.add(o);
}
}
return result;
}
public final void setMayPlay(final Player player, final boolean withoutManaCost, final Cost altManaCost, final boolean withFlash, final boolean grantZonePermissions, final StaticAbility sta) {
this.mayPlay.put(sta, new CardPlayOption(player, sta, withoutManaCost, altManaCost, withFlash, grantZonePermissions));
}
public final void removeMayPlay(final StaticAbility sta) {
this.mayPlay.remove(sta);
}
public void resetMayPlayTurn() {
for (StaticAbility sta : getStaticAbilities()) {
sta.resetMayPlayTurn();
}
}
public final CardCollectionView getEquippedBy() {
if (this.attachedCards == null) {
return CardCollection.EMPTY;
@@ -6142,7 +6107,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
getDamageHistory().setCreatureGotBlockedThisTurn(false);
clearBlockedByThisTurn();
clearBlockedThisTurn();
resetMayPlayTurn();
clearMayPlayThisTurn();
resetExtertedThisTurn();
resetChosenModeTurn();
}
@@ -6387,7 +6352,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
for (SpellAbility sa : getState(CardStateName.Modal).getSpellAbilities()) {
//add alternative costs as additional spell abilities
// only add Spells there
if (sa.isSpell()) {
if (sa.isSpell() || sa.isLandAbility()) {
abilities.add(sa);
abilities.addAll(GameActionUtil.getAlternativeCosts(sa, player));
}
@@ -6415,106 +6380,6 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
}
abilities.removeAll(toRemove);
// Land Abilities below, move them to CardFactory after MayPlayRefactor
if (getLastKnownZone().is(ZoneType.Battlefield)) {
return abilities;
}
if (getState(CardStateName.Original).getType().isLand()) {
LandAbility la = new LandAbility(this, player, null);
la.setCardState(oState);
if (la.canPlay()) {
abilities.add(la);
}
Card source = this;
boolean lkicheck = false;
// if Card is Facedown, need to check if MayPlay still applies
if (isFaceDown()) {
lkicheck = true;
source = CardUtil.getLKICopy(source);
source.forceTurnFaceUp();
}
if (lkicheck) {
// double freeze tracker, so it doesn't update view
game.getTracker().freeze();
CardCollection preList = new CardCollection(source);
game.getAction().checkStaticAbilities(false, Sets.newHashSet(source), preList);
}
// extra for MayPlay
for (CardPlayOption o : source.mayPlay(player)) {
la = new LandAbility(this, player, o.getAbility());
la.setCardState(oState);
if (la.canPlay()) {
abilities.add(la);
}
}
// reset static abilities
if (lkicheck) {
game.getAction().checkStaticAbilities(false);
// clear delayed changes, this check should not have updated the view
game.getTracker().clearDelayed();
// need to unfreeze tracker
game.getTracker().unfreeze();
}
}
if (isModal() && hasState(CardStateName.Modal)) {
CardState modal = getState(CardStateName.Modal);
if (modal.getType().isLand()) {
LandAbility la = new LandAbility(this, player, null);
la.setCardState(modal);
Card source = CardUtil.getLKICopy(this);
boolean lkicheck = true;
// if Card is Facedown, need to check if MayPlay still applies
if (isFaceDown()) {
source.forceTurnFaceUp();
}
// the modal state is not copied with lki, need to copy it extra
if (!source.hasState(CardStateName.Modal)) {
source.addAlternateState(CardStateName.Modal, false);
source.getState(CardStateName.Modal).copyFrom(this.getState(CardStateName.Modal), true);
}
source.setSplitStateToPlayAbility(la);
if (la.canPlay(source)) {
abilities.add(la);
}
if (lkicheck) {
// double freeze tracker, so it doesn't update view
game.getTracker().freeze();
CardCollection preList = new CardCollection(source);
game.getAction().checkStaticAbilities(false, Sets.newHashSet(source), preList);
}
// extra for MayPlay
for (CardPlayOption o : source.mayPlay(player)) {
la = new LandAbility(this, player, o.getAbility());
la.setCardState(modal);
if (la.canPlay(source)) {
abilities.add(la);
}
}
// reset static abilities
if (lkicheck) {
game.getAction().checkStaticAbilities(false);
// clear delayed changes, this check should not have updated the view
game.getTracker().clearDelayed();
// need to unfreeze tracker
game.getTracker().unfreeze();
}
}
}
return abilities;
}
@@ -7021,4 +6886,17 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
}
return edition.getBorderColor();
}
public int getMayPlayThisTurn(StaticAbility stAb) {
return mayPlayThisTurn.containsKey(stAb) ? mayPlayThisTurn.get(stAb) : 0;
}
public void incMayPlayThisTurn(StaticAbility stAb) {
int old = getMayPlayThisTurn(stAb);
mayPlayThisTurn.put(stAb, old + 1);
}
public void clearMayPlayThisTurn() {
mayPlayThisTurn.clear();
}
}

View File

@@ -396,7 +396,11 @@ public class CardFactory {
// SpellPermanent only for Original State
if (c.getCurrentStateName() == CardStateName.Original || c.getCurrentStateName() == CardStateName.Modal) {
// this is the "default" spell for permanents like creatures and artifacts
if (c.isPermanent() && !c.isAura() && !c.isLand()) {
if (c.isLand()) {
SpellAbility sa = new LandAbility(c);
sa.setCardState(c.getCurrentState());
c.addSpellAbility(sa);
} else if (c.isPermanent() && !c.isAura()) {
SpellAbility sa = new SpellPermanent(c);
// Currently only for Modal, might react different when state is always set

View File

@@ -1142,9 +1142,6 @@ public class CardFactoryUtil {
if (sq[0].startsWith("Escaped")) {
return doXMath(Integer.parseInt(sq[c.getCastSA() != null && c.getCastSA().isEscape() ? 1 : 2]), m, c);
}
if (sq[0].startsWith("AltCost")) {
return doXMath(Integer.parseInt(sq[c.isOptionalCostPaid(OptionalCost.AltCost) ? 1 : 2]), m, c);
}
// Count$wasCastFrom<Zone>.<true>.<false>
if (sq[0].startsWith("wasCastFrom")) {
@@ -2131,15 +2128,6 @@ public class CardFactoryUtil {
for (KeywordInterface inst : card.getKeywords()) {
inst.createTraits(card, true);
}
// AltCost
String altCost = card.getSVar("AltCost");
if (StringUtils.isNotBlank(altCost)) {
final SpellAbility sa1 = card.getFirstSpellAbility();
if (sa1 != null && sa1.isSpell()) {
card.addSpellAbility(makeAltCostAbility(card, altCost, sa1));
}
}
}
private static ReplacementEffect createETBReplacement(final CardState card, ReplacementLayer layer,
@@ -3322,6 +3310,7 @@ public class CardFactoryUtil {
inst.addTrigger(parsedUpkeepTrig);
inst.addTrigger(parsedSacTrigger);
} else if (keyword.equals("MayFlashSac")) {
//TODO broken for now, need to be put into the other effect
String strTrig = "Mode$ SpellCast | ValidCard$ Card.Self | ValidSA$ Spell.MayPlaySource | Static$ True | Secondary$ True "
+ " | TriggerDescription$ If you cast it any time a sorcery couldn't have been cast, "
+ " the controller of the permanent it becomes sacrifices it at the beginning of the next cleanup step.";
@@ -3877,25 +3866,7 @@ public class CardFactoryUtil {
public static void addSpellAbility(final KeywordInterface inst, final CardState card, final boolean intrinsic) {
String keyword = inst.getOriginal();
Card host = card.getCard();
if (keyword.startsWith("Alternative Cost") && !host.isLand()) {
final String[] kw = keyword.split(":");
String costStr = kw[1];
for (SpellAbility sa: host.getBasicSpells()) {
final SpellAbility newSA = sa.copy();
newSA.setBasicSpell(false);
if (costStr.equals("ConvertedManaCost")) {
costStr = Integer.toString(host.getCMC());
}
final Cost cost = new Cost(costStr, false).add(sa.getPayCosts().copyWithNoMana());
newSA.putParam("Secondary", "True");
newSA.setPayCosts(cost);
newSA.setDescription(sa.getDescription() + " (by paying " + cost.toSimpleString() + " instead of its mana cost)");
newSA.setIntrinsic(intrinsic);
inst.addSpellAbility(newSA);
}
} else if (keyword.startsWith("Adapt")) {
if (keyword.startsWith("Adapt")) {
final String[] k = keyword.split(":");
final String magnitude = k[1];
final String manacost = k[2];
@@ -4780,38 +4751,6 @@ public class CardFactoryUtil {
}
}
/**
* TODO: Write javadoc for this method.
* @param card
* @param altCost
* @param sa
* @return
*/
private static SpellAbility makeAltCostAbility(final Card card, final String altCost, final SpellAbility sa) {
final Map<String, String> params = AbilityFactory.getMapParams(altCost);
final SpellAbility altCostSA = sa.copy();
final Cost abCost = new Cost(params.get("Cost"), altCostSA.isAbility());
altCostSA.setPayCosts(abCost);
altCostSA.setBasicSpell(false);
altCostSA.addOptionalCost(OptionalCost.AltCost);
final SpellAbilityRestriction restriction = new SpellAbilityRestriction();
restriction.setRestrictions(params);
if (!params.containsKey("ActivationZone")) {
restriction.setZone(ZoneType.Hand);
}
altCostSA.setRestrictions(restriction);
String costDescription = TextUtil.fastReplace(params.get("Description"),"CARDNAME", card.getName());
if (costDescription == null || costDescription.isEmpty()) {
costDescription = TextUtil.concatWithSpace("You may", abCost.toStringAlt(), "rather than pay", TextUtil.addSuffix(card.getName(), "'s mana cost."));
}
altCostSA.setDescription(costDescription);
return altCostSA;
}
private static final Map<String,String> emptyMap = Maps.newTreeMap();
public static SpellAbility setupETBReplacementAbility(SpellAbility sa) {
AbilitySub as = new AbilitySub(ApiType.InternalEtbReplacement, sa.getHostCard(), null, emptyMap);

View File

@@ -39,7 +39,6 @@ import forge.game.player.Player;
import forge.game.player.PlayerController.BinaryChoiceType;
import forge.game.player.PlayerController.ManaPaymentPurpose;
import forge.game.spellability.SpellAbility;
import forge.game.spellability.LandAbility;
import forge.game.staticability.StaticAbility;
import forge.game.trigger.Trigger;
import forge.game.trigger.TriggerType;
@@ -1034,7 +1033,7 @@ public class PhaseHandler implements java.io.Serializable {
final Zone currentZone = saHost.getZone();
// Need to check if Zone did change
if (currentZone != null && originZone != null && !currentZone.equals(originZone) && (sa.isSpell() || sa instanceof LandAbility)) {
if (currentZone != null && originZone != null && !currentZone.equals(originZone) && (sa.isSpell() || sa.isLandAbility())) {
// currently there can be only one Spell put on the Stack at once, or Land Abilities be played
final CardZoneTable triggerList = new CardZoneTable();
triggerList.put(originZone.getZoneType(), currentZone.getZoneType(), saHost);

View File

@@ -53,7 +53,6 @@ import forge.game.trigger.TriggerHandler;
import forge.game.trigger.TriggerType;
import forge.game.zone.PlayerZone;
import forge.game.zone.PlayerZoneBattlefield;
import forge.game.zone.Zone;
import forge.game.zone.ZoneType;
import forge.item.IPaperCard;
import forge.item.PaperCard;
@@ -1861,29 +1860,32 @@ public class Player extends GameEntity implements Comparable<Player> {
}
public final boolean canPlayLand(final Card land) {
return canPlayLand(land, false);
return canPlayLand(land, false, land.getFirstSpellAbility());
}
public final boolean canPlayLand(final Card land, final boolean ignoreZoneAndTiming) {
return canPlayLand(land, ignoreZoneAndTiming, null);
return canPlayLand(land, ignoreZoneAndTiming, land.getFirstSpellAbility());
}
public final boolean canPlayLand(final Card land, final boolean ignoreZoneAndTiming, SpellAbility landSa) {
if (!ignoreZoneAndTiming && !canCastSorcery()) {
return false;
}
landSa.setActivatingPlayer(this);
// CantBeCast static abilities
if (StaticAbilityCantBeCast.cantPlayLandAbility(landSa, land, this)) {
return false;
}
if (land != null && !ignoreZoneAndTiming) {
final boolean mayPlay = landSa == null ? !land.mayPlay(this).isEmpty() : landSa.getMayPlay() != null;
if (land.getOwner() != this && !mayPlay) {
if (land.isInPlay()) {
return false;
}
final Zone zone = game.getZoneOf(land);
if (zone != null && (zone.is(ZoneType.Battlefield) || (!zone.is(ZoneType.Hand) && !mayPlay))) {
if (!landSa.getRestrictions().checkActivatorRestrictions(land, landSa)) {
return false;
}
if (!landSa.getRestrictions().checkZoneRestrictions(land, landSa)) {
return false;
}
}

View File

@@ -20,7 +20,6 @@ package forge.game.spellability;
import forge.card.mana.ManaCost;
import forge.game.card.Card;
import forge.game.cost.Cost;
import forge.game.player.Player;
/**
* <p>
@@ -51,14 +50,7 @@ public abstract class AbilityStatic extends Ability implements Cloneable {
}
@Override
public boolean canPlay() {
Player player = getActivatingPlayer();
if (player == null) {
player = this.getHostCard().getController();
}
final Card c = this.getHostCard();
return this.getRestrictions().canPlay(c, this);
return this.getRestrictions().canPlay(getHostCard(), this);
}
/** {@inheritDoc} */

View File

@@ -23,20 +23,15 @@ import forge.card.CardStateName;
import forge.card.mana.ManaCost;
import forge.game.card.Card;
import forge.game.card.CardUtil;
import forge.game.cost.Cost;
import forge.game.player.Player;
import forge.game.staticability.StaticAbility;
import forge.game.zone.ZoneType;
public class LandAbility extends Ability {
public class LandAbility extends AbilityStatic {
public LandAbility(Card sourceCard, Player p, StaticAbility mayPlay) {
super(sourceCard, new Cost(ManaCost.NO_COST, false));
setActivatingPlayer(p);
setMayPlay(mayPlay);
}
public LandAbility(Card sourceCard) {
this(sourceCard, sourceCard.getController(), null);
super(sourceCard, ManaCost.NO_COST);
getRestrictions().setZone(ZoneType.Hand);
}
public boolean canPlay(Card newHost) {
@@ -44,10 +39,21 @@ public class LandAbility extends Ability {
return p.canPlayLand(newHost, false, this);
}
@Override
public boolean isLandAbility() { return true; }
@Override
public boolean isSecondary() {
return true;
}
@Override
public boolean canPlay() {
Card land = this.getHostCard();
final Player p = this.getActivatingPlayer();
if (p == null) {
return false;
}
if (this.getCardState() != null && land.getCurrentStateName() != this.getCardStateName()) {
if (!land.isLKI()) {
@@ -74,9 +80,8 @@ public class LandAbility extends Ability {
final Card result = getActivatingPlayer().playLandNoCheck(getHostCard());
// increase mayplay used
if (getMayPlay() != null) {
getMayPlay().incMayPlayTurn();
}
this.incMayPlayedThisTurn();
// if land isn't in battlefield try to reset the card state
if (result != null && !result.isInZone(ZoneType.Battlefield)) {
result.setState(CardStateName.Original, true);
@@ -90,23 +95,44 @@ public class LandAbility extends Ability {
sb.append(" (").append(getHostCard().getName(ObjectUtils.firstNonNull(getCardStateName(), CardStateName.Original))).append(")");
}
StaticAbility sta = getMayPlay();
if (sta != null) {
Card source = sta.getHostCard();
if (!source.equals(getHostCard())) {
sb.append(" by ");
if ((source.isEmblem() || source.getType().hasSubtype("Effect"))
&& source.getEffectSource() != null) {
sb.append(source.getEffectSource());
} else {
sb.append(source);
}
if (sta.hasParam("MayPlayText")) {
sb.append(" (").append(sta.getParam("MayPlayText")).append(")");
}
}
}
return sb.toString();
}
@Override
public Card getAlternateHost(Card source) {
boolean lkicheck = false;
// need to be done before so it works with Vivien and Zoetic Cavern
if (source.isFaceDown() && source.isInZone(ZoneType.Exile)) {
if (!source.isLKI()) {
source = CardUtil.getLKICopy(source);
}
source.forceTurnFaceUp();
lkicheck = true;
}
if (getCardState() != null && source.getCurrentStateName() != getCardStateName()) {
if (!source.isLKI()) {
source = CardUtil.getLKICopy(source);
}
CardStateName stateName = getCardState().getStateName();
if (!source.hasState(stateName)) {
source.addAlternateState(stateName, false);
source.getState(stateName).copyFrom(getHostCard().getState(stateName), true);
}
source.setState(stateName, false);
if (getHostCard().hasBackSide()) {
source.setBackSide(getHostCard().getRules().getSplitType().getChangedStateName().equals(stateName));
}
// need to reset CMC
source.setLKICMC(-1);
source.setLKICMC(source.getCMC());
lkicheck = true;
}
return lkicheck ? source : null;
}
}

View File

@@ -11,7 +11,6 @@ public enum OptionalCost {
Kicker2("Kicker"),
Retrace("Retrace"),
Jumpstart("Jump-start"),
AltCost(""),
Flash("Flash"), // used for Pay Extra for Flash
Generic("Generic"); // used by "Dragon Presence" and pseudo-kicker cards

View File

@@ -6,12 +6,12 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,19 +22,22 @@ import org.apache.commons.lang3.ObjectUtils;
import forge.card.CardStateName;
import forge.card.mana.ManaCost;
import forge.game.Game;
import forge.game.ability.AbilityUtils;
import forge.game.card.Card;
import forge.game.card.CardUtil;
import forge.game.cost.Cost;
import forge.game.cost.CostPayment;
import forge.game.player.Player;
import forge.game.staticability.StaticAbility;
import forge.game.staticability.StaticAbilityCantBeCast;
import forge.game.zone.ZoneType;
import forge.util.Expressions;
/**
* <p>
* Abstract Spell class.
* </p>
*
*
* @author Forge
* @version $Id$
*/
@@ -114,7 +117,24 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
/** {@inheritDoc} */
@Override
public boolean checkRestrictions(Card host, Player activator) {
return !StaticAbilityCantBeCast.cantBeCastAbility(this, host, activator);
if (StaticAbilityCantBeCast.cantBeCastAbility(this, host, activator)) {
return false;
}
// check if the selected may play effects are still valid when trying to cast the spell in case of cmc matters like Lurrus
for (StaticAbility stAb : getMayPlayList()) {
// Special Check if CMC is still valid
if (stAb.hasParam("CMC")) {
int y = host.getCMC();
int x = AbilityUtils.calculateAmount(stAb.getHostCard(), stAb.getParam("CMC"), stAb);
if (!Expressions.compare(y, stAb.getParam("CMC"), x)) {
return false;
}
}
}
return super.checkRestrictions(host, activator);
}
/** {@inheritDoc} */
@@ -148,6 +168,7 @@ public abstract class Spell extends SpellAbility implements java.io.Serializable
this.castFaceDown = faceDown;
}
@Override
public Card getAlternateHost(Card source) {
boolean lkicheck = false;

View File

@@ -156,7 +156,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
private SpellAbilityView view;
private StaticAbility mayPlay = null;
private List<StaticAbility> mayPlayList = Lists.newArrayList();
private CardCollection lastStateBattlefield = null;
private CardCollection lastStateGraveyard = null;
@@ -443,6 +443,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
public boolean isSpell() { return false; }
public boolean isAbility() { return true; }
public boolean isActivatedAbility() { return false; }
public boolean isLandAbility() { return false; }
public boolean isMorphUp() {
return this.hasParam("MorphUp");
@@ -936,13 +937,6 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
chapter = val;
}
public StaticAbility getMayPlay() {
return mayPlay;
}
public void setMayPlay(final StaticAbility sta) {
mayPlay = sta;
}
public boolean isAdventure() {
return this.getCardStateName() == CardStateName.Adventure;
}
@@ -998,6 +992,8 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
clone.targetChosen = getTargets().clone();
}
clone.mayPlayList = Lists.newArrayList(mayPlayList);
// clear maps for copy, the values will be added later
clone.additionalAbilities = Maps.newHashMap();
clone.additionalAbilityLists = Maps.newHashMap();
@@ -2281,4 +2277,60 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
}
rollbackEffects.clear();
}
public List<StaticAbility> getMayPlayList() {
return mayPlayList;
}
public void addMayPlay(StaticAbility stAb) {
mayPlayList.add(stAb);
}
public void incMayPlayedThisTurn() {
for (StaticAbility stAb : mayPlayList) {
stAb.incMayPlayTurn();
// Static May Play Abilities that uses
// If a spell cast this way would be put into your graveyard, exile it instead.
if (stAb.hasParam("ReplaceGraveyard")) {
GameActionUtil.createReplaceGraveyardEffect(getHostCard(), getActivatingPlayer(), stAb, stAb.getParam("ReplaceGraveyard"));
}
}
}
public boolean isIgnoreManaCostType() {
if (getHostCard().hasKeyword("May spend mana as though it were mana of any type to cast CARDNAME")) {
return true;
}
for (StaticAbility stAb : mayPlayList) {
if (stAb.hasParam("MayPlayIgnoreType")) {
return true;
}
}
return false;
}
public boolean isIgnoreManaCostColor() {
if (getHostCard().hasKeyword("May spend mana as though it were mana of any color to cast CARDNAME")) {
return true;
}
for (StaticAbility stAb : mayPlayList) {
if (stAb.hasParam("MayPlayIgnoreColor")) {
return true;
}
}
return false;
}
public boolean isIgnoreSnowSourceManaCostColor() {
for (StaticAbility stAb : mayPlayList) {
if (stAb.hasParam("MayPlaySnowIgnoreColor")) {
return true;
}
}
return false;
}
public Card getAlternateHost(Card source) {
return null;
}
}

View File

@@ -111,8 +111,6 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
if (value.equals("AllTargetsLegal")) {
this.setAllTargetsLegal(true);
}
if (value.equals("AltCost"))
this.altCostPaid = true;
if (value.equals("OptionalCost")) {
this.optionalCostPaid = true;
@@ -252,7 +250,6 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
if (this.kicked && !sa.isKicked()) return false;
if (this.kicked1 && !sa.isOptionalCostPaid(OptionalCost.Kicker1)) return false;
if (this.kicked2 && !sa.isOptionalCostPaid(OptionalCost.Kicker2)) return false;
if (this.altCostPaid && !sa.isOptionalCostPaid(OptionalCost.AltCost)) return false;
if (this.surgeCostPaid && !sa.isSurged()) return false;
if (this.foretold && !sa.isForetold()) return false;

View File

@@ -70,4 +70,13 @@ public final class SpellAbilityPredicates extends CardTraitPredicates {
}
};
}
public static Predicate<SpellAbility> isActivator(final Player player) {
return new Predicate<SpellAbility>() {
@Override
public boolean apply(final SpellAbility sa) {
return player.equals(sa.getActivatingPlayer());
}
};
}
}

View File

@@ -24,12 +24,12 @@ import forge.game.card.*;
import forge.game.cost.IndividualCostPaymentInstance;
import forge.game.phase.PhaseType;
import forge.game.player.Player;
import forge.game.staticability.StaticAbility;
import forge.game.staticability.StaticAbilityCastWithFlash;
import forge.game.zone.Zone;
import forge.game.zone.ZoneType;
import forge.util.Expressions;
import java.util.List;
import java.util.Map;
import com.google.common.collect.Sets;
@@ -187,27 +187,12 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
*/
public final boolean checkZoneRestrictions(final Card c, final SpellAbility sa) {
final Player activator = sa.getActivatingPlayer();
final Zone cardZone = c.getLastKnownZone();
Card cp = c;
// for Bestow need to check the animated State
if (sa.isSpell() && sa.isBestow()) {
// already bestowed or in battlefield, no need to check for spell
if (sa.isSpell() || sa.isLandAbility()) {
if (c.isInZone(ZoneType.Battlefield)) {
return false;
}
// if card is lki and bestowed, then do nothing there, it got already animated
if (!(c.isLKI() && c.isBestowed())) {
if (!c.isLKI()) {
cp = CardUtil.getLKICopy(c);
}
if (!cp.isBestowed()) {
cp.animateBestow(!cp.isLKI());
}
}
}
if (cardZone == null || this.getZone() == null || !cardZone.is(this.getZone())) {
@@ -218,60 +203,15 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
return true;
}
// Not a Spell, or on Battlefield, return false
if (!sa.isSpell() || (cardZone != null && ZoneType.Battlefield.equals(cardZone.getZoneType()))
if ((!sa.isSpell() && !sa.isLandAbility()) || (cardZone != null && cardZone.is(ZoneType.Battlefield))
|| (this.getZone() != null && !this.getZone().equals(ZoneType.Hand))) {
return false;
}
if (cardZone != null && cardZone.is(ZoneType.Stack)) {
return false;
}
if (sa.isSpell()) {
final CardPlayOption o = c.mayPlay(sa.getMayPlay());
if (o == null) {
return this.getZone() == null || (cardZone != null && cardZone.is(this.getZone()));
} else if (o.getPlayer() == activator) {
Map<String,String> params = sa.getMayPlay().getMapParams();
// NOTE: this assumes that it's always possible to cast cards from hand and you don't
// need special permissions for that. If WotC ever prints a card that forbids casting
// cards from hand, this may become relevant.
if (!o.grantsZonePermissions() && cardZone != null && !cardZone.is(ZoneType.Hand)) {
final List<CardPlayOption> opts = c.mayPlay(activator);
boolean hasOtherGrantor = false;
for (CardPlayOption opt : opts) {
if (opt.grantsZonePermissions()) {
hasOtherGrantor = true;
break;
}
}
if (cardZone.is(ZoneType.Graveyard) && sa.isAftermath()) {
// Special exclusion for Aftermath, useful for e.g. As Foretold
return true;
}
if (!hasOtherGrantor) {
return false;
}
}
if (params.containsKey("Affected")) {
if (!cp.isValid(params.get("Affected").split(","), activator, o.getHost(), null)) {
return false;
}
}
if (params.containsKey("ValidSA")) {
if (!sa.isValid(params.get("ValidSA").split(","), activator, o.getHost(), null)) {
return false;
}
}
// TODO: this is an exception for Aftermath. Needs to be somehow generalized.
if (this.getZone() != ZoneType.Graveyard && sa.isAftermath() && sa.getCardState() != null) {
return false;
}
return true;
}
if (sa.isSpell() || sa.isLandAbility()) {
return this.getZone() == null || (cardZone != null && cardZone.is(this.getZone()));
}
return false;
}
@@ -322,16 +262,8 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
public final boolean checkActivatorRestrictions(final Card c, final SpellAbility sa) {
Player activator = sa.getActivatingPlayer();
if (sa.isSpell()) {
// Spells should always default to "controller" but use mayPlay check.
final CardPlayOption o = c.mayPlay(sa.getMayPlay());
if (o != null && o.getPlayer() == activator) {
return true;
}
}
String validPlayer = this.getActivator();
return activator.isValid(validPlayer, c.getController(), c, sa);
return validPlayer == null || activator.isValid(validPlayer, c.getController(), c, sa);
}
public final boolean checkOtherRestrictions(final Card c, final SpellAbility sa, final Player activator) {
@@ -520,6 +452,20 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
}
}
for (StaticAbility stAb : sa.getMayPlayList()) {
if (stAb.hasParam("ValidCard")) {
if (!c.isValid(stAb.getParam("ValidCard").split(","), activator, stAb.getHostCard(), null)) {
return false;
}
}
if (stAb.hasParam("ValidSA")) {
if (!sa.isValid(stAb.getParam("ValidSA").split(","), activator, stAb.getHostCard(), null)) {
return false;
}
}
}
return true;
}

View File

@@ -401,7 +401,6 @@ public class SpellAbilityVariables implements Cloneable {
protected boolean kicked = false;
protected boolean kicked1 = false; // http://magiccards.info/query?q=o%3A%22kicker%22+not+o%3A%22multikicker%22+o%3A%22and%2For+{%22
protected boolean kicked2 = false; // Some spells have 2 kickers with different effects
protected boolean altCostPaid = false;
protected boolean optionalCostPaid = false; // Undergrowth other Pseudo-kickers
protected boolean optionalBoolean = true; // Just in case you need to check if something wasn't kicked, etc
protected boolean surgeCostPaid = false;

View File

@@ -59,7 +59,6 @@ public class StackItemView extends TrackableObject implements IHasCardView {
boolean retraced = false;
boolean jumpstart = false;
boolean additional = false;
boolean alternate = false;
boolean generic = false;
for (OptionalCost cost : si.getSpellAbility(false).getOptionalCosts()) {
@@ -77,23 +76,21 @@ public class StackItemView extends TrackableObject implements IHasCardView {
additional = true;
if (cost == OptionalCost.Generic)
generic = true;
if (cost == OptionalCost.AltCost)
alternate = true;
}
if (!alternate) {
if (kicked && !generic)
OptionalCostString += "Kicked";
if (entwined)
OptionalCostString += OptionalCostString.equals("") ? "Entwined" : ", Entwined";
if (buyback)
OptionalCostString += OptionalCostString.equals("") ? "Buyback" : ", Buyback";
if (retraced)
OptionalCostString += OptionalCostString.equals("") ? "Retraced" : ", Retraced";
if (jumpstart)
OptionalCostString += OptionalCostString.equals("") ? "Jumpstart" : ", Jumpstart";
if (additional || generic)
OptionalCostString += OptionalCostString.equals("") ? "Additional" : ", Additional";
}
if (kicked && !generic)
OptionalCostString += "Kicked";
if (entwined)
OptionalCostString += OptionalCostString.equals("") ? "Entwined" : ", Entwined";
if (buyback)
OptionalCostString += OptionalCostString.equals("") ? "Buyback" : ", Buyback";
if (retraced)
OptionalCostString += OptionalCostString.equals("") ? "Retraced" : ", Retraced";
if (jumpstart)
OptionalCostString += OptionalCostString.equals("") ? "Jumpstart" : ", Jumpstart";
if (additional || generic)
OptionalCostString += OptionalCostString.equals("") ? "Additional" : ", Additional";
set(TrackableProperty.OptionalCosts, OptionalCostString);
}

View File

@@ -63,7 +63,6 @@ public class StaticAbility extends CardTraitBase implements IIdentifiable, Clone
private Set<StaticAbilityLayer> layers;
private CardCollectionView ignoreEffectCards = new CardCollection();
private final List<Player> ignoreEffectPlayers = Lists.newArrayList();
private int mayPlayTurn = 0;
@Override
public final int getId() {
@@ -618,6 +617,12 @@ public class StaticAbility extends CardTraitBase implements IIdentifiable, Clone
}
}
if (hasParam("MayPlayTurnLimit")) {
if (this.getMayPlayTurn() >= AbilityUtils.calculateAmount(hostCard, getParam("MayPlayTurnLimit"), this)) {
return false;
}
}
if (hasParam("CheckSVar")) {
final int sVar = AbilityUtils.calculateAmount(this.hostCard, getParam("CheckSVar"), this);
String comparator = "GE1";
@@ -725,15 +730,11 @@ public class StaticAbility extends CardTraitBase implements IIdentifiable, Clone
public int getMayPlayTurn() {
return mayPlayTurn;
return getHostCard().getMayPlayThisTurn(this);
}
public void incMayPlayTurn() {
this.mayPlayTurn++;
}
public void resetMayPlayTurn() {
this.mayPlayTurn = 0;
getHostCard().incMayPlayThisTurn(this);
}
@Override

View File

@@ -0,0 +1,209 @@
package forge.game.staticability;
import java.util.List;
import com.google.common.collect.Lists;
import forge.game.Game;
import forge.game.ability.AbilityUtils;
import forge.game.card.Card;
import forge.game.card.CardCollection;
import forge.game.cost.Cost;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
public class StaticAbilityAlternativeCost {
static String AlternativeCost = "AlternativeCost";
static String AlternativeZone = "AlternativeZone";
public static List<SpellAbility> getAlternativeCostAndZones(final SpellAbility spell, final Card card, final Player activator) {
List<SpellAbility> result = Lists.newArrayList();
if (!spell.isSpell() && !spell.isLandAbility()) {
return result;
}
result.addAll(getAlternativeZones(spell, card, activator));
for (SpellAbility sp : getAlternativeCost(spell, card, activator)) {
result.add(sp);
result.addAll(getAlternativeZones(sp, card, activator));
}
return result;
}
public static List<SpellAbility> getAlternativeCost(final SpellAbility spell, final Card card, final Player activator) {
List<SpellAbility> result = Lists.newArrayList();
if (!spell.isSpell() && !spell.isLandAbility()) {
return result;
}
final Game game = activator.getGame();
final CardCollection allp = new CardCollection(game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES));
allp.add(card);
for (final Card ca : allp) {
for (final StaticAbility stAb : ca.getStaticAbilities()) {
if (!stAb.getParam("Mode").equals(AlternativeCost) || stAb.isSuppressed() || !stAb.checkConditions()) {
continue;
}
SpellAbility alt = applyAlternativeCost(stAb, spell, card, activator);
if (alt != null) {
result.add(alt);
}
}
}
return result;
}
public static List<SpellAbility> getAlternativeZones(final SpellAbility spell, final Card card, final Player activator) {
List<SpellAbility> result = Lists.newArrayList();
if (!spell.isSpell() && !spell.isLandAbility()) {
return result;
}
final Game game = activator.getGame();
final CardCollection allp = new CardCollection(game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES));
allp.add(card);
for (final Card ca : allp) {
for (final StaticAbility stAb : ca.getStaticAbilities()) {
if (!stAb.getParam("Mode").equals(AlternativeZone) || stAb.isSuppressed() || !stAb.checkConditions()) {
continue;
}
SpellAbility alt = applyAlternativeCost(stAb, spell, card, activator);
if (alt != null) {
result.add(alt);
}
}
}
return result;
}
public static SpellAbility applyAlternativeCost(final StaticAbility stAb, final SpellAbility spell, final Card card, final Player activator) {
final Card hostCard = stAb.getHostCard();
if (stAb.hasParam("ValidCard")
&& !card.isValid(stAb.getParam("ValidCard").split(","), hostCard.getController(), hostCard, null)) {
return null;
}
if (stAb.hasParam("Caster") && (activator != null)
&& !activator.isValid(stAb.getParam("Caster"), hostCard.getController(), hostCard, null)) {
return null;
}
if (stAb.hasParam("ValidSA")
&& !spell.isValid(stAb.getParam("ValidSA").split(","), hostCard.getController(), hostCard, null)) {
return null;
}
if (stAb.hasParam("Origin")) {
List<ZoneType> src = ZoneType.listValueOf(stAb.getParam("Origin"));
if (!src.contains(card.getLastKnownZone().getZoneType())) {
return null;
}
}
final SpellAbility newSA = spell.copy(card, activator, false);
newSA.setBasicSpell(false);
// if Origin flag is set, skip zone check in spellRestrictions
if (stAb.hasParam("Origin")) {
newSA.getRestrictions().setZone(null);
}
// Activator already checked with Caster, bypass restrictions
if (stAb.hasParam("Caster")) {
newSA.getRestrictions().setActivator(null);
}
if (stAb.hasParam("MayPlayWithFlash")) {
newSA.getRestrictions().setInstantSpeed(true);
}
if (stAb.hasParam("Cost") && !spell.isLandAbility()) {
String costStr = stAb.getParam("Cost");
// this is for Kentaro, the Smiling Cat, assuming there is no Samurai with X in its mana cost
if (costStr.equals("ConvertedManaCost")) {
costStr = Integer.toString(card.getCMC());
}
final Cost cost = new Cost(costStr, false).add(spell.getPayCosts().copyWithNoMana());
newSA.setPayCosts(cost);
newSA.setDescription(spell.getDescription() + " (by paying " + cost.toSimpleString() + " instead of its mana cost)");
}
if (stAb.hasParam("WithCountersType")) {
newSA.putParam("WithCountersType", stAb.getParam("WithCountersType"));
newSA.putParam("WithCountersAmount", stAb.getParamOrDefault("WithCountersAmount", "1"));
}
// Add this Static Ability to the ones used to play the spell
newSA.addMayPlay(stAb);
return newSA;
}
public static SpellAbility applyAlternativeZone(final StaticAbility stAb, final SpellAbility spell, final Card card, final Player activator) {
final Card hostCard = stAb.getHostCard();
// zone check already overwritten
if (spell.getRestrictions().getZone() == null) {
return null;
}
if (stAb.hasParam("ValidCard")
&& !card.isValid(stAb.getParam("ValidCard").split(","), hostCard.getController(), hostCard, null)) {
return null;
}
if (stAb.hasParam("Caster") && (activator != null)
&& !activator.isValid(stAb.getParam("Caster"), hostCard.getController(), hostCard, null)) {
return null;
}
if (stAb.hasParam("ValidSA")
&& !spell.isValid(stAb.getParam("ValidSA").split(","), hostCard.getController(), hostCard, null)) {
return null;
}
if (stAb.hasParam("Origin")) {
List<ZoneType> src = ZoneType.listValueOf(stAb.getParam("Origin"));
if (!src.contains(card.getLastKnownZone().getZoneType())) {
return null;
}
}
final SpellAbility newSA = spell.copy(card, activator, false);
newSA.setBasicSpell(false);
// if Origin flag is set, skip zone check in spellRestrictions
if (stAb.hasParam("Origin")) {
newSA.getRestrictions().setZone(null);
}
// Activator already checked with Caster, bypass restrictions
if (stAb.hasParam("Caster")) {
newSA.getRestrictions().setActivator(null);
}
if (stAb.hasParam("MayPlayWithFlash")) {
newSA.getRestrictions().setInstantSpeed(true);
}
if (stAb.hasParam("ExtraCost")) {
String costStr = stAb.getParam("ExtraCost");
if (stAb.hasSVar(costStr)) {
costStr = Integer.toString(AbilityUtils.calculateAmount(hostCard, costStr, stAb));
}
Cost cost = new Cost(costStr, false);
newSA.getPayCosts().add(cost);
newSA.setDescription(spell.getDescription() + " (by paying " + cost.toSimpleString() + " extra)");
}
if (stAb.hasParam("WithCountersType")) {
newSA.putParam("WithCountersType", stAb.getParam("WithCountersType"));
newSA.putParam("WithCountersAmount", stAb.getParamOrDefault("WithCountersAmount", "1"));
}
// Add this Static Ability to the ones used to play the spell
newSA.addMayPlay(stAb);
return newSA;
}
}

View File

@@ -100,7 +100,6 @@ public final class StaticAbilityContinuous {
final StaticEffect se = game.getStaticEffects().getStaticEffect(stAb);
se.setAffectedCards(affectedCards);
se.setAffectedPlayers(affectedPlayers);
se.setParams(params);
se.setTimestamp(hostCard.getTimestamp());
String changeColorWordsTo = null;
@@ -142,11 +141,6 @@ public final class StaticAbilityContinuous {
List<Player> mayLookAt = null;
boolean controllerMayPlay = false, mayPlayWithoutManaCost = false, mayPlayWithFlash = false;
String mayPlayAltManaCost = null;
boolean mayPlayGrantZonePermissions = true;
Integer mayPlayLimit = null;
//Global rules changes
if (layer == StaticAbilityLayer.RULES && params.containsKey("GlobalRule")) {
final StaticEffects effects = game.getStaticEffects();
@@ -493,23 +487,6 @@ public final class StaticAbilityContinuous {
}
mayLookAt = AbilityUtils.getDefinedPlayers(hostCard, look, null);
}
if (params.containsKey("MayPlay")) {
controllerMayPlay = true;
if (params.containsKey("MayPlayWithoutManaCost")) {
mayPlayWithoutManaCost = true;
} else if (params.containsKey("MayPlayAltManaCost")) {
mayPlayAltManaCost = params.get("MayPlayAltManaCost");
}
if (params.containsKey("MayPlayWithFlash")) {
mayPlayWithFlash = true;
}
if (params.containsKey("MayPlayLimit")) {
mayPlayLimit = Integer.parseInt(params.get("MayPlayLimit"));
}
if (params.containsKey("MayPlayDontGrantZonePermissions")) {
mayPlayGrantZonePermissions = false;
}
}
if (params.containsKey("IgnoreEffectCost")) {
String cost = params.get("IgnoreEffectCost");
@@ -851,20 +828,6 @@ public final class StaticAbilityContinuous {
if (mayLookAt != null) {
affectedCard.addMayLookAt(se.getTimestamp(), mayLookAt);
}
if (controllerMayPlay && (mayPlayLimit == null || stAb.getMayPlayTurn() < mayPlayLimit)) {
String mayPlayAltCost = mayPlayAltManaCost;
if (mayPlayAltCost != null && mayPlayAltCost.contains("ConvertedManaCost")) {
final String costcmc = Integer.toString(affectedCard.getCMC());
mayPlayAltCost = mayPlayAltCost.replace("ConvertedManaCost", costcmc);
}
Player mayPlayController = params.containsKey("MayPlayCardOwner") ? affectedCard.getOwner() : controller;
affectedCard.setMayPlay(mayPlayController, mayPlayWithoutManaCost,
mayPlayAltCost != null ? new Cost(mayPlayAltCost, false) : null,
mayPlayWithFlash, mayPlayGrantZonePermissions, stAb);
}
}
return affectedCards;

View File

@@ -30,7 +30,6 @@ import forge.game.card.CardState;
import forge.game.phase.PhaseHandler;
import forge.game.phase.PhaseType;
import forge.game.player.Player;
import forge.game.spellability.OptionalCost;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
@@ -353,11 +352,7 @@ public abstract class Trigger extends TriggerReplacementBase {
}
String condition = getParam("Condition");
if ("AltCost".equals(condition)) {
final Card moved = (Card) runParams.get(AbilityKey.Card);
if( null != moved && !moved.isOptionalCostPaid(OptionalCost.AltCost))
return false;
} else if ("AttackedPlayerWithMostLife".equals(condition)) {
if ("AttackedPlayerWithMostLife".equals(condition)) {
GameEntity attacked = (GameEntity) runParams.get(AbilityKey.Attacked);
if (attacked == null) {
// Check "Defender" too because once triggering objects are set on TriggerAttacks, the value of Attacked

View File

@@ -407,8 +407,8 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
System.out.println(sp.getHostCard().getName() + " - activatingPlayer not set before adding to stack.");
}
if (sp.isSpell() && sp.getMayPlay() != null) {
sp.getMayPlay().incMayPlayTurn();
if (sp.isSpell()) {
sp.incMayPlayedThisTurn();
}
final SpellAbilityStackInstance si = new SpellAbilityStackInstance(sp);

View File

@@ -43,7 +43,7 @@ public class PlayerZone extends Zone {
return new Predicate<Card>() {
@Override
public boolean apply(final Card c) {
return !c.mayPlay(who).isEmpty() || c.mayPlayerLook(who);
return !c.getAllPossibleAbilities(who, true).isEmpty() || c.mayPlayerLook(who);
}
};
}
@@ -55,7 +55,7 @@ public class PlayerZone extends Zone {
return true;
}
if (c.isLand() && (!c.mayPlay(c.getController()).isEmpty())) {
if (!c.getAllPossibleAbilities(c.getController(), true).isEmpty()) {
return true;
}
@@ -65,11 +65,6 @@ public class PlayerZone extends Zone {
for (final SpellAbility sa : c.getSpellAbilities()) {
final ZoneType restrictZone = sa.getRestrictions().getZone();
// for mayPlay the restrictZone is null for reasons
if (sa.isSpell() && c.mayPlay(sa.getMayPlay()) != null) {
return true;
}
if (PlayerZone.this.is(restrictZone)) {
return true;
}

View File

@@ -78,7 +78,7 @@ public class SpellAbilityPickerTest extends SimulationTestCase {
Plan plan = picker.getPlan();
assertEquals(2, plan.getDecisions().size());
assertEquals("Play land Mountain", plan.getDecisions().get(0).saRef.toString());
assertEquals("Play land", plan.getDecisions().get(0).saRef.toString());
assertEquals("Shock deals 2 damage to any target.", plan.getDecisions().get(1).saRef.toString());
assertTrue(plan.getDecisions().get(1).targets.toString().contains("Runeclaw Bear"));
}
@@ -265,7 +265,7 @@ public class SpellAbilityPickerTest extends SimulationTestCase {
assertEquals(abbot.getSpellAbilities().get(0), sa);
Plan plan = picker.getPlan();
assertEquals(3, plan.getDecisions().size());
assertEquals("Play land Mountain", plan.getDecisions().get(1).saRef.toString());
assertEquals("Play land", plan.getDecisions().get(1).saRef.toString());
assertEquals("Lightning Bolt deals 3 damage to any target.", plan.getDecisions().get(2).saRef.toString());
}

View File

@@ -1,10 +1,9 @@
Name:Abandoned Sarcophagus
ManaCost:3
Types:Artifact
S:Mode$ Continuous | Affected$ Card.nonLand+YouOwn+withCycling,Card.nonLand+YouOwn+withTypeCycling | MayPlay$ True | AffectedZone$ Graveyard | Description$ You may cast spells that have a cycling ability from your graveyard.
S:Mode$ AlternativeZone | ValidCard$ Card.nonLand+YouOwn+withCycling,Card.nonLand+YouOwn+withTypeCycling | Origin$ Graveyard | Description$ You may cast spells that have a cycling ability from your graveyard.
R:Event$ Moved | ValidCard$ Card.YouOwn+withCycling,Card.YouOwn+withTypeCycling | Destination$ Graveyard | Cycling$ False | ReplaceWith$ Exile | ActiveZones$ Battlefield | Description$ If a card that has a cycling ability would be put into your graveyard from anywhere and it wasn't cycled, exile it instead.
SVar:Exile:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Exile | Defined$ ReplacedCard
#TODO: Add Ability$Cycling to Cycling cards for the purpose of this and other similar cards for deck hints
AI:RemoveDeck:Random
SVar:Picture:http://www.wizards.com/global/images/magic/general/abandoned_sarcophagus.jpg
Oracle:You may cast spells that have a cycling ability from your graveyard.\nIf a card that has a cycling ability would be put into your graveyard from anywhere and it wasn't cycled, exile it instead.

View File

@@ -5,8 +5,8 @@ PT:2/1
K:Prowess
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile the top card of your library. Until end of turn, you may play that card.
SVar:TrigExile:DB$ Dig | Defined$ You | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ Play | SubAbility$ DBCleanup | ExileOnMoved$ Exile
SVar:Play:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play remembered card.
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ STMayPlay | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Exile | Description$ You may play remembered card.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:PlayMain1:ALWAYS
Oracle:Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.)\nWhen Abbot of Keral Keep enters the battlefield, exile the top card of your library. Until end of turn, you may play that card.

View File

@@ -1,7 +1,6 @@
Name:Abolish
ManaCost:1 W W
Types:Instant
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ Discard<1/Plains> | Description$ You may discard a Plains card rather than pay this spell's mana cost.
A:SP$ Destroy | Cost$ 1 W W | ValidTgts$ Artifact,Enchantment | TgtPrompt$ Select target artifact or enchantment | SpellDescription$ Destroy target artifact or enchantment.
SVar:AltCost:Cost$ Discard<1/Plains>
SVar:Picture:http://www.wizards.com/global/images/magic/general/abolish.jpg
Oracle:You may discard a Plains card rather than pay this spell's mana cost.\nDestroy target artifact or enchantment.

View File

@@ -2,8 +2,8 @@ Name:Act on Impulse
ManaCost:2 R
Types:Sorcery
A:SP$ Dig | Cost$ 2 R | Defined$ You | DigNum$ 3 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect | SpellDescription$ Exile the top three cards of your library. Until end of turn, you may play cards exiled this way.
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ Play | SubAbility$ DBCleanup | ForgetOnMoved$ Exile
SVar:Play:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play remembered card.
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ STMayPlay | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Exile | Description$ You may play remembered card.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
AI:RemoveDeck:All
Oracle:Exile the top three cards of your library. Until end of turn, you may play cards exiled this way. (If you cast a spell this way, you still pay its costs. You can play a land this way only if you have an available land play remaining.)

View File

@@ -1,7 +1,7 @@
Name:Admiral's Order
ManaCost:1 U U
Types:Instant
SVar:AltCost:Cost$ U | CheckSVar$ X | Description$ Raid — If you attacked this turn, you may pay {U} rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ U | CheckSVar$ X | Description$ Raid — If you attacked this turn, you may pay {U} rather than pay this spell's mana cost.
A:SP$ Counter | Cost$ 1 U U | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | SpellDescription$ Counter target spell.
SVar:X:Count$AttackersDeclared
Oracle:Raid — If you attacked this turn, you may pay {U} rather than pay this spell's mana cost.\nCounter target spell.

View File

@@ -4,8 +4,7 @@ Types:Creature Human Soldier
PT:4/3
K:Flying
A:AB$ Dig | Cost$ 1 U U | Defined$ You | DigNum$ 1 | Destination$ Exile | RememberChanged$ True | SubAbility$ DBEffect | AILogic$ ExileAndPlayUntilEOT | SpellDescription$ Exile the top card of your library. Until end of turn, you may play that card. (Reveal the card as you exile it.)
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ Play | SubAbility$ DBCleanup | ExileOnMoved$ Exile
SVar:Play:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play remembered card.
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ STMayPlay | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Exile | Description$ You may play remembered card.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/aerial_caravan.jpg
Oracle:Flying\n{1}{U}{U}: Exile the top card of your library. Until end of turn, you may play that card. (Reveal the card as you exile it.)

View File

@@ -4,5 +4,5 @@ Types:Creature Elf Warrior
PT:1+*/1+*
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Description$ CARDNAME's power and toughness are each equal to 1 plus the number of lands you control.
SVar:X:Count$Valid Land.YouCtrl/Plus.1
SVar:AltCost:Cost$ ExileFromHand<2/Card.Green> | Description$ You may exile two green cards from your hand rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ ExileFromHand<2/Card.Green> | Description$ You may exile two green cards from your hand rather than pay this spell's mana cost.
Oracle:You may exile two green cards from your hand rather than pay this spell's mana cost.\nAllosaurus Rider's power and toughness are each equal to 1 plus the number of lands you control.

View File

@@ -1,8 +1,7 @@
Name:Aluren
ManaCost:2 G G
Types:Enchantment
S:Mode$ Continuous | Affected$ Creature.cmcLE3+nonToken | MayPlay$ True | MayPlayCardOwner$ True | MayPlayWithoutManaCost$ True | MayPlayWithFlash$ True | MayPlayDontGrantZonePermissions$ True | AffectedZone$ Hand,Graveyard,Library,Exile | Description$ Any player may cast creature spells with converted mana cost 3 or less without paying their mana costs and as though they had flash.
S:Mode$ AlternativeCost | ValidCard$ Creature.nonLand+cmcLE3 | Cost$ 0 | MayPlayWithFlash$ True | Description$ Any player may cast creature spells with converted mana cost 3 or less without paying their mana costs and as though they had flash.
SVar:NonStackingEffect:True
AI:RemoveDeck:Random
SVar:Picture:http://www.wizards.com/global/images/magic/general/aluren.jpg
Oracle:Any player may cast creature spells with converted mana cost 3 or less without paying their mana costs and as though they had flash.

View File

@@ -6,12 +6,12 @@ SVar:DBChooseLand:DB$ ChooseCard | Defined$ You | Choices$ Land.IsRemembered | M
SVar:DBChangeZone:DB$ ChangeZone | Optional$ True | Defined$ ChosenCard | Origin$ Exile | Destination$ Battlefield | ChangeNum$ 1 | ForgetChanged$ True | SubAbility$ DBCleanupChosen
SVar:DBCleanupChosen:DB$ Cleanup | ClearChosenCard$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$Effect | RememberObjects$ RememberedCard | StaticAbilities$ PlayCr,PlayPl,PlayAr,PlayEn,PlayIn,PlaySo,PlayTr | SubAbility$ DBCleanup | ForgetOnMoved$ Exile
SVar:PlayCr:Mode$ Continuous | Affected$ Creature.YouCtrl+IsRemembered | MayPlay$ True | MayPlayWithoutManaCost$ True | MayPlayLimit$ 1 | MayPlayText$ Creature | EffectZone$ Command | AffectedZone$ Exile
SVar:PlayPl:Mode$ Continuous | Affected$ Planeswalker.YouCtrl+IsRemembered | MayPlay$ True | MayPlayWithoutManaCost$ True | MayPlayLimit$ 1 | MayPlayText$ Planeswalker | EffectZone$ Command | AffectedZone$ Exile
SVar:PlayAr:Mode$ Continuous | Affected$ Artifact.YouCtrl+IsRemembered | MayPlay$ True | MayPlayWithoutManaCost$ True | MayPlayLimit$ 1 | MayPlayText$ Artifact | EffectZone$ Command | AffectedZone$ Exile
SVar:PlayEn:Mode$ Continuous | Affected$ Enchantment.YouCtrl+IsRemembered | MayPlay$ True | MayPlayWithoutManaCost$ True | MayPlayLimit$ 1 | MayPlayText$ Enchantment | EffectZone$ Command | AffectedZone$ Exile
SVar:PlayIn:Mode$ Continuous | Affected$ Instant.YouCtrl+IsRemembered | MayPlay$ True | MayPlayWithoutManaCost$ True | MayPlayLimit$ 1 | MayPlayText$ Instant | EffectZone$ Command | AffectedZone$ Exile
SVar:PlaySo:Mode$ Continuous | Affected$ Sorcery.YouCtrl+IsRemembered | MayPlay$ True | MayPlayWithoutManaCost$ True | MayPlayLimit$ 1 | MayPlayText$ Sorcery | EffectZone$ Command | AffectedZone$ Exile
SVar:PlayTr:Mode$ Continuous | Affected$ Tribal.YouCtrl+IsRemembered | MayPlay$ True | MayPlayWithoutManaCost$ True | MayPlayLimit$ 1 | MayPlayText$ Tribal | EffectZone$ Command | AffectedZone$ Exile
SVar:PlayCr:Mode$ AlternativeCost | ValidCard$ Creature.IsRemembered+YouOwn+nonLand | Caster$ You | Origin$ Exile | Cost$ 0 | MayPlayTurnLimit$ 1 | MayPlayText$ Creature
SVar:PlayPl:Mode$ AlternativeCost | ValidCard$ Planeswalker.IsRemembered+YouOwn+nonLand | Caster$ You | Origin$ Exile | Cost$ 0 | MayPlayTurnLimit$ 1 | MayPlayText$ Planeswalker
SVar:PlayAr:Mode$ AlternativeCost | ValidCard$ Artifact.IsRemembered+YouOwn+nonLand | Caster$ You | Origin$ Exile | Cost$ 0 | MayPlayTurnLimit$ 1 | MayPlayText$ Artifact
SVar:PlayEn:Mode$ AlternativeCost | ValidCard$ Enchantment.IsRemembered+YouOwn+nonLand | Caster$ You | Origin$ Exile | Cost$ 0 | MayPlayTurnLimit$ 1 | MayPlayText$ Enchantment
SVar:PlayIn:Mode$ AlternativeCost | ValidCard$ Instant.IsRemembered+YouOwn+nonLand | Caster$ You | Origin$ Exile | Cost$ 0 | MayPlayTurnLimit$ 1 | MayPlayText$ Instant
SVar:PlaySo:Mode$ AlternativeCost | ValidCard$ Sorcery.IsRemembered+YouOwn+nonLand | Caster$ You | Origin$ Exile | Cost$ 0 | MayPlayTurnLimit$ 1 | MayPlayText$ Sorcery
SVar:PlayTr:Mode$ AlternativeCost | ValidCard$ Tribal.IsRemembered+YouOwn+nonLand | Caster$ You | Origin$ Exile | Cost$ 0 | MayPlayTurnLimit$ 1 | MayPlayText$ Tribal
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
Oracle:Exile the top eight cards of your library. You may put a land card from among them onto the battlefield. Until end of turn, for each nonland card type, you may cast a spell of that type from among the exiled cards without paying its mana cost.

View File

@@ -3,6 +3,6 @@ ManaCost:4 G G
Types:Creature Elemental
PT:5/7
K:Reach
S:Mode$ Continuous | Affected$ Land.YouCtrl | MayPlay$ True | AffectedZone$ Graveyard | Description$ You may play lands from your graveyard.
S:Mode$ AlternativeZone | ValidCard$ Land.YouOwn | Caster$ You | Origin$ Graveyard | Description$ Description$ You may play lands from your graveyard.
K:Panharmonicon:Land:If a land entering the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.
Oracle:Reach\nYou may play lands from your graveyard.\nIf a land entering the battlefield causes a triggered ability of a permanent you control to trigger, that ability triggers an additional time.

View File

@@ -1,7 +1,7 @@
Name:Angelic Favor
ManaCost:3 W
Types:Instant
SVar:AltCost:Cost$ tapXType<1/Creature> | IsPresent$ Plains.YouCtrl | Description$ If you control a Plains, you may tap an untapped creature you control rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ tapXType<1/Creature> | IsPresent$ Plains.YouCtrl | Description$ If you control a Plains, you may tap an untapped creature you control rather than pay this spell's mana cost.
A:SP$ Token | Cost$ 3 W | TokenScript$ w_4_4_angel_flying | AtEOT$ Exile | ActivationPhases$ BeginCombat->EndCombat | StackDescription$ {p:You} creates a 4/4 white Angel creature token with flying. Exile it at the beginning of the next end step. | SpellDescription$ Cast this spell only during combat. Create a 4/4 white Angel creature token with flying. Exile it at the beginning of the next end step.
DeckHas:Ability$Token
AI:RemoveDeck:All

View File

@@ -2,8 +2,8 @@ Name:Apex of Power
ManaCost:7 R R R
Types:Sorcery
A:SP$ Dig | Cost$ 7 R R R | DestinationZone$ Exile | DigNum$ 7 | ChangeNum$ All | RememberChanged$ True | SubAbility$ DBEffect | SpellDescription$ Exile the top seven cards from your library. Until end of turn, you may cast nonland cards exiled this way. If this spell was cast from your hand, add ten mana of any one color.
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ EffSModeContinuous | SubAbility$ DBCleanup | ForgetOnMoved$ Exile
SVar:EffSModeContinuous:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.nonLand+IsRemembered | AffectedZone$ Exile | Description$ You may cast nonland cards exiled this way.
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ STMayPlay | SubAbility$ DBCleanup | ForgetOnMoved$ Exile
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered+nonLand | Caster$ You | Origin$ Exile | Description$ You may cast spells from among them.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBMana
SVar:DBMana:DB$ Mana | Produced$ Any | Amount$ 10 | ConditionDefined$ Self | ConditionPresent$ Card.wasCastFromHand | ConditionCompare$ EQ1 | AILogic$ ManaRitual | AINoRecursiveCheck$ True
Oracle:Exile the top seven cards of your library. Until end of turn, you may cast spells from among them.\nIf this spell was cast from your hand, add ten mana of any one color.

View File

@@ -1,7 +1,7 @@
Name:Archive Trap
ManaCost:3 U U
Types:Instant Trap
SVar:AltCost:Cost$ 0 | CheckSVar$ TrapTrigger | Description$ If an opponent searched their library this turn, you may pay {0} rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ 0 | CheckSVar$ TrapTrigger | Description$ If an opponent searched their library this turn, you may pay {0} rather than pay this spell's mana cost.
A:SP$ Mill | Cost$ 3 U U | NumCards$ 13 | ValidTgts$ Opponent | TgtPrompt$ Choose an opponent | SpellDescription$ Target opponent mills thirteen cards.
SVar:TrapTrigger:Count$SearchedLibrary.Opponent
Oracle:If an opponent searched their library this turn, you may pay {0} rather than pay this spell's mana cost.\nTarget opponent mills thirteen cards.

View File

@@ -1,6 +1,6 @@
Name:Arrow Volley Trap
ManaCost:3 W W
Types:Instant Trap
SVar:AltCost:Cost$ 1 W | IsPresent$ Creature.attacking | PresentCompare$ GE4 | Description$ If four or more creatures are attacking, you may pay {1}{W} rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ 1 W | IsPresent$ Creature.attacking | PresentCompare$ GE4 | Description$ If four or more creatures are attacking, you may pay {1}{W} rather than pay this spell's mana cost.
A:SP$ DealDamage | Cost$ 3 W W | ValidTgts$ Creature.attacking | TgtPrompt$ Select target attacking creature to distribute damage to | NumDmg$ 5 | TargetMin$ 1 | TargetMax$ 5 | DividedAsYouChoose$ 5 | SpellDescription$ CARDNAME deals 5 damage divided as you choose among any number of target attacking creatures.
Oracle:If four or more creatures are attacking, you may pay {1}{W} rather than pay this spell's mana cost.\nArrow Volley Trap deals 5 damage divided as you choose among any number of target attacking creatures.

View File

@@ -3,7 +3,6 @@ ManaCost:2 U
Types:Enchantment
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a time counter on CARDNAME.
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ TIME | CounterNum$ 1
S:Mode$ Continuous | MayPlay$ True | MayPlayAltManaCost$ 0 | MayPlayLimit$ 1 | MayPlayDontGrantZonePermissions$ True | Affected$ Card.YouCtrl+nonLand+cmcLEX | AffectedZone$ Hand,Graveyard,Library,Exile,Command | Description$ Once each turn, you may pay {0} rather than pay the mana cost for a spell you cast with converted mana cost X or less, where X is the number of time counters on CARDNAME.
S:Mode$ AlternativeCost | ValidCard$ Card.nonLand+cmcLEX | References$ X | Caster$ You | Cost$ 0 | MayPlayTurnLimit$ 1 | Description$ Once each turn, you may pay {0} rather than pay the mana cost for a spell you cast with converted mana cost X or less, where X is the number of time counters on CARDNAME.
SVar:X:Count$CardCounters.TIME
SVar:Picture:http://www.wizards.com/global/images/magic/general/as_foretold.jpg
Oracle:At the beginning of your upkeep, put a time counter on As Foretold.\nOnce each turn, you may pay {0} rather than pay the mana cost for a spell you cast with converted mana cost X or less, where X is the number of time counters on As Foretold.

View File

@@ -1,7 +1,7 @@
Name:Baloth Cage Trap
ManaCost:3 G G
Types:Instant Trap
SVar:AltCost:Cost$ 1 G | CheckSVar$ ArtifactsEntered | Description$ If an opponent had an artifact enter the battlefield under their control this turn, you may pay {1}{G} rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ 1 G | CheckSVar$ ArtifactsEntered | Description$ If an opponent had an artifact enter the battlefield under their control this turn, you may pay {1}{G} rather than pay this spell's mana cost.
A:SP$ Token | Cost$ 3 G G | TokenAmount$ 1 | TokenScript$ g_4_4_beast | TokenOwner$ You | StackDescription$ {p:You} creates a 4/4 green Beast creature token. | SpellDescription$ Create a 4/4 green Beast creature token.
SVar:ArtifactsEntered:Count$ThisTurnEntered_Battlefield_Artifact.OppCtrl
Oracle:If an opponent had an artifact enter the battlefield under their control this turn, you may pay {1}{G} rather than pay this spell's mana cost.\nCreate a 4/4 green Beast creature token.

View File

@@ -12,7 +12,7 @@ SVar:TrigReset:DB$ StoreSVar | SVar$ ExiledCMC | Type$ Number | Expression$ 0
S:Mode$ Continuous | EffectZone$ Battlefield | Affected$ Card.Self | SetPower$ ExiledCMC | Description$ CARDNAME's power is equal to the greatest number noted for it this turn.
T:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | ValidPlayer$ You | Execute$ PseudoDraw | TriggerDescription$ At the beginning of your upkeep, exile the top card of your library. You may play that card this turn.
SVar:PseudoDraw:DB$ Dig | Defined$ You | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ MayPlay | SubAbility$ DBCleanup | ExileOnMoved$ Exile
SVar:MayPlay:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play the exiled card this turn.
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ STMayPlay | SubAbility$ DBCleanup | ForgetOnMoved$ Exile
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Exile | Description$ You may play the exiled card this turn.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
Oracle:Note the converted mana cost of each card as it's put into exile.\nBell Borca, Spectral Sergeant's power is equal to the greatest number noted for it this turn.\nAt the beginning of your upkeep, exile the top card of your library. You may play that card this turn.

View File

@@ -14,7 +14,7 @@ Name:Harnfel, Horn of Bounty
ManaCost:4 R
Types:Legendary Artifact
A:AB$ Dig | Cost$ Discard<1/Card> | Defined$ You | DigNum$ 2 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect | StackDescription$ SpellDescription | SpellDescription$ Exile the top two cards of your library, then choose one of them. You may play that card this turn.
SVar:DBEffect:DB$ Effect | StaticAbilities$ StaticMayPlay | RememberObjects$ Remembered | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ STMayPlay | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Exile | Description$ You may play remembered card.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:StaticMayPlay:Mode$ Continuous | Affected$ Card.IsRemembered | EffectZone$ Command | AffectedZone$ Exile | MayPlay$ True | Description$ You may play those cards this turn.
Oracle:Discard a card: Exile the top two cards of your library. You may play those cards this turn.

View File

@@ -1,7 +1,7 @@
Name:Blazing Shoal
ManaCost:X R R
Types:Instant Arcane
SVar:AltCost:Cost$ ExileFromHand<1/Card.Red+Other/red card> | Description$ You may exile a red card with converted mana cost X from your hand rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ ExileFromHand<1/Card.Red+Other/red card> | Description$ You may exile a red card with converted mana cost X from your hand rather than pay this spell's mana cost.
A:SP$ Pump | Cost$ X R R | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +Z | SpellDescription$ Target creature gets +X/+0 until end of turn.
SVar:X:Count$xPaid
SVar:Y:Exiled$CardManaCost

View File

@@ -2,6 +2,6 @@ Name:Bolas's Citadel
ManaCost:3 B B B
Types:Legendary Artifact
S:Mode$ Continuous | Affected$ Card.TopLibrary+YouCtrl | AffectedZone$ Library | MayLookAt$ You | Description$ You may look at the top card of your library any time.
S:Mode$ Continuous | Affected$ Card.TopLibrary+YouCtrl | AffectedZone$ Library | MayPlay$ True | MayPlayAltManaCost$ PayLife<ConvertedManaCost> | Description$ You may play lands and cast spells from the top of your library. If you cast a spell this way, pay life equal to its converted mana cost rather than pay its mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.TopLibrary+YouCtrl | Caster$ You | Origin$ Library | Cost$ PayLife<ConvertedManaCost> | Description$ You may play lands and cast spells from the top of your library. If you cast a spell this way, pay life equal to its converted mana cost rather than pay its mana cost.
A:AB$ LoseLife | Cost$ T Sac<10/Permanent.nonLand/nonland permanent> | Defined$ Player.Opponent | LifeAmount$ 10 | SpellDescription$ Each opponent loses 10 life.
Oracle:You may look at the top card of your library any time.\nYou may play lands and cast spells from the top of your library. If you cast a spell this way, pay life equal to its converted mana cost rather than pay its mana cost.\n{T}, Sacrifice ten nonland permanents: Each opponent loses 10 life.

View File

@@ -1,11 +1,8 @@
Name:Bosium Strip
ManaCost:3
Types:Artifact
A:AB$ Effect | Cost$ 3 T | ReplacementEffects$ REBosiumStrip | StaticAbilities$ STBosiumStrip | SVars$ MoveExile | SpellDescription$ Until end of turn, you may cast instant and sorcery spells from the top of your graveyard. If a spell cast this way would be put into a graveyard this turn, exile it instead.
SVar:STBosiumStrip:Mode$ Continuous | Affected$ Card.TopGraveyard+Instant+YouCtrl,Card.TopGraveyard+Sorcery+YouCtrl | MayPlay$ True | EffectZone$ Command | AffectedZone$ Graveyard | Description$ Until end of turn, you may cast instant and sorcery spells from the top of your graveyard. If a spell cast this way would be put into a graveyard this turn, exile it instead.
SVar:REBosiumStrip:Event$ Moved | ValidLKI$ Card.CastSa Spell.MayPlaySource | Origin$ Stack | Destination$ Graveyard | ReplaceWith$ MoveExile
SVar:MoveExile:DB$ ChangeZone | Defined$ ReplacedCard | Origin$ Stack | Destination$ Exile
A:AB$ Effect | Cost$ 3 T | StaticAbilities$ STBosiumStrip | SpellDescription$ Until end of turn, you may cast instant and sorcery spells from the top of your graveyard. If a spell cast this way would be put into a graveyard this turn, exile it instead.
SVar:STBosiumStrip:Mode$ AlternativeZone | ValidCard$ Card.TopGraveyard+Instant+YouOwn,Card.TopGraveyard+Sorcery+YouOwn | Origin$ Graveyard | ReplaceGraveyard$ Exile | Description$ Until end of turn, you may cast instant and sorcery spells from the top of your graveyard. If a spell cast this way would be put into a graveyard this turn, exile it instead.
SVar:NeedsOrderedGraveyard:TRUE
AI:RemoveDeck:All
SVar:Picture:http://www.wizards.com/global/images/magic/general/bosium_strip.jpg
Oracle:{3}, {T}: Until end of turn, you may cast instant and sorcery spells from the top of your graveyard. If a spell cast this way would be put into a graveyard this turn, exile it instead.

View File

@@ -2,7 +2,7 @@ Name:Bounty of the Hunt
ManaCost:3 G G
Types:Instant
A:SP$ PutCounter | Cost$ 3 G G | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute counters to | CounterType$ P1P1 | CounterNum$ 3 | TargetMin$ 1 | TargetMax$ 3 | DividedAsYouChoose$ 3 | RemovePhase$ Cleanup | SpellDescription$ Distribute three +1/+1 counters among one, two, or three target creatures. For each +1/+1 counter you put on a creature this way, remove a +1/+1 counter from that creature at the beginning of the next cleanup step.
SVar:AltCost:Cost$ExileFromHand<1/Card.Green+Other> | Description$ You may exile a green card from your hand rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ExileFromHand<1/Card.Green+Other> | Description$ You may exile a green card from your hand rather than pay this spell's mana cost.
DeckHas:Ability$Counters
AI:RemoveDeck:All
Oracle:You may exile a green card from your hand rather than pay this spell's mana cost.\nDistribute three +1/+1 counters among one, two, or three target creatures. For each +1/+1 counter you put on a creature this way, remove a +1/+1 counter from that creature at the beginning of the next cleanup step.

View File

@@ -6,8 +6,8 @@ K:Menace
K:Partner
T:Mode$ DamageAll | ValidSource$ Pirate.YouCtrl | ValidTarget$ Opponent | TriggerZones$ Battlefield | Execute$ TrigExileTop | TriggerDescription$ Whenever one or more Pirates you control deal damage to your opponents, exile the top card of each of those opponents' libraries. You may play those cards this turn, and you may spend mana as though it were mana of any color to cast those spells.
SVar:TrigExileTop:DB$ Dig | DigNum$ 1 | ChangeNum$ All | Defined$ TriggeredTargets | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | StaticAbilities$ EffPlay | EffectOwner$ You | RememberObjects$ Remembered | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:EffPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreType$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play those cards this turn, and you may spend mana as though it were mana of any color to cast those spells.
SVar:DBEffect:DB$ Effect | StaticAbilities$ STMayPlay | EffectOwner$ You | RememberObjects$ Remembered | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Exile | MayPlayIgnoreColor$ True | Description$ You may play those cards this turn, and you may spend mana as though it were mana of any color to cast those spells.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
DeckHints:Type$Pirate
Oracle:Menace\nWhenever one or more Pirates you control deal damage to your opponents, exile the top card of each of those opponents' libraries. You may play those cards this turn, and you may spend mana as though it were mana of any color to cast those spells.\nPartner (You can have two commanders if both have partner.)

View File

@@ -3,7 +3,7 @@ ManaCost:7 B B
Types:Creature Bringer
PT:5/5
K:Trample
SVar:AltCost:Cost$ W U B R G | Description$ You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | Caster$ You | Cost$ W U B R G | EffectZone$ All | Description$ You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigChange | TriggerDescription$ At the beginning of your upkeep, you may pay 2 life. If you do, search your library for a card, then shuffle your library and put that card on top of it.
SVar:TrigChange:AB$ ChangeZone | Cost$ PayLife<2> | Origin$ Library | Destination$ Library | LibraryPosition$ 0 | ChangeType$ Card | ChangeNum$ 1
AI:RemoveDeck:All

View File

@@ -3,7 +3,7 @@ ManaCost:7 U U
Types:Creature Bringer
PT:5/5
K:Trample
SVar:AltCost:Cost$ W U B R G | Description$ You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | Caster$ You | Cost$ W U B R G | EffectZone$ All | Description$ You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigDraw | TriggerDescription$ At the beginning of your upkeep, you may draw two cards.
SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ 2
Oracle:You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.\nTrample\nAt the beginning of your upkeep, you may draw two cards.

View File

@@ -3,7 +3,7 @@ ManaCost:7 G G
Types:Creature Bringer
PT:5/5
K:Trample
SVar:AltCost:Cost$ W U B R G | Description$ You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | Caster$ You | Cost$ W U B R G | EffectZone$ All | Description$ You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigToken | TriggerDescription$ At the beginning of your upkeep, you may create a 3/3 green Beast creature token.
SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_3_3_beast | TokenOwner$ You
DeckHas:Ability$Token

View File

@@ -3,7 +3,7 @@ ManaCost:7 R R
Types:Creature Bringer
PT:5/5
K:Trample
SVar:AltCost:Cost$ W U B R G | Description$ You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | Caster$ You | Cost$ W U B R G | EffectZone$ All | Description$ You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigChange | TriggerDescription$ At the beginning of your upkeep, you may untap target creature and gain control of it until end of turn. That creature gains haste until end of turn.
SVar:TrigChange:DB$ GainControl | ValidTgts$ Creature | TgtPrompt$ Select target creature | LoseControl$ EOT | Untap$ True | AddKWs$ Haste
Oracle:You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.\nTrample\nAt the beginning of your upkeep, you may untap target creature and gain control of it until end of turn. That creature gains haste until end of turn.

View File

@@ -3,9 +3,9 @@ ManaCost:7 W W
Types:Creature Bringer
PT:5/5
K:Trample
SVar:AltCost:Cost$ W U B R G | Description$ You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | Caster$ You | Cost$ W U B R G | EffectZone$ All | Description$ You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigChange | TriggerDescription$ At the beginning of your upkeep, you may return target artifact card from your graveyard to the battlefield.
SVar:TrigChange:AB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Artifact.YouCtrl | Cost$ 0
SVar:TrigChange:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Artifact.YouCtrl
DeckHas:Ability$Graveyard
DeckNeeds:Type$Artifact
Oracle:You may pay {W}{U}{B}{R}{G} rather than pay this spell's mana cost.\nTrample\nAt the beginning of your upkeep, you may return target artifact card from your graveyard to the battlefield.

View File

@@ -4,5 +4,5 @@ Types:Legendary Creature Nightmare Beast Elemental
PT:6/6
K:Mutate:2 UB G G
K:Trample
S:Mode$ Continuous | Affected$ Card.Self | MayPlay$ True | ValidSA$ Spell.Mutate | AffectedZone$ Graveyard | EffectZone$ Graveyard | Description$ You may cast CARDNAME from your graveyard using its mutate ability.
S:Mode$ AlternativeZone | ValidCard$ Card.Self | ValidSA$ Spell.Mutate | EffectZone$ Graveyard | Origin$ Graveyard | Description$ You may cast CARDNAME from your graveyard using its mutate ability.
Oracle:Mutate {2}{U/B}{G}{G} (If you cast this spell for its mutate cost, put it over or under target non-Human creature you own. They mutate into the creature on top plus all abilities from under it.)\nTrample\nYou may cast Brokkos, Apex of Forever from your graveyard using its mutate ability.

View File

@@ -1,6 +1,6 @@
Name:Cave-In
ManaCost:3 R R
Types:Sorcery
SVar:AltCost:Cost$ ExileFromHand<1/Card.Red+Other> | Description$ You may exile a red card from your hand rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ ExileFromHand<1/Card.Red+Other> | Description$ You may exile a red card from your hand rather than pay this spell's mana cost.
A:SP$ DamageAll | Cost$ 3 R R | NumDmg$ 2 | ValidCards$ Creature | ValidPlayers$ Player | ValidDescription$ each creature and each player. | SpellDescription$ CARDNAME deals 2 damage to each creature and each player.
Oracle:You may exile a red card from your hand rather than pay this spell's mana cost.\nCave-In deals 2 damage to each creature and each player.

View File

@@ -3,7 +3,7 @@ ManaCost:2 B R
Types:Legendary Creature Human Minion
PT:3/2
A:AB$ Effect | Cost$ Discard<1/Card> | StaticAbilities$ STYardCast | ActivationLimit$ 1 | SpellDescription$ You may cast a creature spell from your graveyard this turn. Activate this ability only once each turn.
SVar:STYardCast:Mode$ Continuous | Affected$ Creature.nonLand+YouCtrl | MayPlay$ True | MayPlayLimit$ 1 | EffectZone$ Command | AffectedZone$ Graveyard
SVar:STYardCast:Mode$ AlternativeZone | ValidCard$ Creature.nonLand+YouOwn | Origin$ Graveyard | MayPlayTurnLimit$ 1 | Description$ You may cast a creature spell from your graveyard this turn. Activate this ability only once each turn.
AI:RemoveDeck:All
T:Mode$ ChangesZone | ValidCard$ Creature.nonToken+YouCtrl+wasNotCastFromHand | Origin$ Any | Destination$ Battlefield | Execute$ TrigPump | TriggerZones$ Battlefield | TriggerDescription$ Whenever a nontoken creature enters the battlefield under your control, if you didn't cast it from your hand, it gains haste until your next turn.
SVar:TrigPump:DB$ Pump | Defined$ TriggeredCard | KW$ Haste | UntilYourNextTurn$ True

View File

@@ -6,8 +6,8 @@ A:AB$ PutCounterAll | Cost$ AddCounter<0/LOYALTY> | Planeswalker$ True | ValidCa
A:AB$ Token | Cost$ AddCounter<0/LOYALTY> | Planeswalker$ True | TokenAmount$ 2 | TokenScript$ r_1_1_elemental | TokenOwner$ You | LegacyImage$ r 1 1 elemental m20 | AtEOT$ Sacrifice | RememberTokens$ True | SubAbility$ DBPump | SpellDescription$ Create two 1/1 red Elemental creature tokens. They gain haste. Sacrifice them at the beginning of the next end step.
SVar:DBPump:DB$ Pump | Defined$ Remembered | KW$ Haste | Permanent$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:AB$ Effect | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | AILogic$ CastFromGraveThisTurn | ValidTgts$ Instant.YouCtrl+cmcLE3,Sorcery.YouCtrl+cmcLE3 | TgtZone$ Graveyard | TgtPrompt$ Select target instant or sorcery card with mana cost 3 or less | RememberObjects$ Targeted | StaticAbilities$ Play | ExileOnMoved$ Graveyard | SubAbility$ DBEffect | SpellDescription$ You may cast target instant or sorcery card with mana cost 3 or less from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead.
SVar:Play:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Graveyard | Description$ You may play remembered card.
A:AB$ Effect | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | AILogic$ CastFromGraveThisTurn | ValidTgts$ Instant.YouCtrl+cmcLE3,Sorcery.YouCtrl+cmcLE3 | TgtZone$ Graveyard | TgtPrompt$ Select target instant or sorcery card with mana cost 3 or less | RememberObjects$ Targeted | StaticAbilities$ STMayPlay | ForgetOnMoved$ Graveyard | SubAbility$ DBEffect | SpellDescription$ You may cast target instant or sorcery card with mana cost 3 or less from your graveyard this turn. If that card would be put into your graveyard this turn, exile it instead.
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Graveyard | Description$ You may play remembered card.
SVar:DBEffect:DB$ Effect | RememberObjects$ Targeted | ExileOnMoved$ Stack | ReplacementEffects$ ReplaceGraveyard | SVars$ MoveExile
SVar:ReplaceGraveyard:Event$ Moved | ValidCard$ Card.IsRemembered | Origin$ Stack | Destination$ Graveyard | ReplaceWith$ MoveExile | Description$ If that card would be put into your graveyard this turn, exile it instead.
SVar:MoveExile:DB$ ChangeZone | Defined$ ReplacedCard | Origin$ Stack | Destination$ Exile

View File

@@ -6,8 +6,8 @@ T:Mode$ CounterRemovedOnce | ValidCard$ Card.Self | CounterType$ LOYALTY | Trigg
SVar:TrigDmg:DB$ DealDamage | ValidTgts$ Opponent,Planeswalker | TgtPrompt$ Select target opponent or planeswalker | NumDmg$ X
SVar:X:TriggerCount$Amount
A:AB$ Dig | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | Defined$ You | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect | SpellDescription$ Exile the top card of your library. You may play it this turn.
SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ Remembered | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STPlay:Mode$ Continuous | EffectZone$ Command | AffectedZone$ Exile | Affected$ Card.IsRemembered | MayPlay$ True | Description$ You may play the card(s) this turn.
SVar:DBEffect:DB$ Effect | StaticAbilities$ STMayPlay | RememberObjects$ Remembered | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Exile | Description$ You may play remembered card.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:AB$ Dig | Cost$ SubCounter<7/LOYALTY> | Planeswalker$ True | Ultimate$ True | Defined$ You | DigNum$ 7 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect | SpellDescription$ Exile the top seven cards of your library. You may play them this turn.
Oracle:Whenever one or more loyalty counters are removed from Chandra, Fire Artisan, she deals that much damage to target opponent or planeswalker.\n[+1]: Exile the top card of your library. You may play it this turn.\n[7]: Exile the top seven cards of your library. You may play them this turn.

View File

@@ -6,6 +6,6 @@ A:AB$ DealDamage | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | NumDmg$ 3
A:AB$ Play | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | Optional$ True | ValidTgts$ Instant.Red+YouOwn,Sorcery.Red+YouOwn | TgtZone$ Graveyard | ReplaceGraveyard$ Exile | TgtPrompt$ Select target red instant or sorcery card | AILogic$ ReplaySpell | SpellDescription$ You may cast target red instant or sorcery card from your graveyard. If that spell would be put into your graveyard this turn, exile it instead.
A:AB$ Discard | Cost$ SubCounter<8/LOYALTY> | Planeswalker$ True | Ultimate$ True | Mode$ Hand | SubAbility$ DBDraw | StackDescription$ SpellDescription | SpellDescription$ Discard your hand, then draw seven cards. Until end of turn, you may cast spells from your hand without paying their mana costs.
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 7 | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | StaticAbilities$ MayPlay | Stackable$ False | Description$ Until end of turn, you may cast spells from your hand without paying their mana costs.
SVar:MayPlay:Mode$ Continuous | EffectZone$ Command | Affected$ Card.nonLand+YouOwn | MayPlay$ True | MayPlayWithoutManaCost$ True | AffectedZone$ Hand
SVar:DBEffect:DB$ Effect | StaticAbilities$ MayPlay | Stackable$ False
SVar:MayPlay:Mode$ AlternativeCost | ValidCard$ Card.nonLand+YouOwn | Caster$ You | Cost$ 0 | Origin$ Hand | Description$ Until end of turn, you may cast spells from your hand without paying their mana costs.
Oracle:[+1]: Chandra, Flame's Catalyst deals 3 damage to each opponent.\n[2]: You may cast target red instant or sorcery card from your graveyard. If that spell would be put into your graveyard this turn, exile it instead.\n[8]: Discard your hand, then draw seven cards. Until end of turn, you may cast spells from your hand without paying their mana costs.

View File

@@ -4,13 +4,12 @@ Types:Legendary Planeswalker Chandra
Loyalty:5
A:AB$ Discard | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | Mode$ Hand | Defined$ You | SubAbility$ DBDig | StackDescription$ SpellDescription | SpellDescription$ Discard your hand, then exile the top three cards of your library. Until end of turn, you may play cards exiled this way.
SVar:DBDig:DB$ Dig | DigNum$ 3 | ChangeNum$ All | ChangeValid$ Card | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ Play | SubAbility$ DBCleanup | ForgetOnMoved$ Exile
SVar:Play:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ Until end of turn, you may play cards exiled this way.
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ STMayPlay | SubAbility$ DBCleanup | ForgetOnMoved$ Exile
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Exile | Description$ You may play remembered card.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:AB$ DealDamage | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ 2 | SpellDescription$ CARDNAME deals 2 damage to any target.
A:AB$ ChangeZone | Cost$ SubCounter<9/LOYALTY> | Planeswalker$ True | Ultimate$ True | Origin$ Graveyard,Library | Destination$ Exile | ChangeType$ Instant.Red,Sorcery.Red | RememberChanged$ True | ChangeNum$ Z | SubAbility$ DBEffect2 | StackDescription$ SpellDescription | SpellDescription$ Search your graveyard and library for any number of red instant and/or sorcery cards, exile them, then shuffle your library. You may cast them this turn. Add six {R}.
SVar:DBEffect2:DB$ Effect | Name$ Chandra, Heart of Fire Ultimate Effect | RememberObjects$ Remembered | StaticAbilities$ Play2 | SubAbility$ DBMana | ForgetOnMoved$ Exile
SVar:Play2:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may cast the exiled red instant and/or sorcery spells this turn.
SVar:DBEffect2:DB$ Effect | Name$ Chandra, Heart of Fire Ultimate Effect | RememberObjects$ RememberedCard | StaticAbilities$ STMayPlay | SubAbility$ DBMana | ForgetOnMoved$ Exile
SVar:DBMana:DB$ Mana | Produced$ R | Amount$ 6 | SubAbility$ DBCleanup | StackDescription$ None
SVar:X:Count$ValidGraveyard Instant.Red+YouOwn,Sorcery.Red+YouOwn
SVar:Y:Count$ValidLibrary Instant.Red+YouOwn,Sorcery.Red+YouOwn

View File

@@ -7,8 +7,8 @@ SVar:ChandraDamage:DB$ DealDamage | ValidTgts$ Creature.ControlledBy TargetedOrC
SVar:DBDamageResolve:DB$ DamageResolve | SubAbility$ DBPump
SVar:DBPump:DB$ Pump | Defined$ Targeted | IsCurse$ True | KW$ HIDDEN CARDNAME can't block. | ConditionDefined$ Targeted | ConditionPresent$ Creature | ConditionCompare$ GE1
A:AB$ Dig | Cost$ AddCounter<0/LOYALTY> | Planeswalker$ True | Defined$ You | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect | SpellDescription$ Exile the top card of your library. You may play it this turn.
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ Play | SubAbility$ DBCleanup | ExileOnMoved$ Exile
SVar:Play:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play remembered card.
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ STMayPlay | SubAbility$ DBCleanup | ForgetOnMoved$ Exile
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Exile | Description$ You may play remembered card.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:AB$ Dig | Cost$ SubCounter<7/LOYALTY> | Planeswalker$ True | Ultimate$ True | Defined$ You | DigNum$ 10 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBChoose | SpellDescription$ Exile the top ten cards of your library. Choose an instant or sorcery card exiled this way and copy it three times. You may cast the copies without paying their mana costs.
SVar:DBChoose:DB$ ChooseCard | Choices$ Instant.IsRemembered,Sorcery.IsRemembered | ChoiceZone$ Exile | Defined$ You | SubAbility$ DBPlay

View File

@@ -3,12 +3,12 @@ ManaCost:1 G
Types:Creature Dinosaur
PT:2/1
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigEffect | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, you may cast Dinosaur spells this turn as though they had flash, and whenever you cast a Dinosaur spell this turn, it gains "When this creature enters the battlefield, you may have it fight another target creature."
SVar:TrigEffect:DB$ Effect | Name$ Cherished Hatchling Effect | StaticAbilities$ STFlash | Triggers$ HatchlingCast | SVars$ TrigHatchlingAnimate,HatchlingFight,TrigETBHatchling
SVar:STFlash:Mode$ Continuous | EffectZone$ Command | Affected$ Dinosaur.nonToken+YouCtrl | MayPlay$ True | MayPlayCardOwner$ True | MayPlayWithFlash$ True | MayPlayDontGrantZonePermissions$ True | AffectedZone$ Hand,Graveyard,Library,Exile | Description$ You may cast Dinosaur spells this turn as though they had flash.
SVar:TrigEffect:DB$ Effect | Name$ Cherished Hatchling Effect | StaticAbilities$ QuickSpell | Triggers$ HatchlingCast | SVars$ TrigHatchlingAnimate,HatchlingFight,TrigETBHatchling
SVar:QuickSpell:Mode$ CastWithFlash | ValidCard$ Dinosaur | ValidSA$ Spell | EffectZone$ Command | Caster$ You | Description$ You may cast Dinosaur spells this turn as though they had flash.
SVar:HatchlingCast:Mode$ SpellCast | ValidCard$ Dinosaur | ValidActivatingPlayer$ You | Execute$ TrigHatchlingAnimate | TriggerZones$ Command | TriggerDescription$ Whenever you cast a Dinosaur spell this turn, it gains "When this creature enters the battlefield, you may have it fight another target creature."
SVar:TrigHatchlingAnimate:DB$ Animate | Defined$ TriggeredCard | Permanent$ True | Triggers$ TrigETBHatchling | sVars$ HatchlingFight
SVar:TrigETBHatchling:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ HatchlingFight | OptionalDecider$ You | TriggerDescription$ When this creature enters the battlefield, you may have it fight another target creature.
SVar:HatchlingFight:DB$ Fight | Defined$ TriggeredCardLKICopy | ValidTgts$ Creature.Other | TgtPrompt$ Select another target creature
DeckHints:Type$Dinosaur
SVar:Picture:http://www.wizards.com/global/images/magic/general/cherished_hatchling.jpg
Oracle:When Cherished Hatchling dies, you may cast Dinosaur spells this turn as though they had flash, and whenever you cast a Dinosaur spell this turn, it gains "When this creature enters the battlefield, you may have it fight another target creature."

View File

@@ -2,9 +2,8 @@ Name:Cho-Arrim Legate
ManaCost:2 W
Types:Creature Human Soldier
PT:1/2
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ All | AddKeyword$ Alternative Cost:0 | CheckSVar$ X | CheckSecondSVar$ Y | Description$ If an opponent controls a Swamp and you control a Plains, you may cast this spell without paying its mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | Caster$ You | Cost$ 0 | EffectZone$ All | CheckSVar$ X | CheckSecondSVar$ Y | Description$ If an opponent controls a Swamp and you control a Plains, you may cast this spell without paying its mana cost.
K:Protection from black
SVar:X:Count$Valid Swamp.OppCtrl
SVar:Y:Count$Valid Plains.YouCtrl
SVar:Picture:http://www.wizards.com/global/images/magic/general/cho_arrim_legate.jpg
Oracle:If an opponent controls a Swamp and you control a Plains, you may cast this spell without paying its mana cost.\nProtection from black

View File

@@ -6,6 +6,6 @@ SVar:TrackValidDestroy:DB$ Pump | RememberObjects$ TriggeredCard
T:Mode$ TurnBegin | Execute$ TrigReset | Static$ True
SVar:TrigReset:DB$ Cleanup | ClearRemembered$ True
SVar:SetTrap:Remembered$Amount
SVar:AltCost:Cost$ G | CheckSVar$ SetTrap | Description$ If a noncreature permanent under your control was destroyed this turn by a spell or ability an opponent controlled, you may pay {G} rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ G | CheckSVar$ SetTrap | Description$ If a noncreature permanent under your control was destroyed this turn by a spell or ability an opponent controlled, you may pay {G} rather than pay this spell's mana cost.
A:SP$ Token | Cost$ 4 G G | TokenAmount$ 4 | TokenScript$ g_1_1_snake | TokenOwner$ You | StackDescription$ {p:You} creates four 1/1 green Snake creature tokens. | SpellDescription$ Create four 1/1 green Snake creature tokens.
Oracle:If a noncreature permanent under your control was destroyed this turn by a spell or ability an opponent controlled, you may pay {G} rather than pay this spell's mana cost.\nCreate four 1/1 green Snake creature tokens.

View File

@@ -3,7 +3,8 @@ ManaCost:2 B B
Types:Enchantment
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile the top seven cards of your library face down. You may look at the cards exiled with CARDNAME, and you may play lands and cast spells from among those cards.
SVar:TrigExile:DB$ Dig | Defined$ You | DigNum$ 7 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | ExileFaceDown$ True | NoReveal$ True
S:Mode$ Continuous | Affected$ Card.IsRemembered+ExiledWithSource | AffectedZone$ Exile | MayPlay$ True | MayLookAt$ You | Description$ You may look at the cards exiled with CARDNAME, and you may play lands and cast spells from among those cards.
S:Mode$ Continuous | Affected$ Card.IsRemembered+ExiledWithSource | AffectedZone$ Exile | MayLookAt$ You | Description$ You may look at the cards exiled with CARDNAME, and you may play lands and cast spells from among those cards.
S:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered+ExiledWithSource | Caster$ You | Origin$ Exile | Secondary$ True | Description$ You may play lands and cast spells from among those cards.
S:Mode$ Continuous | Affected$ You | AddKeyword$ Skip your draw step. | Description$ Skip your draw step.
S:Mode$ CantBeCast | ValidCard$ Card | Caster$ You | NumLimitEachTurn$ 1 | Description$ You can't cast more than one spell each turn.
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered+ExiledWithSource | Execute$ DBForget
@@ -11,5 +12,4 @@ SVar:DBForget:DB$ Pump | ForgetObjects$ TriggeredCard
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.Self | Execute$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
AI:RemoveDeck:All
SVar:Picture:http://www.wizards.com/global/images/magic/general/colfenors_plans.jpg
Oracle:When Colfenor's Plans enters the battlefield, exile the top seven cards of your library face down.\nYou may look at the cards exiled with Colfenor's Plans, and you may play lands and cast spells from among those cards.\nSkip your draw step.\nYou can't cast more than one spell each turn.

View File

@@ -1,7 +1,7 @@
Name:Commandeer
ManaCost:5 U U
Types:Instant
SVar:AltCost:Cost$ ExileFromHand<2/Card.Blue+Other> | Description$ You may exile two blue cards from your hand rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ ExileFromHand<2/Card.Blue+Other> | Description$ You may exile two blue cards from your hand rather than pay this spell's mana cost.
A:SP$ ControlSpell | Cost$ 5 U U | ValidTgts$ Card.nonCreature | TargetType$ Spell | Mode$ Gain | SubAbility$ DBChooseTargets | SpellDescription$ Gain control of target noncreature spell. You may choose new targets for it. (If that spell is an artifact, enchantment, or planeswalker, the permanent enters the battlefield under your control.)
SVar:DBChooseTargets:DB$ ChangeTargets | Defined$ Targeted | Optional$ True
AI:RemoveDeck:All

View File

@@ -2,9 +2,9 @@ Name:Commune with Lava
ManaCost:X R R
Types:Instant
A:SP$ Dig | Cost$ X R R | Defined$ You | DigNum$ X | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBMayPlay | SpellDescription$ Exile the top X cards of your library. Until the end of your next turn, you may play those cards.
SVar:DBMayPlay:DB$ Effect | StaticAbilities$ STCommuned | Duration$ UntilTheEndOfYourNextTurn | RememberObjects$ Remembered | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:DBMayPlay:DB$ Effect | StaticAbilities$ STMayPlay | Duration$ UntilTheEndOfYourNextTurn | RememberObjects$ RememberedCard | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Exile | Description$ Until the end of your next turn, you may play those cards.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:STCommuned:Mode$ Continuous | Affected$ Card.IsRemembered | EffectZone$ Command | AffectedZone$ Exile | MayPlay$ True | Description$ Until the end of your next turn, you may play those cards.
SVar:X:Count$xPaid
AI:RemoveDeck:All
Oracle:Exile the top X cards of your library. Until the end of your next turn, you may play those cards.

View File

@@ -3,7 +3,7 @@ ManaCost:R R
Types:Creature Goblin Rogue
PT:2/2
S:Mode$ Continuous | Affected$ Card.TopLibrary+YouCtrl | AffectedZone$ Library | MayLookAt$ Player | Description$ Play with the top card of your library revealed.
S:Mode$ Continuous | Affected$ Goblin.TopLibrary+YouCtrl+nonLand | AffectedZone$ Library | MayPlay$ True | Description$ You may cast Goblin spells from the top of your library.
S:Mode$ AlternativeZone | ValidCard$ Goblin.TopLibrary+YouOwn+nonLand | Caster$ You | Origin$ Library | Description$ You may cast Goblin spells from the top of your library.
AI:RemoveDeck:Random
S:Mode$ Continuous | TopCardOfLibraryIs$ Goblin | Affected$ Card.Self | EffectZone$ Battlefield | GainsAbilitiesOf$ Goblin.TopLibrary+YouCtrl | GainsAbilitiesOfZones$ Library | Description$ As long as the top card of your library is a Goblin card, CARDNAME has all activated abilities of that card.
DeckHints:Type$Goblin

View File

@@ -1,7 +1,7 @@
Name:Contagion
ManaCost:3 B B
Types:Instant
SVar:AltCost:Cost$ PayLife<1> ExileFromHand<1/Card.Black+Other/black card> | Description$ You may pay 1 life and exile a black card from your hand rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ PayLife<1> ExileFromHand<1/Card.Black+Other/black card> | Description$ You may pay 1 life and exile a black card from your hand rather than pay this spell's mana cost.
A:SP$ PutCounter | Cost$ 3 B B | ValidTgts$ Creature | TgtPrompt$ Select target creature to distribute counters to | CounterType$ M2M1 | CounterNum$ 2 | TargetMin$ 1 | TargetMax$ 2 | DividedAsYouChoose$ 2 | IsCurse$ True | SpellDescription$ Distribute two -2/-1 counters among one or two target creatures.
AI:RemoveDeck:All
Oracle:You may pay 1 life and exile a black card from your hand rather than pay this spell's mana cost.\nDistribute two -2/-1 counters among one or two target creatures.

View File

@@ -25,8 +25,8 @@ PT:3/3
T:Mode$ DamageDone | ValidSource$ Vehicle.YouCtrl | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigExile | TriggerZones$ Battlefield | TriggerDescription$ Whenever a Vehicle you control deals combat damage to a player, that player exiles that many cards from the top of their library. You may play lands from among those cards for as long as they remain exiled.
SVar:TrigExile:DB$ Dig | Defined$ TriggeredTarget | DigNum$ X | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBMayPlayLand
SVar:X:TriggerCount$DamageAmount
SVar:DBMayPlayLand:DB$ Effect | StaticAbilities$ SMayPlayLand | RememberObjects$ Remembered | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:SMayPlayLand:Mode$ Continuous | MayPlay$ True | Affected$ Land.IsRemembered | AffectedZone$ Exile | Secondary$ True | EffectZone$ Command | MayLookAt$ You | Duration$ Permanent | Description$ You may play lands from among those cards for as long as they remain exiled.
SVar:DBMayPlayLand:DB$ Effect | StaticAbilities$ SMayPlayLand | RememberObjects$ RememberedCard | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Land.IsRemembered | Caster$ You | Origin$ Exile | Description$ You may play lands from among those cards for as long as they remain exiled.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
K:Crew:1
DeckHints:Type$Vehicle

View File

@@ -3,8 +3,7 @@ ManaCost:1 G G
Types:Enchantment Creature Centaur
PT:2/4
S:Mode$ Continuous | Affected$ Card.TopLibrary+YouCtrl | AffectedZone$ Library | MayLookAt$ Player | Description$ Play with the top card of your library revealed.
S:Mode$ Continuous | Affected$ Land.TopLibrary+YouCtrl | AffectedZone$ Library | MayPlay$ True | Description$ You may play lands from the top of your library.
S:Mode$ AlternativeZone | ValidCard$ Land.TopLibrary+YouOwn | Caster$ You | Origin$ Library | Description$ You may play lands from the top of your library.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigGainLife | TriggerDescription$ Whenever a land enters the battlefield under your control, you gain 1 life.
SVar:TrigGainLife:DB$ GainLife | LifeAmount$ 1
SVar:Picture:http://www.wizards.com/global/images/magic/general/courser_of_kruphix.jpg
Oracle:Play with the top card of your library revealed.\nYou may play lands from the top of your library.\nWhenever a land enters the battlefield under your control, you gain 1 life.

View File

@@ -2,8 +2,8 @@ Name:Covetous Urge
ManaCost:U/B U/B U/B U/B
Types:Sorcery
A:SP$ ChangeZone | Cost$ U/B U/B U/B U/B | Origin$ Hand,Graveyard | Destination$ Exile | ValidTgts$ Opponent | DefinedPlayer$ Targeted | Chooser$ You | TgtPrompt$ Select target opponent | ChangeType$ Card.nonLand | ChangeNum$ 1 | IsCurse$ True | RememberChanged$ True | SubAbility$ DBEffect | StackDescription$ SpellDescription | SpellDescription$ Target opponent reveals their hand. You choose a nonland card from that player's graveyard or hand and exile it. You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell.
SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ Remembered | Duration$ Permanent | ExileOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreColor$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may cast that card and you may spend mana as though it were mana of any color to cast it.
SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ RememberedCard | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered+nonLand | Caster$ You | Origin$ Exile | MayPlayIgnoreColor$ True | Description$ You may cast that card and you may spend mana as though it were mana of any color to cast it.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
AI:RemoveDeck:All
Oracle:Target opponent reveals their hand. You choose a nonland card from that player's graveyard or hand and exile it. You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell.

View File

@@ -1,6 +1,6 @@
Name:Crash
ManaCost:2 R
Types:Instant
SVar:AltCost:Cost$ Sac<1/Mountain> | Description$ You may sacrifice a Mountain rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ Sac<1/Mountain> | Description$ You may sacrifice a Mountain rather than pay this spell's mana cost.
A:SP$ Destroy | Cost$ 2 R | ValidTgts$ Artifact | TgtPrompt$ Select target artifact | SpellDescription$ Destroy target artifact.
Oracle:You may sacrifice a Mountain rather than pay this spell's mana cost.\nDestroy target artifact.

View File

@@ -1,7 +1,6 @@
Name:Crucible of Worlds
ManaCost:3
Types:Artifact
S:Mode$ Continuous | Affected$ Land.YouOwn | MayPlay$ True | AffectedZone$ Graveyard | Description$ You may play lands from your graveyard.
S:Mode$ AlternativeZone | ValidCard$ Land.YouOwn | Caster$ You | Origin$ Graveyard | Description$ Description$ You may play lands from your graveyard.
SVar:NonStackingEffect:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/crucible_of_worlds.jpg
Oracle:You may play lands from your graveyard.

View File

@@ -3,8 +3,8 @@ ManaCost:1 R
Types:Creature Goblin Shaman
PT:2/2
A:AB$ Dig | Cost$ 1 Sac<1/Creature> | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | Defined$ You | RememberChanged$ True | SubAbility$ DBEffect | SpellDescription$ Exile the top card of your library. You may play that card this turn.
SVar:DBEffect:DB$ Effect | StaticAbilities$ EffSModeContinuous | ExileOnMoved$ Exile | RememberObjects$ Remembered | SubAbility$ DBCleanup
SVar:EffSModeContinuous:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | MayPlay$ True | AffectedZone$ Exile | Description$ You may play that card this turn.
SVar:DBEffect:DB$ Effect | StaticAbilities$ STMayPlay | RememberObjects$ RememberedCard | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered | Caster$ You | Origin$ Exile | Description$ You may play that card this turn.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:AIPreference:SacCost$Creature.token,Creature.cmcLE1
Oracle:{1}, Sacrifice a creature: Exile the top card of your library. You may play that card this turn. (You still pay its costs. You can play a land this way only if you have an available land play remaining.)

View File

@@ -1,7 +1,7 @@
Name:Dark Triumph
ManaCost:4 B
Types:Instant
SVar:AltCost:Cost$ Sac<1/Creature/creature> | IsPresent$ Swamp.YouCtrl | Description$ If you control a Swamp, you may sacrifice a creature rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ Sac<1/Creature/creature> | IsPresent$ Swamp.YouCtrl | Description$ If you control a Swamp, you may sacrifice a creature rather than pay this spell's mana cost.
A:SP$ PumpAll | Cost$ 4 B | ValidCards$ Creature.YouCtrl | NumAtt$ +2 | SpellDescription$ Creatures you control get +2/+0 until end of turn.
AI:RemoveDeck:All
Oracle:If you control a Swamp, you may sacrifice a creature rather than pay this spell's mana cost.\nCreatures you control get +2/+0 until end of turn.

View File

@@ -7,7 +7,7 @@ T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage
SVar:TrigExile:DB$ Dig | Defined$ TriggeredTarget | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBGainLife
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X | SubAbility$ DBEffect
SVar:X:Remembered$CardManaCost
SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | ForgetOnMoved$ Exile | RememberObjects$ Remembered | SubAbility$ DBCleanup
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreColor$ True | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand | AffectedZone$ Exile | Description$ Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast that spell.
SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ RememberedCard | ForgetOnMoved$ Exile | SubAbility$ DBCleanup
SVar:STPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered+nonLand | Caster$ You | Origin$ Exile | MayPlayIgnoreColor$ True | Description$ Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast that spell.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
Oracle:Daxos of Meletis can't be blocked by creatures with power 3 or greater.\nWhenever Daxos of Meletis deals combat damage to a player, exile the top card of that player's library. You gain life equal to that card's converted mana cost. Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast that spell.

View File

@@ -1,6 +1,6 @@
Name:Daze
ManaCost:1 U
Types:Instant
SVar:AltCost:Cost$ Return<1/Island> | AILogic$ MinCMC.4 | Description$ You may return an Island you control to its owner's hand rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ Return<1/Island> | AILogic$ MinCMC.4 | Description$ You may return an Island you control to its owner's hand rather than pay this spell's mana cost.
A:SP$ Counter | Cost$ 1 U | TargetType$ Spell | TgtPrompt$ Select target spell | ValidTgts$ Card | UnlessCost$ 1 | SpellDescription$ Counter target spell unless its controller pays {1}.
Oracle:You may return an Island you control to its owner's hand rather than pay this spell's mana cost.\nCounter target spell unless its controller pays {1}.

View File

@@ -5,8 +5,8 @@ K:Enchant creature an opponent controls
A:SP$ Attach | Cost$ 1 B | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls | AILogic$ Pump
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.AttachedBy | Execute$ TrigExile | TriggerDescription$ When enchanted creature dies, exile cards equal to its power from the top of its owner's library. You may cast spells from among those cards for as long as they remain exiled, and you may spend mana as though it were mana of any type to cast those spells.
SVar:TrigExile:DB$ Dig | Defined$ TriggeredCardOwner | DigNum$ X | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ Remembered | Duration$ Permanent | SubAbility$ DBCleanup | SpellDescription$ You may cast nonland cards from among them as long as they remain exiled, and you may spend mana as though it were mana of any type to cast those spells.
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreType$ True | EffectZone$ Command | Affected$ Card.nonLand+IsRemembered | AffectedZone$ Exile | Description$ You may cast nonland cards from among them as long as they remain exiled, and you may spend mana as though it were mana of any type to cast those spells.
SVar:DBEffect:DB$ Effect | StaticAbilities$ STMayPlay | RememberObjects$ RememberedCard | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup | SpellDescription$ You may cast nonland cards from among them as long as they remain exiled, and you may spend mana as though it were mana of any type to cast those spells.
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered+nonLand | Caster$ You | Origin$ Exile | MayPlayIgnoreType$ True | Description$ You may cast nonland cards from among them as long as they remain exiled, and you may spend mana as though it were mana of any type to cast those spells.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:TriggeredCard$CardPower
Oracle:Enchant creature an opponent controls\nWhen enchanted creature dies, exile cards equal to its power from the top of its owner's library. You may cast spells from among those cards for as long as they remain exiled, and you may spend mana as though it were mana of any type to cast those spells.

View File

@@ -1,6 +1,6 @@
Name:Deadly Rollick
ManaCost:3 B
Types:Instant
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ All | MayPlay$ True | MayPlayDontGrantZonePermissions$ True | MayPlayWithoutManaCost$ True | IsPresent$ Card.IsCommander+YouCtrl | Description$ If you control a commander, you may cast this spell without paying its mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | Caster$ You | Cost$ 0 | EffectZone$ All | IsPresent$ Card.IsCommander+YouCtrl | Description$ If you control a commander, you may cast this spell without paying its mana cost.
A:SP$ ChangeZone | Cost$ 3 B | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | SpellDescription$ Exile target creature.
Oracle:If you control a commander, you may cast this spell without paying its mana cost.\nExile target creature.
Oracle:If you control a commander, you may cast this spell without paying its mana cost.\nExile target creature.

View File

@@ -2,7 +2,7 @@ Name:Deepwood Legate
ManaCost:3 B
Types:Creature Shade
PT:1/1
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ All | AddKeyword$ Alternative Cost:0 | CheckSVar$ X | CheckSecondSVar$ Y | Description$ If an opponent controls a Forest and you control a Swamp, you may cast this spell without paying its mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | Caster$ You | Cost$ 0 | EffectZone$ All | CheckSVar$ X | CheckSecondSVar$ Y | Description$ If an opponent controls a Forest and you control a Swamp, you may cast this spell without paying its mana cost.
A:AB$ Pump | Cost$ B | Defined$ Self | NumAtt$ +1 | NumDef$ +1 | SpellDescription$ CARDNAME gets +1/+1 until end of turn.
SVar:X:Count$Valid Forest.OppCtrl
SVar:Y:Count$Valid Swamp.YouCtrl

View File

@@ -1,6 +1,6 @@
Name:Deflecting Swat
ManaCost:2 R
Types:Instant
S:Mode$ Continuous | Affected$ Card.Self | EffectZone$ All | MayPlay$ True | MayPlayDontGrantZonePermissions$ True | MayPlayWithoutManaCost$ True | IsPresent$ Card.IsCommander+YouCtrl | Description$ If you control a commander, you may cast this spell without paying its mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | Caster$ You | Cost$ 0 | EffectZone$ All | IsPresent$ Card.IsCommander+YouCtrl | Description$ If you control a commander, you may cast this spell without paying its mana cost.
A:SP$ ChangeTargets | Cost$ 2 R | TargetType$ Spell,Activated,Triggered | Optional$ True | ValidTgts$ Card | TgtPrompt$ Select target spell or ability | SpellDescription$ You may choose new targets for target spell or ability.
Oracle:If you control a commander, you may cast this spell without paying its mana cost.\nYou may choose new targets for target spell or ability.
Oracle:If you control a commander, you may cast this spell without paying its mana cost.\nYou may choose new targets for target spell or ability.

View File

@@ -3,5 +3,5 @@ ManaCost:6 B
Types:Creature Horror
PT:6/6
K:Trample
SVar:AltCost:Cost$ Sac<3/Creature.Black> | Description$ Trample
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ Sac<3/Creature.Black> | Description$ Trample
Oracle:You may sacrifice three black creatures rather than pay this spell's mana cost.\nTrample

View File

@@ -4,5 +4,5 @@ Types:Creature Demon
PT:9/9
K:Trample
K:Flying
SVar:AltCost:Cost$ PayLife<6> Sac<3/Creature.Black> | Description$ You may pay 6 life and sacrifice three black creatures rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ PayLife<6> Sac<3/Creature.Black> | Description$ You may pay 6 life and sacrifice three black creatures rather than pay this spell's mana cost.
Oracle:You may pay 6 life and sacrifice three black creatures rather than pay this spell's mana cost.\nFlying, trample

View File

@@ -4,7 +4,7 @@ Types:Enchantment Aura
K:Enchant creature
A:SP$ Attach | Cost$ 1 B B | ValidTgts$ Creature | AILogic$ Pump
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 3 | AddToughness$ 1 | AddKeyword$ Flying | AddType$ Demon | Description$ Enchanted creature gets +3/+1, has flying, and is a Demon in addition to its other types.
SVar:AltCost:Cost$ 1 B B PayLife<3> Discard<1/Card> | ActivationZone$ Graveyard | Description$ You may cast CARDNAME from your graveyard by paying 3 life and discarding a card in addition to paying its other costs.
S:Mode$ AlternativeZone | ValidCard$ Card.Self | EffectZone$ All | ExtraCost$ PayLife<3> Discard<1/Card> | ActivationZone$ Graveyard | Description$ You may cast CARDNAME from your graveyard by paying 3 life and discarding a card in addition to paying its other costs.
DeckHas:Ability$Discard & Ability$Graveyard
SVar:DiscardMe:1
Oracle:Enchant creature\nEnchanted creature gets +3/+1, has flying, and is a Demon in addition to its other types.\nYou may cast Demonic Embrace from your graveyard by paying 3 life and discarding a card in addition to paying its other costs.

View File

@@ -5,9 +5,9 @@ PT:2/1
K:First Strike
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME enters the battlefield, exile target instant or sorcery card from an opponent's graveyard. You may cast it this turn, and you may spend mana as though it were mana of any type to cast that spell. If that spell would be put into a graveyard this turn, exile it instead.
SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Graveyard | Destination$ Exile | ValidTgts$ Instant.OppOwn,Sorcery.OppOwn | RememberChanged$ True | TgtPrompt$ Choose target instant or sorcery card from an opponent's graveyard | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ STPlay | ExileOnMoved$ Exile | SubAbility$ DBEffect2
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreType$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may cast that card this turn, and you may spend mana as though it were mana of any type to cast that spell. If that card would be put into a graveyard this turn, exile it instead.
SVar:DBEffect2:DB$ Effect | RememberObjects$ Remembered | ExileOnMoved$ Stack | ReplacementEffects$ ReplaceGraveyard | SVars$ MoveExile | SubAbility$ DBCleanup
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ STPlay | ExileOnMoved$ Exile | SubAbility$ DBEffect2
SVar:STMayPlay:Mode$ AlternativeZone | ValidCard$ Card.IsRemembered+nonLand | Caster$ You | Origin$ Exile | MayPlayIgnoreType$ True | Description$ You may cast that card this turn, and you may spend mana as though it were mana of any type to cast that spell. If that card would be put into a graveyard this turn, exile it instead.
SVar:DBEffect2:DB$ Effect | RememberObjects$ RememberedCard | ExileOnMoved$ Stack | ReplacementEffects$ ReplaceGraveyard | SubAbility$ DBCleanup
SVar:ReplaceGraveyard:Event$ Moved | ValidCard$ Card.IsRemembered | Origin$ Stack | Destination$ Graveyard | ReplaceWith$ MoveExile | Description$ If that card would be put into your graveyard this turn, exile it instead.
SVar:MoveExile:DB$ ChangeZone | Defined$ ReplacedCard | Origin$ Stack | Destination$ Exile
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True

View File

@@ -1,7 +1,7 @@
Name:Disrupting Shoal
ManaCost:X U U
Types:Instant Arcane
SVar:AltCost:Cost$ ExileFromHand<1/Card.Blue+Other/blue card> | Description$ You may exile a blue card with converted mana cost X from your hand rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ ExileFromHand<1/Card.Blue+Other/blue card> | Description$ You may exile a blue card with converted mana cost X from your hand rather than pay this spell's mana cost.
A:SP$ Pump | Cost$ X U U | IsCurse$ True | TargetType$ Spell | TgtZone$ Stack | TgtPrompt$ Select target spell | ValidTgts$ Card | SubAbility$ DBCounter
SVar:DBCounter:DB$ Counter | Defined$ Targeted | ConditionCheckSVar$ T | ConditionSVarCompare$ EQZ | SpellDescription$ Counter target spell if its converted mana cost is X.
SVar:X:Count$xPaid

View File

@@ -1,7 +1,7 @@
Name:Downhill Charge
ManaCost:2 R
Types:Instant
SVar:AltCost:Cost$ Sac<1/Mountain> | Description$ You may sacrifice a Mountain rather than pay this spell's mana cost.
S:Mode$ AlternativeCost | ValidCard$ Card.Self | EffectZone$ All | Cost$ Sac<1/Mountain> | Description$ You may sacrifice a Mountain rather than pay this spell's mana cost.
A:SP$ Pump | Cost$ 2 R | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +X | SpellDescription$ Target creature gets +X/+0 until end of turn, where X is the number of Mountains you control.
SVar:X:Count$TypeYouCtrl.Mountain
Oracle:You may sacrifice a Mountain rather than pay this spell's mana cost.\nTarget creature gets +X/+0 until end of turn, where X is the number of Mountains you control.

View File

@@ -5,7 +5,7 @@ PT:4/4
R:Event$ Moved | ActiveZones$ Battlefield | Origin$ Battlefield | Destination$ Graveyard | ValidLKI$ Creature.nonToken+OppCtrl | ReplaceWith$ Exile | CheckSelfLKIZone$ True | Description$ If a nontoken creature an opponent controls would die, exile that card with an ice counter on it instead.
SVar:Exile:DB$ ChangeZone | Origin$ Battlefield | Destination$ Exile | Defined$ ReplacedCard | SubAbility$ DBPutCounter
SVar:DBPutCounter:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ ICE | CounterNum$ 1
S:Mode$ Continuous | Affected$ Card.OppOwn+counters_GE1_ICE+nonLand | AffectedZone$ Exile | MayPlay$ True | MayPlaySnowIgnoreColor$ True | Description$ You may cast spells from among cards in exile your opponents own with ice counters on them, and you may spend mana from snow sources as though it were mana of any color to cast those spells.
S:Mode$ AlternativeZone | ValidCard$ Card.OppOwn+counters_GE1_ICE+nonLand | Caster$ You | Origin$ Exile | MayPlaySnowIgnoreColor$ True | Description$ You may cast spells from among cards in exile your opponents own with ice counters on them, and you may spend mana from snow sources as though it were mana of any color to cast those spells.
DeckNeeds:Type$Snow
DeckHas:Ability$Counters
Oracle:If a nontoken creature an opponent controls would die, exile that card with an ice counter on it instead.\nYou may cast spells from among cards in exile your opponents own with ice counters on them, and you may spend mana from snow sources as though it were mana of any color to cast those spells.

View File

@@ -1,9 +1,8 @@
Name:Dream Halls
ManaCost:3 U U
Types:Enchantment
S:Mode$ Continuous | Affected$ Card.nonToken | AddKeyword$ Alternative Cost:Discard<1/Card.SharesColorWith/color sharing> | AffectedZone$ Hand,Graveyard,Exile,Library,Command | Description$ Rather than pay the mana cost for a spell, its controller may discard a card that shares a color with that spell.
S:Mode$ AlternativeCost | ValidCard$ Card | Cost$ Discard<1/Card.SharesColorWith/color sharing> | Description$ Rather than pay the mana cost for a spell, its controller may discard a card that shares a color with that spell.
SVar:NonStackingEffect:True
SVar:AllowFreeCast:Discard
AI:RemoveDeck:Random
SVar:Picture:http://www.wizards.com/global/images/magic/general/dream_halls.jpg
Oracle:Rather than pay the mana cost for a spell, its controller may discard a card that shares a color with that spell.

Some files were not shown because too many files have changed in this diff Show More