add Energy Tap from Legends (great with Fireball)

This commit is contained in:
jendave
2011-08-06 04:20:46 +00:00
parent 87d56c6767
commit 89e787fff2
4 changed files with 56 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene
snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg
snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
energy_tap.jpg http://www.wizards.com/global/images/magic/general/energy_tap.jpg
divine_offering.jpg http://www.wizards.com/global/images/magic/general/divine_offering.jpg divine_offering.jpg http://www.wizards.com/global/images/magic/general/divine_offering.jpg
argothian_pixies.jpg http://www.wizards.com/global/images/magic/general/argothian_pixies.jpg argothian_pixies.jpg http://www.wizards.com/global/images/magic/general/argothian_pixies.jpg
arc_slogger.jpg http://www.wizards.com/global/images/magic/general/arc_slogger.jpg arc_slogger.jpg http://www.wizards.com/global/images/magic/general/arc_slogger.jpg

View File

@@ -1,3 +1,8 @@
Energy Tap
U
Sorcery
Tap target untapped creature you control. If you do, add X Colorless to your mana pool, where X is that creature's converted mana cost.
Divine Offering Divine Offering
1 W 1 W
Instant Instant

View File

@@ -352,4 +352,13 @@ public class AllZoneUtil {
return c.isTapped(); return c.isTapped();
} }
}; };
/**
* a CardListFilter to get all cards that are untapped
*/
public static CardListFilter untapped = new CardListFilter() {
public boolean addCard(Card c) {
return c.isUntapped();
}
};
} }

View File

@@ -19646,6 +19646,47 @@ public class CardFactory implements NewConstants {
spell.setBeforePayMana(runtime); spell.setBeforePayMana(runtime);
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Energy Tap")) {
/*
* Tap target untapped creature you control. If you do, add X to
* your mana pool, where X is that creature's converted mana cost.
*/
final SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 8883585452278041848L;
@Override
public void resolve() {
Card target = getTargetCard();
if(null != target && target.isUntapped()) {
int cost = CardUtil.getConvertedManaCost(target);
Card mp = AllZone.ManaPool;
mp.addExtrinsicKeyword("ManaPool:"+cost);
target.tap();
}
}
@Override
public boolean canPlayAI() {
return false;
}
};
Input runtime = new Input() {
private static final long serialVersionUID = -757364902159389697L;
@Override
public void showMessage() {
CardList choices = AllZoneUtil.getCreaturesInPlay(card.getController());
choices = choices.filter(AllZoneUtil.untapped);
stopSetNext(CardFactoryUtil.input_targetSpecific(spell, choices,
"Select target tapped creature", true, false));
}//showMessage()
};//Input
spell.setBeforePayMana(runtime);
card.clearSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
// Cards with Cycling abilities // Cards with Cycling abilities
// -1 means keyword "Cycling" not found // -1 means keyword "Cycling" not found
if(hasKeyword(card, "Cycling") != -1) { if(hasKeyword(card, "Cycling") != -1) {