add Tumble Magnet (from Scars of Mirrodin)

This commit is contained in:
jendave
2011-08-06 08:16:16 +00:00
parent 9edf1fa0e2
commit 7e06fb0040
3 changed files with 49 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -3884,6 +3884,7 @@ res/cardsfolder/tukatongue_thallid.txt -text svneol=native#text/plain
res/cardsfolder/tuknir_deathlock.txt -text svneol=native#text/plain
res/cardsfolder/tuktuk_grunts.txt -text svneol=native#text/plain
res/cardsfolder/tuktuk_the_explorer.txt -text svneol=native#text/plain
res/cardsfolder/tumble_magnet.txt -text svneol=native#text/plain
res/cardsfolder/tundra.txt -text svneol=native#text/plain
res/cardsfolder/tundra_wolves.txt -text svneol=native#text/plain
res/cardsfolder/tunnel.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,9 @@
Name:Tumble Magnet
ManaCost:3
Types:Artifact
Text:Tap, Remove a charge counter from Tumble Magnet: Tap target artifact or creature.
K:etbCounter:CHARGE:3
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/tumble_magnet.jpg
End

View File

@@ -10487,6 +10487,45 @@ public class CardFactory implements NewConstants {
card.addComesIntoPlayCommand(intoPlay);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Tumble Magnet")) {
/*
* Tumble Magnet enters the battlefield with three charge
* counters on it.
* Tap, Remove a charge counter from Tumble Magnet: Tap target
* artifact or creature.
*/
final Ability_Tap ability = new Ability_Tap(card, "0") {
private static final long serialVersionUID = -5513092896385146010L;
@Override
public boolean canPlayAI() {
return false;
}
@Override
public boolean canPlay() {
return card.getCounters(Counters.CHARGE) > 0;
}
@Override
public void resolve() {
Card target = getTargetCard();
//remove charge counter
card.subtractCounter(Counters.CHARGE, 1);
card.tap();
if(CardFactoryUtil.canTarget(card, target) && AllZoneUtil.isCardInPlay(target)) {
target.tap();
}
}
};//Ability
card.addSpellAbility(ability);
ability.setBeforePayMana(CardFactoryUtil.input_targetType(ability, "Creature;Artifact"));
}//*************** END ************ END **************************
// Cards with Cycling abilities
// -1 means keyword "Cycling" not found