From b1dc27f8cc96702728ada731cc84b0fa9d07e4bb Mon Sep 17 00:00:00 2001 From: Sloth Date: Mon, 8 Oct 2012 16:28:36 +0000 Subject: [PATCH] - Converted Isochron Scepter and three other cards to use AF Play instead of AF Copy. --- res/cardsfolder/i/isochron_scepter.txt | 2 +- res/cardsfolder/p/panoptic_mirror.txt | 2 +- res/cardsfolder/s/spellbinder.txt | 2 +- res/cardsfolder/s/spellweaver_helix.txt | 28 +++++++++---------- .../abilityfactory/AbilityFactoryPlay.java | 9 ++++++ 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/res/cardsfolder/i/isochron_scepter.txt b/res/cardsfolder/i/isochron_scepter.txt index 62727f51984..26bf3a40eb5 100644 --- a/res/cardsfolder/i/isochron_scepter.txt +++ b/res/cardsfolder/i/isochron_scepter.txt @@ -4,7 +4,7 @@ Types:Artifact Text:no text T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint - When CARDNAME enters the battlefield, you may exile an instant card with converted mana cost 2 or less from your hand. SVar:TrigExile:AB$ChangeZone | Cost$ 0 | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Instant.cmcLE2 | ChangeNum$ 1 -A:AB$ CopySpell | Cost$ 2 T | Defined$ Imprinted | SpellDescription$ You may copy the exiled card. If you do, you may cast the copy without paying its mana cost. +A:AB$ Play | Cost$ 2 T | Defined$ Imprinted | WithoutManaCost$ True | Optional$ True | CopyCard$ True | SpellDescription$ You may copy the exiled card. If you do, you may cast the copy without paying its mana cost. SVar:RemAIDeck:True SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/isochron_scepter.jpg diff --git a/res/cardsfolder/p/panoptic_mirror.txt b/res/cardsfolder/p/panoptic_mirror.txt index 9f861c168db..9946727fb24 100644 --- a/res/cardsfolder/p/panoptic_mirror.txt +++ b/res/cardsfolder/p/panoptic_mirror.txt @@ -5,7 +5,7 @@ Text:no text A:AB$ ChangeZone | Cost$ X T | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Instant.cmcEQX,Sorcery.cmcEQX | References$ X | ChangeNum$ 1 | PrecostDesc$ Imprint - | SpellDescription$ You may exile an instant or sorcery card with converted mana cost X from your hand. SVar:X:Count$xPaid T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | OptionalDecider$ You | TriggerZones$ Battlefield | Execute$ TrigCopy | TriggerDescription$ At the beginning of your upkeep, you may copy a card exiled with Panoptic Mirror. If you do, you may cast the copy without paying its mana cost. -SVar:TrigCopy:AB$ CopySpell | Cost$ 0 | Defined$ Imprinted +SVar:TrigCopy:AB$ Play | Cost$ 0 | Defined$ Imprinted | WithoutManaCost$ True | Optional$ True | CopyCard$ True SVar:RemAIDeck:True SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/panoptic_mirror.jpg diff --git a/res/cardsfolder/s/spellbinder.txt b/res/cardsfolder/s/spellbinder.txt index 885e3fabb54..9f3207f0930 100644 --- a/res/cardsfolder/s/spellbinder.txt +++ b/res/cardsfolder/s/spellbinder.txt @@ -6,7 +6,7 @@ K:Equip 4 T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigExile | TriggerDescription$ Imprint - When CARDNAME enters the battlefield, you may exile an instant card from your hand. SVar:TrigExile:AB$ChangeZone | Cost$ 0 | Imprint$ True | Origin$ Hand | Destination$ Exile | ChangeType$ Instant | ChangeNum$ 1 T:Mode$ DamageDone | ValidSource$ Creature.EquippedBy | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigSpell | TriggerZones$ Battlefield | TriggerDescription$ Whenever equipped creature deals combat damage to a player, you may copy the exiled card. If you do, you may cast the copy without paying its mana cost. -SVar:TrigSpell:AB$ CopySpell | Cost$ 0 | Defined$ Imprinted +SVar:TrigSpell:AB$ Play | Cost$ 0 | Defined$ Imprinted | WithoutManaCost$ True | Optional$ True | CopyCard$ True SVar:RemAIDeck:True SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/spellbinder.jpg diff --git a/res/cardsfolder/s/spellweaver_helix.txt b/res/cardsfolder/s/spellweaver_helix.txt index 0978839e69f..0df1810b1dd 100644 --- a/res/cardsfolder/s/spellweaver_helix.txt +++ b/res/cardsfolder/s/spellweaver_helix.txt @@ -1,15 +1,15 @@ -Name:Spellweaver Helix -ManaCost:3 -Types:Artifact -Text:no text -T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigSpellweaverExile | OptionalDecider$ You | TriggerDescription$ Imprint - When CARDNAME enters the battlefield, you may exile two target sorcery cards from a single graveyard. -SVar:TrigSpellweaverExile:AB$ ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Exile | TargetsFromSingleZone$ True | ValidTgts$ Card.Sorcery | TargetMin$ 2 | TargetMax$ 2 | TgtPrompt$ Select two target sorcery cards from a single graveyard | Imprint$ True | SpellDescription$ Exile two sorcery cards from a single graveyard. -T:Mode$ SpellCast | ValidCard$ Card.SameNameAsImprinted | Execute$ TrigSpellweaverCopy | OptionalDecider$ You | TriggerZones$ Battlefield | TriggerDescription$ Whenever a player casts a card, if it has the same name as one of the cards exiled with CARDNAME, you may copy the other. If you do, you may cast the copy without paying its mana cost. -SVar:TrigSpellweaverCopy:AB$ CopySpell | Cost$ 0 | Defined$ Imprinted.doesNotShareNameWith+TriggeredCard+Exiled -SVar:RemAIDeck:True -SVar:RemRandomDeck:True -SVar:Rarity:Rare -SVar:Picture:http://www.wizards.com/global/images/magic/general/spellweaver_helix.jpg -SetInfo:MRD|Rare|http://magiccards.info/scans/en/mi/247.jpg -Oracle:Imprint - When Spellweaver Helix enters the battlefield, you may exile two target sorcery cards from a single graveyard.\nWhenever a player casts a card, if it has the same name as one of the cards exiled with Spellweaver Helix, you may copy the other. If you do, you may cast the copy without paying its mana cost. +Name:Spellweaver Helix +ManaCost:3 +Types:Artifact +Text:no text +T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigSpellweaverExile | OptionalDecider$ You | TriggerDescription$ Imprint - When CARDNAME enters the battlefield, you may exile two target sorcery cards from a single graveyard. +SVar:TrigSpellweaverExile:AB$ ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Exile | TargetsFromSingleZone$ True | ValidTgts$ Card.Sorcery | TargetMin$ 2 | TargetMax$ 2 | TgtPrompt$ Select two target sorcery cards from a single graveyard | Imprint$ True | SpellDescription$ Exile two sorcery cards from a single graveyard. +T:Mode$ SpellCast | ValidCard$ Card.SameNameAsImprinted | Execute$ TrigSpellweaverCopy | OptionalDecider$ You | TriggerZones$ Battlefield | TriggerDescription$ Whenever a player casts a card, if it has the same name as one of the cards exiled with CARDNAME, you may copy the other. If you do, you may cast the copy without paying its mana cost. +SVar:TrigSpellweaverCopy:AB$ Play | Cost$ 0 | Defined$ Imprinted.doesNotShareNameWith+TriggeredCard+Exiled | WithoutManaCost$ True | Optional$ True | CopyCard$ True +SVar:RemAIDeck:True +SVar:RemRandomDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/spellweaver_helix.jpg +SetInfo:MRD|Rare|http://magiccards.info/scans/en/mi/247.jpg +Oracle:Imprint - When Spellweaver Helix enters the battlefield, you may exile two target sorcery cards from a single graveyard.\nWhenever a player casts a card, if it has the same name as one of the cards exiled with Spellweaver Helix, you may copy the other. If you do, you may cast the copy without paying its mana cost. End \ No newline at end of file diff --git a/src/main/java/forge/card/abilityfactory/AbilityFactoryPlay.java b/src/main/java/forge/card/abilityfactory/AbilityFactoryPlay.java index c7dadb72f7e..126e4daee7c 100644 --- a/src/main/java/forge/card/abilityfactory/AbilityFactoryPlay.java +++ b/src/main/java/forge/card/abilityfactory/AbilityFactoryPlay.java @@ -48,6 +48,7 @@ import forge.game.player.ComputerUtil; import forge.game.player.Player; import forge.game.zone.ZoneType; import forge.gui.GuiChoose; +import forge.item.CardDb; import forge.util.MyRandom; /** @@ -444,6 +445,14 @@ public final class AbilityFactoryPlay { if (params.containsKey("ForgetRemembered")) { source.clearRemembered(); } + if (params.containsKey("CopyCard")) { + tgtCard = AllZone.getCardFactory().getCard(CardDb.instance().getCard(tgtCard), sa.getActivatingPlayer()); + // when copying something stolen: + tgtCard.addController(sa.getActivatingPlayer()); + + tgtCard.setToken(true); + tgtCard.setCopiedSpell(true); + } // lands will be played if (tgtCard.isLand()) { controller.playLand(tgtCard);