convert Gush to SP$Draw

This commit is contained in:
jendave
2011-08-06 13:17:20 +00:00
parent 9554175e8e
commit 9502e7c0c8
2 changed files with 2 additions and 93 deletions

View File

@@ -2,6 +2,8 @@ Name:Gush
ManaCost:4 U
Types:Instant
Text:no text
A:SP$Draw | Cost$4 U | NumCards$2 | SpellDescription$Draw two cards.
SVar:AltCost:Return<2/Island>
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/gush.jpg
SetInfo:MMQ|Common|http://magiccards.info/scans/en/mm/82.jpg

View File

@@ -2803,99 +2803,6 @@ public class CardFactory_Instants {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Gush")) {
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 8881817765689776033L;
@Override
public void resolve() {
card.getController().drawCards(2);
}
};
spell.setDescription("Draw two cards.");
StringBuilder sb = new StringBuilder();
sb.append(card.getName()).append(" - Draw two cards.");
spell.setStackDescription(sb.toString());
final SpellAbility bounce = new Spell(card) {
private static final long serialVersionUID = 1950742710354343569L;
@Override
public void resolve() {
card.getController().drawCards(2);
}
@Override
public boolean canPlay() {
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, card.getController());
CardList list = new CardList(play.getCards());
list = list.getType("Island");
return list.size() >= 2;
}
};
bounce.setDescription("You may return two Islands you control to their owner's hand rather than pay Gush's mana cost.");
StringBuilder sb2 = new StringBuilder();
sb2.append(card.getName()).append(" - Draw two cards.");
bounce.setStackDescription(sb2.toString());
bounce.setManaCost("0");
final Input bounceIslands = new Input() {
private static final long serialVersionUID = 3124427514142382129L;
int stop = 2;
int count = 0;
@Override
public void showMessage() {
AllZone.Display.showMessage("Select an Island");
ButtonUtil.disableAll();
}
@Override
public void selectButtonCancel() {
stop();
}
@Override
public void selectCard(Card c, PlayerZone zone) {
if(c.getType().contains("Island") && zone.is(Constant.Zone.Battlefield)) {
AllZone.GameAction.moveToHand(c);
count++;
if(count == stop) {
AllZone.Stack.add(bounce);
stop();
}
}
}//selectCard()
};
bounce.setBeforePayMana(bounceIslands);
Command bounceIslandsAI = new Command() {
private static final long serialVersionUID = 235908265780575226L;
public void execute() {
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, AllZone.ComputerPlayer);
CardList list = new CardList(play.getCards());
list = list.getType("Island");
//TODO: sort by tapped
for(int i = 0; i < 2; i++) {
AllZone.GameAction.moveToHand(list.get(i));
}
}
};
bounce.setBeforePayManaAI(bounceIslandsAI);
card.clearSpellAbility();
card.addSpellAbility(bounce);
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Thwart")) {
final SpellAbility spell = new Spell(card) {