From 0bdcc3baf1d365ce7d57dba0154647f2df4dc007 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 16:52:03 +0000 Subject: [PATCH] - Convert Rancor keyword to Triggers --- res/cardsfolder/aspect_of_mongoose.txt | 3 ++- res/cardsfolder/brilliant_halo.txt | 3 ++- res/cardsfolder/cessation.txt | 3 ++- res/cardsfolder/despondency.txt | 3 ++- res/cardsfolder/endless_cockroaches.txt | 3 ++- res/cardsfolder/fallen_ideal.txt | 3 ++- res/cardsfolder/fiery_mantle.txt | 3 ++- res/cardsfolder/launch.txt | 3 ++- res/cardsfolder/rancor.txt | 3 ++- res/cardsfolder/shivan_phoenix.txt | 3 ++- res/cardsfolder/sleepers_guile.txt | 3 ++- res/cardsfolder/slow_motion.txt | 3 ++- res/cardsfolder/sluggishness.txt | 3 ++- res/cardsfolder/spirit_loop.txt | 3 ++- res/cardsfolder/undying_rage.txt | 3 ++- res/cardsfolder/weatherseed_treefolk.txt | 3 ++- src/forge/CardFactoryUtil.java | 4 +--- src/forge/GameAction.java | 8 +------- 18 files changed, 34 insertions(+), 26 deletions(-) diff --git a/res/cardsfolder/aspect_of_mongoose.txt b/res/cardsfolder/aspect_of_mongoose.txt index b2fd6bddbf7..99bf81dcc0c 100644 --- a/res/cardsfolder/aspect_of_mongoose.txt +++ b/res/cardsfolder/aspect_of_mongoose.txt @@ -4,7 +4,8 @@ Types:Enchantment Aura Text:no text K:Enchant creature K:enPump:Shroud -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/aspect_of_mongoose.jpg SetInfo:TSP|Uncommon|http://magiccards.info/scans/en/ts/191.jpg diff --git a/res/cardsfolder/brilliant_halo.txt b/res/cardsfolder/brilliant_halo.txt index ccdb5357b10..fc6658b67dc 100644 --- a/res/cardsfolder/brilliant_halo.txt +++ b/res/cardsfolder/brilliant_halo.txt @@ -4,7 +4,8 @@ Types:Enchantment Aura Text:no text K:Enchant creature K:enPump:+1/+2 -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/brilliant_halo.jpg SetInfo:USG|Common|http://magiccards.info/scans/en/us/5.jpg diff --git a/res/cardsfolder/cessation.txt b/res/cardsfolder/cessation.txt index 7bbf239a5b7..56fa630f5dc 100644 --- a/res/cardsfolder/cessation.txt +++ b/res/cardsfolder/cessation.txt @@ -4,7 +4,8 @@ Types:Enchantment Aura Text:no text K:Enchant creature K:enPumpCurse:HIDDEN CARDNAME can't attack.:Enchanted creature can't attack. -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/cessation.jpg SetInfo:ULG|Common|http://magiccards.info/scans/en/ul/4.jpg diff --git a/res/cardsfolder/despondency.txt b/res/cardsfolder/despondency.txt index 2266c68a4bc..3959ce70d1b 100644 --- a/res/cardsfolder/despondency.txt +++ b/res/cardsfolder/despondency.txt @@ -4,7 +4,8 @@ Types:Enchantment Aura Text:no text K:Enchant creature K:enPumpCurse:-2/-0 -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/despondency.jpg SetInfo:USG|Common|http://magiccards.info/scans/en/us/129.jpg diff --git a/res/cardsfolder/endless_cockroaches.txt b/res/cardsfolder/endless_cockroaches.txt index 4f31a2eb6f5..3a7fe95795d 100644 --- a/res/cardsfolder/endless_cockroaches.txt +++ b/res/cardsfolder/endless_cockroaches.txt @@ -3,7 +3,8 @@ ManaCost:1 B B Types:Creature Insect Text:no text PT:1/1 -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Rare SVar:Picture:http://resources.wizards.com/magic/cards/po/en-us/card4220.jpg SetInfo:POR|Rare|http://magiccards.info/scans/en/po/14.jpg diff --git a/res/cardsfolder/fallen_ideal.txt b/res/cardsfolder/fallen_ideal.txt index aa7822cc3e7..0b9ee8affce 100644 --- a/res/cardsfolder/fallen_ideal.txt +++ b/res/cardsfolder/fallen_ideal.txt @@ -5,7 +5,8 @@ Text:no text K:Enchant creature K:enPump:Flying A:AB$Pump | Cost$ Sac<1/Creature> | Defined$ Enchanted | NumAtt$ +2 | NumDef$ +1 | SpellDescription$ Enchanted creature gets +2/+1 until end of turn. -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/fallen_ideal.jpg SetInfo:TSP|Uncommon|http://magiccards.info/scans/en/ts/109.jpg diff --git a/res/cardsfolder/fiery_mantle.txt b/res/cardsfolder/fiery_mantle.txt index 246b1ad0097..3ce8dca30f9 100644 --- a/res/cardsfolder/fiery_mantle.txt +++ b/res/cardsfolder/fiery_mantle.txt @@ -5,7 +5,8 @@ Text:no text K:Enchant creature K:enPump:+0/+0 A:AB$Pump | Cost$ R | Defined$ Enchanted | NumAtt$ +1 | SpellDescription$ Enchanted creature gets +1/+0 until end of turn. -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/fiery_mantle.jpg SetInfo:USG|Common|http://magiccards.info/scans/en/us/186.jpg diff --git a/res/cardsfolder/launch.txt b/res/cardsfolder/launch.txt index f1962cf9b13..d10332ee4f3 100644 --- a/res/cardsfolder/launch.txt +++ b/res/cardsfolder/launch.txt @@ -4,7 +4,8 @@ Types:Enchantment Aura Text:no text K:Enchant creature K:enPump:Flying -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/launch.jpg SetInfo:USG|Common|http://magiccards.info/scans/en/us/82.jpg diff --git a/res/cardsfolder/rancor.txt b/res/cardsfolder/rancor.txt index 7a7c2bd8d5b..882c6b4f981 100644 --- a/res/cardsfolder/rancor.txt +++ b/res/cardsfolder/rancor.txt @@ -4,7 +4,8 @@ Types:Enchantment Aura Text:no text K:Enchant creature K:enPump:+2/+0/Trample -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/rancor.jpg SetInfo:ULG|Common|http://magiccards.info/scans/en/ul/110.jpg diff --git a/res/cardsfolder/shivan_phoenix.txt b/res/cardsfolder/shivan_phoenix.txt index 424339281d1..27570fc0a44 100644 --- a/res/cardsfolder/shivan_phoenix.txt +++ b/res/cardsfolder/shivan_phoenix.txt @@ -4,7 +4,8 @@ Types:Creature Phoenix Text:no text PT:3/4 K:Flying -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/shivan_phoenix.jpg SetInfo:ULG|Rare|http://magiccards.info/scans/en/ul/91.jpg diff --git a/res/cardsfolder/sleepers_guile.txt b/res/cardsfolder/sleepers_guile.txt index 48851a313c0..88a89b91e04 100644 --- a/res/cardsfolder/sleepers_guile.txt +++ b/res/cardsfolder/sleepers_guile.txt @@ -4,7 +4,8 @@ Types:Enchantment Aura Text:no text K:Enchant creature K:enPump:Fear -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/sleepers_guile.jpg SetInfo:ULG|Common|http://magiccards.info/scans/en/ul/67.jpg diff --git a/res/cardsfolder/slow_motion.txt b/res/cardsfolder/slow_motion.txt index ab7e241d929..6726960f8e8 100644 --- a/res/cardsfolder/slow_motion.txt +++ b/res/cardsfolder/slow_motion.txt @@ -4,7 +4,8 @@ Types:Enchantment Aura Text:no text K:Enchant creature K:enPumpCurse:HIDDEN At the beginning of your upkeep, sacrifice CARDNAME unless you pay 2:At the beginning of the upkeep of enchanted creature's controller, that player sacrifices that creature unless he or she pays 2. -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/slow_motion.jpg SetInfo:ULG|Common|http://magiccards.info/scans/en/ul/42.jpg diff --git a/res/cardsfolder/sluggishness.txt b/res/cardsfolder/sluggishness.txt index c080a2e935a..b63ad84fe9a 100644 --- a/res/cardsfolder/sluggishness.txt +++ b/res/cardsfolder/sluggishness.txt @@ -4,7 +4,8 @@ Types:Enchantment Aura Text:no text K:Enchant creature K:enPumpCurse:HIDDEN CARDNAME can't block.:Enchanted creature can't block. -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/sluggishness.jpg SetInfo:ULG|Common|http://magiccards.info/scans/en/ul/92.jpg diff --git a/res/cardsfolder/spirit_loop.txt b/res/cardsfolder/spirit_loop.txt index eb72c0fb695..86af3217317 100644 --- a/res/cardsfolder/spirit_loop.txt +++ b/res/cardsfolder/spirit_loop.txt @@ -5,7 +5,8 @@ Text:no text K:Enchant creature K:enPump:+0/+0 K:Whenever enchanted creature deals damage, you gain that much life. -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/spirit_loop.jpg SetInfo:TSP|Uncommon|http://magiccards.info/scans/en/ts/42.jpg diff --git a/res/cardsfolder/undying_rage.txt b/res/cardsfolder/undying_rage.txt index a5a7b64b411..12e6b4e1b60 100644 --- a/res/cardsfolder/undying_rage.txt +++ b/res/cardsfolder/undying_rage.txt @@ -4,7 +4,8 @@ Types:Enchantment Aura Text:no text K:Enchant creature K:enPump:+2/+2/HIDDEN CARDNAME can't block.:Enchanted creature gets +2/+2 and can't block. -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/undying_rage.jpg SetInfo:TSP|Uncommon|http://magiccards.info/scans/en/ts/184.jpg diff --git a/res/cardsfolder/weatherseed_treefolk.txt b/res/cardsfolder/weatherseed_treefolk.txt index 08dde3ef3ee..fde09a6ae68 100644 --- a/res/cardsfolder/weatherseed_treefolk.txt +++ b/res/cardsfolder/weatherseed_treefolk.txt @@ -4,7 +4,8 @@ Types:Creature Treefolk Text:no text PT:5/3 K:Trample -K:When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand. +SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Hand SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/weatherseed_treefolk.jpg SetInfo:ULG|Rare|http://magiccards.info/scans/en/ul/116.jpg diff --git a/src/forge/CardFactoryUtil.java b/src/forge/CardFactoryUtil.java index bf74b51482a..feb7cc65938 100644 --- a/src/forge/CardFactoryUtil.java +++ b/src/forge/CardFactoryUtil.java @@ -346,9 +346,7 @@ public class CardFactoryUtil { if (c.hasStartOfKeyword("Fading")) value -= 20; //not used atm if (c.hasStartOfKeyword("Vanishing")) value -= 20; //not used atm - //undesired effects - if (c.hasStartOfKeyword("When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand.")) value -= 10; - + return value; } //evaluateCreature diff --git a/src/forge/GameAction.java b/src/forge/GameAction.java index 8f0d5319d26..8511b971b91 100644 --- a/src/forge/GameAction.java +++ b/src/forge/GameAction.java @@ -2111,13 +2111,7 @@ public class GameAction { AllZone.Stack.add(persistAb); } - if(c.getKeyword().contains( - "When CARDNAME is put into a graveyard from the battlefield, return CARDNAME to its owner's hand.")) { - PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, newCard.getOwner()); - moveTo(hand, newCard); - } - - else if(c.getName().equals("Nissa's Chosen")) { + if(c.getName().equals("Nissa's Chosen")) { PlayerZone library = AllZone.getZone(Constant.Zone.Library, newCard.getOwner()); moveTo(library, newCard); }