- Added the optional parameter AffectedZone to CantTarget.

- Added Ground Seal.
This commit is contained in:
Sloth
2011-11-13 14:01:26 +00:00
parent 23efb3e559
commit d89976fd0c
4 changed files with 27 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -3569,6 +3569,7 @@ res/cardsfolder/g/grotag_siege_runner.txt svneol=native#text/plain
res/cardsfolder/g/grotag_thrasher.txt svneol=native#text/plain
res/cardsfolder/g/grotesque_hybrid.txt svneol=native#text/plain
res/cardsfolder/g/ground_rift.txt svneol=native#text/plain
res/cardsfolder/g/ground_seal.txt -text
res/cardsfolder/g/groundbreaker.txt svneol=native#text/plain
res/cardsfolder/g/groundling_pouncer.txt svneol=native#text/plain
res/cardsfolder/g/groundskeeper.txt svneol=native#text/plain

View File

@@ -0,0 +1,13 @@
Name:Ground Seal
ManaCost:1 G
Types:Enchantment
Text:no text
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
S:Mode$ CantTarget | AffectedZone$ Graveyard | Description$ Cards in graveyards can't be the targets of spells or abilities.
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/ground_seal.jpg
SetInfo:ODY|Rare|http://magiccards.info/scans/en/od/242.jpg
Oracle:When Ground Seal enters the battlefield, draw a card.\nCards in graveyards can't be the targets of spells or abilities.
End

View File

@@ -241,7 +241,7 @@ public class TargetSelection {
}
final CardList choices = AllZoneUtil.getCardsIn(zone).getValidCards(this.target.getValidTgts(),
this.ability.getActivatingPlayer(), this.ability.getSourceCard());
this.ability.getActivatingPlayer(), this.ability.getSourceCard()).getTargetableCards(this.ability);
ArrayList<Object> objects = new ArrayList<Object>();
if (tgt.isUniqueTargets()) {

View File

@@ -3,7 +3,9 @@ package forge.card.staticability;
import java.util.HashMap;
import forge.Card;
import forge.Constant;
import forge.Player;
import forge.Constant.Zone;
import forge.card.spellability.SpellAbility;
/**
@@ -17,6 +19,16 @@ public class StaticAbilityCantTarget {
final Card source = sa.getSourceCard();
final Player activator = sa.getActivatingPlayer();
if (params.containsKey("AffectedZone")) {
if(!card.isInZone(Zone.smartValueOf(params.get("AffectedZone")))) {
return false;
}
} else { // default zone is battlefield
if (!card.isInZone(Constant.Zone.Battlefield)) {
return false;
}
}
if (params.containsKey("Spell") && !sa.isSpell()) {
return false;
}