...
 
Commits (53)
......@@ -594,6 +594,11 @@ public class ComputerUtilCost {
if (c == null || c.isUntapped()) {
return false;
}
} else if ("RiskFactor".equals(aiLogic)) {
final Player activator = sa.getActivatingPlayer();
if (!activator.canDraw() || activator.hasKeyword("You can't draw more than one card each turn.")) {
return false;
}
} else if ("MorePowerful".equals(aiLogic)) {
final int sourceCreatures = sa.getActivatingPlayer().getCreaturesInPlay().size();
final int payerCreatures = payer.getCreaturesInPlay().size();
......
......@@ -22,9 +22,8 @@ import java.util.List;
public class CopyPermanentAi extends SpellAbilityAi {
@Override
protected boolean canPlayAI(Player aiPlayer, SpellAbility sa) {
// Card source = sa.getHostCard();
// TODO - I'm sure someone can do this AI better
Card source = sa.getHostCard();
PhaseHandler ph = aiPlayer.getGame().getPhaseHandler();
String aiLogic = sa.getParamOrDefault("AILogic", "");
......@@ -38,6 +37,11 @@ public class CopyPermanentAi extends SpellAbilityAi {
return ph.is(PhaseType.END_OF_TURN);
} else if ("AtOppEOT".equals(aiLogic)) {
return ph.is(PhaseType.END_OF_TURN) && ph.getPlayerTurn() != aiPlayer;
} else if ("DuplicatePerms".equals(aiLogic)) {
final List<Card> valid = AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa);
if (valid.size() < 2) {
return false;
}
}
if (sa.hasParam("AtEOT") && !aiPlayer.getGame().getPhaseHandler().is(PhaseType.MAIN1)) {
......@@ -46,7 +50,7 @@ public class CopyPermanentAi extends SpellAbilityAi {
if (sa.hasParam("Defined")) {
// If there needs to be an imprinted card, don't activate the ability if nothing was imprinted yet (e.g. Mimic Vat)
if (sa.getParam("Defined").equals("Imprinted.ExiledWithSource") && sa.getHostCard().getImprintedCards().isEmpty()) {
if (sa.getParam("Defined").equals("Imprinted.ExiledWithSource") && source.getImprintedCards().isEmpty()) {
return false;
}
}
......@@ -60,9 +64,32 @@ public class CopyPermanentAi extends SpellAbilityAi {
if (sa.usesTargeting() && sa.hasParam("TargetingPlayer")) {
sa.resetTargets();
Player targetingPlayer = AbilityUtils.getDefinedPlayers(sa.getHostCard(), sa.getParam("TargetingPlayer"), sa).get(0);
Player targetingPlayer = AbilityUtils.getDefinedPlayers(source, sa.getParam("TargetingPlayer"), sa).get(0);
sa.setTargetingPlayer(targetingPlayer);
return targetingPlayer.getController().chooseTargetsFor(sa);
} else if (sa.getTargetRestrictions() != null && sa.getTargetRestrictions().canTgtPlayer()) {
if (!sa.isCurse()) {
if (sa.canTarget(aiPlayer)) {
sa.getTargets().add(aiPlayer);
return true;
} else {
for (Player p : aiPlayer.getTeamMates(true)) {
if (sa.canTarget(p)) {
sa.getTargets().add(p);
return true;
}
}
return false;
}
} else {
for (Player p : aiPlayer.getOpponents()) {
if (sa.canTarget(p)) {
sa.getTargets().add(p);
return true;
}
}
return false;
}
} else {
return this.doTriggerAINoCost(aiPlayer, sa, false);
}
......
......@@ -452,14 +452,14 @@ public class DamageDealAi extends DamageAiBase {
for (SpellAbility sa : pw.getSpellAbilities()) {
if (sa.hasParam("Ultimate") && sa.getPayCosts() != null) {
int loyaltyCost = 0;
Integer loyaltyCost = 0;
CostRemoveCounter remLoyalty = sa.getPayCosts().getCostPartByType(CostRemoveCounter.class);
if (remLoyalty != null) {
// if remLoyalty is null, generally there's an AddCounter<0/LOYALTY> cost, like for Gideon Jura.
loyaltyCost = remLoyalty.convertAmount();
}
if (loyaltyCost != 0 && loyaltyCost - curLoyalty <= 1) {
if (loyaltyCost != null && loyaltyCost != 0 && loyaltyCost - curLoyalty <= 1) {
// Will ultimate soon
pwScore += 10000;
}
......
......@@ -74,6 +74,10 @@ public class PumpAi extends PumpAiBase {
return doAristocratLogic(sa, ai);
} else if (aiLogic.startsWith("AristocratCounters")) {
return doAristocratWithCountersLogic(sa, ai);
} else if ("RiskFactor".equals(aiLogic)) {
if (ai.getCardsIn(ZoneType.Hand).size() + 3 >= ai.getMaxHandSize()) {
return false;
}
}
return super.checkAiLogic(ai, sa, aiLogic);
......
......@@ -31,10 +31,6 @@ public class RepeatEachAi extends SpellAbilityAi {
return SpecialCardAi.PriceOfProgress.consider(aiPlayer, sa);
} else if ("Never".equals(logic)) {
return false;
} else if ("CloneMyTokens".equals(logic)) {
if (CardLists.filter(aiPlayer.getCreaturesInPlay(), Presets.TOKEN).size() < 2) {
return false;
}
} else if ("CloneAllTokens".equals(logic)) {
List<Card> humTokenCreats = CardLists.filter(aiPlayer.getOpponents().getCreaturesInPlay(), Presets.TOKEN);
List<Card> compTokenCreats = CardLists.filter(aiPlayer.getCreaturesInPlay(), Presets.TOKEN);
......
......@@ -1296,8 +1296,8 @@ public class AbilityUtils {
}
}
else if (defined.equals("EffectSource")) {
if (card.getEffectSource() != null) {
sas.addAll(card.getEffectSource().getSpellAbilities());
if (card.getEffectSourceAbility() != null) {
sas.add(card.getEffectSourceAbility().getRootAbility());
}
}
else if (defined.equals("SourceFirstSpell")) {
......
......@@ -165,6 +165,7 @@ public enum ApiType {
DamageResolve (DamageResolveEffect.class),
ChangeZoneResolve (ChangeZoneResolveEffect.class),
InternalEtbReplacement (ETBReplacementEffect.class),
InternalLegendaryRule (CharmEffect.class),
InternalIgnoreEffect (CharmEffect.class);
......
......@@ -341,7 +341,7 @@ public abstract class SpellAbilityEffect {
protected static void addLeaveBattlefieldReplacement(final Card card, final SpellAbility sa, final String zone) {
final Card host = sa.getHostCard();
final Game game = card.getGame();
final Card eff = createEffect(host, sa.getActivatingPlayer(), host.getName() + "'s Effect", host.getImageKey());
final Card eff = createEffect(sa, sa.getActivatingPlayer(), host.getName() + "'s Effect", host.getImageKey());
addLeaveBattlefieldReplacement(eff, zone);
......@@ -378,8 +378,9 @@ public abstract class SpellAbilityEffect {
}
// create a basic template for Effect to be used somewhere else
protected static Card createEffect(final Card hostCard, final Player controller, final String name,
protected static Card createEffect(final SpellAbility sa, 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());
......@@ -404,7 +405,7 @@ public abstract class SpellAbilityEffect {
eff.setColor(hostCard.determineColor().getColor());
}
eff.setImmutable(true);
eff.setEffectSource(hostCard);
eff.setEffectSource(sa);
return eff;
}
......@@ -440,7 +441,7 @@ public abstract class SpellAbilityEffect {
// build an Effect with that infomation
String name = host.getName() + "'s Effect";
final Card eff = createEffect(host, controller, name, host.getImageKey());
final Card eff = createEffect(sa, controller, name, host.getImageKey());
if (cards != null) {
eff.addRemembered(cards);
}
......
package forge.game.ability.effects;
import forge.game.Game;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.CardZoneTable;
import forge.game.spellability.SpellAbility;
public class ChangeZoneResolveEffect extends SpellAbilityEffect {
public ChangeZoneResolveEffect() {
// TODO Auto-generated constructor stub
}
@Override
public void resolve(SpellAbility sa) {
final Game game = sa.getHostCard().getGame();
CardZoneTable table = sa.getChangeZoneTable();
if (table != null) {
table.triggerChangesZoneAll(game);
table.clear();
}
}
/* (non-Javadoc)
* @see forge.game.ability.SpellAbilityEffect#getStackDescription(forge.game.spellability.SpellAbility)
*/
@Override
protected String getStackDescription(SpellAbility sa) {
return "";
}
}
......@@ -15,6 +15,7 @@ import forge.game.card.Card;
import forge.game.card.CardCollectionView;
import forge.game.card.CardFactory;
import forge.game.card.CardLists;
import forge.game.card.CardZoneTable;
import forge.game.card.token.TokenInfo;
import forge.game.combat.Combat;
import forge.game.event.GameEventCombatChanged;
......@@ -153,11 +154,23 @@ public class CopyPermanentEffect extends SpellAbilityEffect {
}
}
} else {
tgtCards = getTargetCards(sa);
tgtCards = getDefinedCardsOrTargeted(sa);
}
boolean useZoneTable = true;
CardZoneTable triggerList = sa.getChangeZoneTable();
if (triggerList == null) {
triggerList = new CardZoneTable();
useZoneTable = false;
}
if (sa.hasParam("ChangeZoneTable")) {
sa.setChangeZoneTable(triggerList);
useZoneTable = true;
}
for (final Card c : tgtCards) {
if (!sa.usesTargeting() || c.canBeTargetedBy(sa)) {
// if it only targets player, it already got all needed cards from defined
if (!sa.usesTargeting() || sa.getTargetRestrictions().canTgtPlayer() || c.canBeTargetedBy(sa)) {
Card proto = getProtoType(sa, c);
List <Card> token = TokenInfo.makeToken(proto, controller, true, numCopies);
......@@ -170,6 +183,10 @@ public class CopyPermanentEffect extends SpellAbilityEffect {
//game.getTriggerHandler().registerActiveTrigger(copy, false);
final Card copyInPlay = game.getAction().moveToPlay(t, sa, null);
if (copyInPlay.getZone() != null) {
triggerList.put(ZoneType.None, copyInPlay.getZone().getZoneType(), copyInPlay);
}
// when copying something stolen:
//copyInPlay.setSetCode(c.getSetCode());
......@@ -245,6 +262,11 @@ public class CopyPermanentEffect extends SpellAbilityEffect {
}
} // end canBeTargetedBy
} // end foreach Card
if (!useZoneTable) {
triggerList.triggerChangesZoneAll(game);
triggerList.clear();
}
} // end resolve
......
......@@ -174,10 +174,12 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
if (sa.hasParam("Epic")) {
copy.getHostCard().removeIntrinsicKeyword("Epic");
SpellAbility sub = copy;
while (sub.getSubAbility() != null) {
while (sub.getSubAbility() != null && !sub.hasParam("Epic")) {
sub = sub.getSubAbility();
}
sub.getParent().setSubAbility(null);
if (sub != null) {
sub.getParent().setSubAbility(sub.getSubAbility());
}
}
copies.add(copy);
......
......@@ -116,7 +116,7 @@ public class EffectEffect extends SpellAbilityEffect {
image = hostCard.getImageKey();
}
final Card eff = createEffect(hostCard, controller, name, image);
final Card eff = createEffect(sa, controller, name, image);
// Grant SVars first in order to give references to granted abilities
if (effectSVars != null) {
......
......@@ -185,6 +185,8 @@ public class PlayEffect extends SpellAbilityEffect {
tgtCard.setToken(true);
tgtCard.setZone(zone);
// to fix the CMC
tgtCard.setCopiedPermanent(original);
if (zone != null) {
zone.add(tgtCard);
}
......@@ -284,7 +286,7 @@ public class PlayEffect extends SpellAbilityEffect {
final Player controller = sa.getActivatingPlayer();
final String name = hostCard.getName() + "'s Effect";
final String image = hostCard.getImageKey();
final Card eff = createEffect(hostCard, controller, name, image);
final Card eff = createEffect(sa, controller, name, image);
eff.addRemembered(c);
......
......@@ -23,7 +23,7 @@ public abstract class RegenerateBaseEffect extends SpellAbilityEffect {
// create Effect for Regeneration
final Card eff = createEffect(
hostCard, sa.getActivatingPlayer(), hostCard.getName() + "'s Regeneration", hostCard.getImageKey());
sa, sa.getActivatingPlayer(), hostCard.getName() + "'s Regeneration", hostCard.getImageKey());
eff.addRemembered(list);
addForgetOnMovedTrigger(eff, "Battlefield");
......
......@@ -84,6 +84,9 @@ public class RepeatEachEffect extends SpellAbilityEffect {
sa.setDamageMap(new CardDamageMap());
sa.setPreventMap(new CardDamageMap());
}
if (sa.hasParam("ChangeZoneTable")) {
sa.setChangeZoneTable(new CardZoneTable());
}
if (loopOverCards) {
// TODO (ArsenalNut 22 Dec 2012) Add logic to order cards for AI
......@@ -216,5 +219,9 @@ public class RepeatEachEffect extends SpellAbilityEffect {
sa.getDamageMap().triggerDamageDoneOnce(false, sa);
sa.setDamageMap(null);
}
if (sa.hasParam("ChangeZoneTable")) {
sa.getChangeZoneTable().triggerChangesZoneAll(game);
sa.setChangeZoneTable(null);
}
}
}
......@@ -38,6 +38,7 @@ import forge.game.ability.SpellAbilityEffect;
import forge.game.card.Card;
import forge.game.card.CardCollection;
import forge.game.card.CardUtil;
import forge.game.card.CardZoneTable;
import forge.game.combat.Combat;
import forge.game.event.GameEventCombatChanged;
import forge.game.event.GameEventTokenCreated;
......@@ -277,6 +278,17 @@ public class TokenEffect extends SpellAbilityEffect {
tokenInfo = new TokenInfo(prototype, host);
}
boolean useZoneTable = true;
CardZoneTable triggerList = sa.getChangeZoneTable();
if (triggerList == null) {
triggerList = new CardZoneTable();
useZoneTable = false;
}
if (sa.hasParam("ChangeZoneTable")) {
sa.setChangeZoneTable(triggerList);
useZoneTable = true;
}
for (final Player controller : AbilityUtils.getDefinedPlayers(host, this.tokenOwner, sa)) {
List<Card> tokens;
......@@ -302,6 +314,9 @@ public class TokenEffect extends SpellAbilityEffect {
// Should this be catching the Card that's returned?
Card c = game.getAction().moveToPlay(tok, sa);
if (c.getZone() != null) {
triggerList.put(ZoneType.None, c.getZone().getZoneType(), c);
}
if (sa.hasParam("AtEOTTrig")) {
addSelfTrigger(sa, sa.getParam("AtEOTTrig"), c);
......@@ -336,6 +351,11 @@ public class TokenEffect extends SpellAbilityEffect {
}
}
if (!useZoneTable) {
triggerList.triggerChangesZoneAll(game);
triggerList.clear();
}
game.fireEvent(new GameEventTokenCreated());
if (combatChanged) {
......
......@@ -105,6 +105,8 @@ public class Card extends GameEntity implements Comparable<Card> {
// if this card is attached or linked to something, what card is it currently attached to
private Card encoding, cloneOrigin, haunting, effectSource, pairedWith, meldedWith;
private SpellAbility effectSourceAbility = null;
private GameEntity entityAttachedTo = null;
private GameEntity mustAttackEntity = null;
......@@ -5609,12 +5611,24 @@ public class Card extends GameEntity implements Comparable<Card> {
}
public Card getEffectSource() {
if (effectSourceAbility != null) {
return effectSourceAbility.getHostCard();
}
return effectSource;
}
public SpellAbility getEffectSourceAbility() {
return effectSourceAbility;
}
public void setEffectSource(Card src) {
effectSource = src;
}
public void setEffectSource(SpellAbility sa) {
effectSourceAbility = sa;
}
public boolean isStartsGameInPlay() {
return startsGameInPlay;
}
......
......@@ -108,6 +108,9 @@ public class CardFactoryUtil {
@Override
public boolean canPlay() {
if (hostCard.isInPlay()) {
return false; // cut short if already on the battlefield, avoids side effects when checking statics
}
CardStateName stateBackup = hostCard.getCurrentStateName();
boolean face = hostCard.isFaceDown();
hostCard.turnFaceDownNoUpdate();
......@@ -3903,14 +3906,14 @@ public class CardFactoryUtil {
// Epic does modify existing SA, and does not add new one
// Add the Epic effect as a subAbility
String dbStr = "DB$ Effect | Triggers$ EpicTrigger | SVars$ EpicCopy | StaticAbilities$ EpicCantBeCast | Duration$ Permanent";
String dbStr = "DB$ Effect | Triggers$ EpicTrigger | SVars$ EpicCopy | StaticAbilities$ EpicCantBeCast | Duration$ Permanent | Epic$ True";
final AbilitySub newSA = (AbilitySub) AbilityFactory.getAbility(dbStr.toString(), card);
card.setSVar("EpicCantBeCast", "Mode$ CantBeCast | ValidCard$ Card | Caster$ You | EffectZone$ Command | Description$ For the rest of the game, you can't cast spells.");
card.setSVar("EpicTrigger", "Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ EpicCopy | TriggerDescription$ "
newSA.setSVar("EpicCantBeCast", "Mode$ CantBeCast | ValidCard$ Card | Caster$ You | EffectZone$ Command | Description$ For the rest of the game, you can't cast spells.");
newSA.setSVar("EpicTrigger", "Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ EpicCopy | TriggerDescription$ "
+ "At the beginning of each of your upkeeps, copy " + card.toString() + " except for its epic ability.");
card.setSVar("EpicCopy", "DB$ CopySpellAbility | Defined$ EffectSource | Epic$ True");
newSA.setSVar("EpicCopy", "DB$ CopySpellAbility | Defined$ EffectSource | Epic$ True");
final SpellAbility origSA = card.getFirstSpellAbility();
......
......@@ -19,10 +19,23 @@ public class CardZoneTable extends ForwardingTable<ZoneType, ZoneType, CardColle
// TODO use EnumBasedTable if exist
private Table<ZoneType, ZoneType, CardCollection> dataMap = HashBasedTable.create();
public CardZoneTable(Table<ZoneType, ZoneType, CardCollection> cardZoneTable) {
this.putAll(cardZoneTable);
}
public CardZoneTable() {
}
/**
* special put logic, add Card to Card Collection
*/
public CardCollection put(ZoneType rowKey, ZoneType columnKey, Card value) {
if (rowKey == null) {
rowKey = ZoneType.None;
}
if (columnKey == null) {
columnKey = ZoneType.None;
}
CardCollection old;
if (contains(rowKey, columnKey)) {
old = get(rowKey, columnKey);
......@@ -42,7 +55,7 @@ public class CardZoneTable extends ForwardingTable<ZoneType, ZoneType, CardColle
public void triggerChangesZoneAll(final Game game) {
if (!isEmpty()) {
final Map<String, Object> runParams = Maps.newHashMap();
runParams.put("Cards", this);
runParams.put("Cards", new CardZoneTable(this));
game.getTriggerHandler().runTrigger(TriggerType.ChangesZoneAll, runParams, false);
}
}
......
......@@ -31,6 +31,7 @@ import forge.game.card.CardCollection;
import forge.game.card.CardCollectionView;
import forge.game.card.CardDamageMap;
import forge.game.card.CardFactory;
import forge.game.card.CardZoneTable;
import forge.game.cost.Cost;
import forge.game.cost.CostPart;
import forge.game.cost.CostPartMana;
......@@ -125,7 +126,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
private SpellAbilityRestriction restrictions = new SpellAbilityRestriction();
private SpellAbilityCondition conditions = new SpellAbilityCondition();
private AbilitySub subAbility = null;
private Map<String, AbilitySub> additionalAbilities = Maps.newHashMap();
private Map<String, List<AbilitySub>> additionalAbilityLists = Maps.newHashMap();
......@@ -161,9 +162,10 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
private CardCollection lastStateBattlefield = null;
private CardCollection lastStateGraveyard = null;
private CardDamageMap damageMap = null;
private CardDamageMap preventMap = null;
private CardZoneTable changeZoneTable = null;
public CardCollection getLastStateBattlefield() {
return lastStateBattlefield;
......@@ -283,7 +285,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
// Spell, and Ability, and other Ability objects override this method
public abstract boolean canPlay();
public boolean canPlay(boolean checkOptionalCosts) {
if (canPlay()) {
return true;
......@@ -298,17 +300,17 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
}
return false;
}
public boolean canPlayWithOptionalCost(OptionalCostValue opt) {
return GameActionUtil.addOptionalCosts(this, Lists.newArrayList(opt)).canPlay();
}
public boolean isPossible() {
return canPlay(); //by default, ability is only possible if it can be played
return canPlay(); //by default, ability is only possible if it can be played
}
public boolean promptIfOnlyPossibleAbility() {
return false; //by default, don't prompt user if ability is only possible ability
return false; //by default, don't prompt user if ability is only possible ability
}
// all Spell's and Abilities must override this method
......@@ -607,7 +609,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
}
}
}
// key for autoyield - the card description (including number) (if there is a card) plus the effect description
public String yieldKey() {
if (getHostCard() != null) {
......@@ -631,7 +633,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
setDescription(s);
}
}
public String getOriginalStackDescription() {
return originalStackDescription;
}
......@@ -645,7 +647,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
originalDescription = s;
description = originalDescription;
}
public String getOriginalDescription() {
return originalDescription;
}
......@@ -709,7 +711,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
}
view.updateDescription(this); //description changes when sub-abilities change
}
public Map<String, AbilitySub> getAdditionalAbilities() {
return additionalAbilities;
}
......@@ -719,7 +721,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
}
return null;
}
public boolean hasAdditionalAbility(final String name) {
return additionalAbilities.containsKey(name);
}
......@@ -744,7 +746,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
return ImmutableList.of();
}
}
public void setAdditionalAbilityList(final String name, final List<AbilitySub> list) {
if (list == null || list.isEmpty()) {
additionalAbilityLists.remove(name);
......@@ -890,6 +892,10 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
if (preventMap != null) {
clone.preventMap = new CardDamageMap(preventMap);
}
if (changeZoneTable != null) {
clone.changeZoneTable = new CardZoneTable();
clone.changeZoneTable.putAll(changeZoneTable);
}
// clear maps for copy, the values will be added later
clone.additionalAbilities = Maps.newHashMap();
......@@ -1127,7 +1133,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
// Restrictions coming from target
return entity.canBeTargetedBy(this);
}
// is this a wrapping ability (used by trigger abilities)
public boolean isWrapper() {
return false;
......@@ -1387,20 +1393,20 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
/**
* returns true if another target can be added
* @return
* @return
*/
public boolean canAddMoreTarget() {
if (!this.usesTargeting()) {
return false;
}
return getTargets().getNumTargeted() < getTargetRestrictions().getMaxTargets(hostCard, this);
}
public boolean isZeroTargets() {
return getTargetRestrictions().getMinTargets(hostCard, this) == 0 && getTargets().getNumTargeted() == 0;
}
public boolean isTargetNumberValid() {
if (!this.usesTargeting()) {
return getTargets().isEmpty();
......@@ -1776,7 +1782,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
for (AbilitySub sa : additionalAbilities.values()) {
sa.changeText();
}
for (List<AbilitySub> list : additionalAbilityLists.values()) {
for (AbilitySub sa : list) {
sa.changeText();
......@@ -1886,12 +1892,12 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
return score;
}
public CardDamageMap getDamageMap() {
if (damageMap != null) {
return damageMap;
} else if (getParent() != null) {
return getParent().getDamageMap();
return getParent().getDamageMap();
}
return null;
}
......@@ -1900,7 +1906,16 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
if (preventMap != null) {
return preventMap;
} else if (getParent() != null) {
return getParent().getPreventMap();
return getParent().getPreventMap();
}
return null;
}
public CardZoneTable getChangeZoneTable() {
if (changeZoneTable != null) {
return changeZoneTable;
} else if (getParent() != null) {
return getParent().getChangeZoneTable();
}
return null;
}
......@@ -1911,6 +1926,9 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
public void setPreventMap(final CardDamageMap map) {
preventMap = map;
}
public void setChangeZoneTable(final CardZoneTable table) {
changeZoneTable = table;
}
public SpellAbility getOriginalAbility() {
return grantorOriginal;
......
......@@ -19,7 +19,8 @@ public enum ZoneType {
Sideboard(true),
Ante(false),
SchemeDeck(true),
PlanarDeck(true);
PlanarDeck(true),
None(true);
public static final List<ZoneType> STATIC_ABILITIES_SOURCE_ZONES = Arrays.asList(new ZoneType[]{Battlefield, Graveyard, Exile, Command/*, Hand*/});
......
Name:Ajani's Influence
ManaCost:2 W W
Types:Sorcery
A:SP$ PutCounter | Cost$ 2 W W | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 2 | SpellDescription$ Put two +1/+1 counters on target creature.\nLook at the top five cards of your library. You may reveal a white card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. | SubAbility$ DBDig
SVar:DBDig:DB$ Dig | DigNum$ 5 | ChangeNum$ 1 | Optional$ True | ForceRevealToController$ True | ChangeValid$ Card.White | RestRandomOrder$ True
A:SP$ PutCounter | Cost$ 2 W W | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 2 | SpellDescription$ Put two +1/+1 counters on target creature. | SubAbility$ DBDig
SVar:DBDig:DB$ Dig | DigNum$ 5 | ChangeNum$ 1 | Optional$ True | ForceRevealToController$ True | ChangeValid$ Card.White | RestRandomOrder$ True | SpellDescription$ Look at the top five cards of your library. You may reveal a white card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
DeckHas:Ability$Counters
Oracle:Put two +1/+1 counters on target creature.\nLook at the top five cards of your library. You may reveal a white card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
\ No newline at end of file
Name:Apex of Power
ManaCost:7 R R R
Types:Sorcery
A:SP$ Mill | Cost$ 7 R R R | Origin$ Library | Destination$ Exile | NumCards$ 7 | RememberMilled$ True | SubAbility$ DBEffect | Exile the top seven cards from your library. Until end of turn, you may cast nonland cards exiled this way.\nIf this spell was cast from your hand, add ten mana of any one color.
A:SP$ Mill | Cost$ 7 R R R | Origin$ Library | Destination$ Exile | NumCards$ 7 | RememberMilled$ 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: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 nonland cards exiled this way.\nIf this spell was cast from your hand, add ten mana of any one color.
Oracle:Exile the top seven cards of your library. Until end of turn, you may cast nonland cards exiled this way.\nIf this spell was cast from your hand, add ten mana of any one color.
\ No newline at end of file
......@@ -2,7 +2,7 @@ Name:Ayula, Queen Among Bears
ManaCost:1 G
Types:Legendary Creature Bear
PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Bear.YouCtrl+Other | TriggerZones$ Battlefield | Execute$ TrigChoose | TriggerDescription$ Whenever another Bear enters the battlefield under your control, choose one —\n• Put two +1/+1 counters on target Bear.\n• Target Bear you control fights target creature you don’t control.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Bear.YouCtrl+Other | TriggerZones$ Battlefield | Execute$ TrigChoose | TriggerDescription$ Whenever another Bear enters the battlefield under your control, ABILITY
SVar:TrigChoose:DB$ Charm | Choices$ DBCounter,DBPump
SVar:DBCounter:DB$ PutCounter | ValidTgts$ Bear | Tgtprompt$ Select target Bear | CounterType$ P1P1 | CounterNum$ 2 | SpellDescription$ Put two +1/+1 counters on target Bear.
SVar:DBPump:DB$ Pump | ValidTgts$ Bear.YouCtrl | TgtPrompt$ Choose target creature you control | SubAbility$ DBFight | SpellDescription$ Target Bear you control fights target creature you don't control.
......
Name:Bestial Menace
ManaCost:3 G G
Types:Sorcery
A:SP$ Token | Cost$ 3 G G | TokenAmount$ 1 | TokenScript$ g_1_1_snake | TokenOwner$ You | LegacyImage$ | SubAbility$ DBWolfToken | SpellDescription$ Create a 1/1 green Snake creature token,
A:SP$ Token | Cost$ 3 G G | TokenAmount$ 1 | TokenScript$ g_1_1_snake | TokenOwner$ You | LegacyImage$ | SubAbility$ DBWolfToken | ChangeZoneTable$ True | SpellDescription$ Create a 1/1 green Snake creature token,
SVar:DBWolfToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_2_2_wolf | TokenOwner$ You | LegacyImage$ g 2 2 wolf wwk | SubAbility$ DBElephantToken | SpellDescription$ a 2/2 green Wolf creature token,
SVar:DBElephantToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_3_3_elephant | TokenOwner$ You | LegacyImage$ g 3 3 elephant wwk | SpellDescription$ and a 3/3 green Elephant creature token.
SVar:DBElephantToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_3_3_elephant | TokenOwner$ You | LegacyImage$ g 3 3 elephant wwk | SubAbility$ DBResolve | SpellDescription$ and a 3/3 green Elephant creature token.
SVar:DBResolve:DB$ ChangeZoneResolve
SVar:Picture:http://www.wizards.com/global/images/magic/general/bestial_menace.jpg
Oracle:Create a 1/1 green Snake creature token, a 2/2 green Wolf creature token, and a 3/3 green Elephant creature token.
Name:Camaraderie
ManaCost:4 G W
Types:Sorcery
A:SP$ GainLife | Cost$ 4 G W | Defined$ You | LifeAmount$ X | References$ X | SubAbility$ DBDraw | SpellDescription$ You gain X life and draw X cards, where X is the number of creatures you control. Creatures you control get +1/+1 until end of turn.
A:SP$ GainLife | Cost$ 4 G W | Defined$ You | LifeAmount$ X | References$ X | SubAbility$ DBDraw | SpellDescription$ You gain X life and draw X cards, where X is the number of creatures you control.
SVar:DBDraw:DB$ Draw | NumCards$ X | References$ X | SubAbility$ DBPumpAll
SVar:DBPumpAll:DB$ PumpAll | ValidCards$ Creature.YouCtrl | NumAtt$ +1 | NumDef$ +1 | SpellDescription$ Creatures you control get +1/+1 until end of turn.
SVar:X:Count$TypeYouCtrl.Creature
SVar:PlayMain1:TRUE
Oracle:You gain X life and draw X cards, where X is the number of creatures you control. Creatures you control get +1/+1 until end of turn.
Oracle:You gain X life and draw X cards, where X is the number of creatures you control. Creatures you control get +1/+1 until end of turn.
\ No newline at end of file
......@@ -4,15 +4,15 @@ Types:Enchantment
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChoose | Static$ True | TriggerDescription$ CARDNAME enters the battlefield under the control of an opponent of your choice.
SVar:TrigChoose:DB$ ChoosePlayer | Defined$ You | Choices$ Player.Opponent | ChoiceTitle$ Choose an opponent to give control to: | AILogic$ Curse | SubAbility$ DBDonate | SpellDescription$ CARDNAME enters the battlefield under the control of an opponent of your choice.
SVar:DBDonate:DB$ GainControl | Defined$ Self | NewController$ Player.Chosen | SubAbility$ ClearRemembered
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigCharm | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, choose one that hasn't been chosen
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigCharm | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, ABILITY
SVar:TrigCharm:DB$ Charm | Choices$ LifePact,DiscardPact,ZombiesPact | ChoiceRestriction$ NotRemembered | RememberChoice$ True | CharmNum$ 1
SVar:LifePact:DB$ SetLife | Defined$ You | LifeAmount$ 4 | ChoiceName$ LifePact | SpellDescription$ Your life total becomes 4.
SVar:DiscardPact:DB$ Discard | Defined$ You | Mode$ Hand | ChoiceName$ DiscardPact | SpellDescription$ Discard your hand.
SVar:ZombiesPact:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ MakeZombies | ChoiceName$ ZombiesPact | SpellDescription$ Each opponent creates five 2/2 black Zombie creature tokens.
SVar:ZombiesPact:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ MakeZombies | ChoiceName$ ZombiesPact | ChangeZoneTable$ True | SpellDescription$ Each opponent creates five 2/2 black Zombie creature tokens.
SVar:MakeZombies:DB$ Token | LegacyImage$ b 2 2 zombie rna | TokenAmount$ 5 | TokenScript$ b_2_2_zombie | TokenOwner$ Remembered | SpellDescription$ Each opponent creates five 2/2 black Zombie creature tokens.
# Clear RememberChoice just in case it's not getting cleared by Zone changes
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ ClearRemembered | Static$ True
SVar:ClearRemembered:DB$ Cleanup | ClearRemembered$ True
AI:RemoveDeck:Random
DeckHas:Ability$Token
Oracle:Captive Audience enters the battlefield under the control of an opponent of your choice.\nAt the beginning of your upkeep, choose one that hasn't been chosen —\n• Your life total becomes 4.\n• Discard your hand.\n• Each opponent creates five 2/2 black Zombie creature tokens.
Oracle:Captive Audience enters the battlefield under the control of an opponent of your choice.\nAt the beginning of your upkeep, choose one that hasn't been chosen —\n• Your life total becomes 4.\n• Discard your hand.\n• Each opponent creates five 2/2 black Zombie creature tokens.
\ No newline at end of file
......@@ -8,7 +8,7 @@ SVar:TrigDiscard:DB$ Discard | Cost$ 3 R | AnyNumber$ True | Optional$ True | Mo
SVar:DBDraw:DB$Draw | Defined$ You | NumCards$ Y | References$ Y | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Y:Remembered$Amount
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigDamageAll | OptionalDecider$ You | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, it deals X damage to each opponent and each planeswalker they control, where X is the number of land cards in your graveyard.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigDamageAll | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, it deals X damage to each opponent and each planeswalker they control, where X is the number of land cards in your graveyard.
SVar:TrigDamageAll:DB$ DamageAll | ValidPlayers$ Player.Opponent | ValidCards$ Planeswalker.OppCtrl | NumDmg$ X | References$ X | SpellDescription$ CARDNAME deals X damage to each opponent and each planeswalker they control, where X is the number of land cards in your graveyard.
SVar:X:Count$TypeInYourYard.Land
Oracle:{1}{R}: Creatures you control get +1/+0 and gain haste until end of turn.\nWhen Cavalier of Flame enters the battlefield, discard any number of cards, then draw that many cards.\nWhen Cavalier of Flame dies, it deals X damage to each opponent and each planeswalker they control, where X is the number of land cards in your graveyard.
......@@ -4,7 +4,7 @@ Types:Creature Elemental Knight
PT:4/5
K:Lifelink
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigSac | TriggerDescription$ When CARDNAME enters the battlefield, you may sacrifice another creature. When you do, destroy target creature an opponent controls.
SVar:TrigSac:AB$ ImmediateTrigger | Cost$ Sac<1/Creature.Other/another creature> | Execute$ TrigDestroy
SVar:TrigSac:AB$ ImmediateTrigger | Cost$ Sac<1/Creature.Other/another creature> | Execute$ TrigDestroy | TriggerDescription$ When you do, destroy target creature an opponent controls.
SVar:TrigDestroy:DB$ Destroy | ValidTgts$ Creature.OppCtrl | TgtPrompt$ Select target creature an opponent controls
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | TriggerController$ TriggeredCardController | Execute$ TrigChange | TriggerDescription$ When CARDNAME dies, return target creature card with converted mana cost 3 or less from your graveyard to the battlefield.
SVar:TrigChange:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature.YouOwn+cmcLE3
......
......@@ -7,5 +7,5 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.S
SVar:TrigDig:DB$ Dig | DigNum$ 5 | ChangeNum$ 1 | ChangeValid$ Land | Optional$ True | DestinationZone$ Battlefield | DestinationZone2$ Graveyard
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigExile | OptionalDecider$ TriggeredCardController | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, you may exile it. If you do, put another target card from your graveyard on top of your library.
SVar:TrigExile:DB$ ChangeZone | Origin$ Graveyard | Destination$ Exile | Defined$ TriggeredCard | SubAbility$ DBChange
SVar:DBChange:DB$ ChangeZone | Origin$ Graveyard | Destination$ Library | ValidTgts$ Card.YouOwn | TgtPrompt$ Select another target card from your graveyard | AITgts$ Card.Other | ChangeNum$ 1
SVar:DBChange:DB$ ChangeZone | Origin$ Graveyard | Destination$ Library | ValidTgts$ Card.YouOwn+Other | TgtPrompt$ Select another target card from your graveyard | AITgts$ Card.Other | ChangeNum$ 1
Oracle:Reach\nWhen Cavalier of Thorns enters the battlefield, reveal the top five cards of your library. You may put a land card from among them onto the battlefield. Put the rest into your graveyard.\nWhen Cavalier of Thorns dies, you may exile it. If you do, put another target card from your graveyard on top of your library.
......@@ -3,7 +3,7 @@ ManaCost:1 R
Types:Legendary Artifact
T:Mode$ AbilityCast | ValidCard$ Planeswalker.Chandra | ValidActivatingPlayer$ You | ValidSA$ Activated.Loyalty | TriggerZones$ Battlefield | Execute$ TrigCopyAbility | TriggerDescription$ Whenever you activate a loyalty ability of a Chandra planeswalker, you may pay {1}. If you do, copy that ability. You may choose new targets for the copy.
SVar:TrigCopyAbility:AB$ CopySpellAbility | Cost$ 1 | Defined$ TriggeredSpellAbility
A:AB$ Draw | Cost$ 1 T Discard<1/Mountain;Card.Red> | NumCards$ 1 | SpellDescription$ Draw a card.
A:AB$ Draw | Cost$ 1 T Discard<1/Mountain;Card.Red/Mountain card or a red card> | NumCards$ 1 | SpellDescription$ Draw a card.
SVar:AIPreference:SacCost$Card.Mountain,Card.Red
DeckNeeds:Type$Chandra
Oracle:Whenever you activate a loyalty ability of a Chandra planeswalker, you may pay {1}. If you do, copy that ability. You may choose new targets for the copy.\n{1}, {T}, Discard a Mountain card or a red card: Draw a card.
Name:Chaos Wand
ManaCost:3
Types:Artifact
A:AB$ DigUntil | Cost$ 4 T | ValidTgts$ Opponent | Valid$ Instant,Sorcery | ValidDescription$ instant or sorcery | FoundDestination$ Exile | RevealedDestination$ Exile | RememberFound$ True | RememberRevealed$ True | IsCurse$ True | SubAbility$ DBPlay | SpellDescription$ Target opponent exiles cards from the top of their library until they exile an instant or sorcery card. You may cast that card without paying its mana cost.
A:AB$ DigUntil | Cost$ 4 T | ValidTgts$ Opponent | Valid$ Instant,Sorcery | ValidDescription$ instant or sorcery | FoundDestination$ Exile | RevealedDestination$ Exile | RememberFound$ True | RememberRevealed$ True | IsCurse$ True | SubAbility$ DBPlay | SpellDescription$ Target opponent exiles cards from the top of their library until they exile an instant or sorcery card. You may cast that card without paying its mana cost. Then put the exiled cards that weren't cast this way on the bottom of that library in a random order.
SVar:DBPlay:DB$ Play | Defined$ Remembered | ValidZone$ Exile | Valid$ Instant.IsRemembered,Sorcery.IsRemembered | WithoutManaCost$ True | RememberObjects$ Remembered | Optional$ True | ForgetTargetRemembered$ True | SubAbility$ DBRestRandomOrder
SVar:DBRestRandomOrder:DB$ ChangeZone | Defined$ Remembered | AtRandom$ True | Origin$ Library | Destination$ Library | LibraryPosition$ -1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/chaos_wand.jpg
Oracle:{4}, {T}: Target opponent exiles cards from the top of their library until they exile an instant or sorcery card. You may cast that card without paying its mana cost. Then put the exiled cards that weren't cast this way on the bottom of that library in a random order.
Oracle:{4}, {T}: Target opponent exiles cards from the top of their library until they exile an instant or sorcery card. You may cast that card without paying its mana cost. Then put the exiled cards that weren't cast this way on the bottom of that library in a random order.
\ No newline at end of file
Name:Clone Legion
ManaCost:7 U U
Types:Sorcery
A:SP$ RepeatEach | Cost$ 7 U U | ValidTgts$ Player | UseImprinted$ True | RepeatCards$ Creature.TargetedPlayerCtrl | Zone$ Battlefield | RepeatSubAbility$ DBClone | StackDescription$ SpellDescription | SpellDescription$ For each creature target player controls, create a token that's a copy of that creature.
SVar:DBClone:DB$ CopyPermanent | Defined$ Imprinted | NumCopies$ 1
A:SP$ CopyPermanent | Cost$ 7 U U | ValidTgts$ Player | Defined$ Valid Creature.TargetedPlayerCtrl | NumCopies$ 1 | AILogic$ DuplicatePerms | StackDescription$ SpellDescription | SpellDescription$ For each creature target player controls, create a token that's a copy of that creature.
SVar:Picture:http://www.wizards.com/global/images/magic/general/clone_legion.jpg
Oracle:For each creature target player controls, create a token that's a copy of that creature.
......@@ -4,7 +4,7 @@ Types:Enchantment Aura Curse
K:Enchant player
A:SP$ Attach | Cost$ 2 B | ValidTgts$ Player | AILogic$ Curse
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigRepeat | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, create a 2/2 black Zombie creature token. Each opponent attacking that player does the same.
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigToken
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigToken | ChangeZoneTable$ True
SVar:TrigToken:DB$ Token | TokenOwner$ Player.IsRemembered | TokenAmount$ 1 | TokenScript$ b_2_2_zombie | LegacyImage$ b 2 2 zombie c17 | SpellDescription$ Create a 2/2 black Zombie creature token. Activate this ability only any time you could cast a sorcery.
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_vitality.jpg
Oracle:Enchant player\nWhenever enchanted player is attacked, create a 2/2 black Zombie creature token. Each opponent attacking that player does the same.
......@@ -4,7 +4,7 @@ Types:Enchantment Aura Curse
K:Enchant player
A:SP$ Attach | Cost$ R | ValidTgts$ Player | AILogic$ Curse
T:Mode$ AttackersDeclared | ValidCard$ Creature | AttackedTarget$ Player.EnchantedBy | Execute$ TrigRepeat | TriggerZones$ Battlefield | TriggerDescription$ Whenever enchanted player is attacked, create a colorless artifact token named Gold. It has "Sacrifice this artifact: Add one mana of any color." Each opponent attacking that player does the same.
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigToken
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ TriggeredAttackingPlayerAndYou | RepeatSubAbility$ TrigToken | ChangeZoneTable$ True
SVar:TrigToken:DB$ Token | TokenScript$ gold | TokenOwner$ Player.IsRemembered | TokenAmount$ 1 | LegacyImage$ gold c17
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_vitality.jpg
Oracle:Enchant player\nWhenever enchanted player is attacked, create a colorless artifact token named Gold. It has "Sacrifice this artifact: Add one mana of any color." Each opponent attacking that player does the same.
......@@ -2,7 +2,7 @@ Name:Curse of the Swine
ManaCost:X U U
Types:Sorcery
A:SP$ ChangeZone | Cost$ X U U | ValidTgts$ Creature | TargetMin$ 0 | TargetMax$ MaxTgts | References$ X,MaxTgts | Origin$ Battlefield | Destination$ Exile | RememberLKI$ True | SubAbility$ DBToken | SpellDescription$ Exile X target creatures. For each creature exiled this way, its controller creates a 2/2 green Boar creature token.
SVar:DBToken:DB$ RepeatEach | UseImprinted$ True | DefinedCards$ DirectRemembered | RepeatSubAbility$ TokenBoar | SubAbility$ DBCleanup
SVar:DBToken:DB$ RepeatEach | UseImprinted$ True | DefinedCards$ DirectRemembered | RepeatSubAbility$ TokenBoar | SubAbility$ DBCleanup | ChangeZoneTable$ True
SVar:TokenBoar:DB$ Token | TokenAmount$ 1 | TokenScript$ g_2_2_boar | TokenOwner$ ImprintedController | LegacyImage$ g 2 2 boar ths
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Targeted$Amount
......
......@@ -2,7 +2,7 @@ Name:Descent of the Dragons
ManaCost:4 R R
Types:Sorcery
A:SP$ Destroy | Cost$ 4 R R | ValidTgts$ Creature | TargetMin$ 0 | TargetMax$ MaxTgts | References$ MaxTgts | RememberLKI$ True | SubAbility$ DBToken | SpellDescription$ Destroy any number of target creatures. For each creature destroyed this way, its controller creates a 4/4 red Dragon creature token with flying.
SVar:DBToken:DB$ RepeatEach | UseImprinted$ True | DefinedCards$ DirectRemembered | RepeatSubAbility$ TokenDragon | SubAbility$ DBCleanup
SVar:DBToken:DB$ RepeatEach | UseImprinted$ True | DefinedCards$ DirectRemembered | RepeatSubAbility$ TokenDragon | ChangeZoneTable$ True | SubAbility$ DBCleanup
SVar:TokenDragon:DB$ Token | TokenAmount$ 1 | TokenScript$ r_4_4_dragon_flying | TokenOwner$ ImprintedController | LegacyImage$ r 4 4 dragon flying dtk
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:MaxTgts:Count$Valid Creature
......
Name:Elephant Resurgence
ManaCost:1 G
Types:Sorcery
A:SP$ RepeatEach | Cost$ 1 G | RepeatPlayers$ Player | RepeatSubAbility$ DBToken | SpellDescription$ Each player creates a green Elephant creature token. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard."
A:SP$ RepeatEach | Cost$ 1 G | RepeatPlayers$ Player | RepeatSubAbility$ DBToken | ChangeZoneTable$ True | SpellDescription$ Each player creates a green Elephant creature token. Those creatures have "This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard."
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_x_x_elephant_resurgence | TokenOwner$ Player.IsRemembered | LegacyImage$ g x x elephant resurgence pcy
SVar:NeedsToPlayVar:Z GE2
SVar:Z:SVar$Z1/Minus.Z2
......
Name:Ezuri's Predation
ManaCost:5 G G G
Types:Sorcery
A:SP$ RepeatEach | Cost$ 5 G G G | RepeatCards$ Creature.OppCtrl | UseImprinted$ True | RepeatSubAbility$ DBToken | SpellDescription$ For each creature your opponents control, create a 4/4 green Beast creature token. Each of those Beasts fights a different one of those creatures.
A:SP$ RepeatEach | Cost$ 5 G G G | RepeatCards$ Creature.OppCtrl | UseImprinted$ True | RepeatSubAbility$ DBToken | ChangeZoneTable$ True | SubAbility$ DBCleanup2 | SpellDescription$ For each creature your opponents control, create a 4/4 green Beast creature token. Each of those Beasts fights a different one of those creatures.
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ g_4_4_beast | TokenOwner$ You | LegacyImage$ g 4 4 beast c15 | RememberTokens$ True | SubAbility$ DBFight
SVar:DBFight:DB$ Fight | Defined$ Imprinted | ExtraDefined$ Remembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:DBCleanup2:DB$ Cleanup | ClearImprinted$ True
SVar:NeedsToPlay:Creature.OppCtrl+inZoneBattlefield+powerLE3
SVar:Picture:http://www.wizards.com/global/images/magic/general/ezuris_predation.jpg
Oracle:For each creature your opponents control, create a 4/4 green Beast creature token. Each of those Beasts fights a different one of those creatures.
......@@ -5,7 +5,7 @@ PT:5/4
K:Ninjutsu:2 U B
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigMill | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, that player exiles the top two cards of their library. Until end of turn, you may play those cards without paying their mana cost.
SVar:TrigMill:DB$ Mill | Defined$ TriggeredTarget | NumCards$ 2 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ Play | SubAbility$ DBCleanup | ExileOnMoved$ Exile
SVar:DBEffect:DB$ Effect | RememberObjects$ RememberedCard | StaticAbilities$ Play | SubAbility$ DBCleanup | ForgetOnMoved$ Exile
SVar:Play:Mode$ Continuous | MayPlay$ True | MayPlayWithoutManaCost$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ Until end of turn, you may play those cards without paying their mana cost.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
Oracle:Ninjutsu {2}{U}{B} ({2}{U}{B}, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking.)\nWhenever Fallen Shinobi deals combat damage to a player, that player exiles the top two cards of their library. Until end of turn, you may play those cards without paying their mana cost.
......@@ -4,7 +4,7 @@ Types:Land
K:CARDNAME enters the battlefield tapped.
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | CheckSVar$ X | SVarCompare$ GE7 | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME or another land enters the battlefield under your control, if you control seven or more lands with different names, create a 2/2 black Zombie creature token.
T:Mode$ ChangesZone | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ GE7 | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.YouCtrl | Execute$ TrigToken | Secondary$ True | TriggerDescription$ Whenever CARDNAME or another land enters the battlefield under your control, if you control seven or more lands with different names, create a 2/2 black Zombie creature token.
T:Mode$ ChangesZone | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ GE7 | Origin$ Any | Destination$ Battlefield | ValidCard$ Land.Other+YouCtrl | Execute$ TrigToken | Secondary$ True | TriggerDescription$ Whenever CARDNAME or another land enters the battlefield under your control, if you control seven or more lands with different names, create a 2/2 black Zombie creature token.
SVar:TrigToken:DB$ Token | TokenScript$ b_2_2_zombie | TokenOwner$ You | TokenAmount$ 1 | LegacyImage$ b 2 2 zombie m20
SVar:X:Count$DifferentCardNames_Land.YouCtrl+inZoneBattlefield
DeckHas:Ability$Token
......
......@@ -2,7 +2,7 @@ Name:For Each of You, a Gift
ManaCost:no cost
Types:Scheme
T:Mode$ SetInMotion | ValidCard$ Card.Self | Execute$ TrigRepeat | TriggerZones$ Command | TriggerDescription$ When you set this scheme in motion, for each opponent, create a 3/3 black Horror creature token that attacks that player each combat if able.
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBToken
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBToken | ChangeZoneTable$ True
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ b_3_3_horror_designated | TokenOwner$ You | LegacyImage$ b 3 3 horror designated e01 | TokenHiddenKeywords$ CARDNAME attacks specific player each combat if able:Remembered | TokenRemembered$ Player.IsRemembered
SVar:Picture:https://downloads.cardforge.org/images/cards/E01/For Each of You, a Gift.full.jpg
Oracle:When you set this scheme in motion, for each opponent, create a 3/3 black Horror creature token that attacks that player each combat if able.
......@@ -4,7 +4,7 @@ Types:Legendary Creature Hydra
PT:8/7
K:Vigilance
S:Mode$ ReduceCost | ValidCard$ Card.Hydra | Type$ Spell | Activator$ You | Amount$ 4 | Description$ Hydra spells you cast cost {4} less to cast.
T:Mode$ BecomesTarget | ValidTarget$ Creature.YouCtrl | SourceType$ Spell | ValidTarget$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ DBFight | TriggerDescription$ Whenever a creature you control becomes the target of a spell, CARDNAME fights up to one target creature you don't control.
T:Mode$ BecomesTarget | ValidTarget$ Creature.inZoneBattlefield+YouCtrl | SourceType$ Spell | TriggerZones$ Battlefield | Execute$ DBFight | TriggerDescription$ Whenever a creature you control becomes the target of a spell, CARDNAME fights up to one target creature you don't control.
SVar:DBFight:DB$ Fight | Defined$ Self | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Choose target creature you don't control
SVar:PlayMain1:TRUE
DeckHints:Type$Hydra
......
......@@ -4,7 +4,7 @@ Types:Plane Mirrodin
T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | IsSingleTarget$ True | Execute$ TrigCopy | TriggerZones$ Command | TriggerDescription$ Whenever a player casts an instant or sorcery spell with a single target, they copy that spell for each other spell, permanent, card not on the battlefield, and/or player the spell could target. Each copy targets a different one of them.
SVar:TrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | Controller$ TriggeredActivator | CopyForEachCanTarget$ Spell,Permanent,Card,Player
T:Mode$ PlanarDice | Result$ Chaos | TriggerZones$ Command | Execute$ RolledChaos | TriggerDescription$ Whenever you roll {CHAOS}, choose target creature. Each player except that creature's controller creates a token that's a copy of that creature.
SVar:RolledChaos:DB$ RepeatEach | RepeatPlayers$ NonTargetedController | RepeatSubAbility$ DBCopy | ValidTgts$ Creature | TgtPrompt$ Select target creature
SVar:RolledChaos:DB$ RepeatEach | RepeatPlayers$ NonTargetedController | RepeatSubAbility$ DBCopy | ValidTgts$ Creature | TgtPrompt$ Select target creature | ChangeZoneTable$ True
SVar:DBCopy:DB$ CopyPermanent | Defined$ ParentTarget | Controller$ Remembered
AI:RemoveDeck:All
SVar:Picture:http://www.wizards.com/global/images/magic/general/glimmervoid_basin.jpg
......
......@@ -7,7 +7,7 @@ SVar:OssuaryX:TriggeredCard$CardPower
SVar:MaxTgts:TriggeredCardController$Valid Creature.YouCtrl
T:Mode$ PlanarDice | Result$ Chaos | TriggerZones$ Command | Execute$ RolledChaos | TriggerDescription$ Whenever you roll {CHAOS}, each player exiles all creatures they control and creates X 1/1 green Saproling creature tokens, where X is the total power of the creatures they exiled this way. Then planeswalk.
SVar:RolledChaos:DB$ ChangeZoneAll | ChangeType$ Creature | Imprint$ True | Origin$ Battlefield | Destination$ Exile | SubAbility$ OssuaryRepeat
SVar:OssuaryRepeat:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ OssuaryTokens | SubAbility$ WalkAway
SVar:OssuaryRepeat:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ OssuaryTokens | SubAbility$ WalkAway | ChangeZoneTable$ True
SVar:OssuaryTokens:DB$ Token | TokenAmount$ OsX | References$ OsX | TokenScript$ g_1_1_saproling | TokenOwner$ Player.IsRemembered | LegacyImage$ g 1 1 saproling pc2
SVar:WalkAway:DB$ Planeswalk | SubAbility$ ClearImprinted
SVar:ClearImprinted:DB$ Cleanup | ClearImprinted$ True
......
Name:Hammer of Nazahn
ManaCost:4
Types:Legendary Artifact Equipment
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigAttach | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME or another Equipment enters the battlefield under your control, that Equipment to target creature you control.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigAttach | OptionalDecider$ You | TriggerDescription$ Whenever CARDNAME or another Equipment enters the battlefield under your control, you may attach that Equipment to target creature you control.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Equipment+Other+YouCtrl | TriggerZones$ Battlefield | Execute$ TrigAttach | OptionalDecider$ You | Secondary$ True | TriggerDescription$ Whenever CARDNAME or another Equipment enters the battlefield under your control, that Equipment to target creature you control.
SVar:TrigAttach:DB$ Attach | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Target creature you control | Object$ TriggeredCard
S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 2 | AddKeyword$ Indestructible | Description$ Equipped creature gets +2/+0 and has indestructible.
......
......@@ -3,7 +3,7 @@ ManaCost:2 B B
Types:Legendary Creature Spirit
PT:4/4
K:Flying
T:Mode$ BecomesTarget | ValidTarget$ Creature+inZoneBattlefield | TriggerZones$ Battlefield | Execute$ TrigDestroy | TriggerDescription$ Whenever a creature becomes the target of a spell or ability, destroy that creature.
T:Mode$ BecomesTarget | ValidTarget$ Creature.inZoneBattlefield | TriggerZones$ Battlefield | Execute$ TrigDestroy | TriggerDescription$ Whenever a creature becomes the target of a spell or ability, destroy that creature.
SVar:TrigDestroy:DB$Destroy | Defined$ TriggeredTarget
SVar:Picture:http://www.wizards.com/global/images/magic/general/horobi_deaths_wail.jpg
Oracle:Flying\nWhenever a creature becomes the target of a spell or ability, destroy that creature.
Name:Hour of Eternity
ManaCost:X X U U U
Types:Sorcery
A:SP$ ChangeZone | Cost$ X X U U U | Origin$ Graveyard | Destination$ Exile | TgtPrompt$ Choose target card in a graveyard | ValidTgts$ Creature.YouCtrl | TargetMin$ 0 | TargetMax$ MaxTgts | References$ MaxTgts | SubAbility$ DBRepeatEach | RememberChanged$ True | SpellDescription$ Exile X target creature cards from your graveyard. For each card exiled this way, create a token that's a copy of that card, except it's a 4/4 black Zombie.
SVar:DBRepeatEach:DB$ RepeatEach | UseImprinted$ True | RepeatCards$ Card.IsRemembered | Zone$ Exile | RepeatSubAbility$ DBClone | SubAbility$ DBCleanup
SVar:DBClone:DB$ CopyPermanent | Defined$ Imprinted | SetPower$ 4 | SetToughness$ 4 | SetColor$ Black | SetCreatureTypes$ Zombie | NumCopies$ 1
A:SP$ ChangeZone | Cost$ X X U U U | Origin$ Graveyard | Destination$ Exile | TgtPrompt$ Choose target card in a graveyard | ValidTgts$ Creature.YouCtrl | TargetMin$ 0 | TargetMax$ MaxTgts | References$ MaxTgts | SubAbility$ DBClone | RememberChanged$ True | SpellDescription$ Exile X target creature cards from your graveyard. For each card exiled this way, create a token that's a copy of that card, except it's a 4/4 black Zombie.
SVar:DBClone:DB$ CopyPermanent | Defined$ Remembered | SetPower$ 4 | SetToughness$ 4 | SetColor$ Black | SetCreatureTypes$ Zombie | NumCopies$ 1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Targeted$Amount
SVar:MaxTgts:Count$TypeInYourYard.Creature
......
......@@ -3,7 +3,7 @@ ManaCost:2 U
Types:Instant
K:Strive:1 U
A:SP$ ChangeZone | Cost$ 2 U | ValidTgts$ Creature | TargetMin$ 0 | TargetMax$ X | Origin$ Battlefield | Destination$ Exile | References$ X | RememberLKI$ True | SubAbility$ DBRepeat | SpellDescription$ Exile any number of target creatures. For each creature exiled this way, its controller creates a 4/4 blue Sphinx creature token with flying.
SVar:DBRepeat:DB$ RepeatEach | DefinedCards$ DirectRemembered | UseImprinted$ True | RepeatSubAbility$ DBToken | SubAbility$ DBCleanup
SVar:DBRepeat:DB$ RepeatEach | DefinedCards$ DirectRemembered | UseImprinted$ True | RepeatSubAbility$ DBToken | SubAbility$ DBCleanup | ChangeZoneTable$ True
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ u_4_4_sphinx_flying | TokenOwner$ ImprintedController | LegacyImage$ u 4 4 sphinx flying
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$Valid Creature
......
......@@ -2,7 +2,7 @@ Name:Imperial Mask
ManaCost:4 W
Types:Enchantment
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self+nonToken | Execute$ TrigCopyPermanent | TriggerDescription$ When CARDNAME enters the battlefield, if it's not a token, each of your teammates creates a token that's a copy of CARDNAME.
SVar:TrigCopyPermanent:DB$ RepeatEach | RepeatSubAbility$ DBClone | RepeatPlayers$ Player.Allies
SVar:TrigCopyPermanent:DB$ RepeatEach | RepeatSubAbility$ DBClone | RepeatPlayers$ Player.Allies | ChangeZoneTable$ True
SVar:DBClone:DB$ CopyPermanent | Defined$ TriggeredCard | Controller$ Remembered
S:Mode$ Continuous | Affected$ You | AddKeyword$ Hexproof | Description$ You have hexproof. (You can't be the target of spells or abilities your opponents control.)
SVar:NonStackingEffect:True
......
......@@ -3,7 +3,7 @@ ManaCost:3 G
Types:Sorcery
A:SP$ RepeatEach | Cost$ 3 G | RepeatPlayers$ Player | RepeatSubAbility$ DBChoose | StackDescription$ SpellDescription | SubAbility$ DBRepeatToken | SpellDescription$ Each player may reveal any number of creature cards from their hand. Then each player creates a 2/2 green Bear creature token for each card they revealed this way.
SVar:DBChoose:DB$ Reveal | Defined$ Player.IsRemembered | AnyNumber$ True | RevealValid$ Creature | RememberRevealed$ True
SVar:DBRepeatToken:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBToken | SubAbility$ DBCleanup
SVar:DBRepeatToken:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBToken | SubAbility$ DBCleanup | ChangeZoneTable$ True
SVar:DBToken:DB$ Token | TokenAmount$ X | References$ X | TokenScript$ g_2_2_bear | LegacyImage$ g 2 2 bear ons | TokenOwner$ Player.IsRemembered
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$ValidHand Card.IsRemembered+RememberedPlayerCtrl
......
......@@ -2,13 +2,17 @@ Name:Kharasha Foothills
ManaCost:no cost
Types:Plane Mongseng
T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | TriggerZones$ Command | Attacked$ Player | Execute$ TrigCopy | TriggerDescription$ Whenever a creature you control attacks a player, for each other opponent, you may create a token that's a copy of that creature, tapped and attacking that opponent. Exile those tokens at the beginning of the next end step.
SVar:TrigCopy:DB$ RepeatEach | RepeatPlayers$ OppNonTriggeredDefender | RepeatSubAbility$ DBCopy
SVar:DBCopy:DB$ CopyPermanent | Defined$ TriggeredAttacker | NumCopies$ 1 | CopyAttacking$ Remembered | Tapped$ True | AtEOT$ Exile | Optional$ True
SVar:TrigCopy:DB$ RepeatEach | RepeatPlayers$ OppNonTriggeredDefender | RepeatSubAbility$ DBCopy | ChangeZoneTable$ True
SVar:DBCopy:DB$ CopyPermanent | Defined$ TriggeredAttacker | NumCopies$ 1 | CopyAttacking$ Remembered | Tapped$ True | AtEOT$ Exile | Optional$ True | ImprintCopied$ True
SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ End Of Turn | Execute$ TrigExile | RememberObjects$ Imprinted | ChangeZoneTable$ True | TriggerDescription$ At the beginning of the next end step, exile those tokens. | SubAbility$ DBCleanup
SVar:TrigExile:DB$ ChangeZone | Defined$ DelayTriggerRemembered | Origin$ Battlefield | Destination$ Exile
T:Mode$ PlanarDice | Result$ Chaos | TriggerZones$ Command | Execute$ RolledChaos | TriggerDescription$ Whenever you roll {CHAOS}, you may sacrifice any number of creatures. If you do, CARDNAME deals that much damage to target creature.
SVar:RolledChaos:DB$ Sacrifice | Defined$ You | Amount$ SacX | References$ SacX | SacValid$ Creature | RememberSacrificed$ True | Optional$ True | SubAbility$ DBDmg
SVar:SacX:Count$Valid Creature.YouCtrl
SVar:DBDmg:DB$ DealDamage | ValidTgts$ Creature | NumDmg$ DmgX | References$ DmgX | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True
SVar:DmgX:Remembered$Amount
SVar:Picture:http://www.wizards.com/global/images/magic/general/kharasha_foothills.jpg
Oracle:Whenever a creature you control attacks a player, for each other opponent, you may create a token that's a copy of that creature, tapped and attacking that opponent. Exile those tokens at the beginning of the next end step.\nWhenever you roll {CHAOS}, you may sacrifice any number of creatures. If you do, Kharasha Foothills deals that much damage to target creature.
Name:Kindred Charge
ManaCost:4 R R
Types:Sorcery
A:SP$ ChooseType | Cost$ 4 R R | Defined$ You | Type$ Creature | SubAbility$ DBRepeatEach | AILogic$ MostProminentComputerControls | SpellDescription$ Choose a creature type. For each creature you control of the chosen type, create a token that's a copy of that creature. Those tokens gain haste. Exile them at the beginning of the next end step.
SVar:DBRepeatEach:DB$ RepeatEach | UseImprinted$ True | RepeatCards$ Creature.ChosenType+YouCtrl | Zone$ Battlefield | RepeatSubAbility$ DBClone
SVar:DBClone:DB$ CopyPermanent | Defined$ Imprinted | AddKeywords$ Haste | NumCopies$ 1 | AtEOT$ Exile
A:SP$ ChooseType | Cost$ 4 R R | Defined$ You | Type$ Creature | SubAbility$ DBClone | AILogic$ MostProminentComputerControls | SpellDescription$ Choose a creature type. For each creature you control of the chosen type, create a token that's a copy of that creature. Those tokens gain haste. Exile them at the beginning of the next end step.
SVar:DBClone:DB$ CopyPermanent | Defined$ Valid Creature.ChosenType+YouCtrl | AddKeywords$ Haste | NumCopies$ 1 | AtEOT$ Exile
SVar:NeedsToPlayVar:Z GE2
SVar:Z:Count$Valid Creature.YouCtrl
SVar:Picture:http://www.wizards.com/global/images/magic/general/kindred_charge.jpg
Oracle:Choose a creature type. For each creature you control of the chosen type, create a token that's a copy of that creature. Those tokens gain haste. Exile them at the beginning of the next end step.
Name:Liliana's Spoils
ManaCost:3 B
Types:Sorcery
A:SP$ Discard | Cost$ 3 B | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | NumCards$ 1 | Mode$ TgtChoose | SubAbility$ DBDig | SpellDescription$ Target opponent discards a card.\nLook at the top five cards of your library. You may reveal a black card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
SVar:DBDig:DB$ Dig | DigNum$ 5 | ChangeNum$ 1 | Optional$ True | ForceRevealToController$ True | ChangeValid$ Card.Black | RestRandomOrder$ True
A:SP$ Discard | Cost$ 3 B | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | NumCards$ 1 | Mode$ TgtChoose | SubAbility$ DBDig | SpellDescription$ Target opponent discards a card.
SVar:DBDig:DB$ Dig | DigNum$ 5 | ChangeNum$ 1 | Optional$ True | ForceRevealToController$ True | ChangeValid$ Card.Black | RestRandomOrder$ True | SpellDescription$ Look at the top five cards of your library. You may reveal a black card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
DeckHas:Ability$Discard
Oracle:Target opponent discards a card.\nLook at the top five cards of your library. You may reveal a black card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
\ No newline at end of file
......@@ -2,7 +2,7 @@ Name:March of Souls
ManaCost:4 W
Types:Sorcery
A:SP$ DestroyAll | Cost$ 4 W | ValidCards$ Creature | RememberDestroyed$ True | NoRegen$ True | SubAbility$ DBRepeat | SpellDescription$ Destroy all creatures.
SVar:DBRepeat:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBToken | SubAbility$ DBCleanup
SVar:DBRepeat:DB$ RepeatEach | RepeatPlayers$ Player | RepeatSubAbility$ DBToken | SubAbility$ DBCleanup | ChangeZoneTable$ True
SVar:DBToken:DB$ Token | TokenAmount$ X | References$ X | TokenScript$ w_1_1_spirit_flying | TokenOwner$ Player.IsRemembered | LegacyImage$ w 1 1 spirit flying pls | SpellDescription$ They can't be regenerated. For each creature destroyed this way, its controller creates a 1/1 white Spirit creature token with flying.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:RememberedLKI$FilterControlledByRemembered_Number$1
......
Name:Mirror Match
ManaCost:4 U U
Types:Instant
A:SP$ RepeatEach | Cost$ 4 U U | RepeatCards$ Creature.attackingYouOrYourPW | UseImprinted$ True | RepeatSubAbility$ DBCloneAndBlock | SubAbility$ DelTrig | ActivationPhases$ Declare Blockers | SpellDescription$ Cast CARDNAME only during the declare blockers step. For each creature attacking you or a planeswalker you control, create a token that's a copy of that creature and that's blocking that creature. Exile those tokens at end of combat.
A:SP$ RepeatEach | Cost$ 4 U U | RepeatCards$ Creature.attackingYouOrYourPW | UseImprinted$ True | RepeatSubAbility$ DBCloneAndBlock | SubAbility$ DelTrig | ActivationPhases$ Declare Blockers | ChangeZoneTable$ True | SpellDescription$ Cast CARDNAME only during the declare blockers step. For each creature attacking you or a planeswalker you control, create a token that's a copy of that creature and that's blocking that creature. Exile those tokens at end of combat.
SVar:DBCloneAndBlock:DB$ CopyPermanent | Defined$ Imprinted | CopyBlocking$ Imprinted | RememberCopied$ True
SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ EndCombat | Execute$ TrigExile | RememberObjects$ Remembered | TriggerDescription$ At end of combat, exile those tokens. | SubAbility$ DBCleanup
SVar:TrigExile:DB$ ChangeZone | Defined$ DelayTriggerRemembered | Origin$ Battlefield | Destination$ Exile
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/mirror_match.jpg
Oracle:Cast Mirror Match only during the declare blockers step.\nFor each creature attacking you or a planeswalker you control, create a token that's a copy of that creature and that's blocking that creature. Exile those tokens at end of combat.
\ No newline at end of file
Oracle:Cast Mirror Match only during the declare blockers step.\nFor each creature attacking you or a planeswalker you control, create a token that's a copy of that creature and that's blocking that creature. Exile those tokens at end of combat.
......@@ -2,7 +2,7 @@ Name:Parallel Evolution
ManaCost:3 G G
Types:Sorcery
K:Flashback:4 G G G
A:SP$ RepeatEach | Cost$ 3 G G | RepeatSubAbility$ DBClone | RepeatCards$ Creature.token | AILogic$ CloneAllTokens | SpellDescription$ For each creature token on the battlefield, its controller creates a token that's a copy of that creature.
A:SP$ RepeatEach | Cost$ 3 G G | RepeatSubAbility$ DBClone | RepeatCards$ Creature.token | AILogic$ CloneAllTokens | ChangeZoneTable$ True | SpellDescription$ For each creature token on the battlefield, its controller creates a token that's a copy of that creature.
SVar:DBClone:DB$ CopyPermanent | Defined$ Remembered | Controller$ RememberedController
AI:RemoveDeck:Random
SVar:Picture:http://www.wizards.com/global/images/magic/general/parallel_evolution.jpg
......
Name:Precognitive Perception
ManaCost:3 U U
Types:Instant
A:SP$ Scry | Cost$ 3 U U | ScryNum$ 3 | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | ConditionDefined$ Self | ConditionPresent$ Card.wasCast | SubAbility$ DBDraw | SpellDescription$ Draw three cards.\nAddendum — If you cast this spell during your main phase, instead scry 3, then draw three cards.
SVar:DBDraw:DB$ Draw | Cost$ 3 U U | NumCards$ 3
A:SP$ Scry | Cost$ 3 U U | ScryNum$ 3 | ConditionPlayerTurn$ True | ConditionPhases$ Main1,Main2 | ConditionDefined$ Self | ConditionPresent$ Card.wasCast | SubAbility$ DBDraw | SpellDescription$ Draw three cards.
SVar:DBDraw:DB$ Draw | Cost$ 3 U U | NumCards$ 3 | SpellDescription$ Addendum — If you cast this spell during your main phase, instead scry 3, then draw three cards.
Oracle:Draw three cards.\nAddendum — If you cast this spell during your main phase, instead scry 3, then draw three cards.
......@@ -2,7 +2,7 @@ Name:Rampage of the Clans
ManaCost:3 G
Types:Instant
A:SP$ DestroyAll | Cost$ 3 G | ValidCards$ Artifact,Enchantment | RememberDestroyed$ True | SubAbility$ DBRepeat | SpellDescription$ Destroy all artifacts and enchantments. For each permanent destroyed this way, its controller creates a 3/3 green Centaur creature token.
SVar:DBRepeat:DB$ RepeatEach | UseImprinted$ True | DefinedCards$ DirectRemembered | RepeatSubAbility$ DBToken | SubAbility$ DBCleanup
SVar:DBRepeat:DB$ RepeatEach | UseImprinted$ True | DefinedCards$ DirectRemembered | RepeatSubAbility$ DBToken | SubAbility$ DBCleanup | ChangeZoneTable$ True
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenOwner$ ImprintedController | TokenScript$ g_3_3_centaur | LegacyImage$ g 3 3 centaur rna
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ true
Oracle:Destroy all artifacts and enchantments. For each permanent destroyed this way, its controller creates a 3/3 green Centaur creature token.
Name:Revitalize
ManaCost:1 W
Types:Instant
A:SP$ GainLife | Cost$ 1 W | Defined$ You | LifeAmount$ 3 | SubAbility$ DBDraw | SpellDescription$ You gain 3 life.\nDraw a card.
SVar:DBDraw:DB$ Draw | NumCards$ 1 | Defined$ You
A:SP$ GainLife | Cost$ 1 W | Defined$ You | LifeAmount$ 3 | SubAbility$ DBDraw | SpellDescription$ You gain 3 life.
SVar:DBDraw:DB$ Draw | NumCards$ 1 | Defined$ You | SpellDescription$ Draw a card.
Oracle:You gain 3 life.\nDraw a card.
\ No newline at end of file
......@@ -3,7 +3,6 @@ ManaCost:GW
Types:Legendary Creature Elf Warrior
PT:1/1
A:AB$ Token | Cost$ 2 GW T | TokenAmount$ 1 | TokenScript$ gw_1_1_elf_warrior | TokenOwner$ You | LegacyImage$ gw 1 1 elf warrior shm | SpellDescription$ Create a 1/1 green and white Elf Warrior creature token.
A:AB$ RepeatEach | Cost$ 4 GW GW T | RepeatSubAbility$ DBClone | RepeatCards$ Creature.token+YouCtrl | AILogic$ CloneMyTokens | SpellDescription$ For each creature token you control, create a token that's a copy of that creature.
SVar:DBClone:DB$ CopyPermanent | Defined$ Remembered
A:AB$ CopyPermanent | Cost$ 4 GW GW T | AILogic$ DuplicatePerms | Defined$ Valid Creature.token+YouCtrl | SpellDescription$ For each creature token you control, create a token that's a copy of that creature.
SVar:Picture:http://www.wizards.com/global/images/magic/general/rhys_the_redeemed.jpg
Oracle:{2}{G/W}, {T}: Create a 1/1 green and white Elf Warrior creature token.\n{4}{G/W}{G/W}, {T}: For each creature token you control, create a token that's a copy of that creature.
......@@ -2,6 +2,6 @@ Name:Risk Factor
ManaCost:2 R
Types:Instant
K:Jump-start
A:SP$ Pump | StackDescription$ {p:Targeted} may have CARDNAME deal 4 damage to them. If {p:Targeted} doesn't, | Cost$ 2 R | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | UnlessCost$ DamageYou<4> | UnlessPayer$ Targeted | UnlessResolveSubs$ WhenNotPaid | SubAbility$ DBDraw | IsCurse$ True | SpellDescription$ Target opponent may have CARDNAME deal 4 damage to them. If that player doesn't, you draw three cards.
A:SP$ Pump | StackDescription$ {p:Targeted} may have CARDNAME deal 4 damage to them. If {p:Targeted} doesn't, | Cost$ 2 R | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | UnlessCost$ DamageYou<4> | UnlessPayer$ Targeted | UnlessResolveSubs$ WhenNotPaid | AILogic$ RiskFactor | UnlessAI$ RiskFactor | SubAbility$ DBDraw | IsCurse$ True | SpellDescription$ Target opponent may have CARDNAME deal 4 damage to them. If that player doesn't, you draw three cards.
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 3
Oracle:Target opponent may have Risk Factor deal 4 damage to them. If that player doesn't, you draw three cards.\nJump-start (You may cast this card from your graveyard by discarding a card in addition to paying its other costs. Then exile this card.)
......@@ -2,7 +2,7 @@ Name:Rotted Ones, Lay Siege
ManaCost:no cost
Types:Scheme
T:Mode$ SetInMotion | ValidCard$ Card.Self | Execute$ TrigRepeat | TriggerZones$ Command | TriggerDescription$ When you set this scheme in motion, for each opponent, put a 2/2 black Zombie creature token onto the battlefield that attacks that player each combat if able.
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBToken
SVar:TrigRepeat:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBToken | ChangeZoneTable$ True
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenScript$ b_2_2_zombie_designated | TokenOwner$ You | LegacyImage$ b 2 2 zombie designated arc | TokenRemembered$ Player.IsRemembered
SVar:Picture:https://downloads.cardforge.org/images/cards/ARC/Rotted Ones, Lay Siege.full.jpg
Oracle:When you set this scheme in motion, for each opponent, put a 2/2 black Zombie creature token onto the battlefield that attacks that player each combat if able.
......@@ -8,8 +8,6 @@ SVar:HBReduceCost:Mode$ ReduceCost | EffectZone$ Command | Type$ Spell | ValidCa
SVar:TrigCastSpell:Mode$ SpellCast | ValidActivatingPlayer$ You | TriggerZones$ Command | Execute$ RemoveEffect | Static$ True
SVar:RemoveEffect:DB$ ChangeZone | Origin$ Command | Destination$ Exile
SVar:X:Count$Valid Artifact.YouCtrl
A:AB$ RepeatEach | Cost$ SubCounter<7/LOYALTY> | Planeswalker$ True | Ultimate$ True | RepeatSubAbility$ DBClone | RepeatCards$ Artifact.YouCtrl | SpellDescription$ For each artifact you control, create a token that's a copy of it. Those tokens gain haste. Exile those tokens at the beginning of the next end step.
SVar:DBClone:DB$ CopyPermanent | Defined$ Remembered | AddKeywords$ Haste | AtEOT$ Exile
A:AB$ CopyPermanent | Cost$ SubCounter<7/LOYALTY> | Planeswalker$ True | Ultimate$ True | Defined$ Valid Artifact.YouCtrl | AddKeywords$ Haste | AtEOT$ Exile | AILogic$ DuplicatePerms | SpellDescription$ For each artifact you control, create a token that's a copy of it. Those tokens gain haste. Exile those tokens at the beginning of the next end step.
K:CARDNAME can be your commander.
Oracle:[+1]: Create a 1/1 colorless Servo artifact creature token.\n[+1]: The next spell you cast this turn costs {1} less to cast for each artifact you control as you cast it.\n[-7]: For each artifact you control, create a token that's a copy of it. Those tokens gain haste. Exile those tokens at the beginning of the next end step.\nSaheeli, the Gifted can be your commander.