From 23efb3e5595af3c722c29a8c79d5d4c3b63ab514 Mon Sep 17 00:00:00 2001 From: Sloth Date: Sun, 13 Nov 2011 12:44:27 +0000 Subject: [PATCH] - Converted some cards to the new CantTarget static ability. --- res/cardsfolder/c/canopy_cover.txt | 3 ++- res/cardsfolder/d/dense_foliage.txt | 2 +- res/cardsfolder/g/gaeas_revenge.txt | 3 ++- res/cardsfolder/m/mercenary_informer.txt | 2 +- res/cardsfolder/r/rebel_informer.txt | 2 +- res/cardsfolder/s/shielding_plax.txt | 2 +- .../forge/card/staticability/StaticAbilityCantTarget.java | 5 +++++ 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/res/cardsfolder/c/canopy_cover.txt b/res/cardsfolder/c/canopy_cover.txt index 857bd44993f..7e814fb0db4 100644 --- a/res/cardsfolder/c/canopy_cover.txt +++ b/res/cardsfolder/c/canopy_cover.txt @@ -4,7 +4,8 @@ Types:Enchantment Aura Text:no text K:Enchant creature A:SP$ Attach | Cost$ 1 G | ValidTgts$ Creature | AILogic$ Pump -S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddHiddenKeyword$ HIDDEN CARDNAME can't be blocked except by creatures with flying or reach. & HIDDEN Hexproof | Description$ Enchanted creature can't be blocked except by creatures with flying or reach. Enchanted creature can't be the target of spells or abilities your opponents control. +S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddHiddenKeyword$ HIDDEN CARDNAME can't be blocked except by creatures with flying or reach. | Description$ Enchanted creature can't be blocked except by creatures with flying or reach. +S:Mode$ CantTarget | ValidCard$ Card.EnchantedBy | Activator$ Opponent | Description$ Enchanted creature can't be the target of spells or abilities your opponents control. SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/canopy_cover.jpg SetInfo:WWK|Uncommon|http://magiccards.info/scans/en/wwk/98.jpg diff --git a/res/cardsfolder/d/dense_foliage.txt b/res/cardsfolder/d/dense_foliage.txt index 2d484740bc0..4aeb86ba194 100644 --- a/res/cardsfolder/d/dense_foliage.txt +++ b/res/cardsfolder/d/dense_foliage.txt @@ -2,7 +2,7 @@ Name:Dense Foliage ManaCost:2 G Types:Enchantment Text:no text -S:Mode$ Continuous | Affected$ Creature | AddHiddenKeyword$ HIDDEN CARDNAME can't be the target of spells. | Description$ Creatures can't be the target of spells. +S:Mode$ CantTarget | ValidCard$ Creature | Spell$ True | Description$ Creatures can't be the target of spells. SVar:RemRandomDeck:True SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/dense_foliage.jpg diff --git a/res/cardsfolder/g/gaeas_revenge.txt b/res/cardsfolder/g/gaeas_revenge.txt index 34e032a2c4a..408b356053a 100644 --- a/res/cardsfolder/g/gaeas_revenge.txt +++ b/res/cardsfolder/g/gaeas_revenge.txt @@ -1,10 +1,11 @@ Name:Gaea's Revenge ManaCost:5 G G Types:Creature Elemental -Text:Gaea's Revenge can't be the target of nongreen spells or abilities from nongreen sources. +Text: PT:8/5 K:CARDNAME can't be countered. K:Haste +S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card.nonGreen | Description$ CARDNAME can't be the target of nongreen spells or abilities from nongreen sources. SVar:Rarity:Mythic SVar:Picture:http://www.wizards.com/global/images/magic/general/gaeas_revenge.jpg SetInfo:M11|Mythic|http://magiccards.info/scans/en/m11/174.jpg diff --git a/res/cardsfolder/m/mercenary_informer.txt b/res/cardsfolder/m/mercenary_informer.txt index f734b740e66..ba735e9b2bf 100644 --- a/res/cardsfolder/m/mercenary_informer.txt +++ b/res/cardsfolder/m/mercenary_informer.txt @@ -3,7 +3,7 @@ ManaCost:2 W Types:Creature Human Rebel Mercenary Text:no text PT:2/1 -K:CARDNAME can't be the target of black spells or abilities from black sources. +S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card.Black | Description$ CARDNAME can't be the target of black spells or abilities from black sources. A:AB$ ChangeZone | Cost$ 2 W | ValidTgts$ Mercenary | IsCurse$ True | TgtPrompt$ Select target Mercenary | Origin$ Battlefield | Destination$ Library | LibraryPosition$ -1 | SpellDescription$ Put target Mercenary on the bottom of its owner's library. SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/mercenary_informer.jpg diff --git a/res/cardsfolder/r/rebel_informer.txt b/res/cardsfolder/r/rebel_informer.txt index 77399481f48..ed3d28990f7 100644 --- a/res/cardsfolder/r/rebel_informer.txt +++ b/res/cardsfolder/r/rebel_informer.txt @@ -3,7 +3,7 @@ ManaCost:2 B Types:Creature Human Mercenary Rebel Text:no text PT:1/2 -K:CARDNAME can't be the target of white spells or abilities from white sources. +S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card.White | Description$ CARDNAME can't be the target of white spells or abilities from white sources. A:AB$ ChangeZone | Cost$ 3 | ValidTgts$ Rebel | IsCurse$ True | TgtPrompt$ Select target Rebel | Origin$ Battlefield | Destination$ Library | LibraryPosition$ -1 | SpellDescription$ Put target Rebel on the bottom of its owner's library. SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/rebel_informer.jpg diff --git a/res/cardsfolder/s/shielding_plax.txt b/res/cardsfolder/s/shielding_plax.txt index 6a4b64985ce..68c1f9345bd 100644 --- a/res/cardsfolder/s/shielding_plax.txt +++ b/res/cardsfolder/s/shielding_plax.txt @@ -4,7 +4,7 @@ Types:Enchantment Aura Text:no text K:Enchant creature A:SP$ Attach | Cost$ 2 GU | ValidTgts$ Creature | AILogic$ Pump -S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddHiddenKeyword$ HIDDEN Hexproof | Description$ Enchanted creature can't be the target of spells or abilities your opponents control. +S:Mode$ CantTarget | ValidCard$ Card.EnchantedBy | Activator$ Opponent | Description$ Enchanted creature can't be the target of spells or abilities your opponents control. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME enters the battlefield, draw a card. SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1 SVar:Rarity:Common diff --git a/src/main/java/forge/card/staticability/StaticAbilityCantTarget.java b/src/main/java/forge/card/staticability/StaticAbilityCantTarget.java index 03b65682a85..7e6bb900b0d 100644 --- a/src/main/java/forge/card/staticability/StaticAbilityCantTarget.java +++ b/src/main/java/forge/card/staticability/StaticAbilityCantTarget.java @@ -16,6 +16,10 @@ public class StaticAbilityCantTarget { final Card hostCard = stAb.getHostCard(); final Card source = sa.getSourceCard(); final Player activator = sa.getActivatingPlayer(); + + if (params.containsKey("Spell") && !sa.isSpell()) { + return false; + } if (params.containsKey("ValidCard") && !card.isValid(params.get("ValidCard").split(","), hostCard.getController(), hostCard)) { @@ -32,6 +36,7 @@ public class StaticAbilityCantTarget { return false; } + return true; }