convert Energy Tap to script

This commit is contained in:
jendave
2011-08-07 00:02:10 +00:00
parent 5d193c6c2b
commit a849f6ebbf
2 changed files with 4 additions and 38 deletions

View File

@@ -3361,43 +3361,6 @@ public class CardFactory_Sorceries {
card.addSpellAbility(spell);
spell.setBeforePayMana(input);
}//*************** 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.
*/
Cost cost = new Cost("U", cardName, false);
Target tgt = new Target(card,"Select an untapped creature you control", "Creature.untapped+YouCtrl".split(","));
final SpellAbility spell = new Spell(card, cost, tgt) {
private static final long serialVersionUID = 8883585452278041848L;
@Override
public void resolve() {
Card target = getTargetCard();
if(null != target && target.isUntapped()) {
int cmc = CardUtil.getConvertedManaCost(target);
target.tap();
Ability_Mana abMana = new Ability_Mana(card, "0", "1", cmc) {
private static final long serialVersionUID = -2182129023960978132L;
};
abMana.produceMana();
}
}
@Override
public boolean canPlayAI() {
return false;
}
};
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
card.clearFirstSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************