add Sanctum Gargoyle (from Shards of Alara)

This commit is contained in:
jendave
2011-08-06 09:06:40 +00:00
parent 5775aaba0e
commit a022543430
3 changed files with 60 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -3367,6 +3367,7 @@ res/cardsfolder/salt_marsh.txt -text svneol=native#text/plain
res/cardsfolder/saltblast.txt -text svneol=native#text/plain
res/cardsfolder/salvage.txt -text svneol=native#text/plain
res/cardsfolder/samurai_enforcers.txt -text svneol=native#text/plain
res/cardsfolder/sanctum_gargoyle.txt -text svneol=native#text/plain
res/cardsfolder/sanctum_plowbeast.txt -text svneol=native#text/plain
res/cardsfolder/sandbar_merfolk.txt -text svneol=native#text/plain
res/cardsfolder/sandbar_serpent.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,9 @@
Name:Sanctum Gargoyle
ManaCost:3 W
Types:Artifact Creature Gargoyle
Text:When Sanctum Gargoyle enters the battlefield, you may return target artifact card from your graveyard to your hand.
PT:2/3
K:Flying
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/sanctum_gargoyle.jpg
End

View File

@@ -20307,6 +20307,56 @@ public class CardFactory_Creatures {
//ability.setBeforePayMana(runtime);
}//*************** END ************ END **************************
//*************** START *********** START ************************
if(cardName.equals("Sanctum Gargoyle")) {
final SpellAbility ability = new Ability(card, "0") {
@Override
public void chooseTargetAI() {
CardList grave = getGraveArts();
Card target = CardFactoryUtil.AI_getBestArtifact(grave);
setTargetCard(target);
}
@Override
public void resolve() {
if(card.getController().equals(Constant.Player.Human)) {
Card c = AllZone.Display.getChoice("Select card", getGraveArts().toArray());
setTargetCard(c);
}
Card target = getTargetCard();
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
if(AllZone.GameAction.isCardInZone(target, grave)
&& CardFactoryUtil.canTarget(card, target))
AllZone.GameAction.moveToHand(target);
}//resolve()
CardList getGraveArts() {
CardList list = AllZoneUtil.getPlayerGraveyard(card.getController());
return list.filter(AllZoneUtil.artifacts);
}
};//SpellAbility
final Command cip = new Command() {
private static final long serialVersionUID = -8905934905046258175L;
CardList getGraveArts() {
CardList list = AllZoneUtil.getPlayerGraveyard(card.getController());
return list.filter(AllZoneUtil.artifacts);
}
public void execute() {
if(getGraveArts().size() > 0)
AllZone.Stack.add(ability);
}
};
ability.setStackDescription(cardName + " - return target artifact from your graveyard to your hand.");
card.addComesIntoPlayCommand(cip);
}//*************** END ************ END **************************
// Cards with Cycling abilities
// -1 means keyword "Cycling" not found