This commit is contained in:
tool4ever
2023-04-12 22:48:12 +02:00
committed by GitHub
parent e970033b59
commit 76a2023745
31 changed files with 66 additions and 93 deletions

View File

@@ -1211,7 +1211,7 @@ public class ComputerUtil {
creatures2.add(creatures.get(i));
}
}
if (((creatures2.size() + CardUtil.getThisTurnCast("Creature.YouCtrl", vengevines.get(0), null).size()) > 1)
if (((creatures2.size() + CardUtil.getThisTurnCast("Creature.YouCtrl", vengevines.get(0), null, ai).size()) > 1)
&& card.isCreature() && card.getManaCost().getCMC() <= 3) {
return true;
}

View File

@@ -198,13 +198,6 @@ public class ChooseCardAi extends SpellAbilityAi {
} else if ("RandomNonLand".equals(logic)) {
options = CardLists.getValidCards(options, "Card.nonLand", host.getController(), host, sa);
choice = Aggregates.random(options);
} else if (logic.equals("Untap")) {
final String filter = "Permanent.YouCtrl,Permanent.tapped";
CardCollection newOptions = CardLists.getValidCards(options, filter, ctrl, host, sa);
if (!newOptions.isEmpty()) {
options = newOptions;
}
choice = ComputerUtilCard.getBestAI(options);
} else if (logic.equals("NeedsPrevention")) {
final Game game = ai.getGame();
final Combat combat = game.getCombat();

View File

@@ -3,11 +3,14 @@ package forge.ai.ability;
import forge.ai.*;
import forge.game.ability.AbilityUtils;
import forge.game.card.Card;
import forge.game.card.CardCollection;
import forge.game.card.CardLists;
import forge.game.cost.Cost;
import forge.game.phase.PhaseHandler;
import forge.game.phase.PhaseType;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
public class TapAi extends TapAiBase {
@Override
@@ -52,8 +55,15 @@ public class TapAi extends TapAiBase {
}
if (!sa.usesTargeting()) {
CardCollection untap;
if (sa.hasParam("CardChoices")) {
untap = CardLists.getValidCards(source.getGame().getCardsIn(ZoneType.Battlefield), sa.getParam("CardChoices"), ai, source, sa);
} else {
untap = AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa);
}
boolean bFlag = false;
for (final Card c : AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa)) {
for (final Card c : untap) {
bFlag |= c.isUntapped();
}

View File

@@ -450,6 +450,7 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView,
}
if (params.containsKey("CheckSVar")) {
// TODO this provides only the card controller instead of the stack one
final int sVar = AbilityUtils.calculateAmount(getHostCard(), params.get("CheckSVar"), this);
final String comparator = getParamOrDefault("SVarCompare", "GE1");
final String svarOperator = comparator.substring(0, 2);
@@ -463,7 +464,7 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView,
final String comparator2 = getParamOrDefault("SecondSVarCompare", "GE1");
final String svarOperator2 = comparator2.substring(0, 2);
final String svarOperand2 = comparator2.substring(2);
final int operandValue2 = AbilityUtils.calculateAmount(this.hostCard, svarOperand2, this);
final int operandValue2 = AbilityUtils.calculateAmount(getHostCard(), svarOperand2, this);
if (!Expressions.compare(sVar2, svarOperator2, operandValue2)) {
return false;
}

View File

@@ -333,7 +333,7 @@ public class AbilityUtils {
origin = null;
validFilter = workingCopy[2];
}
for (final Card cl : CardUtil.getThisTurnEntered(destination, origin, validFilter, hostCard, sa)) {
for (final Card cl : CardUtil.getThisTurnEntered(destination, origin, validFilter, hostCard, sa, player)) {
Card gameState = game.getCardState(cl, null);
// cards that use this should only care about if it is still in that zone
// TODO if all LKI needs to be returned, need to change CardCollection return from this function
@@ -1846,11 +1846,6 @@ public class AbilityUtils {
}
return count;
}
// Count$TriggeredManaSpent
if (sq[0].equals("TriggeredManaSpent")) {
final SpellAbility root = (SpellAbility) sa.getRootAbility().getTriggeringObject(AbilityKey.SpellAbility);
return root == null ? 0 : root.getTotalManaSpent();
}
// Count$ManaColorsPaid
if (sq[0].equals("ManaColorsPaid")) {
@@ -2624,7 +2619,7 @@ public class AbilityUtils {
//game info
// Count$Morbid.<True>.<False>
if (sq[0].startsWith("Morbid")) {
final List<Card> res = CardUtil.getThisTurnEntered(ZoneType.Graveyard, ZoneType.Battlefield, "Creature", c, ctb);
final List<Card> res = CardUtil.getThisTurnEntered(ZoneType.Graveyard, ZoneType.Battlefield, "Creature", c, ctb, player);
return doXMath(calculateAmount(c, sq[res.size() > 0 ? 1 : 2], ctb), expr, c, ctb);
}
@@ -2736,9 +2731,9 @@ public class AbilityUtils {
List<Card> res = Lists.newArrayList();
if (workingCopy[0].contains("This")) {
res = CardUtil.getThisTurnCast(validFilter, c, ctb);
res = CardUtil.getThisTurnCast(validFilter, c, ctb, player);
} else {
res = CardUtil.getLastTurnCast(validFilter, c, ctb);
res = CardUtil.getLastTurnCast(validFilter, c, ctb, player);
}
return doXMath(res.size(), expr, c, ctb);
@@ -2753,7 +2748,7 @@ public class AbilityUtils {
ZoneType origin = hasFrom ? ZoneType.smartValueOf(workingCopy[3]) : null;
String validFilter = workingCopy[hasFrom ? 4 : 2];
final List<Card> res = CardUtil.getThisTurnEntered(destination, origin, validFilter, c, ctb);
final List<Card> res = CardUtil.getThisTurnEntered(destination, origin, validFilter, c, ctb, player);
return doXMath(res.size(), expr, c, ctb);
}
@@ -2766,7 +2761,7 @@ public class AbilityUtils {
ZoneType origin = hasFrom ? ZoneType.smartValueOf(workingCopy[3]) : null;
String validFilter = workingCopy[hasFrom ? 4 : 2];
final List<Card> res = CardUtil.getLastTurnEntered(destination, origin, validFilter, c, ctb);
final List<Card> res = CardUtil.getLastTurnEntered(destination, origin, validFilter, c, ctb, player);
return doXMath(res.size(), expr, c, ctb);
}

View File

@@ -1238,7 +1238,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
CardLists.shuffle(chosenCards);
}
// do not shuffle the library once we have placed a fetched card on top.
if (origin.contains(ZoneType.Library) && (destination == ZoneType.Library) && shuffleMandatory) {
if (origin.contains(ZoneType.Library) && destination == ZoneType.Library && shuffleMandatory) {
player.shuffle(sa);
}

View File

@@ -173,7 +173,7 @@ public class DamageDealEffect extends DamageBaseEffect {
} else { // only for Comet, Stellar Pup
final String prompt = sa.hasParam("ChoicePrompt") ? sa.getParam("ChoicePrompt") :
Localizer.getInstance().getMessage("lblChooseEntityDmg");
tgts.addAll(sa.getActivatingPlayer().getController().chooseEntitiesForEffect(choices, n, n, null, sa,
tgts.addAll(activator.getController().chooseEntitiesForEffect(choices, n, n, null, sa,
prompt, null, null));
}
} else {

View File

@@ -127,7 +127,7 @@ public class RepeatEachEffect extends SpellAbilityEffect {
if (def.startsWith("ThisTurnCast")) {
final String[] workingCopy = def.split("_");
final String validFilter = workingCopy[1];
res = CardUtil.getThisTurnCast(validFilter, source, sa);
res = CardUtil.getThisTurnCast(validFilter, source, sa, player);
} else if (def.startsWith("Defined ")) {
res = AbilityUtils.getDefinedCards(source, def.substring(8), sa);
} else {

View File

@@ -25,19 +25,17 @@ public class TapEffect extends SpellAbilityEffect {
card.clearRemembered();
}
CardCollection toTap = new CardCollection();
Iterable<Card> toTap;
if (sa.hasParam("CardChoices")) { // choosing outside Defined/Targeted
final Player activator = sa.getActivatingPlayer();
CardCollection choices = new CardCollection();
choices.addAll(CardLists.getValidCards(card.getGame().getCardsIn(ZoneType.Battlefield),
sa.getParam("CardChoices"), activator, card, sa));
CardCollection choices = CardLists.getValidCards(card.getGame().getCardsIn(ZoneType.Battlefield), sa.getParam("CardChoices"), activator, card, sa);
int n = sa.hasParam("ChoiceAmount") ?
AbilityUtils.calculateAmount(card, sa.getParam("ChoiceAmount"), sa) : 1;
int min = (sa.hasParam("AnyNumber")) ? 0 : n;
int min = sa.hasParam("AnyNumber") ? 0 : n;
final String prompt = sa.hasParam("ChoicePrompt") ? sa.getParam("ChoicePrompt") :
Localizer.getInstance().getMessage("lblChoosePermanentstoTap");
toTap.addAll(activator.getController().chooseEntitiesForEffect(choices, min, n, null, sa, prompt, null, null));
toTap = activator.getController().chooseEntitiesForEffect(choices, min, n, null, sa, prompt, null, null);
} else {
toTap = getTargetCards(sa);
}

View File

@@ -870,7 +870,7 @@ public class CardProperty {
} else if (restriction.equals(ZoneType.Battlefield.toString())) {
return Iterables.any(game.getCardsIn(ZoneType.Battlefield), CardPredicates.sharesNameWith(card));
} else if (restriction.equals("ThisTurnCast")) {
return Iterables.any(CardUtil.getThisTurnCast("Card", source, spellAbility), CardPredicates.sharesNameWith(card));
return Iterables.any(CardUtil.getThisTurnCast("Card", source, spellAbility, sourceController), CardPredicates.sharesNameWith(card));
} else if (restriction.equals("MovedToGrave")) {
if (!(spellAbility instanceof SpellAbility)) {
final SpellAbility root = ((SpellAbility) spellAbility).getRootAbility();
@@ -962,7 +962,7 @@ public class CardProperty {
}
}
} else if (property.startsWith("SecondSpellCastThisTurn")) {
final List<Card> cards = CardUtil.getThisTurnCast("Card", source, spellAbility);
final List<Card> cards = CardUtil.getThisTurnCast("Card", source, spellAbility, sourceController);
if (cards.size() < 2) {
return false;
}
@@ -970,7 +970,7 @@ public class CardProperty {
return false;
}
} else if (property.equals("ThisTurnCast")) {
for (final Card c : CardUtil.getThisTurnCast("Card", source, spellAbility)) {
for (final Card c : CardUtil.getThisTurnCast("Card", source, spellAbility, sourceController)) {
if (card.equals(c)) {
return true;
}

View File

@@ -101,9 +101,6 @@ public final class CardUtil {
* @param src a Card object
* @return a CardCollection that matches the given criteria
*/
public static List<Card> getThisTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src, final CardTraitBase ctb) {
return getThisTurnEntered(to, from, valid, src, ctb, src.getController());
}
public static List<Card> getThisTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src, final CardTraitBase ctb, final Player controller) {
List<Card> res = Lists.newArrayList();
final Game game = src.getGame();
@@ -126,7 +123,7 @@ public final class CardUtil {
* @param src a Card object
* @return a CardCollection that matches the given criteria
*/
public static List<Card> getLastTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src, final CardTraitBase ctb) {
public static List<Card> getLastTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src, final CardTraitBase ctb, final Player controller) {
List<Card> res = Lists.newArrayList();
final Game game = src.getGame();
if (to != ZoneType.Stack) {
@@ -136,15 +133,15 @@ public final class CardUtil {
} else {
res.addAll(game.getStackZone().getCardsAddedLastTurn(from));
}
return CardLists.getValidCardsAsList(res, valid, src.getController(), src, ctb);
return CardLists.getValidCardsAsList(res, valid, controller, src, ctb);
}
public static List<Card> getThisTurnCast(final String valid, final Card src, final CardTraitBase ctb) {
return CardLists.getValidCardsAsList(src.getGame().getStack().getSpellsCastThisTurn(), valid, src.getController(), src, ctb);
public static List<Card> getThisTurnCast(final String valid, final Card src, final CardTraitBase ctb, final Player controller) {
return CardLists.getValidCardsAsList(src.getGame().getStack().getSpellsCastThisTurn(), valid, controller, src, ctb);
}
public static List<Card> getLastTurnCast(final String valid, final Card src, final CardTraitBase ctb) {
return CardLists.getValidCardsAsList(src.getGame().getStack().getSpellsCastLastTurn(), valid, src.getController(), src, ctb);
public static List<Card> getLastTurnCast(final String valid, final Card src, final CardTraitBase ctb, final Player controller) {
return CardLists.getValidCardsAsList(src.getGame().getStack().getSpellsCastLastTurn(), valid, controller, src, ctb);
}
public static List<Card> getLKICopyList(final Iterable<Card> in, Map<Integer, Card> cachedMap) {

View File

@@ -468,7 +468,7 @@ public class CostAdjustment {
}
List<Card> list;
if (st.hasParam("ValidCard")) {
list = CardUtil.getThisTurnCast(st.getParam("ValidCard"), hostCard, st);
list = CardUtil.getThisTurnCast(st.getParam("ValidCard"), hostCard, st, controller);
} else {
list = game.getStack().getSpellsCastThisTurn();
}

View File

@@ -139,7 +139,7 @@ public class StaticAbilityCantBeCast {
if (stAb.hasParam("NumLimitEachTurn") && activator != null) {
int limit = Integer.parseInt(stAb.getParam("NumLimitEachTurn"));
String valid = stAb.getParamOrDefault("ValidCard", "Card");
List<Card> thisTurnCast = CardUtil.getThisTurnCast(valid, card, stAb);
List<Card> thisTurnCast = CardUtil.getThisTurnCast(valid, card, stAb, activator);
if (CardLists.filterControlledByAsList(thisTurnCast, activator).size() < limit) {
return false;
}

View File

@@ -33,7 +33,6 @@ import forge.game.ability.AbilityUtils;
import forge.game.card.Card;
import forge.game.card.CardLists;
import forge.game.card.CardPredicates;
import forge.game.card.CardUtil;
import forge.game.spellability.SpellAbility;
import forge.game.zone.ZoneType;
import forge.util.Expressions;
@@ -190,7 +189,7 @@ public class TriggerChangesZone extends Trigger {
/* this trigger only activates for the nth spell you cast this turn */
if (hasParam("ConditionYouCastThisTurn")) {
final String compare = getParam("ConditionYouCastThisTurn");
List<Card> thisTurnCast = CardUtil.getThisTurnCast("Card", getHostCard(), this);
List<Card> thisTurnCast = getHostCard().getGame().getStack().getSpellsCastThisTurn();
thisTurnCast = CardLists.filterControlledByAsList(thisTurnCast, getHostCard().getController());
// checks which card this spell was the castSA

View File

@@ -102,7 +102,7 @@ public class TriggerSpellAbilityCastOrCopy extends Trigger {
if (hasParam("ActivatorThisTurnCast")) {
final String compare = getParam("ActivatorThisTurnCast");
final String valid = getParamOrDefault("ValidCard", "Card");
List<Card> thisTurnCast = CardUtil.getThisTurnCast(valid, getHostCard(), this);
List<Card> thisTurnCast = CardUtil.getThisTurnCast(valid, getHostCard(), this, getHostCard().getController());
thisTurnCast = CardLists.filterControlledByAsList(thisTurnCast, activator);
int left = thisTurnCast.size();
int right = Integer.parseInt(compare.substring(2));

View File

@@ -14,6 +14,6 @@ SVar:DBEffect3:DB$ Effect | Name$ Emblem - Chandra, Dressed to Kill | Triggers$
SVar:STPlay2:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered+Red+nonLand | AffectedZone$ Exile | Description$ You may cast red spells from among the exiled cards this turn.
SVar:TRSpellCast:Mode$ SpellCast | ValidCard$ Card.Red | ValidActivatingPlayer$ You | TriggerZones$ Command | Execute$ TrigDealDamage | TriggerDescription$ Whenever you cast a red spell, this emblem deals X damage to any target, where X is the amount of mana spent to cast that spell."
SVar:TrigDealDamage:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ X
SVar:X:Count$TriggeredManaSpent
SVar:X:TriggeredCard$CastTotalManaSpent
SVar:BuffedBy:Card.Red
Oracle:[+1]: Add {R}. Chandra, Dressed to Kill deals 1 damage to up to one target player or planeswalker.\n[+1]: Exile the top card of your library. If it's red, you may cast it this turn.\n[-7]: Exile the top five cards of your library. You may cast red spells from among them this turn. You get an emblem with "Whenever you cast a red spell, this emblem deals X damage to any target, where X is the amount of mana spent to cast that spell."

View File

@@ -1,11 +1,9 @@
Name:Devout Invocation
ManaCost:6 W
Types:Sorcery
A:SP$ ChooseCard | Cost$ 6 W | Defined$ You | MinAmount$ 0 | Amount$ X | Choices$ Creature.untapped+YouCtrl | ChoiceTitle$ Choose any number of untapped creatures you control | ChoiceZone$ Battlefield | RememberChosen$ True | SubAbility$ TrigTap | SpellDescription$ Tap any number of untapped creatures you control. Create a 4/4 white Angel creature token with flying for each creature tapped this way. | StackDescription$ SpellDescription
SVar:TrigTap:DB$ Tap | Defined$ Remembered | SubAbility$ DBToken | StackDescription$ None
A:SP$ Tap | CardChoices$ Creature.YouCtrl+untapped | AnyNumber$ True | ChoiceAmount$ Count$Valid Creature.YouCtrl+untapped | RememberTapped$ True | SpellDescription$ Tap any number of untapped creatures you control. Create a 4/4 white Angel creature token with flying for each creature tapped this way. | StackDescription$ SpellDescription
SVar:DBToken:DB$ Token | TokenAmount$ Y | TokenScript$ w_4_4_angel_flying | TokenOwner$ You | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$Valid Creature.YouCtrl
SVar:Y:Remembered$Amount
SVar:NeedsToPlay:Creature.YouCtrl+untapped
SVar:PlayMain1:ALWAYS

View File

@@ -7,5 +7,7 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creatu
SVar:TrigImprint:DB$ Pump | ImprintCards$ Remembered | SubAbility$ DBCopy
SVar:DBCopy:DB$ CopyPermanent | Defined$ TriggeredCardLKICopy | Controller$ You | AddTypes$ Artifact | RememberTokens$ True | SubAbility$ DBChangeZoneAll
SVar:DBChangeZoneAll:DB$ ChangeZoneAll | Origin$ Battlefield | Destination$ Exile | ChangeType$ Card.IsImprinted
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigClean | Static$ True
SVar:TrigClean:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True
DeckHas:Ability$Token
Oracle:Flying\nWhenever a nontoken creature enters the battlefield under an opponent's control, create a token that's a copy of that creature except it's an artifact in addition to its other types. Then exile all other tokens created with Faerie Artisans.

View File

@@ -2,11 +2,9 @@ Name:Guild Summit
ManaCost:2 U
Types:Enchantment
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ GuestList | TriggerDescription$ When CARDNAME enters the battlefield, you may tap any number of untapped Gates you control. Draw a card for each Gate tapped this way.
SVar:GuestList:DB$ ChooseCard | Defined$ You | MinAmount$ 0 | Amount$ X | Choices$ Gate.untapped+YouCtrl | ChoiceTitle$ Choose any number of untapped Gates you control | ChoiceZone$ Battlefield | RememberChosen$ True | SubAbility$ TrigTap
SVar:TrigTap:DB$ Tap | Defined$ Remembered | SubAbility$ DBDraw
SVar:GuestList:DB$ Tap | CardChoices$ Gate.YouCtrl+untapped | AnyNumber$ True | ChoiceAmount$ Count$Valid Gate.YouCtrl+untapped | RememberTapped$ True | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ Y | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$Valid Gate.untapped+YouCtrl
SVar:Y:Remembered$Amount
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Gate.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ Whenever a Gate enters the battlefield under your control, draw a card.
SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ 1

View File

@@ -1,11 +1,9 @@
Name:Harmony of Nature
ManaCost:2 G
Types:Sorcery
A:SP$ ChooseCard | Cost$ 2 G | Defined$ You | MinAmount$ 0 | Amount$ X | Choices$ Creature.untapped+YouCtrl | ChoiceTitle$ Choose any number of untapped creatures you control | ChoiceZone$ Battlefield | RememberChosen$ True | SubAbility$ TrigTap | SpellDescription$ Tap any number of untapped creatures you control. You gain 4 life for each creature tapped this way.
SVar:TrigTap:DB$ Tap | Defined$ Remembered | SubAbility$ DBGainLife
A:SP$ Tap | CardChoices$ Creature.YouCtrl+untapped | AnyNumber$ True | ChoiceAmount$ Count$Valid Creature.YouCtrl+untapped | RememberTapped$ True | SubAbility$ DBGainLife | SpellDescription$ Tap any number of untapped creatures you control. You gain 4 life for each creature tapped this way.
SVar:DBGainLife:DB$ GainLife | LifeAmount$ Z | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$Valid Creature.YouCtrl
SVar:Y:Remembered$Amount
SVar:Z:SVar$Y/Times.4
AI:RemoveDeck:All

View File

@@ -3,11 +3,9 @@ ManaCost:4 G
Types:Creature Elemental
PT:2/8
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ GuestList | TriggerDescription$ When CARDNAME enters the battlefield, you may tap any number of untapped creatures you control. You gain 2 life for each creature tapped this way.
SVar:GuestList:DB$ ChooseCard | Defined$ You | MinAmount$ 0 | Amount$ JaddiLifestriderX | Choices$ Creature.untapped+YouCtrl | ChoiceTitle$ Choose any number of untapped creatures you control | ChoiceZone$ Battlefield | RememberChosen$ True | SubAbility$ TrigJaddiLifestriderTap
SVar:TrigJaddiLifestriderTap:DB$ Tap | Defined$ Remembered | SubAbility$ DBJaddiLifestriderGainLife
SVar:TrigJaddiLifestriderTap:DB$ Tap | CardChoices$ Creature.YouCtrl+untapped | AnyNumber$ True | ChoiceAmount$ Count$Valid Creature.YouCtrl+untapped | RememberTapped$ True | SubAbility$ DBJaddiLifestriderGainLife
SVar:DBJaddiLifestriderGainLife:DB$ GainLife | LifeAmount$ JaddiLifestriderZ | SubAbility$ DBJaddiLifestriderCleanup
SVar:DBJaddiLifestriderCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:JaddiLifestriderX:Count$Valid Creature.YouCtrl
SVar:JaddiLifestriderY:Remembered$Amount
SVar:JaddiLifestriderZ:SVar$JaddiLifestriderY/Times.2
Oracle:When Jaddi Lifestrider enters the battlefield, you may tap any number of untapped creatures you control. You gain 2 life for each creature tapped this way.

View File

@@ -2,10 +2,10 @@ Name:Kalamax, the Stormsire
ManaCost:1 G U R
Types:Legendary Creature Elemental Dinosaur
PT:4/4
T:Mode$ SpellCast | ValidCard$ Instant | ValidActivatingPlayer$ You | ActivatorThisTurnCast$ EQ1 | NoResolvingCheck$ True | Execute$ TrigCopy | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast your first instant spell each turn, if CARDNAME is tapped, copy that spell. You may choose new targets for the copy.
SVar:TrigCopy:DB$ CopySpellAbility | ConditionPresent$ Card.Self+tapped | Defined$ TriggeredSpellAbility | AILogic$ Always | MayChooseTarget$ True
T:Mode$ SpellCast | ValidCard$ Instant | ValidActivatingPlayer$ You | ActivatorThisTurnCast$ EQ1 | NoResolvingCheck$ True | IsPresent$ Card.Self+tapped | Execute$ TrigCopy | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast your first instant spell each turn, if CARDNAME is tapped, copy that spell. You may choose new targets for the copy.
SVar:TrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | AILogic$ Always | MayChooseTarget$ True
SVar:BuffedBy:Instant
T:Mode$ SpellCopy | ValidCard$ Instant | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever you copy an instant spell, put a +1/+1 counter on CARDNAME.
T:Mode$ SpellCopy | ValidCard$ Instant | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever you copy an instant spell, put a +1/+1 counter on NICKNAME.
DeckHas:Ability$Counters
DeckHints:Type$Instant
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1

View File

@@ -2,13 +2,10 @@ Name:Ledev Champion
ManaCost:1 G W
Types:Creature Elf Knight
PT:2/2
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigChoose | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME attacks, you may tap any number of untapped creatures you control. CARDNAME gets +1/+1 until end of turn for each creature tapped this way.
SVar:TrigChoose:DB$ ChooseCard | Defined$ You | MinAmount$ 0 | Amount$ X | Choices$ Creature.untapped+YouCtrl | ChoiceTitle$ Choose any number of untapped creatures you control | ChoiceZone$ Battlefield | RememberChosen$ True | SubAbility$ TrigTap
SVar:TrigTap:DB$ Tap | Defined$ Remembered | SubAbility$ DBPump
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigTap | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME attacks, you may tap any number of untapped creatures you control. CARDNAME gets +1/+1 until end of turn for each creature tapped this way.
SVar:TrigTap:DB$ Tap | CardChoices$ Creature.YouCtrl+untapped | AnyNumber$ True | ChoiceAmount$ Count$Valid Creature.YouCtrl+untapped | RememberTapped$ True | SubAbility$ DBPump
SVar:DBPump:DB$ Pump | NumAtt$ Y | NumDef$ Y | SubAbility$ DBCleanup
SVar:TrigPump:DB$ Pump | NumAtt$ X
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$Valid Creature.YouCtrl
SVar:Y:Remembered$Amount
A:AB$ Token | Cost$ 3 G W | TokenAmount$ 1 | TokenScript$ w_1_1_soldier_lifelink | SpellDescription$ Create a 1/1 white Soldier creature token with lifelink.
DeckHas:Ability$Token|LifeGain

View File

@@ -9,5 +9,5 @@ SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield |
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:NeedsToPlayVar:Z GE2
SVar:Z:Count$Valid Land.YouCtrl+untapped+inZoneBattlefield
SVar:Z:Count$Valid Land.YouCtrl+untapped
Oracle:If Lotus Vale would enter the battlefield, sacrifice two untapped lands instead. If you do, put Lotus Vale onto the battlefield. If you don't, put it into its owner's graveyard.\n{T}: Add three mana of any one color.

View File

@@ -5,7 +5,7 @@ PT:4/4
K:Flying
T:Mode$ SpellCast | ValidCard$ Card.nonCreature | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ Whenever you cast a noncreature spell, create an X/X red Dragon Illusion creature token with flying and haste, where X is the amount of mana spent to cast that spell. Exile that token at the beginning of the next end step.
SVar:TrigToken:DB$ Token | TokenScript$ r_x_x_dragon_illusion_flying_haste | TokenPower$ X | TokenToughness$ X | AtEOT$ Exile
SVar:X:Count$TriggeredManaSpent
SVar:X:TriggeredCard$CastTotalManaSpent
SVar:BuffedBy:Card.nonLand+nonCreature
DeckHas:Ability$Token
Oracle:Flying\nWhenever you cast a noncreature spell, create an X/X red Dragon Illusion creature token with flying and haste, where X is the amount of mana spent to cast that spell. Exile that token at the beginning of the next end step.

View File

@@ -1,11 +1,9 @@
Name:Marshaling the Troops
ManaCost:1 G
Types:Sorcery
A:SP$ ChooseCard | Cost$ 1 G | Defined$ You | MinAmount$ 0 | Amount$ X | Choices$ Creature.untapped+YouCtrl | ChoiceTitle$ Choose any number of untapped creatures you control | ChoiceZone$ Battlefield | RememberChosen$ True | SubAbility$ TrigTap | SpellDescription$ Tap any number of untapped creatures you control. You gain 4 life for each creature tapped this way.
SVar:TrigTap:DB$ Tap | Defined$ Remembered | SubAbility$ DBGainLife
A:SP$ Tap | CardChoices$ Creature.YouCtrl+untapped | AnyNumber$ True | ChoiceAmount$ Count$Valid Creature.YouCtrl+untapped | RememberTapped$ True | SubAbility$ DBGainLife | SpellDescription$ Tap any number of untapped creatures you control. You gain 4 life for each creature tapped this way.
SVar:DBGainLife:DB$ GainLife | LifeAmount$ Z | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$Valid Creature.YouCtrl
SVar:Y:Remembered$Amount
SVar:Z:SVar$Y/Times.4
AI:RemoveDeck:All

View File

@@ -20,9 +20,6 @@ S:Mode$ Continuous | Affected$ Creature.tapped+YouCtrl+Other | AddPower$ 1 | Des
S:Mode$ Continuous | Affected$ Creature.untapped+YouCtrl+Other | AddToughness$ 1 | Description$ Other untapped creatures you control get +0/+1.
T:Mode$ AttackersDeclared | Execute$ DBUnTapAll | CheckSVar$ OverwhelmInstinct | SVarCompare$ GE1 | NoResolvingCheck$ True | TriggerZones$ Battlefield | AttackingPlayer$ You | TriggerDescription$ Whenever you attack, untap each creature you control, then tap any number of creatures you control.
SVar:OverwhelmInstinct:Count$Valid Creature.attacking
SVar:DBUnTapAll:DB$ UntapAll | ValidCards$ Creature.YouCtrl | SubAbility$ DBChoose
SVar:DBChoose:DB$ ChooseCard | Defined$ You | MinAmount$ 0 | Amount$ X | Choices$ Creature.untapped+YouCtrl | ChoiceTitle$ Choose any number of untapped creatures you control | ChoiceZone$ Battlefield | SubAbility$ DBTap | SpellDescription$ Tap any number of creatures you control.
SVar:DBTap:DB$ Tap | Defined$ ChosenCard | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True
SVar:X:Count$Valid Creature.untapped+YouCtrl
SVar:DBUnTapAll:DB$ UntapAll | ValidCards$ Creature.YouCtrl | SubAbility$ DBTap
SVar:DBTap:DB$ Tap | Defined$ CardChoices$ Creature.YouCtrl+untapped | AnyNumber$ True | ChoiceAmount$ Count$Valid Creature.YouCtrl+untapped
Oracle:Other tapped creatures you control get +1/+0.\nOther untapped creatures you control get +0/+1.\nWhenever you attack, untap each creature you control, then tap any number of creatures you control.

View File

@@ -2,16 +2,13 @@ Name:Raiding Party
ManaCost:2 R
Types:Enchantment
S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card.White | Description$ CARDNAME can't be the target of white spells or abilities from white sources.
A:AB$ RepeatEach | Cost$ Sac<1/Orc/Orc> | CostDesc$ Sacrifice an Orc: | RepeatPlayers$ Player | RepeatSubAbility$ ChooseCardsToTap | SubAbility$ DBDestroy | SpellDescription$ Each player may tap any number of untapped white creatures they control. For each creature tapped this way, that player chooses up to two Plains. Then destroy all Plains that weren't chosen this way by any player.
SVar:ChooseCardsToTap:DB$ ChooseCard | Defined$ Remembered | MinAmount$ 0 | Amount$ NumCreatures | Choices$ Creature.untapped+White+RememberedPlayerCtrl | ChoiceTitle$ Choose any number of untapped white creatures you control | ChoiceZone$ Battlefield | RememberChosen$ True | AIMaxAmount$ NumPlainsDiv2 | SubAbility$ DBTap
SVar:DBTap:DB$ Tap | Defined$ Remembered | SubAbility$ ChoosePlainsToSave
A:AB$ RepeatEach | Cost$ Sac<1/Orc/Orc> | CostDesc$ Sacrifice an Orc: | RepeatPlayers$ Player | RepeatSubAbility$ DBTap | SubAbility$ DBDestroy | SpellDescription$ Each player may tap any number of untapped white creatures they control. For each creature tapped this way, that player chooses up to two Plains. Then destroy all Plains that weren't chosen this way by any player.
SVar:DBTap:DB$ Tap | CardChoices$ Creature.untapped+White+RememberedPlayerCtrl | AnyNumber$ True | ChoiceAmount$ Count$Valid Creature.untapped+White+RememberedPlayerCtrl | RememberTapped$ True | SubAbility$ ChoosePlainsToSave
SVar:ChoosePlainsToSave:DB$ ChooseCard | Defined$ Remembered | MinAmount$ 0 | Amount$ TappedXTwo | Choices$ Plains | ChoiceTitle$ Choose up to two Plains for each creature tapped | ChoiceZone$ Battlefield | ImprintChosen$ True | AILogic$ OwnCard | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearChosenCard$ True
SVar:DBDestroy:DB$ DestroyAll | ValidCards$ Plains.IsNotImprinted | SubAbility$ DBCleanImp | AILogic$ RaidingParty | StackDescription$ None
SVar:DBCleanImp:DB$ Cleanup | ClearImprinted$ True
SVar:NumCreatures:Count$Valid Creature.untapped+White+RememberedPlayerCtrl
SVar:TappedXTwo:Count$Valid Creature.IsRemembered/Times.2
SVar:NumPlainsDiv2:Count$Valid Plains.YouCtrl/HalfUp
AI:RemoveDeck:Random
SVar:NeedsToPlay:Plains.OppCtrl
DeckNeeds:Type$Orc

View File

@@ -4,10 +4,8 @@ Types:Creature Human Soldier
PT:1/1
K:Double Strike
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigChoose | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME attacks, you may tap any number of untapped creatures you control. CARDNAME gets +1/+1 until end of turn for each creature tapped this way.
SVar:TrigChoose:DB$ ChooseCard | Defined$ You | MinAmount$ 0 | Amount$ X | Choices$ Creature.untapped+YouCtrl | ChoiceTitle$ Choose any number of untapped creatures you control | ChoiceZone$ Battlefield | RememberChosen$ True | SubAbility$ TrigTap
SVar:TrigTap:DB$ Tap | Defined$ Remembered | SubAbility$ DBPump
SVar:TrigTap:DB$ Tap | CardChoices$ Creature.YouCtrl+untapped | AnyNumber$ True | ChoiceAmount$ Count$Valid Creature.YouCtrl+untapped | RememberTapped$ True | SubAbility$ DBPump
SVar:DBPump:DB$ Pump | Defined$ Self | NumAtt$ Y | NumDef$ Y | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearChosenCard$ True
SVar:X:Count$Valid Creature.untapped+YouCtrl
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Y:Count$RememberedSize
Oracle:Double strike (This creature deals both first-strike and regular combat damage.)\nWhenever Siege Striker attacks, you may tap any number of untapped creatures you control. Siege Striker gets +1/+1 until end of turn for each creature tapped this way.

View File

@@ -8,7 +8,7 @@ SVar:TrigCharge:DB$ PutCounter | Defined$ Self | CounterType$ EMBER | CounterNum
SVar:DBBranch:DB$ Branch | BranchConditionSVar$ Ember | TrueSubAbility$ DBRemoveCtrs
SVar:DBRemoveCtrs:DB$ RemoveCounter | Defined$ Self | CounterType$ EMBER | CounterNum$ All | SubAbility$ DBTransform
SVar:DBTransform:DB$ SetState | Defined$ Self | Mode$ Transform
SVar:X:Count$TriggeredManaSpent
SVar:X:TriggeredCard$CastTotalManaSpent
SVar:Ember:Count$Valid Card.Self+counters_GE7_EMBER
DeckHas:Ability$Counters
DeckNeeds:Type$Instant|Sorcery

View File

@@ -1,9 +1,8 @@
Name:Urge to Feed
ManaCost:B B
Types:Instant
A:SP$ Pump | Cost$ B B | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -3 | NumDef$ -3 | IsCurse$ True | SubAbility$ GuestList | SpellDescription$ Target creature gets -3/-3 until end of turn. You may tap any number of untapped Vampire creatures you control. If you do, put a +1/+1 counter on each of those Vampires.
SVar:GuestList:DB$ ChooseCard | Defined$ You | MinAmount$ 0 | Amount$ AbleToFeedX | Choices$ Creature.Vampire+untapped+YouCtrl | ChoiceTitle$ Choose any number of untapped Vampire creature you control | ChoiceZone$ Battlefield | SubAbility$ VampiricUrge
SVar:VampiricUrge:DB$ Tap | Defined$ ChosenCard | SubAbility$ VampiricFeed
SVar:VampiricFeed:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ 1 | Defined$ ChosenCard
SVar:AbleToFeedX:Count$Valid Creature.Vampire+YouCtrl
A:SP$ Pump | Cost$ B B | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -3 | NumDef$ -3 | IsCurse$ True | SubAbility$ VampiricUrge | SpellDescription$ Target creature gets -3/-3 until end of turn. You may tap any number of untapped Vampire creatures you control. If you do, put a +1/+1 counter on each of those Vampires.
SVar:VampiricUrge:DB$ Tap | CardChoices$ Vampire.YouCtrl+untapped | AnyNumber$ True | ChoiceAmount$ Count$Valid Vampire.YouCtrl+untapped | RememberTapped$ True | SubAbility$ VampiricFeed
SVar:VampiricFeed:DB$ PutCounter | CounterType$ P1P1 | CounterNum$ 1 | Defined$ Remembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
Oracle:Target creature gets -3/-3 until end of turn. You may tap any number of untapped Vampire creatures you control. If you do, put a +1/+1 counter on each of those Vampires.