mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
convert Energy Tap to script
This commit is contained in:
@@ -1,7 +1,10 @@
|
|||||||
Name:Energy Tap
|
Name:Energy Tap
|
||||||
ManaCost:U
|
ManaCost:U
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
Text: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.
|
Text:no text
|
||||||
|
A:SP$ Tap | Cost$ U | TgtPrompt$ Select target untapped creature you control | ValidTgts$ Creature.untapped+YouCtrl | SubAbility$ SVar=DBMana | SpellDescription$ Tap target untapped creature you control. If you do, add X to your mana pool, where X is that creature's converted mana cost.
|
||||||
|
SVar:DBMana:DB$Mana | Produced$ X
|
||||||
|
SVar:X:Targeted$CardManaCost
|
||||||
SVar:RemAIDeck:True
|
SVar:RemAIDeck:True
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/energy_tap.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/energy_tap.jpg
|
||||||
|
|||||||
@@ -3361,43 +3361,6 @@ public class CardFactory_Sorceries {
|
|||||||
card.addSpellAbility(spell);
|
card.addSpellAbility(spell);
|
||||||
spell.setBeforePayMana(input);
|
spell.setBeforePayMana(input);
|
||||||
}//*************** 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.
|
|
||||||
*/
|
|
||||||
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 **************************
|
//*************** START *********** START **************************
|
||||||
|
|||||||
Reference in New Issue
Block a user