add Glint Hawk (from Scars of Mirrodin)

This commit is contained in:
slapshot5
2011-11-21 21:26:23 +00:00
parent c4cc2fa78b
commit 5b776fa024
3 changed files with 68 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -3296,6 +3296,7 @@ res/cardsfolder/g/glimmervoid.txt svneol=native#text/plain
res/cardsfolder/g/glimpse_of_nature.txt svneol=native#text/plain
res/cardsfolder/g/glimpse_the_unthinkable.txt svneol=native#text/plain
res/cardsfolder/g/glint_eye_nephilim.txt svneol=native#text/plain
res/cardsfolder/g/glint_hawk.txt -text
res/cardsfolder/g/glint_hawk_idol.txt svneol=native#text/plain
res/cardsfolder/g/glintwing_invoker.txt svneol=native#text/plain
res/cardsfolder/g/glissa_the_traitor.txt svneol=native#text/plain

View File

@@ -0,0 +1,11 @@
Name:Glint Hawk
ManaCost:W
Types:Creature Bird
Text:no text
PT:2/2
K:Flying
#TODO - ETB trigger is hard-coded
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/glint_hawk.jpg
End

View File

@@ -2652,6 +2652,62 @@ public class CardFactoryCreatures {
card.addSpellAbility(finalAb);
} // *************** END ************ END **************************
// *************** START *********** START **************************
else if (cardName.equals("Glint Hawk")) {
final SpellAbility sacOrNo = new Ability(card, "") {
@Override
public void resolve() {
final Player player = card.getController();
final CardList arts = player.getCardsIn(Zone.Battlefield).getType("Artifact");
if (player.isComputer()) {
//SVar:RemAIDeck:True
} else { // this is the human resolution
final Input target = new Input() {
private static final long serialVersionUID = -789722084164422578L;
@Override
public void showMessage() {
AllZone.getDisplay().showMessage(card + " - Select an artifact you control");
ButtonUtil.enableOnlyCancel();
}
@Override
public void selectButtonCancel() {
AllZone.getGameAction().sacrifice(card);
this.stop();
}
@Override
public void selectCard(final Card c, final PlayerZone zone) {
if (zone.is(Constant.Zone.Battlefield) && arts.contains(c)) {
AllZone.getGameAction().moveToHand(c);
this.stop();
}
} // selectCard()
}; // Input
AllZone.getInputControl().setInput(target);
}
}
};
final StringBuilder sb = new StringBuilder();
sb.append("When CARDNAME enters the battlefield, ");
sb.append("sacrifice it unless you return an artifact you control to its owner's hand.");
sacOrNo.setStackDescription(sb.toString());
final Command comesIntoPlay = new Command() {
private static final long serialVersionUID = 4065476629778198760L;
@Override
public void execute() {
AllZone.getStack().addSimultaneousStackEntry(sacOrNo);
}
};
card.addComesIntoPlayCommand(comesIntoPlay);
} // *************** END ************ END **************************
// ***************************************************
// end of card specific code
// ***************************************************