Added Quicksilver Amulet.

This commit is contained in:
jendave
2011-08-06 05:36:04 +00:00
parent f426170a9b
commit cb7605ffc7
2 changed files with 62 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
Quicksilver Amulet
4
Artifact
4, tap: You may put a creature card from your hand onto the battlefield.
Unyaro Bees
G G G
Creature Insect

View File

@@ -14616,6 +14616,63 @@ public class CardFactory implements NewConstants {
}
//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Quicksilver Amulet")) {
final SpellAbility ability = new Ability_Tap(card, "4") {
private static final long serialVersionUID = 4414609319033894302L;
@Override
public boolean canPlayAI() {
return getCreature().size() != 0;
}
@Override
public void chooseTargetAI() {
card.tap();
Card target = CardFactoryUtil.AI_getBestCreature(getCreature());
setTargetCard(target);
}
CardList getCreature() {
CardList list = new CardList(AllZone.Computer_Hand.getCards());
list = list.getType("Creature");
return list;
}
@Override
public void resolve() {
Card c = getTargetCard();
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
if(AllZone.GameAction.isCardInZone(c, hand)) {
hand.remove(c);
play.add(c);
}
}
};
ability.setBeforePayMana(new Input() {
private static final long serialVersionUID = -1647181037510967127L;
@Override
public void showMessage() {
String controller = card.getController();
CardList creats = new CardList(AllZone.getZone(Constant.Zone.Hand, controller).getCards());
creats = creats.filter(new CardListFilter() {
public boolean addCard(Card c) {
PlayerZone zone = AllZone.getZone(c);
return c.isCreature() && zone.is(Constant.Zone.Hand);
}
});
stopSetNext(CardFactoryUtil.input_targetSpecific(ability, creats, "Select a creature", false,
false));
}
});
card.addSpellAbility(ability);
}//*************** END ************ END **************************
//*************** START *********** START **************************