Added Keeper of the Dead

Finally figured out how to add TargetedPlayerCtrl to isValid in Cards.java
This commit is contained in:
moomarc
2012-03-21 09:53:45 +00:00
parent 8e6b60be9e
commit 544131410e
3 changed files with 33 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -4715,6 +4715,7 @@ res/cardsfolder/k/keep_watch.txt svneol=native#text/plain
res/cardsfolder/k/keeper_of_kookus.txt svneol=native#text/plain
res/cardsfolder/k/keeper_of_progenitus.txt -text svneol=unset#text/plain
res/cardsfolder/k/keeper_of_the_beasts.txt -text
res/cardsfolder/k/keeper_of_the_dead.txt -text
res/cardsfolder/k/keeper_of_the_flame.txt -text
res/cardsfolder/k/keeper_of_the_light.txt -text
res/cardsfolder/k/keeper_of_the_mind.txt -text

View File

@@ -0,0 +1,15 @@
Name:Keeper of the Dead
ManaCost:B B
Types:Creature Human Wizard
Text:no text
PT:1/2
A:AB$ Pump | Cost$ B T | ValidTgts$ Opponent | TgtPrompt$ Choose target opponent with at least two fewer creature cards in his or her graveyard than you | CheckSVar$ X | SVarCompare$ GEY | SubAbility$ DeadKeepersDestroy | StackDescription$ None | SpellDescription$ Choose target opponent who had at least two fewer creature cards in his or her graveyard than you did as you activated this ability. Destroy target nonblack creature he or she controls.
SVar:DeadKeepersDestroy:DB$ Destroy | ValidTgts$ Creature.nonBlack+TargetedPlayerCtrl | TgtPrompt$ Select target nonblack creature targeted player controls
SVar:X:Count$InYourYard/Minus.2
SVar:Y:Count$InOppYard
SVar:Z:Remembered$Amount
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/keeper_of_the_dead.jpg
SetInfo:EXO|Uncommon|http://magiccards.info/scans/en/ex/65.jpg
Oracle:{B}, {T}: Choose target opponent who had at least two fewer creature cards in his or her graveyard than you did as you activated this ability. Destroy target nonblack creature he or she controls.
End

View File

@@ -34,6 +34,7 @@ import com.esotericsoftware.minlog.Log;
import forge.Constant.Zone;
import forge.card.CardCharacteristics;
import forge.card.EditionInfo;
import forge.card.abilityfactory.AbilityFactory;
import forge.card.cardfactory.CardFactoryUtil;
import forge.card.cost.Cost;
import forge.card.mana.ManaCost;
@@ -6798,6 +6799,22 @@ public class Card extends GameEntity implements Comparable<Card> {
}
}
}
} else if (property.equals("TargetedPlayerCtrl")) {
for (final SpellAbility sa : source.getCharacteristics().getSpellAbility()) {
final SpellAbility parent = AbilityFactory.findParentsTargetedPlayer(sa);
if (parent != null) {
if (parent.getTarget() != null) {
for (final Object o : parent.getTarget().getTargetPlayers()) {
if (o instanceof Player) {
if (!this.getController().isPlayer((Player) o)) {
return false;
}
}
}
}
}
}
} else if (property.startsWith("YouOwn")) {
if (!this.getOwner().isPlayer(sourceController)) {
return false;