Cleanup + fixes (#1523)

* Fix activator

* Clean up
This commit is contained in:
tool4ever
2022-09-15 15:12:40 +00:00
committed by GitHub
parent 4270f371c7
commit 63f9cbd446
21 changed files with 36 additions and 44 deletions

View File

@@ -887,8 +887,7 @@ public class Game {
ingamePlayers.remove(p); ingamePlayers.remove(p);
lostPlayers.add(p); lostPlayers.add(p);
final Map<AbilityKey, Object> runParams = AbilityKey.newMap(); final Map<AbilityKey, Object> runParams = AbilityKey.mapFromPlayer(p);
runParams.put(AbilityKey.Player, p);
getTriggerHandler().runTrigger(TriggerType.LosesGame, runParams, false); getTriggerHandler().runTrigger(TriggerType.LosesGame, runParams, false);
} }
@@ -1202,8 +1201,7 @@ public class Game {
// If an effect allows or instructs a player to reveal the card as its being drawn, // If an effect allows or instructs a player to reveal the card as its being drawn,
// its revealed after the spell becomes cast or the ability becomes activated. // its revealed after the spell becomes cast or the ability becomes activated.
final Map<AbilityKey, Object> runParams = Maps.newHashMap(); final Map<AbilityKey, Object> runParams = AbilityKey.mapFromCard(c);
runParams.put(AbilityKey.Card, c);
runParams.put(AbilityKey.Number, facedownWhileCasting.get(c)); runParams.put(AbilityKey.Number, facedownWhileCasting.get(c));
runParams.put(AbilityKey.Player, this); runParams.put(AbilityKey.Player, this);
runParams.put(AbilityKey.CanReveal, true); runParams.put(AbilityKey.CanReveal, true);

View File

@@ -2238,8 +2238,7 @@ public class GameAction {
game.setMonarch(p); game.setMonarch(p);
// Run triggers // Run triggers
final Map<AbilityKey, Object> runParams = AbilityKey.newMap(); final Map<AbilityKey, Object> runParams = AbilityKey.mapFromPlayer(p);
runParams.put(AbilityKey.Player, p);
game.getTriggerHandler().runTrigger(TriggerType.BecomeMonarch, runParams, false); game.getTriggerHandler().runTrigger(TriggerType.BecomeMonarch, runParams, false);
} }
@@ -2264,8 +2263,7 @@ public class GameAction {
// You can take the initiative even if you already have it // You can take the initiative even if you already have it
// Run triggers // Run triggers
final Map<AbilityKey, Object> runParams = AbilityKey.newMap(); final Map<AbilityKey, Object> runParams = AbilityKey.mapFromPlayer(p);
runParams.put(AbilityKey.Player, p);
game.getTriggerHandler().runTrigger(TriggerType.TakesInitiative, runParams, false); game.getTriggerHandler().runTrigger(TriggerType.TakesInitiative, runParams, false);
} }
@@ -2354,8 +2352,7 @@ public class GameAction {
if (cause != null) { if (cause != null) {
// set up triggers (but not actually do them until later) // set up triggers (but not actually do them until later)
final Map<AbilityKey, Object> runParams = AbilityKey.newMap(); final Map<AbilityKey, Object> runParams = AbilityKey.mapFromPlayer(p);
runParams.put(AbilityKey.Player, p);
runParams.put(AbilityKey.ScryNum, numLookedAt); runParams.put(AbilityKey.ScryNum, numLookedAt);
game.getTriggerHandler().runTrigger(TriggerType.Scry, runParams, false); game.getTriggerHandler().runTrigger(TriggerType.Scry, runParams, false);
} }

View File

@@ -39,7 +39,7 @@ public class AnimateAllEffect extends AnimateEffectBase {
if (sa.hasParam("Toughness")) { if (sa.hasParam("Toughness")) {
toughness = AbilityUtils.calculateAmount(host, sa.getParam("Toughness"), sa); toughness = AbilityUtils.calculateAmount(host, sa.getParam("Toughness"), sa);
} }
final Game game = sa.getActivatingPlayer().getGame(); final Game game = host.getGame();
// Every Animate event needs a unique time stamp // Every Animate event needs a unique time stamp
final long timestamp = game.getNextTimestamp(); final long timestamp = game.getNextTimestamp();
@@ -142,7 +142,7 @@ public class AnimateAllEffect extends AnimateEffectBase {
list = getTargetPlayers(sa).getCardsIn(ZoneType.Battlefield); list = getTargetPlayers(sa).getCardsIn(ZoneType.Battlefield);
} }
list = CardLists.getValidCards(list, valid, host.getController(), host, sa); list = CardLists.getValidCards(list, valid, sa.getActivatingPlayer(), host, sa);
for (final Card c : list) { for (final Card c : list) {
doAnimate(c, sa, power, toughness, types, removeTypes, finalColors, keywords, removeKeywords, doAnimate(c, sa, power, toughness, types, removeTypes, finalColors, keywords, removeKeywords,
@@ -170,6 +170,6 @@ public class AnimateAllEffect extends AnimateEffectBase {
addUntilCommand(sa, unanimate); addUntilCommand(sa, unanimate);
} }
} }
} // animateAllResolve }
} }

View File

@@ -55,7 +55,7 @@ public class CountersPutAllEffect extends SpellAbilityEffect {
} }
CardCollectionView cards = game.getCardsIn(zone); CardCollectionView cards = game.getCardsIn(zone);
cards = CardLists.getValidCards(cards, valid, host.getController(), host, sa); cards = CardLists.getValidCards(cards, valid, activator, host, sa);
if (sa.usesTargeting()) { if (sa.usesTargeting()) {
final Player pl = sa.getTargets().getFirstTargetedPlayer(); final Player pl = sa.getTargets().getFirstTargetedPlayer();
@@ -80,7 +80,7 @@ public class CountersPutAllEffect extends SpellAbilityEffect {
ZoneType.smartValueOf(sa.getParam("ValidZone2")) : zone; ZoneType.smartValueOf(sa.getParam("ValidZone2")) : zone;
if (sa.hasParam("ValidCards2")) { if (sa.hasParam("ValidCards2")) {
cards = CardLists.getValidCards(game.getCardsIn(zone2), sa.getParam("ValidCards2"), cards = CardLists.getValidCards(game.getCardsIn(zone2), sa.getParam("ValidCards2"),
host.getController(), host, sa); activator, host, sa);
if (sa.usesTargeting()) { if (sa.usesTargeting()) {
cards = CardLists.filterControlledBy(cards, sa.getTargets().getFirstTargetedPlayer()); cards = CardLists.filterControlledBy(cards, sa.getTargets().getFirstTargetedPlayer());
} }

View File

@@ -613,8 +613,7 @@ public class CountersPutEffect extends SpellAbilityEffect {
&& !sa.hasParam("CounterTypes") && !sa.hasParam("ChooseDifferent") && !sa.hasParam("CounterTypes") && !sa.hasParam("ChooseDifferent")
&& !sa.hasParam("PutOnEachOther") && !sa.hasParam("PutOnDefined")) { && !sa.hasParam("PutOnEachOther") && !sa.hasParam("PutOnDefined")) {
try { try {
counterType = chooseTypeFromList(sa, sa.getParam("CounterType"), null, counterType = chooseTypeFromList(sa, sa.getParam("CounterType"), null, placer.getController());
placer.getController());
} catch (Exception e) { } catch (Exception e) {
System.out.println("Counter type doesn't match, nor does an SVar exist with the type name."); System.out.println("Counter type doesn't match, nor does an SVar exist with the type name.");
return; return;

View File

@@ -52,7 +52,7 @@ public class CountersRemoveAllEffect extends SpellAbilityEffect {
final Game game = sa.getActivatingPlayer().getGame(); final Game game = sa.getActivatingPlayer().getGame();
CardCollectionView cards = game.getCardsIn(zone); CardCollectionView cards = game.getCardsIn(zone);
cards = CardLists.getValidCards(cards, valid, sa.getHostCard().getController(), sa.getHostCard(), sa); cards = CardLists.getValidCards(cards, valid, sa.getActivatingPlayer(), sa.getHostCard(), sa);
if (sa.usesTargeting()) { if (sa.usesTargeting()) {
final Player pl = sa.getTargets().getFirstTargetedPlayer(); final Player pl = sa.getTargets().getFirstTargetedPlayer();

View File

@@ -83,7 +83,7 @@ public class CountersRemoveEffect extends SpellAbilityEffect {
if (sa.hasParam("Optional")) { if (sa.hasParam("Optional")) {
String ctrs = cntToRemove > 1 ? Localizer.getInstance().getMessage("lblCounters") : num.equals("All") ? Localizer.getInstance().getMessage("lblAllCounters") : Localizer.getInstance().getMessage("lblACounters"); String ctrs = cntToRemove > 1 ? Localizer.getInstance().getMessage("lblCounters") : num.equals("All") ? Localizer.getInstance().getMessage("lblAllCounters") : Localizer.getInstance().getMessage("lblACounters");
if (!sa.getActivatingPlayer().getController().confirmAction(sa, null, Localizer.getInstance().getMessage("lblRemove") + " " + ctrs + "?", null)) { if (!pc.confirmAction(sa, null, Localizer.getInstance().getMessage("lblRemove") + " " + ctrs + "?", null)) {
return; return;
} }
} }
@@ -133,7 +133,7 @@ public class CountersRemoveEffect extends SpellAbilityEffect {
if (num.equals("Any")) { if (num.equals("Any")) {
Map<String, Object> params = Maps.newHashMap(); Map<String, Object> params = Maps.newHashMap();
params.put("CounterType", counterType); params.put("CounterType", counterType);
srcCards = player.getController().chooseCardsForEffect(srcCards, sa, title, 0, srcCards.size(), true, params); srcCards = pc.chooseCardsForEffect(srcCards, sa, title, 0, srcCards.size(), true, params);
} }
} else if (sa.hasParam("Choices") && counterType != null) { } else if (sa.hasParam("Choices") && counterType != null) {
ZoneType choiceZone = sa.hasParam("ChoiceZone") ? ZoneType.smartValueOf(sa.getParam("ChoiceZone")) ZoneType choiceZone = sa.hasParam("ChoiceZone") ? ZoneType.smartValueOf(sa.getParam("ChoiceZone"))

View File

@@ -65,7 +65,7 @@ public class DamageEachEffect extends DamageBaseEffect {
FCollectionView<Card> sources = game.getCardsIn(ZoneType.Battlefield); FCollectionView<Card> sources = game.getCardsIn(ZoneType.Battlefield);
if (sa.hasParam("ValidCards")) { if (sa.hasParam("ValidCards")) {
sources = CardLists.getValidCards(sources, sa.getParam("ValidCards"), card.getController(), card, sa); sources = CardLists.getValidCards(sources, sa.getParam("ValidCards"), sa.getActivatingPlayer(), card, sa);
} }
final List<GameObject> tgts = getTargets(sa, "DefinedPlayers"); final List<GameObject> tgts = getTargets(sa, "DefinedPlayers");
@@ -121,7 +121,7 @@ public class DamageEachEffect extends DamageBaseEffect {
final int dmg = AbilityUtils.calculateAmount(source, "X", sa); final int dmg = AbilityUtils.calculateAmount(source, "X", sa);
final Card sourceLKI = source.getGame().getChangeZoneLKIInfo(source); final Card sourceLKI = source.getGame().getChangeZoneLKIInfo(source);
for (final Object o : sa.getHostCard().getRemembered()) { for (final Object o : card.getRemembered()) {
if (o instanceof Card) { if (o instanceof Card) {
Card rememberedcard = (Card) o; Card rememberedcard = (Card) o;
damageMap.put(sourceLKI, rememberedcard, dmg); damageMap.put(sourceLKI, rememberedcard, dmg);

View File

@@ -37,7 +37,7 @@ public class UntapAllEffect extends SpellAbilityEffect {
} }
list = list2; list = list2;
} }
list = CardLists.getValidCards(list, valid, card.getController(), card, sa); list = CardLists.getValidCards(list, valid, sa.getActivatingPlayer(), card, sa);
boolean remember = sa.hasParam("RememberUntapped"); boolean remember = sa.hasParam("RememberUntapped");
for (Card c : list) { for (Card c : list) {

View File

@@ -393,7 +393,6 @@ public class ManaCostBeingPaid {
return; return;
} }
int difference = manaToSubtract - sc.totalCount; int difference = manaToSubtract - sc.totalCount;
if (manaToSubtract >= sc.totalCount) { if (manaToSubtract >= sc.totalCount) {

View File

@@ -1605,9 +1605,8 @@ public class Player extends GameEntity implements Comparable<Player> {
} }
// MilledAll trigger // MilledAll trigger
final Map<AbilityKey, Object> runParams = AbilityKey.newMap(); final Map<AbilityKey, Object> runParams = AbilityKey.mapFromPlayer(this);
runParams.put(AbilityKey.Cards, milled); runParams.put(AbilityKey.Cards, milled);
runParams.put(AbilityKey.Player, this);
game.getTriggerHandler().runTrigger(TriggerType.MilledAll, runParams, false); game.getTriggerHandler().runTrigger(TriggerType.MilledAll, runParams, false);
return milled; return milled;

View File

@@ -2,7 +2,7 @@ Name:Alchemist's Gambit
ManaCost:1 R R ManaCost:1 R R
Types:Sorcery Types:Sorcery
A:SP$ AddTurn | NumTurns$ 1 | ExtraTurnDelayedTrigger$ DBDelTrig | ExtraTurnDelayedTriggerExcute$ TrigEffect | SubAbility$ DBExile | StackDescription$ {p:You} takes an extra turn after this one. During that turn, damage can't be prevented. At the beginning of that turn's end step, {p:You} loses the game. | SpellDescription$ Take an extra turn after this one. [At the beginning of that turn's end step, you lose the game.] A:SP$ AddTurn | NumTurns$ 1 | ExtraTurnDelayedTrigger$ DBDelTrig | ExtraTurnDelayedTriggerExcute$ TrigEffect | SubAbility$ DBExile | StackDescription$ {p:You} takes an extra turn after this one. During that turn, damage can't be prevented. At the beginning of that turn's end step, {p:You} loses the game. | SpellDescription$ Take an extra turn after this one. [At the beginning of that turn's end step, you lose the game.]
SVar:DBDelTrig:ThisTurn$ True | Mode$ Phase | Phase$ Upkeep | TriggerDescription$ During that turn, damage can't be prevented. SVar:DBDelTrig:ThisTurn$ True | Static$ True | Mode$ Phase | Phase$ Upkeep | TriggerDescription$ During that turn, damage can't be prevented.
SVar:TrigEffect:DB$ Effect | Defined$ You | StaticAbilities$ STCantPrevent | Triggers$ EndLose SVar:TrigEffect:DB$ Effect | Defined$ You | StaticAbilities$ STCantPrevent | Triggers$ EndLose
SVar:STCantPrevent:Mode$ CantPreventDamage | EffectZone$ Command | Description$ Damage can't be prevented. SVar:STCantPrevent:Mode$ CantPreventDamage | EffectZone$ Command | Description$ Damage can't be prevented.
SVar:EndLose:Mode$ Phase | Phase$ End of Turn | Execute$ TrigLose | TriggerDescription$ At the beginning of that turn's end step, you lose the game. SVar:EndLose:Mode$ Phase | Phase$ End of Turn | Execute$ TrigLose | TriggerDescription$ At the beginning of that turn's end step, you lose the game.

View File

@@ -1,16 +1,16 @@
Name:Desperate Gambit Name:Desperate Gambit
ManaCost:R ManaCost:R
Types:Instant Types:Instant
A:SP$ ChooseSource | Cost$ R | Choices$ Card.YouCtrl | RememberChosen$ True | SubAbility$ CoinFlip | SpellDescription$ Choose a source you control and flip a coin. If you win the flip, the next time that source would deal damage this turn, it deals double that damage instead. If you lose the flip, the next time it would deal damage this turn, prevent that damage. A:SP$ ChooseSource | Cost$ R | Choices$ Card.YouCtrl,Emblem.YouCtrl | RememberChosen$ True | SubAbility$ CoinFlip | SpellDescription$ Choose a source you control and flip a coin. If you win the flip, the next time that source would deal damage this turn, it deals double that damage instead. If you lose the flip, the next time it would deal damage this turn, prevent that damage.
SVar:CoinFlip:DB$ FlipACoin | WinSubAbility$ CreateWinEffect | LoseSubAbility$ CreateLossEffect | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 SVar:CoinFlip:DB$ FlipACoin | WinSubAbility$ CreateWinEffect | LoseSubAbility$ CreateLossEffect | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1
# Winning Effect # Winning Effect
SVar:CreateWinEffect:DB$ Effect | Name$ Desperate Gambit Win Effect | ReplacementEffects$ EventWinDamageDone | RememberObjects$ Remembered SVar:CreateWinEffect:DB$ Effect | Name$ Desperate Gambit Win Effect | ReplacementEffects$ EventWinDamageDone | RememberObjects$ Remembered
SVar:EventWinDamageDone:Event$ DamageDone | ValidSource$ Card.IsRemembered | ReplaceWith$ DmgTwice | Description$ The next time source would deal damage this turn, it deals double that damage instead. SVar:EventWinDamageDone:Event$ DamageDone | ValidSource$ Card.IsRemembered,Emblem.IsRemembered | ReplaceWith$ DmgTwice | Description$ The next time source would deal damage this turn, it deals double that damage instead.
SVar:DmgTwice:DB$ ReplaceEffect | VarName$ DamageAmount | VarValue$ WinX | SubAbility$ ExileEffect SVar:DmgTwice:DB$ ReplaceEffect | VarName$ DamageAmount | VarValue$ WinX | SubAbility$ ExileEffect
SVar:WinX:ReplaceCount$DamageAmount/Twice SVar:WinX:ReplaceCount$DamageAmount/Twice
# Losing Effect # Losing Effect
SVar:CreateLossEffect:DB$ Effect | Name$ Desperate Gambit Loss Effect | ReplacementEffects$ EventLossDamageDone | RememberObjects$ Remembered SVar:CreateLossEffect:DB$ Effect | Name$ Desperate Gambit Loss Effect | ReplacementEffects$ EventLossDamageDone | RememberObjects$ Remembered
SVar:EventLossDamageDone:Event$ DamageDone | ValidSource$ Card.IsRemembered | ReplaceWith$ ExileEffect | PreventionEffect$ True | Description$ The next time it would deal damage this turn, prevent that damage. SVar:EventLossDamageDone:Event$ DamageDone | ValidSource$ Card.IsRemembered,Emblem.IsRemembered | ReplaceWith$ ExileEffect | PreventionEffect$ True | Description$ The next time it would deal damage this turn, prevent that damage.
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
AI:RemoveDeck:All AI:RemoveDeck:All
Oracle:Choose a source you control and flip a coin. If you win the flip, the next time that source would deal damage this turn, it deals double that damage instead. If you lose the flip, the next time it would deal damage this turn, prevent that damage. Oracle:Choose a source you control and flip a coin. If you win the flip, the next time that source would deal damage this turn, it deals double that damage instead. If you lose the flip, the next time it would deal damage this turn, prevent that damage.

View File

@@ -3,7 +3,7 @@ ManaCost:2 U U
Types:Creature Elemental Otter Types:Creature Elemental Otter
PT:5/5 PT:5/5
K:Flying K:Flying
T:Mode$ ChangesZone | ValidCard$ Card.wasCast+Self | Destination$ Battlefield | Execute$ DBAddTurn | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it, target opponent takes an extra turn after this one. Until your next turn, you and planeswalkers you control gain protection from that player. (You and planeswalkers you control can't be targeted, dealt damage, or enchanted by anything controlled by that player.) T:Mode$ ChangesZone | ValidCard$ Card.wasCastByYou+Self | Destination$ Battlefield | Execute$ DBAddTurn | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it, target opponent takes an extra turn after this one. Until your next turn, you and planeswalkers you control gain protection from that player. (You and planeswalkers you control can't be targeted, dealt damage, or enchanted by anything controlled by that player.)
SVar:DBAddTurn:DB$ AddTurn | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | NumTurns$ 1 | SubAbility$ DBPump SVar:DBAddTurn:DB$ AddTurn | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | NumTurns$ 1 | SubAbility$ DBPump
SVar:DBPump:DB$ Pump | Defined$ You | KW$ Protection:Player.TargetedPlayer:Protection from TargetedPlayer | DefinedKW$ TargetedPlayer | Duration$ UntilYourNextTurn | SubAbility$ DBPumpWalkers SVar:DBPump:DB$ Pump | Defined$ You | KW$ Protection:Player.TargetedPlayer:Protection from TargetedPlayer | DefinedKW$ TargetedPlayer | Duration$ UntilYourNextTurn | SubAbility$ DBPumpWalkers
SVar:DBPumpWalkers:DB$ Pump | Defined$ Valid Planeswalker.YouCtrl | KW$ Protection:Player.TargetedPlayer:Protection from TargetedPlayer | DefinedKW$ TargetedPlayer | Duration$ UntilYourNextTurn SVar:DBPumpWalkers:DB$ Pump | Defined$ Valid Planeswalker.YouCtrl | KW$ Protection:Player.TargetedPlayer:Protection from TargetedPlayer | DefinedKW$ TargetedPlayer | Duration$ UntilYourNextTurn

View File

@@ -1,7 +1,7 @@
Name:Jacob Hauken, Inspector Name:Jacob Hauken, Inspector
ManaCost:1 U ManaCost:1 U
Types:Legendary Creature Human Advisor Types:Legendary Creature Human Advisor
PT:1/2 PT:0/2
A:AB$ Draw | Cost$ T | NumCards$ 1 | SubAbility$ DBExile | StackDescription$ {p:You} draws a card, | SpellDescription$ Draw a card, A:AB$ Draw | Cost$ T | NumCards$ 1 | SubAbility$ DBExile | StackDescription$ {p:You} draws a card, | SpellDescription$ Draw a card,
SVar:DBExile:DB$ ChangeZone | Origin$ Hand | Destination$ Exile | ChangeType$ Card | ChangeNum$ 1 | ExileFaceDown$ True | Imprint$ True | Mandatory$ True | SubAbility$ DBEffect | StackDescription$ then exiles a card from their hand face down. | SpellDescription$ then exile a card from your hand face down. SVar:DBExile:DB$ ChangeZone | Origin$ Hand | Destination$ Exile | ChangeType$ Card | ChangeNum$ 1 | ExileFaceDown$ True | Imprint$ True | Mandatory$ True | SubAbility$ DBEffect | StackDescription$ then exiles a card from their hand face down. | SpellDescription$ then exile a card from your hand face down.
SVar:DBEffect:DB$ Effect | RememberObjects$ Imprinted | StaticAbilities$ STLook | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBTransform | SpellDescription$ You may look at that card for as long as it remains exiled. SVar:DBEffect:DB$ Effect | RememberObjects$ Imprinted | StaticAbilities$ STLook | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBTransform | SpellDescription$ You may look at that card for as long as it remains exiled.

View File

@@ -2,7 +2,7 @@ Name:Light-Paws, Emperor's Voice
ManaCost:1 W ManaCost:1 W
Types:Legendary Creature Fox Advisor Types:Legendary Creature Fox Advisor
PT:2/2 PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Aura.YouCtrl+wasCast | TriggerZones$ Battlefield | Execute$ TrigSearch | OptionalDecider$ You | TriggerDescription$ Whenever an Aura enters the battlefield under your control, if you cast it, you may search your library for an Aura card with mana value less than or equal to that Aura and with a different name than each Aura you control, put that card on the battlefield attached to CARDNAME, then shuffle. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Aura.YouCtrl+wasCastByYou | TriggerZones$ Battlefield | Execute$ TrigSearch | OptionalDecider$ You | TriggerDescription$ Whenever an Aura enters the battlefield under your control, if you cast it, you may search your library for an Aura card with mana value less than or equal to that Aura and with a different name than each Aura you control, put that card on the battlefield attached to CARDNAME, then shuffle.
SVar:TrigSearch:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Aura.CanEnchantSource+cmcLEX+doesNotShareNameWith Aura.YouCtrl | ChangeNum$ 1 | ShuffleNonMandatory$ True | AttachedTo$ Self SVar:TrigSearch:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Aura.CanEnchantSource+cmcLEX+doesNotShareNameWith Aura.YouCtrl | ChangeNum$ 1 | ShuffleNonMandatory$ True | AttachedTo$ Self
SVar:X:TriggeredCard$CardManaCost SVar:X:TriggeredCard$CardManaCost
DeckHints:Type$Aura DeckHints:Type$Aura

View File

@@ -4,7 +4,7 @@ Types:Legendary Creature Elemental Otter
PT:3/2 PT:3/2
K:Companion:Special:UniqueNames:Each nonland card in your starting deck has a different name. K:Companion:Special:UniqueNames:Each nonland card in your starting deck has a different name.
K:Flash K:Flash
T:Mode$ ChangesZone | ValidCard$ Card.Self+wasCast | Origin$ Any | Destination$ Battlefield | Execute$ TrigCopy | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it, copy target instant or sorcery spell you control. You may choose new targets for the copy. T:Mode$ ChangesZone | ValidCard$ Card.Self+wasCastByYou | Origin$ Any | Destination$ Battlefield | Execute$ TrigCopy | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it, copy target instant or sorcery spell you control. You may choose new targets for the copy.
SVar:TrigCopy:DB$ CopySpellAbility | ValidTgts$ Instant.YouCtrl,Sorcery.YouCtrl | TgtPrompt$ Select target instant or sorcery spell you control | MayChooseTarget$ True SVar:TrigCopy:DB$ CopySpellAbility | ValidTgts$ Instant.YouCtrl,Sorcery.YouCtrl | TgtPrompt$ Select target instant or sorcery spell you control | MayChooseTarget$ True
DeckHints:Type$Instant|Sorcery DeckHints:Type$Instant|Sorcery
Oracle:Companion — Each nonland card in your starting deck has a different name. (If this card is your chosen companion, you may put it into your hand from outside the game for {3} any time you could cast a sorcery.)\nFlash\nWhen Lutri, the Spellchaser enters the battlefield, if you cast it, copy target instant or sorcery spell you control. You may choose new targets for the copy. Oracle:Companion — Each nonland card in your starting deck has a different name. (If this card is your chosen companion, you may put it into your hand from outside the game for {3} any time you could cast a sorcery.)\nFlash\nWhen Lutri, the Spellchaser enters the battlefield, if you cast it, copy target instant or sorcery spell you control. You may choose new targets for the copy.

View File

@@ -7,7 +7,7 @@ SVar:DBRepeat:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility
SVar:DBChoose:DB$ ChooseCard | Defined$ You | MinAmount$ 0 | Amount$ 1 | Choices$ Creature.untapped+YouCtrl | ChoiceTitle$ Choose up to one untapped creature you control to tap | ChoiceTitleAppendDefined$ Player.IsRemembered | ChoiceZone$ Battlefield | SubAbility$ DBTap SVar:DBChoose:DB$ ChooseCard | Defined$ You | MinAmount$ 0 | Amount$ 1 | Choices$ Creature.untapped+YouCtrl | ChoiceTitle$ Choose up to one untapped creature you control to tap | ChoiceTitleAppendDefined$ Player.IsRemembered | ChoiceZone$ Battlefield | SubAbility$ DBTap
SVar:DBTap:DB$ Tap | Defined$ ChosenCard | SubAbility$ DBImmediateTrigger SVar:DBTap:DB$ Tap | Defined$ ChosenCard | SubAbility$ DBImmediateTrigger
SVar:DBImmediateTrigger:DB$ ImmediateTrigger | RememberObjects$ ChosenCard,Player.IsRemembered | ConditionDefined$ ChosenCard | ConditionPresent$ Card | ConditionCompare$ GE1 | Execute$ TrigGainControl | TrigDescReminderDefined$ Player.IsRemembered | TriggerDescription$ When you do, gain control of target creature that player controls with power less than or equal to the tapped creature's power for as long as you control CARDNAME. SVar:DBImmediateTrigger:DB$ ImmediateTrigger | RememberObjects$ ChosenCard,Player.IsRemembered | ConditionDefined$ ChosenCard | ConditionPresent$ Card | ConditionCompare$ GE1 | Execute$ TrigGainControl | TrigDescReminderDefined$ Player.IsRemembered | TriggerDescription$ When you do, gain control of target creature that player controls with power less than or equal to the tapped creature's power for as long as you control CARDNAME.
SVar:TrigGainControl:DB$ GainControl | ValidTgts$ Creature.RememberedPlayerCtrl+powerLEX | LoseControl$ LeavesPlay,LoseControl | TgtPrompt$ Select target creature that opponent controls SVar:TrigGainControl:DB$ GainControl | ValidTgts$ Creature.powerLEX+ControlledBy DelayTriggerRemembered | LoseControl$ LeavesPlay,LoseControl | TgtPrompt$ Select target creature that opponent controls
SVar:X:TriggerRemembered$CardPower SVar:X:TriggerRemembered$CardPower
SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True
T:Mode$ Attacks | ValidCard$ Creature.YouCtrl+OppOwn | TriggerZones$ Battlefield | Execute$ TrigGain | TriggerDescription$ Whenever you attack with a creature an opponent owns, you gain 2 life and that player loses 2 life. T:Mode$ Attacks | ValidCard$ Creature.YouCtrl+OppOwn | TriggerZones$ Battlefield | Execute$ TrigGain | TriggerDescription$ Whenever you attack with a creature an opponent owns, you gain 2 life and that player loses 2 life.

View File

@@ -4,7 +4,7 @@ Types:Creature Phoenix
PT:2/2 PT:2/2
K:Flying K:Flying
K:Haste K:Haste
T:Mode$ ChangesZone | ValidCard$ Card.wasCast+Self | Destination$ Battlefield | Execute$ TrigLearn | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.) T:Mode$ ChangesZone | ValidCard$ Card.wasCastByYou+Self | Destination$ Battlefield | Execute$ TrigLearn | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it, learn. (You may reveal a Lesson card you own from outside the game and put it into your hand, or discard a card to draw a card.)
SVar:TrigLearn:DB$ Learn SVar:TrigLearn:DB$ Learn
R:Event$ Learn | ActiveZones$ Graveyard | ValidPlayer$ You | Optional$ True | ReplaceWith$ Return | IsPresent$ Card.Self | PresentZone$ Graveyard | Description$ As long as CARDNAME is in your graveyard, if you would learn, you may instead return CARDNAME to the battlefield. R:Event$ Learn | ActiveZones$ Graveyard | ValidPlayer$ You | Optional$ True | ReplaceWith$ Return | IsPresent$ Card.Self | PresentZone$ Graveyard | Description$ As long as CARDNAME is in your graveyard, if you would learn, you may instead return CARDNAME to the battlefield.
SVar:Return:DB$ ChangeZone | Defined$ Self | Origin$ Graveyard | Destination$ Battlefield SVar:Return:DB$ ChangeZone | Defined$ Self | Origin$ Graveyard | Destination$ Battlefield

View File

@@ -3,6 +3,6 @@ ManaCost:3 W W
Types:Creature Angel Types:Creature Angel
PT:3/3 PT:3/3
K:Flying K:Flying
T:Mode$ ChangesZone | ValidCard$ Card.Self+wasCast | Destination$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it, return up to two target creature cards with mana value 2 or less from your graveyard to the battlefield. T:Mode$ ChangesZone | ValidCard$ Card.Self+wasCastByYou | Destination$ Battlefield | Execute$ TrigChange | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it, return up to two target creature cards with mana value 2 or less from your graveyard to the battlefield.
SVar:TrigChange:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature.YouOwn+cmcLE2 | SelectPrompt$ Select up to two target creature cards with mana value 2 or less to return to the battlefield | TargetMin$ 0 | TargetMax$ 2 SVar:TrigChange:DB$ ChangeZone | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Creature.YouOwn+cmcLE2 | SelectPrompt$ Select up to two target creature cards with mana value 2 or less to return to the battlefield | TargetMin$ 0 | TargetMax$ 2
Oracle:Flying\nWhen Sigardian Savior enters the battlefield, if you cast it, return up to two target creature cards with mana value 2 or less from your graveyard to the battlefield. Oracle:Flying\nWhen Sigardian Savior enters the battlefield, if you cast it, return up to two target creature cards with mana value 2 or less from your graveyard to the battlefield.

View File

@@ -3,7 +3,7 @@ ManaCost:2 W U B R G
Types:Legendary Creature Dragon God Types:Legendary Creature Dragon God
PT:7/7 PT:7/7
K:Flying K:Flying
T:Mode$ ChangesZone | ValidCard$ Card.Self+wasCast | Destination$ Battlefield | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it, search your library for up to five Dragon cards not named Tiamat that each have different names, reveal them, put them into your hand, then shuffle. T:Mode$ ChangesZone | ValidCard$ Card.Self+wasCastByYou | Destination$ Battlefield | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it, search your library for up to five Dragon cards not named Tiamat that each have different names, reveal them, put them into your hand, then shuffle.
SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Dragon.notnamedTiamat | ChangeNum$ 5 | DifferentNames$ True SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Library | Destination$ Hand | ChangeType$ Dragon.notnamedTiamat | ChangeNum$ 5 | DifferentNames$ True
DeckNeeds:Type$Dragon DeckNeeds:Type$Dragon
Oracle:Flying\nWhen Tiamat enters the battlefield, if you cast it, search your library for up to five Dragon cards not named Tiamat that each have different names, reveal them, put them into your hand, then shuffle. Oracle:Flying\nWhen Tiamat enters the battlefield, if you cast it, search your library for up to five Dragon cards not named Tiamat that each have different names, reveal them, put them into your hand, then shuffle.