mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
add Energy Tap from Legends (great with Fireball)
This commit is contained in:
@@ -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_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
|
||||
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
|
||||
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
|
||||
|
||||
@@ -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
|
||||
1 W
|
||||
Instant
|
||||
|
||||
@@ -352,4 +352,13 @@ public class AllZoneUtil {
|
||||
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();
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -19646,6 +19646,47 @@ public class CardFactory implements NewConstants {
|
||||
spell.setBeforePayMana(runtime);
|
||||
}//*************** 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
|
||||
// -1 means keyword "Cycling" not found
|
||||
if(hasKeyword(card, "Cycling") != -1) {
|
||||
|
||||
Reference in New Issue
Block a user