Merge pull request #1136 from tool4ever/castSACMC

Remove CastSACMC
This commit is contained in:
Anthony Calosa
2022-07-19 12:56:01 +08:00
committed by GitHub
34 changed files with 58 additions and 82 deletions

View File

@@ -29,7 +29,6 @@ public enum AbilityKey {
Blockers("Blockers"),
CanReveal("CanReveal"),
CastSA("CastSA"),
CastSACMC("CastSACMC"),
Card("Card"),
Cards("Cards"),
CardLKI("CardLKI"),

View File

@@ -283,7 +283,7 @@ public class AbilityUtils {
System.err.println("Warning: couldn't find trigger SA in the chain of SpellAbility " + sa);
}
} else if (defined.equals("FirstRemembered")) {
Object o = Iterables.getFirst(hostCard.getRemembered(), null);
Object o = hostCard.getFirstRemembered();
if (o != null && o instanceof Card) {
cards.add(game.getCardState((Card) o));
}
@@ -542,6 +542,9 @@ public class AbilityUtils {
}
} else if (calcX[0].equals("OriginalHost")) {
val = xCount(ability.getOriginalHost(), calcX[1], ability);
} else if (calcX[0].equals("LastStateBattlefield") && ability instanceof SpellAbility) {
Card c = ((SpellAbility) ability).getLastStateBattlefield().get(card);
val = c == null ? 0 : xCount(c, calcX[1], ability);
} else if (calcX[0].startsWith("Remembered")) {
// Add whole Remembered list to handlePaid
final CardCollection list = new CardCollection();
@@ -685,10 +688,9 @@ public class AbilityUtils {
Object o = root.getTriggeringObject(AbilityKey.fromString(calcX[0].substring(9)));
val = o instanceof Player ? playerXProperty((Player) o, calcX[1], card, ability) : 0;
}
else if (calcX[0].equals("TriggeredSpellAbility")) {
final SpellAbility root = sa.getRootAbility();
SpellAbility sat = (SpellAbility) root.getTriggeringObject(AbilityKey.SpellAbility);
val = calculateAmount(sat.getHostCard(), calcX[1], sat);
else if (calcX[0].equals("TriggeredSpellAbility") || calcX[0].equals("TriggeredStackInstance") || calcX[0].equals("SpellTargeted")) {
final SpellAbility sat = getDefinedSpellAbilities(card, calcX[0], sa).get(0);
val = xCount(sat.getHostCard(), calcX[1], sat);
}
else if (calcX[0].startsWith("TriggerCount")) {
// TriggerCount is similar to a regular Count, but just
@@ -728,7 +730,7 @@ public class AbilityUtils {
else if (calcX[0].startsWith("Discarded")) {
final SpellAbility root = sa.getRootAbility();
list = root.getPaidList("Discarded");
if ((null == list) && root.isTrigger()) {
if (null == list && root.isTrigger()) {
list = root.getHostCard().getSpellPermanent().getPaidList("Discarded");
}
}
@@ -1847,7 +1849,7 @@ public class AbilityUtils {
return doXMath(0, expr, c, ctb);
}
}
list = CardLists.getValidCards(list, k[1], sa.getActivatingPlayer(), c, sa);
list = CardLists.getValidCards(list, k[1], player, c, sa);
return doXMath(list.size(), expr, c, ctb);
}
@@ -1871,7 +1873,7 @@ public class AbilityUtils {
return doXMath(0, expr, c, ctb);
}
}
list = CardLists.getValidCards(list, k[1], sa.getActivatingPlayer(), c, sa);
list = CardLists.getValidCards(list, k[1], player, c, sa);
return doXMath(list.size(), expr, c, ctb);
}
@@ -1899,14 +1901,14 @@ public class AbilityUtils {
// fallback if ctb isn't a spellability
if (sq[0].startsWith("LastStateBattlefield")) {
final String[] k = l[0].split(" ");
CardCollection list = new CardCollection(game.getLastStateBattlefield());
CardCollectionView list = game.getLastStateBattlefield();
list = CardLists.getValidCards(list, k[1], player, c, ctb);
return doXMath(list.size(), expr, c, ctb);
}
if (sq[0].startsWith("LastStateGraveyard")) {
final String[] k = l[0].split(" ");
CardCollection list = new CardCollection(game.getLastStateGraveyard());
CardCollectionView list = game.getLastStateGraveyard();
list = CardLists.getValidCards(list, k[1], player, c, ctb);
return doXMath(list.size(), expr, c, ctb);
}
@@ -2165,17 +2167,22 @@ public class AbilityUtils {
// Count$CardManaCost
if (sq[0].contains("CardManaCost")) {
Card ce;
if (sq[0].contains("Equipped") && c.isEquipping()) {
ce = c.getEquipping();
}
else if (sq[0].contains("Remembered")) {
if (sq[0].contains("Remembered")) {
ce = (Card) c.getFirstRemembered();
}
else {
ce = c;
}
return doXMath(ce == null ? 0 : ce.getCMC(), expr, c, ctb);
int cmc = ce == null ? 0 : ce.getCMC();
if (sq[0].contains("LKI") && ctb instanceof SpellAbility && ce != null && !ce.isInZone(ZoneType.Stack) && ce.getManaCost() != null) {
if (((SpellAbility) ctb).getXManaCostPaid() != null) {
cmc += ((SpellAbility) ctb).getXManaCostPaid() * ce.getManaCost().countX();
}
}
return doXMath(cmc, expr, c, ctb);
}
if (sq[0].startsWith("RememberedSize")) {

View File

@@ -122,8 +122,9 @@ public class CounterEffect extends SpellAbilityEffect {
CardZoneTable table = new CardZoneTable();
for (final SpellAbility tgtSA : sas) {
final Card tgtSACard = tgtSA.getHostCard();
// should remember even that spell cannot be countered, e.g. Dovescape
// TODO use LKI in case the spell gets countered before (else X amounts would be missing)
// should remember even that spell cannot be countered
// currently all effects using this are targeted in case the spell gets countered before
// so don't need to worry about LKI (else X amounts would be missing)
if (sa.hasParam("RememberCounteredCMC")) {
sa.getHostCard().addRemembered(Integer.valueOf(tgtSACard.getCMC()));
}

View File

@@ -45,6 +45,7 @@ import forge.game.zone.Zone;
import forge.game.zone.ZoneType;
import forge.util.CardTranslation;
import forge.util.Expressions;
import forge.util.FileSection;
import forge.util.Lang;
import forge.util.TextUtil;
@@ -89,41 +90,12 @@ public class StaticAbility extends CardTraitBase implements IIdentifiable, Clone
* @return a {@link java.util.HashMap} object.
*/
private static Map<String, String> parseParams(final String abString, final Card hostCard) {
final Map<String, String> mapParameters = Maps.newHashMap();
if (!(abString.length() > 0)) {
throw new RuntimeException("StaticEffectFactory : getAbility -- abString too short in "
+ hostCard.getName() + ": [" + abString + "]");
}
final String[] a = abString.split("\\|");
for (int aCnt = 0; aCnt < a.length; aCnt++) {
a[aCnt] = a[aCnt].trim();
}
if (!(a.length > 0)) {
throw new RuntimeException("StaticEffectFactory : getAbility -- a[] too short in " + hostCard.getName());
}
for (final String element : a) {
final String[] aa = element.split("\\$");
for (int aaCnt = 0; aaCnt < aa.length; aaCnt++) {
aa[aaCnt] = aa[aaCnt].trim();
}
if (aa.length != 2) {
final StringBuilder sb = new StringBuilder();
sb.append("StaticEffectFactory Parsing Error: Split length of ");
sb.append(element).append(" in ").append(hostCard.getName()).append(" is not 2.");
throw new RuntimeException(sb.toString());
}
mapParameters.put(aa[0], aa[1]);
}
return mapParameters;
return FileSection.parseToMap(abString, FileSection.DOLLAR_SIGN_KV_SEPARATOR);
}
/**

View File

@@ -313,8 +313,7 @@ public class TriggerSpellAbilityCastOrCopy extends Trigger {
AbilityKey.Player,
AbilityKey.Activator,
AbilityKey.CurrentStormCount,
AbilityKey.CurrentCastSpells,
AbilityKey.CastSACMC
AbilityKey.CurrentCastSpells
);
}

View File

@@ -308,7 +308,6 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
runParams.put(AbilityKey.Cost, sp.getPayCosts());
runParams.put(AbilityKey.Activator, sp.getActivatingPlayer());
runParams.put(AbilityKey.CastSA, si.getSpellAbility(true));
runParams.put(AbilityKey.CastSACMC, si.getSpellAbility(true).getHostCard().getCMC());
runParams.put(AbilityKey.CurrentStormCount, thisTurnCast.size());
runParams.put(AbilityKey.CurrentCastSpells, Lists.newArrayList(thisTurnCast));

View File

@@ -5,5 +5,5 @@ PT:4/4
K:Flying
T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigGainLife | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, you may gain life equal to that spell's mana value.
SVar:TrigGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
Oracle:Flying\nWhenever you cast a Spirit or Arcane spell, you may gain life equal to that spell's mana value.

View File

@@ -5,7 +5,7 @@ PT:3/3
K:Flying
T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDestroyAll | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, destroy all permanents with that spell's mana value.
SVar:TrigDestroyAll:DB$ DestroyAll | ValidCards$ Permanent.cmcEQX
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
AI:RemoveDeck:All
DeckHints:Type$Spirit|Arcane
AI:RemoveDeck:Random

View File

@@ -5,5 +5,5 @@ PT:4/4
K:Flying
T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigMill | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, you may have target player mill X cards, where X is that spell's mana value.
SVar:TrigMill:DB$ Mill | ValidTgts$ Player | TgtPrompt$ Select target player | NumCards$ X
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
Oracle:Flying\nWhenever you cast a Spirit or Arcane spell, you may have target player mill X cards, where X is that spell's mana value.

View File

@@ -4,7 +4,7 @@ Types:Legendary Creature Human Wizard
PT:3/3
T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, create a 0/0 green and blue Fractal creature token. Put X +1/+1 counters on it, where X is that spell's mana value.
SVar:TrigToken:DB$ Token | TokenScript$ gu_0_0_fractal | RememberTokens$ True | SubAbility$ DBPutCounter
SVar:DBPutCounter:DB$ PutCounter | Defined$ Remembered | CounterType$ P1P1 | CounterNum$ TriggerCount$CastSACMC | SubAbility$ DBCleanup
SVar:DBPutCounter:DB$ PutCounter | Defined$ Remembered | CounterType$ P1P1 | CounterNum$ TriggeredStackInstance$CardManaCostLKI | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:AB$ Pump | Cost$ 3 U | KW$ HIDDEN Unblockable | TgtPrompt$ Select target creature token | ValidTgts$ Creature.token | SpellDescription$ Target creature token can't be blocked this turn.
DeckHas:Ability$Token|Counters

View File

@@ -2,8 +2,7 @@ Name:Dovescape
ManaCost:3 WU WU WU
Types:Enchantment
T:Mode$ SpellCast | ValidCard$ Card.nonCreature | TriggerZones$ Battlefield | Execute$ TrigCounter | TriggerDescription$ Whenever a player casts a noncreature spell, counter that spell. That player creates X 1/1 white and blue Bird creature tokens with flying, where X is the spell's mana value.
SVar:TrigCounter:DB$ Counter | Defined$ TriggeredSpellAbility | RememberCounteredCMC$ True | SubAbility$ DBToken
SVar:DBToken:DB$ Token | TokenAmount$ X | TokenScript$ wu_1_1_bird_flying | TokenOwner$ TriggeredActivator | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$RememberedNumber
SVar:TrigCounter:DB$ Counter | Defined$ TriggeredSpellAbility | SubAbility$ DBToken
SVar:DBToken:DB$ Token | TokenAmount$ X | TokenScript$ wu_1_1_bird_flying | TokenOwner$ TriggeredActivator
SVar:X:TriggeredStackInstance$CardManaCostLKI
Oracle:({W/U} can be paid with either {W} or {U}.)\nWhenever a player casts a noncreature spell, counter that spell. That player creates X 1/1 white and blue Bird creature tokens with flying, where X is the spell's mana value.

View File

@@ -5,6 +5,6 @@ PT:2/2
T:Mode$ SpellCast | ValidCard$ Creature | ValidActivatingPlayer$ You | Execute$ TrigToken | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast a creature spell, create X 1/1 black Thrull creature tokens, where X is that spell's mana value.
T:Mode$ Always | IsPresent$ Card.Thrull+YouCtrl | PresentCompare$ GE7 | Execute$ TrigSac | TriggerZones$ Battlefield | TriggerDescription$ When you control seven or more Thrulls, sacrifice CARDNAME.
SVar:TrigToken:DB$ Token | TokenOwner$ You | TokenAmount$ X | TokenScript$ b_1_1_thrull
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
SVar:TrigSac:DB$ Sacrifice | Defined$ Self
Oracle:Whenever you cast a creature spell, create X 1/1 black Thrull creature tokens, where X is that spell's mana value.\nWhen you control seven or more Thrulls, sacrifice Endrek Sahr, Master Breeder.

View File

@@ -5,7 +5,7 @@ PT:0/8
K:Trample
T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you cast an instant or sorcery spell, CARDNAME gets +X/+0 until end of turn, where X is that spell's mana value.
SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ +X
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
SVar:BuffedBy:Instant,Sorcery
DeckHints:Type$Instant|Sorcery
Oracle:Trample\nWhenever you cast an instant or sorcery spell, Erratic Cyclops gets +X/+0 until end of turn, where X is that spell's mana value.

View File

@@ -7,7 +7,7 @@ SVar:DBMayPlay:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ Remembere
SVar:DBMayPlayWithoutCost:DB$ Effect | StaticAbilities$ STPlayWithoutCost | RememberObjects$ Remembered | Duration$ Permanent | ExileOnMoved$ Exile | SubAbility$ DBCleanup | SpellDescription$ 15+ VERT You may cast that card without paying its mana cost for as long as it remains exiled.
SVar:STPlay:Mode$ Continuous | MayPlay$ True | MayPlayIgnoreColor$ True | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand | AffectedZone$ Exile | Description$ 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 it.
SVar:STPlayWithoutCost:Mode$ Continuous | MayPlay$ True | MayPlayWithoutManaCost$ True | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand | AffectedZone$ Exile | Description$ You may cast that card without paying its mana cost for as long as it remains exiled.
SVar:Y:RememberedLKI$CardManaCost
SVar:Y:SpellTargeted$CardManaCostLKI
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
AI:RemoveDeck:All
Oracle:Exile target spell, then roll a d20 and add that spell's mana value.\n1-14 | You may cast the exiled 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.\n15+ | You may cast the exiled card without paying its mana cost for as long as it remains exiled.

View File

@@ -3,7 +3,7 @@ ManaCost:2
Types:Artifact
T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever a player casts an instant or sorcery spell, put a number of charge counters on CARDNAME equal to that spell's mana value.
SVar:TrigPutCounter:DB$ PutCounter | CounterType$ CHARGE | CounterNum$ Y
SVar:Y:TriggerCount$CastSACMC
SVar:Y:TriggeredStackInstance$CardManaCostLKI
A:AB$ Token | Cost$ 6 T SubCounter<All/CHARGE> | CostDesc$ {6}, {T}, Remove all charge counters from CARDNAME: | TokenScript$ gu_0_0_fractal | RememberTokens$ True | SubAbility$ DBPutCounter | SpellDescription$ Create a 0/0 green and blue Fractal creature token.
SVar:DBPutCounter:DB$ PutCounter | Defined$ Remembered | CounterType$ P1P1 | CounterNum$ X | SubAbility$ DBCleanup | StackDescription$ SpellDescription | SpellDescription$ Put X +1/+1 counters on it, where X is the number of charge counters removed this way.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True

View File

@@ -3,5 +3,5 @@ ManaCost:4
Types:Artifact Equipment
K:Equip:4
S:Mode$ Continuous | Affected$ Card.EquippedBy | AddPower$ X | AddToughness$ X | Description$ Equipped creature gets +X/+X, where X is its mana value.
SVar:X:Count$EquippedCardManaCost
SVar:X:Equipped$CardManaCost
Oracle:Equipped creature gets +X/+X, where X is its mana value.\nEquip {4}

View File

@@ -6,5 +6,5 @@ T:Mode$ SpellCast | ValidCard$ Card.cmcEQX | ValidActivatingPlayer$ You | Trigge
SVar:TrigDealDamage:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ Y | SubAbility$ DBPutCounter
SVar:DBPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ DOOM | CounterNum$ 1
SVar:X:Count$CardCounters.DOOM
SVar:Y:TriggerCount$CastSACMC
SVar:Y:LastStateBattlefield$CardCounters.DOOM
Oracle:Imminent Doom enters the battlefield with a doom counter on it.\nWhenever you cast a spell with mana value equal to the number of doom counters on Imminent Doom, Imminent Doom deals that much damage to any target. Then put a doom counter on Imminent Doom.

View File

@@ -5,5 +5,5 @@ PT:3/3
K:Flying
T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDiscard | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, target player reveals their hand and discards all cards with that spell's mana value.
SVar:TrigDiscard:DB$ Discard | ValidTgts$ Player | Mode$ RevealDiscardAll | DiscardValid$ Card.cmcEQX
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
Oracle:Flying\nWhenever you cast a Spirit or Arcane spell, target player reveals their hand and discards all cards with that spell's mana value.

View File

@@ -4,5 +4,5 @@ Types:Legendary Creature Human Shaman
PT:5/4
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ Opponent | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ Whenever an opponent casts a spell, CARDNAME deals damage equal to that spell's mana value to any target.
SVar:TrigDealDamage:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ X
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
Oracle:Whenever an opponent casts a spell, Kaervek the Merciless deals damage equal to that spell's mana value to any target.

View File

@@ -5,6 +5,5 @@ T:Mode$ Attached | ValidSource$ Card.Self | ValidTarget$ Creature | TriggerZones
SVar:TrigChoose:DB$ NameCard | Defined$ You | ValidCards$ Creature.ManaCost=Equipped | SubAbility$ DBCopy
SVar:DBCopy:DB$ Clone | CopyFromChosenName$ True | CloneTarget$ TriggeredTarget | Duration$ UntilUnattached | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearNamedCard$ True
SVar:X:Count$EquippedCardManaCost
K:Equip:3
Oracle:Whenever Killer Cosplay becomes attached to a creature, choose a creature card name with an identical mana cost. That creature becomes a copy of the card with the chosen name until Killer Cosplay becomes unattached from it.\nEquip {3}

View File

@@ -9,6 +9,7 @@ SVar:X:Count$RememberedCardManaCost
T:Mode$ DamageDealtOnce | CombatDamage$ True | ValidSource$ Card.Self | Execute$ TrigSacLore | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage, you may sacrifice it. If you do, you may cast the exiled card without paying its mana cost.
SVar:TrigSacLore:AB$ Play | Cost$ Sac<1/CARDNAME> | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | ValidSA$ Spell | Optional$ True | ForgetRemembered$ True
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.Self | Execute$ DBCleanup
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | Static$ True | ValidCard$ Card.IsRemembered | Execute$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
AI:RemoveDeck:Random
Oracle:As Living Lore enters the battlefield, exile an instant or sorcery card from your graveyard.\nLiving Lore's power and toughness are each equal to the exiled card's mana value.\nWhenever Living Lore deals combat damage, you may sacrifice it. If you do, you may cast the exiled card without paying its mana cost.

View File

@@ -5,7 +5,7 @@ PT:4/2
K:Flying
T:Mode$ SpellCast | ValidCard$ Card.Adventure,Dragon | ValidActivatingPlayer$ You | Execute$ TrigDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast an Adventure spell or Dragon spell, CARDNAME deals damage equal to that spell's mana value to any target that isn't a commander.
SVar:TrigDamage:DB$ DealDamage | ValidTgts$ Creature.IsNotCommander,Player,Planeswalker.IsNotCommander | TgtPrompt$ Select any target that isn't a commander | NumDmg$ X
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
SVar:BuffedBy:Creature.AdventureCard,Dragon
DeckHints:Type$Adventure|Dragon
Oracle:Flying\nWhenever you cast an Adventure spell or Dragon spell, Lozhan, Dragons' Legacy deals damage equal to that spell's mana value to any target that isn't a commander.

View File

@@ -4,6 +4,6 @@ Types:Creature Ooze
PT:1/1
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you cast a spell, CARDNAME gets +X/+X until end of turn, where X is that spell's mana value.
SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ +X | NumDef$ +X
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
SVar:BuffedBy:Card
Oracle:Whenever you cast a spell, Manaplasm gets +X/+X until end of turn, where X is that spell's mana value.

View File

@@ -4,7 +4,7 @@ Types:Enchantment
T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ Whenever you cast an instant or sorcery spell, create an X/X colorless Construct artifact creature token, where X is that spell's mana value.
SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ c_x_x_a_construct | TokenPower$ X | TokenToughness$ X | TokenOwner$ You
A:AB$ ChangeZoneAll | Cost$ 3 U U Exile<1/CARDNAME> | ChangeType$ Instant.YouOwn,Sorcery.YouOwn | IsPresent$ Card.Artifact+YouCtrl | PresentCompare$ GE6 | Origin$ Graveyard | Destination$ Hand | SpellDescription$ Return all instant and sorcery cards from your graveyard to your hand. Activate only if you control six or more artifacts.
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
SVar:BuffedBy:Instant,Sorcery
DeckHints:Type$Instant|Sorcery
Oracle:Whenever you cast an instant or sorcery spell, create an X/X colorless Construct artifact creature token, where X is that spell's mana value.\n{3}{U}{U}, Exile Metallurgic Summonings: Return all instant and sorcery cards from your graveyard to your hand. Activate only if you control six or more artifacts.

View File

@@ -4,7 +4,7 @@ Types:Creature Human Shaman
PT:2/2
T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, CARDNAME can't be blocked this turn. If that spell has mana value 5 or greater, put a +1/+1 counter on CARDNAME.
SVar:TrigPump:DB$ Pump | Defined$ Self | KW$ HIDDEN Unblockable | SubAbility$ DBPutCounter
SVar:DBPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | ConditionCheckSVar$ TriggerCount$CastSACMC | ConditionSVarCompare$ GE5
SVar:DBPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | ConditionCheckSVar$ TriggeredStackInstance$CardManaCostLKI | ConditionSVarCompare$ GE5
DeckNeeds:Type$Instant|Sorcery
DeckHas:Ability$Counters
Oracle:Magecraft — Whenever you cast or copy an instant or sorcery spell, Prismari Apprentice can't be blocked this turn. If that spell has mana value 5 or greater, put a +1/+1 counter on Prismari Apprentice.

View File

@@ -3,7 +3,7 @@ ManaCost:4 PR
Types:Artifact
T:Mode$ SpellCast | ValidCard$ Card.CostsPhyrexianMana | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ Whenever you cast a spell with {P} in its mana cost, CARDNAME deals damage equal to that spell's mana value to any target.
SVar:TrigDealDamage:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ X
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
SVar:BuffedBy:Card.CostsPhyrexianMana
AI:RemoveDeck:Random
Oracle:({R/P} can be paid with either {R} or 2 life.)\nWhenever you cast a spell with {P} in its mana cost, Rage Extractor deals damage equal to that spell's mana value to any target.

View File

@@ -3,6 +3,6 @@ ManaCost:4 R
Types:Enchantment
T:Mode$ SpellCast | ValidCard$ Card.YouCtrl+kicked | TriggerZones$ Battlefield | Execute$ DamageSomeone | OptionalDecider$ You | TriggerDescription$ Whenever you cast a kicked spell, you may have CARDNAME deal damage to any target equal to the number of times that spell was kicked.
SVar:DamageSomeone:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | NumDmg$ X | TgtPrompt$ Select any target
SVar:X:TriggeredSpellAbility$Count$TimesKicked
SVar:X:TriggeredSpellAbility$TimesKicked
AI:RemoveDeck:Random
Oracle:Whenever you cast a kicked spell, you may have Rumbling Aftershocks deal damage to any target equal to the number of times that spell was kicked.

View File

@@ -5,6 +5,6 @@ PT:3/3
K:Flying
T:Mode$ SpellCast | ValidCard$ Spirit,Arcane | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigChange | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, you may gain control of target creature with that spell's mana value until end of turn.
SVar:TrigChange:DB$ GainControl | ValidTgts$ Creature.cmcEQX | TgtPrompt$ Select target creature | LoseControl$ EOT | NewController$ You
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
DeckHints:Type$Spirit|Arcane
Oracle:Flying\nWhenever you cast a Spirit or Arcane spell, you may gain control of target creature with that spell's mana value until end of turn.

View File

@@ -6,5 +6,5 @@ SVar:TrigDig:DB$ PeekAndReveal | Defined$ You | PeekAmount$ X | RememberRevealed
SVar:DBPlay:DB$ Play | ValidZone$ Library | Valid$ Card.nonLand+IsRemembered | ValidSA$ Spell.cmcLEX | WithoutManaCost$ True | Optional$ True | Amount$ 1 | ShowCards$ Card.IsRemembered | ForgetPlayed$ True | SubAbility$ DBRestRandomOrder
SVar:DBRestRandomOrder:DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered | Origin$ Library | Destination$ Library | LibraryPosition$ -1 | RandomOrder$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
Oracle:Whenever you cast a spell from your hand, reveal the top X cards of your library, where X is that spell's mana value. You may cast a spell with mana value X or less from among cards revealed this way without paying its mana cost. Put the rest on the bottom of your library in a random order.

View File

@@ -4,6 +4,6 @@ Types:Legendary Creature Dragon Shaman
PT:1/3
T:Mode$ SpellCast | ValidCard$ Card.nonCreature | ValidActivatingPlayer$ You | Execute$ TrigPump | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast a noncreature spell, target creature gets +X/+0 until end of turn, where X is that spell's mana value.
SVar:TrigPump:DB$ Pump | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | NumAtt$ +X
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
K:Choose a Background
Oracle:Whenever you cast a noncreature spell, target creature gets +X/+0 until end of turn, where X is that spell's mana value.\nChoose a Background (You can have a Background as a second commander.)

View File

@@ -3,5 +3,5 @@ ManaCost:U
Types:Enchantment
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ Opponent | Execute$ TrigAnimate | TriggerZones$ Battlefield | IsPresent$ Card.Self+Enchantment | TriggerDescription$ When an opponent casts a spell, if CARDNAME is an enchantment, CARDNAME becomes an Illusion creature with power and toughness each equal to that spell's mana value.
SVar:TrigAnimate:DB$ Animate | Defined$ Self | Power$ X | Toughness$ X | Types$ Creature,Illusion | RemoveCardTypes$ True | Duration$ Permanent
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
Oracle:When an opponent casts a spell, if Veiled Sentry is an enchantment, Veiled Sentry becomes an Illusion creature with power and toughness each equal to that spell's mana value.

View File

@@ -6,6 +6,6 @@ T:Mode$ SpellCast | ValidActivatingPlayer$ You | ActivatorThisTurnCast$ EQ1 | No
SVar:TrigChoose:DB$ ChoosePlayer | Defined$ You | Choices$ Player.Opponent | Random$ True | SubAbility$ DBDealDamage
SVar:DBDealDamage:DB$ DealDamage | Defined$ ChosenPlayer | NumDmg$ X | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearChosenPlayer$ True
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
K:Partner
Oracle:Whenever you cast your first spell each turn, choose an opponent at random. Vial Smasher the Fierce deals damage equal to that spell's mana value to that player or a planeswalker that player controls.\nPartner (You can have two commanders if both have partner.)

View File

@@ -11,6 +11,6 @@ SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:AB$ Effect | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | Ultimate$ True | Triggers$ TrigSearch | AILogic$ WillCastCreature | SpellDescription$ When you cast your next creature spell this turn, search your library for a creature card with lesser mana value, put it onto the battlefield, then shuffle.
SVar:TrigSearch:Mode$ SpellCast | ValidCard$ Creature | ValidActivatingPlayer$ You | OneOff$ True | TriggerZones$ Command | Execute$ DBSearch | TriggerDescription$ When you cast your next creature spell this turn, search your library for a creature card with lesser mana value, put it onto the battlefield, then shuffle.
SVar:DBSearch:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Creature.cmcLTX | ChangeNum$ 1
SVar:X:TriggerCount$CastSACMC
SVar:X:TriggeredStackInstance$CardManaCostLKI
DeckHas:Ability$Token|Counters
Oracle:You may look at the top card of your library any time.\nYou may cast creature spells from the top of your library.\n[+1]: Create a 3/3 green Beast creature token. Put your choice of a vigilance counter, a reach counter, or a trample counter on it.\n[-2]: When you cast your next creature spell this turn, search your library for a creature card with lesser mana value, put it onto the battlefield, then shuffle.

View File

@@ -4,9 +4,9 @@ Types:Legendary Creature Human Shaman
PT:1/4
T:Mode$ SpellCastOrCopy | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ DBScry | TriggerDescription$ Magecraft — Whenever you cast or copy an instant or sorcery spell, scry 1. If that spell's mana value is 5 or greater, create a 4/4 blue and red Elemental creature token. If that spell's mana value is 10 or greater, CARDNAME deals 10 damage to an opponent chosen at random.
SVar:DBScry:DB$ Scry | ScryNum$ 1 | SubAbility$ DBToken
SVar:DBToken:DB$ Token | TokenScript$ ur_4_4_elemental | TokenOwner$ You | ConditionCheckSVar$ TriggerCount$CastSACMC | ConditionSVarCompare$ GE5 | SubAbility$ DBChoose
SVar:DBToken:DB$ Token | TokenScript$ ur_4_4_elemental | TokenOwner$ You | ConditionCheckSVar$ TriggeredStackInstance$CardManaCostLKI | ConditionSVarCompare$ GE5 | SubAbility$ DBChoose
SVar:DBChoose:DB$ ChoosePlayer | Defined$ You | Choices$ Player.Opponent | Random$ True | SubAbility$ DBDamage
SVar:DBDamage:DB$ DealDamage | NumDmg$ 10 | Defined$ ChosenPlayer | ConditionCheckSVar$ TriggerCount$CastSACMC | ConditionSVarCompare$ GE10
SVar:DBDamage:DB$ DealDamage | NumDmg$ 10 | Defined$ ChosenPlayer | ConditionCheckSVar$ TriggeredStackInstance$CardManaCostLKI | ConditionSVarCompare$ GE10
DeckHas:Ability$Token
SVar:BuffedBy:Instant,Sorcery
DeckHints:Type$Instant|Sorcery