Merge branch 'master' of https://github.com/Card-Forge/forge into adventure

 Conflicts:
	forge-gui-mobile/src/forge/adventure/scene/DuelScene.java
This commit is contained in:
Grimm
2022-08-11 13:15:57 +02:00
31 changed files with 94 additions and 80 deletions

View File

@@ -1682,8 +1682,8 @@ public class AiController {
Iterables.removeIf(saList, new Predicate<SpellAbility>() {
@Override
public boolean apply(final SpellAbility spellAbility) {
return spellAbility instanceof LandAbility;
public boolean apply(final SpellAbility spellAbility) { //don't include removedAI cards if somehow the AI can play the ability or gain control of unsupported card
return spellAbility instanceof LandAbility || (spellAbility.getHostCard() != null && spellAbility.getHostCard().getRules().getAiHints().getRemAIDecks());
}
});

View File

@@ -198,7 +198,7 @@ public class ChooseGenericEffectAi extends SpellAbilityAi {
} else if ("SinProdder".equals(logic)) {
SpellAbility allow = null, deny = null;
for (final SpellAbility sp : spells) {
if (sp.getDescription().equals("Allow")) {
if (sp.getDescription().equals("No")) {
allow = sp;
} else {
deny = sp;

View File

@@ -23,6 +23,7 @@ import forge.game.card.IHasCardView;
import forge.game.keyword.KeywordInterface;
import forge.game.player.Player;
import forge.game.spellability.SpellAbility;
import forge.game.trigger.Trigger;
import forge.game.zone.ZoneType;
import forge.util.Expressions;
@@ -187,7 +188,15 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView,
if (srcCard == null) {
return false;
}
return matchesValid(o, valids, srcCard, srcCard.getController());
Player controller = srcCard.getController();
if (this instanceof Trigger) {
// check for delayed trigger
if (((Trigger) this).getSpawningAbility() != null) {
controller = ((Trigger) this).getSpawningAbility().getActivatingPlayer();
}
}
return matchesValid(o, valids, srcCard, controller);
}
public boolean matchesValid(final Object o, final String[] valids, final Card srcCard, final Player srcPlayer) {

View File

@@ -326,6 +326,7 @@ public abstract class SpellAbilityEffect {
final SpellAbility newSa = AbilityFactory.getAbility(trigSA, sa.getHostCard());
newSa.setIntrinsic(intrinsic);
trig.setOverridingAbility(newSa);
trig.setSpawningAbility(sa.copy(sa.getHostCard(), sa.getActivatingPlayer(), true));
sa.getActivatingPlayer().getGame().getTriggerHandler().registerDelayedTrigger(trig);
}
@@ -641,10 +642,16 @@ public abstract class SpellAbilityEffect {
final Card hostCard = sa.getHostCard();
final Game game = hostCard.getGame();
hostCard.addUntilLeavesBattlefield(triggerList.allCards());
final TriggerHandler trigHandler = game.getTriggerHandler();
final Card lki = CardUtil.getLKICopy(hostCard);
lki.clearControllers();
lki.setOwner(sa.getActivatingPlayer());
final TriggerHandler trigHandler = game.getTriggerHandler();
final Card lki;
if (sa.hasParam("ReturnAbility")) {
lki = CardUtil.getLKICopy(hostCard);
lki.clearControllers();
lki.setOwner(sa.getActivatingPlayer());
} else {
lki = null;
}
return new GameCommand() {
@@ -671,14 +678,13 @@ public abstract class SpellAbilityEffect {
if (newCard == null || !newCard.equalsWithTimestamp(c)) {
continue;
}
Trigger trig = null;
if (sa.hasAdditionalAbility("ReturnAbility")) {
String valid = sa.getParamOrDefault("ReturnValid", "Card.IsTriggerRemembered");
String trigSA = "Mode$ ChangesZone | Origin$ " + cell.getColumnKey() + " | Destination$ " + cell.getRowKey() + " | ValidCard$ " + valid +
" | TriggerDescription$ " + sa.getAdditionalAbility("ReturnAbility").getParam("SpellDescription");
trig = TriggerHandler.parseTrigger(trigSA, hostCard, sa.isIntrinsic(), null);
Trigger trig = TriggerHandler.parseTrigger(trigSA, hostCard, sa.isIntrinsic(), null);
trig.setSpawningAbility(sa.copy(lki, sa.getActivatingPlayer(), true));
trig.setActiveZone(null);
trig.addRemembered(newCard);

View File

@@ -67,6 +67,7 @@ public class AddPhaseEffect extends SpellAbilityEffect {
SpellAbility overridingSA = AbilityFactory.getAbility(sa.getSVar(sa.getParam("ExtraPhaseDelayedTriggerExcute")), sa.getHostCard());
overridingSA.setActivatingPlayer(sa.getActivatingPlayer());
delTrig.setOverridingAbility(overridingSA);
delTrig.setSpawningAbility(sa.copy(sa.getHostCard(), sa.getActivatingPlayer(), true));
extraPhase.addTrigger(delTrig);
}
}

View File

@@ -56,6 +56,7 @@ public class AddTurnEffect extends SpellAbilityEffect {
SpellAbility overridingSA = AbilityFactory.getAbility(sa.getSVar(sa.getParam("ExtraTurnDelayedTriggerExcute")), sa.getHostCard());
overridingSA.setActivatingPlayer(sa.getActivatingPlayer());
delTrig.setOverridingAbility(overridingSA);
delTrig.setSpawningAbility(sa.copy(sa.getHostCard(), sa.getActivatingPlayer(), true));
extra.addTrigger(delTrig);
}
if (sa.hasParam("SkipUntap")) {

View File

@@ -665,6 +665,7 @@ public class CountersPutEffect extends SpellAbilityEffect {
final SpellAbility newSa = AbilityFactory.getAbility(trigSA, host);
newSa.setIntrinsic(intrinsic);
trig.setOverridingAbility(newSa);
trig.setSpawningAbility(sa.copy(host, sa.getActivatingPlayer(), true));
sa.getActivatingPlayer().getGame().getTriggerHandler().registerDelayedTrigger(trig);
}
}

View File

@@ -11,7 +11,6 @@ import forge.game.ability.AbilityUtils;
import forge.game.ability.ApiType;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.Card;
import forge.game.card.CardUtil;
import forge.game.player.Player;
import forge.game.spellability.AbilitySub;
import forge.game.spellability.SpellAbility;
@@ -46,13 +45,8 @@ public class DelayedTriggerEffect extends SpellAbilityEffect {
mapParams.remove("SpellDescription");
}
// in case the card moved before the delayed trigger can be created, need to check the latest card state for right timestamp
Card gameCard = game.getCardState(host);
Card lki = CardUtil.getLKICopy(gameCard);
lki.clearControllers();
lki.setOwner(sa.getActivatingPlayer());
final Trigger delTrig = TriggerHandler.parseTrigger(mapParams, lki, sa.isIntrinsic(), null);
delTrig.setSpawningAbility(sa.copy(lki, sa.getActivatingPlayer(), true));
final Trigger delTrig = TriggerHandler.parseTrigger(mapParams, host, sa.isIntrinsic(), null);
delTrig.setSpawningAbility(sa.copy(host, sa.getActivatingPlayer(), true));
delTrig.setActiveZone(null);
if (sa.hasParam("RememberObjects")) {
@@ -76,7 +70,7 @@ public class DelayedTriggerEffect extends SpellAbilityEffect {
}
if (sa.hasAdditionalAbility("Execute")) {
SpellAbility overridingSA = sa.getAdditionalAbility("Execute").copy(lki, sa.getActivatingPlayer(), false);
SpellAbility overridingSA = sa.getAdditionalAbility("Execute").copy(host, sa.getActivatingPlayer(), false);
// need to reset the parent, additionalAbility does set it to this
if (overridingSA instanceof AbilitySub) {
((AbilitySub)overridingSA).setParent(null);

View File

@@ -42,7 +42,7 @@ public class DigUntilEffect extends SpellAbilityEffect {
}
final ZoneType revealed = ZoneType.smartValueOf(sa.getParam("RevealedDestination"));
sb.append(revealed.equals(ZoneType.Exile) ? "exiles cards from their library until they exile " :
sb.append(ZoneType.Exile.equals(revealed) ? "exiles cards from their library until they exile " :
"reveals cards from their library until revealing ");
sb.append(Lang.nounWithNumeralExceptOne(untilAmount, desc + " card"));
if (untilAmount != 1) {
@@ -62,18 +62,18 @@ public class DigUntilEffect extends SpellAbilityEffect {
sb.append(untilAmount > 1 ? "those cards" : "that card");
sb.append(" ");
if (found.equals(ZoneType.Hand)) {
if (ZoneType.Hand.equals(found)) {
sb.append("into their hand ");
}
if (revealed.equals(ZoneType.Graveyard)) {
if (ZoneType.Graveyard.equals(revealed)) {
sb.append("and all other cards into their graveyard.");
}
if (revealed.equals(ZoneType.Exile)) {
if (ZoneType.Exile.equals(revealed)) {
sb.append("and exile all other cards revealed this way.");
}
} else if (revealed != null) {
if (revealed.equals(ZoneType.Hand)) {
if (ZoneType.Hand.equals(revealed)) {
sb.append("all cards revealed this way into their hand");
}
}

View File

@@ -8,8 +8,6 @@ import forge.game.Game;
import forge.game.ability.AbilityUtils;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.Card;
import forge.game.card.CardUtil;
import forge.game.replacement.ReplacementType;
import forge.game.spellability.AbilitySub;
import forge.game.spellability.SpellAbility;
import forge.game.trigger.Trigger;
@@ -45,15 +43,8 @@ public class ImmediateTriggerEffect extends SpellAbilityEffect {
mapParams.put("Mode", TriggerType.Immediate.name());
// in case the card moved before the delayed trigger can be created, need to check the latest card state for right timestamp
Card gameCard = game.getCardState(host);
Card lki = CardUtil.getLKICopy(gameCard);
lki.clearControllers();
lki.setOwner(sa.getActivatingPlayer());
// if this trigger is part of ETBReplacement it shouldn't run with LKI from incomplete zone change (Mimic Vat + Wall of Stolen Identity)
final Card trigHost = sa.getRootAbility().getReplacementEffect() != null && sa.getRootAbility().getReplacementEffect().getMode().equals(ReplacementType.Moved) && gameCard.getZone() == null ? gameCard : lki;
final Trigger immediateTrig = TriggerHandler.parseTrigger(mapParams, trigHost, sa.isIntrinsic(), null);
immediateTrig.setSpawningAbility(sa.copy(lki, sa.getActivatingPlayer(), true));
final Trigger immediateTrig = TriggerHandler.parseTrigger(mapParams, host, sa.isIntrinsic(), null);
immediateTrig.setSpawningAbility(sa.copy(host, sa.getActivatingPlayer(), true));
// Need to copy paid costs
@@ -71,7 +62,7 @@ public class ImmediateTriggerEffect extends SpellAbilityEffect {
}
if (sa.hasAdditionalAbility("Execute")) {
SpellAbility overridingSA = sa.getAdditionalAbility("Execute").copy(lki, sa.getActivatingPlayer(), false);
SpellAbility overridingSA = sa.getAdditionalAbility("Execute").copy(host, sa.getActivatingPlayer(), false);
// need to set Parent to null, otherwise it might have wrong root ability
if (overridingSA instanceof AbilitySub) {
((AbilitySub)overridingSA).setParent(null);

View File

@@ -1942,7 +1942,13 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
}
}
return topSA.getHostCard().isValid(tgt.getValidTgts(), getActivatingPlayer(), getHostCard(), this);
Card host = topSA.getHostCard();
// if from an effect it's always Delayed Trigger
if (host.isImmutable() && !host.isEmblem()) {
host = host.getEffectSource();
}
return host.isValid(tgt.getValidTgts(), getActivatingPlayer(), getHostCard(), this);
}
public boolean isTargeting(GameObject o) {

View File

@@ -107,6 +107,15 @@ public class StaticAbilityPanharmonicon {
if (table.filterCards(origin == null ? null : ImmutableList.of(ZoneType.smartValueOf(origin)), ZoneType.smartValueOf(destination), stAb.getParam("ValidCause"), card, stAb).isEmpty()) {
return false;
}
} else if (trigMode.equals(TriggerType.Attacks)) {
if (!stAb.matchesValidParam("ValidCause", runParams.get(AbilityKey.Attacker))) {
return false;
}
} else if (trigMode.equals(TriggerType.AttackersDeclared)
|| trigMode.equals(TriggerType.AttackersDeclaredOneTarget)) {
if (!stAb.matchesValidParam("ValidCause", runParams.get(AbilityKey.Attackers))) {
return false;
}
} else if (trigMode.equals(TriggerType.SpellCastOrCopy)
|| trigMode.equals(TriggerType.SpellCast) || trigMode.equals(TriggerType.SpellCopy)) {
// Check if the spell cast and the caster match

View File

@@ -531,7 +531,6 @@ public abstract class Trigger extends TriggerReplacementBase {
public SpellAbility getSpawningAbility() {
return spawningAbility;
}
public void setSpawningAbility(SpellAbility ability) {
spawningAbility = ability;
}

View File

@@ -541,8 +541,9 @@ public class TriggerHandler {
sa.changeText();
}
} else {
Player controller = regtrig.getSpawningAbility() != null ? regtrig.getSpawningAbility().getActivatingPlayer() : host.getController();
// need to copy the SA because of TriggeringObjects
sa = sa.copy(host, host.getController(), false);
sa = sa.copy(host, controller, false);
}
sa.setLastStateBattlefield(game.getLastStateBattlefield());

View File

@@ -4,7 +4,7 @@ Types:Instant
A:SP$ Charm | Choices$ Proliferate,PhaseOut,CounterAbility | CharmNum$ 3 | CanRepeatModes$ True
SVar:Proliferate:DB$ Proliferate | SpellDescription$ Proliferate. (Choose any number of permanents and/or players, then give each another counter of each kind already there.)
SVar:PhaseOut:DB$ Phases | ValidTgts$ Creature | SpellDescription$ Target creature phases out. (Treat it and anything attached to it as though they don't exist until its controller's next turn.)
SVar:CounterAbility:DB$ Counter | TargetType$ Activated,Triggered | ValidTgts$ Card | TgtPrompt$ Select target activated or triggered ability | SpellDescription$ Counter target activated or triggered ability.
SVar:CounterAbility:DB$ Counter | TargetType$ Activated,Triggered | ValidTgts$ Card,Emblem | TgtPrompt$ Select target activated or triggered ability | SpellDescription$ Counter target activated or triggered ability.
DeckHas:Ability$Proliferate
DeckHints:Ability$Counters & Type$Planeswalker
Oracle:Choose three. You may choose the same mode more than once.\n• Proliferate. (Choose any number of permanents and/or players, then give each another counter of each kind already there.)\n• Target creature phases out. (Treat it and anything attached to it as though they don't exist until its controller's next turn.)\n• Counter target activated or triggered ability.

View File

@@ -1,6 +1,6 @@
Name:Disallow
ManaCost:1 U U
Types:Instant
A:SP$ Counter | Cost$ 1 U U | TargetType$ Spell,Activated,Triggered | TgtPrompt$ Select target spell or ability | ValidTgts$ Card | SpellDescription$ Counter target spell, activated ability, or triggered ability.
A:SP$ Counter | Cost$ 1 U U | TargetType$ Spell,Activated,Triggered | TgtPrompt$ Select target spell or ability | ValidTgts$ Card,Emblem | SpellDescription$ Counter target spell, activated ability, or triggered ability.
AI:RemoveDeck:All
Oracle:Counter target spell, activated ability, or triggered ability. (Mana abilities can't be targeted.)

View File

@@ -1,10 +1,13 @@
Name:Distant Memories
ManaCost:2 U U
Types:Sorcery
A:SP$ ChangeZone | Origin$ Library | Destination$ Exile | ChangeType$ Card | ChangeNum$ 1 | Mandatory$ True | RememberChanged$ True | AILogic$ BestCard | SubAbility$ DBReturn | StackDescription$ SpellDescription | SpellDescription$ Search your library for a card, exile it, then shuffle. Any opponent may have you put that card into your hand. If no player does, you draw three cards.
SVar:DBReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Hand | ChangeType$ Card.IsRemembered | Hidden$ True | Chooser$ Opponent | SelectPrompt$ Select a card to put in the opponent's hand, or they will draw three cards. | SkipCancelPrompt$ True | ForgetChanged$ True | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | NumCards$ 3 | ConditionDefined$ Remembered | ConditionZone$ Exile | ConditionPresent$ Card | ConditionCompare$ GE1 | SubAbility$ DBCleanup | StackDescription$ None
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
A:SP$ ChangeZone | Origin$ Library | Destination$ Exile | ChangeType$ Card | ChangeNum$ 1 | Mandatory$ True | Imprint$ True | AILogic$ BestCard | SubAbility$ DBReturn | StackDescription$ SpellDescription | SpellDescription$ Search your library for a card, exile it, then shuffle. Any opponent may have you put that card into your hand. If no player does, you draw three cards.
SVar:DBRepeat:DB$ RepeatEach | RepeatPlayers$ Opponent | RepeatSubAbility$ DBChoose | SubAbility$ DBDraw
SVar:DBChoose:DB$ GenericChoice | Defined$ Remembered | Choices$ DBToHand,DoNothing | ChoicePrompt$ Have them put the card in their hand? | ConditionDefined$ Imprinted | ConditionZone$ Exile | ConditionPresent$ Card | ConditionCompare$ EQ1
SVar:DBToHand:DB$ ChangeZone | Origin$ Exile | Destination$ Hand | Defined$ Imprinted | Unimprint$ True | SpellDescription$ Yes
SVar:DoNothing:DB$ Cleanup | SpellDescription$ No
SVar:DBDraw:DB$ Draw | NumCards$ 3 | ConditionDefined$ Imprinted | ConditionZone$ Exile | ConditionPresent$ Card | ConditionCompare$ GE1 | SubAbility$ DBCleanup | StackDescription$ None
SVar:DBCleanup:DB$ Cleanup | ClearImprinted$ True
SVar:NeedsToPlayVar:X LE4
SVar:X:Count$InYourHand
Oracle:Search your library for a card, exile it, then shuffle. Any opponent may have you put that card into your hand. If no player does, you draw three cards.

View File

@@ -1,21 +1,11 @@
Name:Grinning Totem
ManaCost:4
Types:Artifact
A:AB$ ChangeZone | Cost$ 2 T Sac<1/CARDNAME> | ValidTgts$ Player.Opponent | IsCurse$ True | Chooser$ You | Origin$ Library | Destination$ Exile | ChangeType$ Card | ChangeNum$ 1 | IsCurse$ True | RememberChanged$ True | SubAbility$ TotemEffect | SpellDescription$ Search target opponent's library for a card and exile it. Then that player shuffles. Until the beginning of your next upkeep, you may play that card. At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard. | StackDescription$ SpellDescription
SVar:TotemEffect:DB$ Effect | StaticAbilities$ STGrinning | Duration$ Permanent | RememberObjects$ Remembered | Triggers$ TrigDuration,TrigReturn,TrigLandPlayed,TrigCast | SubAbility$ DBResetSVar
# Even though the Effect is "Permanent", it's not really permanent
SVar:DBResetSVar:DB$ StoreSVar | SVar$ ActiveTotem | Type$ Number | Expression$ 1 | SubAbility$ DBCleanup
A:AB$ ChangeZone | Cost$ 2 T Sac<1/CARDNAME> | ValidTgts$ Opponent | IsCurse$ True | Chooser$ You | Origin$ Library | Destination$ Exile | ChangeType$ Card | ChangeNum$ 1 | IsCurse$ True | RememberChanged$ True | SubAbility$ TotemEffect | SpellDescription$ Search target opponent's library for a card and exile it. Then that player shuffles. | StackDescription$ {p:You} searches {p:Targeted}'s library for a card and exiles it. Then {p:Targeted} shuffles.
SVar:TotemEffect:DB$ Effect | StaticAbilities$ STGrinning | Duration$ UntilYourNextUpkeep | RememberObjects$ Remembered | ExileOnMoved$ Exile | SubAbility$ DBDelayedTrigger | SpellDescription$ Until the beginning of your next upkeep, you may play that card.
SVar:STGrinning:Mode$ Continuous | Affected$ Card.IsRemembered | MayPlay$ True | EffectZone$ Command | AffectedZone$ Exile | Description$ Until the beginning of your next upkeep, you may play that card.
SVar:DBDelayedTrigger:DB$ DelayedTrigger | Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | RememberObjects$ Remembered | Execute$ DBReturn | IsPresent$ Card.IsTriggerRemembered | PresentZone$ Exile | SubAbility$ DBCleanup | TriggerDescription$ At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard.
SVar:DBReturn:DB$ ChangeZone | Defined$ DelayTriggerRememberedLKI | Origin$ Exile | Destination$ Graveyard
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:ActiveTotem:Number$1
SVar:STGrinning:Mode$ Continuous | Affected$ Card.IsRemembered+OppOwn | MayPlay$ True | EffectZone$ Command | AffectedZone$ Exile | CheckSVar$ ActiveTotem | Description$ Until the beginning of your next upkeep, you may play that card.
# Turn off the duration at the beginning of the upkeep statically
SVar:TrigDuration:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Static$ True | TriggerZones$ Command | Execute$ DBDuration
SVar:DBDuration:DB$ StoreSVar | SVar$ ActiveTotem | Type$ Number | Expression$ 0
# Return the card as a normal trigger
SVar:TrigReturn:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Command | Execute$ DBReturn | OneOff$ True | TriggerDescription$ At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard.
SVar:DBReturn:DB$ ChangeZone | Defined$ Remembered | Origin$ Exile | Destination$ Graveyard
# Remove Totem Effect when the card is played
SVar:TrigLandPlayed:Mode$ LandPlayed | ValidCard$ Land.IsRemembered | Static$ True | TriggerZones$ Command | Execute$ RemoveEffect
SVar:TrigCast:Mode$ SpellCast | ValidCard$ Card.IsRemembered | Static$ True | TriggerZones$ Command | Execute$ RemoveEffect
AI:RemoveDeck:All
Oracle:{2}, {T}, Sacrifice Grinning Totem: Search target opponent's library for a card and exile it. Then that player shuffles. Until the beginning of your next upkeep, you may play that card. At the beginning of your next upkeep, if you haven't played it, put it into its owner's graveyard.

View File

@@ -1,7 +1,7 @@
Name:Lithoform Engine
ManaCost:4
Types:Legendary Artifact
A:AB$ CopySpellAbility | Cost$ 2 T | TgtPrompt$ Select target activated or triggered ability you control | TargetType$ Activated.YouCtrl,Triggered.YouCtrl | ValidTgts$ Card | MayChooseTarget$ True | StackDescription$ SpellDescription | SpellDescription$ Copy target activated or triggered ability you control. You may choose new targets for the copy.
A:AB$ CopySpellAbility | Cost$ 2 T | TgtPrompt$ Select target activated or triggered ability you control | TargetType$ Activated.YouCtrl,Triggered.YouCtrl | ValidTgts$ Card,Emblem | MayChooseTarget$ True | StackDescription$ SpellDescription | SpellDescription$ Copy target activated or triggered ability you control. You may choose new targets for the copy.
A:AB$ CopySpellAbility | Cost$ 3 T | TgtPrompt$ Select target instant or sorcery spell you control | ValidTgts$ Instant.YouCtrl,Sorcery.YouCtrl | TargetType$ Spell | MayChooseTarget$ True | SpellDescription$ Copy target instant or sorcery spell you control. You may choose new targets for the copy.
A:AB$ CopySpellAbility | Cost$ 4 T | TgtPrompt$ Select target permanent spell you control | ValidTgts$ Permanent.YouCtrl | TargetType$ Spell | SpellDescription$ Copy target permanent spell you control. (The copy becomes a token.)
Oracle:{2}, {T}: Copy target activated or triggered ability you control. You may choose new targets for the copy.\n{3}, {T}: Copy target instant or sorcery spell you control. You may choose new targets for the copy.\n{4}, {T}: Copy target permanent spell you control. (The copy becomes a token.)

View File

@@ -3,16 +3,16 @@ ManaCost:no cost
Types:Scheme
T:Mode$ SetInMotion | ValidCard$ Card.Self | Execute$ ChooseCreature | TriggerZones$ Command | TriggerDescription$ When you set this scheme in motion, target opponent chooses a creature you don't control and puts it on top of its owner's library, then repeats this process for an artifact, an enchantment, and a land. Then the owner of each permanent chosen this way shuffles.
SVar:ChooseCreature:DB$ ChooseCard | ValidTgts$ Opponent | Choices$ Creature.YouDontCtrl | Mandatory$ True | SubAbility$ BounceCreature
SVar:BounceCreature:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Battlefield | Destination$ Library | Imprint$ True | UnImprint$ True | LibraryPosition$ 0 | SubAbility$ DBRemember1
SVar:BounceCreature:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Battlefield | Destination$ Library | Imprint$ True | Unimprint$ True | LibraryPosition$ 0 | SubAbility$ DBRemember1
SVar:DBRemember1:DB$ Pump | RememberObjects$ ImprintedOwner | SubAbility$ ChooseArtifact
SVar:ChooseArtifact:DB$ ChooseCard | Defined$ ParentTarget | Choices$ Artifact.YouDontCtrl | Mandatory$ True | SubAbility$ BounceArtifact
SVar:BounceArtifact:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Battlefield | Destination$ Library | Imprint$ True | UnImprint$ True | LibraryPosition$ 0 | SubAbility$ DBRemember2
SVar:BounceArtifact:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Battlefield | Destination$ Library | Imprint$ True | Unimprint$ True | LibraryPosition$ 0 | SubAbility$ DBRemember2
SVar:DBRemember2:DB$ Pump | RememberObjects$ ImprintedOwner | SubAbility$ ChooseEnchant
SVar:ChooseEnchant:DB$ ChooseCard | Defined$ ParentTarget | Choices$ Enchantment.YouDontCtrl | Mandatory$ True | SubAbility$ BounceEnchant
SVar:BounceEnchant:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Battlefield | Destination$ Library | Imprint$ True | UnImprint$ True | LibraryPosition$ 0 | SubAbility$ DBRemember3
SVar:BounceEnchant:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Battlefield | Destination$ Library | Imprint$ True | Unimprint$ True | LibraryPosition$ 0 | SubAbility$ DBRemember3
SVar:DBRemember3:DB$ Pump | RememberObjects$ ImprintedOwner | SubAbility$ ChooseLand
SVar:ChooseLand:DB$ ChooseCard | Defined$ ParentTarget | Choices$ Land.YouDontCtrl | Mandatory$ True | SubAbility$ BounceLand
SVar:BounceLand:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Battlefield | Destination$ Library | Imprint$ True | UnImprint$ True | LibraryPosition$ 0 | SubAbility$ DBRemember4
SVar:BounceLand:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Battlefield | Destination$ Library | Imprint$ True | Unimprint$ True | LibraryPosition$ 0 | SubAbility$ DBRemember4
SVar:DBRemember4:DB$ Pump | RememberObjects$ ImprintedOwner | SubAbility$ DBShuffle
SVar:DBShuffle:DB$ Shuffle | Defined$ Remembered | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True

View File

@@ -6,5 +6,5 @@ K:Flash
K:Flying
K:Cycling:2 U
T:Mode$ Cycled | ValidCard$ Card.Self | Execute$ TrigCounter | TriggerDescription$ When you cycle CARDNAME, counter target activated or triggered ability you don't control.
SVar:TrigCounter:DB$ Counter | TargetType$ Activated,Triggered | ValidTgts$ Card.YouDontCtrl
SVar:TrigCounter:DB$ Counter | TargetType$ Activated.YouDontCtrl,Triggered.YouDontCtrl | TgtPrompt$ Choose target ability | ValidTgts$ Card,Emblem
Oracle:Flash\nFlying\nCycling {2}{U} ({2}{U}, Discard this card: Draw a card.)\nWhen you cycle Nimble Obstructionist, counter target activated or triggered ability you don't control.

View File

@@ -6,9 +6,9 @@ K:Menace
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPeek | TriggerDescription$ At the beginning of your upkeep, reveal the top card of your library. Any opponent may have you put that card into your graveyard. If a player does, Sin Prodder deals damage to that player equal to that card's mana value. Otherwise, put that card into your hand.
SVar:TrigPeek:DB$ PeekAndReveal | PeekAmount$ 1 | RevealValid$ Card | ImprintRevealed$ True | SubAbility$ DBRepeat
SVar:DBRepeat:DB$ RepeatEach | RepeatPlayers$ Opponent | RepeatSubAbility$ DBProd | SubAbility$ DBPutIntoHand
SVar:DBProd:DB$ GenericChoice | Defined$ Remembered | Choices$ DBMillAndDamage,DoNothing | ConditionDefined$ Imprinted | ConditionPresent$ Card | ConditionCompare$ EQ1 | AILogic$ SinProdder
SVar:DoNothing:DB$ Cleanup | SpellDescription$ Allow
SVar:DBMillAndDamage:DB$ Mill | Defined$ You | NumCards$ 1 | SubAbility$ DBDamage | SpellDescription$ Deny
SVar:DBProd:DB$ GenericChoice | Defined$ Remembered | Choices$ DBGraveAndDamage,DoNothing | ChoicePrompt$ Have them put the card into their graveyard? | ConditionDefined$ Imprinted | ConditionPresent$ Card | ConditionCompare$ EQ1 | AILogic$ SinProdder
SVar:DoNothing:DB$ Cleanup | SpellDescription$ No
SVar:DBGraveAndDamage:DB$ ChangeZone | Origin$ Library | Destination$ Graveyard | Defined$ Imprinted | SubAbility$ DBDamage | SpellDescription$ Yes (take damage)
SVar:DBDamage:DB$ DealDamage | Defined$ Remembered | NumDmg$ X | SubAbility$ DBCleanup
SVar:X:Imprinted$CardManaCost
SVar:DBPutIntoHand:DB$ Dig | DigNum$ 1 | ChangeNum$ All | ChangeValid$ Card | DestinationZone$ Hand | SubAbility$ DBCleanup | ConditionDefined$ Imprinted | ConditionPresent$ Card | ConditionCompare$ EQ1

View File

@@ -7,4 +7,6 @@ SVar:TrigChoose:DB$ ChooseCard | ChoiceZone$ Hand | Choices$ Sorcery.YouOwn,Inst
SVar:DBEffect:DB$ Effect | StaticAbilities$ PerpetualCasualty | Name$ Spelldrain Assassin's Perpetual Effect | Duration$ Permanent | SubAbility$ DBCleanup
SVar:PerpetualCasualty:Mode$ Continuous | Affected$ Card.ChosenCard | AddKeyword$ Casualty:2 | EffectZone$ Command | AffectedZone$ Battlefield,Hand,Graveyard,Exile,Stack,Library,Command | Description$ The chosen card perpetually gains casualty 2.
SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True
DeckHints:Type$Instant|Sorcery
DeckHas:Ability$Sacrifice
Oracle:When Spelldrain Assassin enters the battlefield, choose an instant or sorcery card in your hand. It perpetually gains casualty 2.

View File

@@ -1,6 +1,6 @@
Name:Stifle
ManaCost:U
Types:Instant
A:SP$ Counter | Cost$ U | TgtPrompt$ Select target Activated or Triggered Ability | ValidTgts$ Card | TargetType$ Activated,Triggered | SpellDescription$ Counter target activated or triggered ability.
A:SP$ Counter | Cost$ U | TgtPrompt$ Choose target ability | ValidTgts$ Card,Emblem | TargetType$ Activated,Triggered | SpellDescription$ Counter target activated or triggered ability.
AI:RemoveDeck:All
Oracle:Counter target activated or triggered ability. (Mana abilities can't be targeted.)

View File

@@ -1,7 +1,7 @@
Name:Strionic Resonator
ManaCost:2
Types:Artifact
A:AB$ CopySpellAbility | Cost$ 2 T | TargetType$ Triggered.YouCtrl | ValidTgts$ Card | MayChooseTarget$ True | SpellDescription$ Copy target triggered ability you control. You may choose new targets for the copy.
A:AB$ CopySpellAbility | Cost$ 2 T | TargetType$ Triggered.YouCtrl | ValidTgts$ Card,Emblem | TgtPrompt$ Choose target triggered ability you control | MayChooseTarget$ True | SpellDescription$ Copy target triggered ability you control. You may choose new targets for the copy.
AI:RemoveDeck:All
AI:RemoveDeck:Random
Oracle:{2}, {T}: Copy target triggered ability you control. You may choose new targets for the copy. (A triggered ability uses the words "when," "whenever," or "at.")

View File

@@ -3,7 +3,7 @@ ManaCost:4 U U
Types:Instant
A:SP$ Charm | MinCharmNum$ 1 | CharmNum$ 5 | Choices$ DBCounterSpell,DBCounterAbility,DBReturn,DBCopy,DBDraw
SVar:DBCounterSpell:DB$ Counter | TargetType$ Spell | ValidTgts$ Card | TgtPrompt$ Select target spell | SpellDescription$ Counter target spell.
SVar:DBCounterAbility:DB$ Counter | TargetType$ Activated,Triggered | ValidTgts$ Card | TgtPrompt$ Select target activated or triggered ability | SpellDescription$ Counter target activated or triggered ability.
SVar:DBCounterAbility:DB$ Counter | TargetType$ Activated,Triggered | ValidTgts$ Card,Emblem | TgtPrompt$ Select target activated or triggered ability | SpellDescription$ Counter target activated or triggered ability.
SVar:DBReturn:DB$ ChangeZone | Origin$ Battlefield | Destination$ Hand | ValidTgts$ Permanent.nonLand | TgtPrompt$ Select target nonland permanent | AILogic$ Good | SpellDescription$ Return target nonland permanent to its owner's hand.
SVar:DBCopy:DB$ CopyPermanent | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | SpellDescription$ Create a token that's a copy of target creature you control.
SVar:DBDraw:DB$ Draw | NumCards$ 1 | ValidTgts$ Player | TgtPrompt$ Select target player | SpellDescription$ Target player draws a card.

View File

@@ -1,6 +1,6 @@
Name:Tale's End
ManaCost:1 U
Types:Instant
A:SP$ Counter | Cost$ 1 U | TargetType$ Activated,Triggered,Spell.Legendary | TgtPrompt$ Select target activated ability, triggered ability, or legendary spell | ValidTgts$ Card | SpellDescription$ Counter target activated ability, triggered ability, or legendary spell.
A:SP$ Counter | Cost$ 1 U | TargetType$ Activated,Triggered,Spell.Legendary | TgtPrompt$ Select target activated ability, triggered ability, or legendary spell | ValidTgts$ Card,Emblem | SpellDescription$ Counter target activated ability, triggered ability, or legendary spell.
AI:RemoveDeck:Random
Oracle:Counter target activated ability, triggered ability, or legendary spell.

View File

@@ -2,7 +2,7 @@ Name:Trickbind
ManaCost:1 U
Types:Instant
K:Split second
A:SP$ Counter | Cost$ 1 U | TargetType$ Activated,Triggered | TgtPrompt$ Select target Activated or Triggered Ability | RememberCountered$ True | ValidTgts$ Card | SubAbility$ DBEffect | SpellDescription$ Counter target activated or triggered ability. If a permanent's ability is countered this way, activated abilities of that permanent can't be activated this turn. (Mana abilities can't be targeted.)
A:SP$ Counter | Cost$ 1 U | TargetType$ Activated,Triggered | TgtPrompt$ Choose target ability | RememberCountered$ True | ValidTgts$ Card,Emblem | SubAbility$ DBEffect | SpellDescription$ Counter target activated or triggered ability. If a permanent's ability is countered this way, activated abilities of that permanent can't be activated this turn. (Mana abilities can't be targeted.)
SVar:DBEffect:DB$ Effect | StaticAbilities$ STCantBeActivated | RememberObjects$ Remembered | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ1
SVar:STCantBeActivated:Mode$ CantBeActivated | EffectZone$ Command | ValidCard$ Permanent.IsRemembered
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True

View File

@@ -12,5 +12,5 @@ ALTERNATE
Name:Dissonant Wave
ManaCost:2 G
Types:Instant Adventure
A:SP$ Counter | TargetType$ Activated,Triggered | TgtPrompt$ Select target activated or triggered ability from a noncreature source | ValidTgts$ Card.nonCreature | SpellDescription$ Counter target activated or triggered ability from a noncreature source. (Then exile this card. You may cast the creature later from exile.)
A:SP$ Counter | TargetType$ Activated,Triggered | TgtPrompt$ Select target activated or triggered ability from a noncreature source | ValidTgts$ Card.nonCreature,Emblem | SpellDescription$ Counter target activated or triggered ability from a noncreature source. (Then exile this card. You may cast the creature later from exile.)
Oracle:Counter target activated or triggered ability from a noncreature source. (Then exile this card. You may cast the creature later from exile.)

View File

@@ -1,6 +1,6 @@
Name:Voidslime
ManaCost:G U U
Types:Instant
A:SP$ Counter | Cost$ G U U | TargetType$ Spell,Activated,Triggered | TgtPrompt$ Select target spell or ability | ValidTgts$ Card | SpellDescription$ Counter target spell, activated ability, or triggered ability.
A:SP$ Counter | Cost$ G U U | TargetType$ Spell,Activated,Triggered | TgtPrompt$ Select target spell or ability | ValidTgts$ Card,Emblem | SpellDescription$ Counter target spell, activated ability, or triggered ability.
AI:RemoveDeck:All
Oracle:Counter target spell, activated ability, or triggered ability. (Mana abilities can't be targeted.)

View File

@@ -1,8 +1,9 @@
Name:Waylay
ManaCost:2 W
Types:Instant
A:SP$ Token | Cost$ 2 W | TokenAmount$ 3 | TokenScript$ w_2_2_knight | TokenOwner$ You | AtEOT$ Exile | SpellDescription$ Create three 2/2 white Knight creature tokens. Exile them at the beginning of the next cleanup step.
DeckHas:Ability$Token
AI:RemoveDeck:All
DeckHints:Type$Knight
A:SP$ Token | TokenAmount$ 3 | TokenScript$ w_2_2_knight | RememberTokens$ True | SubAbility$ DBDelayedTrigger | SpellDescription$ Create three 2/2 white Knight creature tokens.
SVar:DBDelayedTrigger:DB$ DelayedTrigger | RememberObjects$ Remembered | Mode$ Phase | Phase$ Cleanup | Execute$ TrigExileAll | SubAbility$ DBCleanup | TriggerDescription$ Exile them at the beginning of the next cleanup step.
SVar:TrigExileAll:DB$ ChangeZone | Defined$ DelayTriggerRememberedLKI | Origin$ Battlefield | Destination$ Exile
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
DeckHas:Ability$Token & Type$Knight
Oracle:Create three 2/2 white Knight creature tokens. Exile them at the beginning of the next cleanup step.