add Turn to Slag (from Scars of Mirrodin)

This commit is contained in:
jendave
2011-08-06 23:23:59 +00:00
parent f01788c42a
commit bb674b26d6
4 changed files with 43 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -7362,6 +7362,7 @@ res/cardsfolder/tunneler_wurm.txt svneol=native#text/plain
res/cardsfolder/turn_aside.txt -text svneol=native#text/plain
res/cardsfolder/turn_the_tide.txt -text svneol=native#text/plain
res/cardsfolder/turn_to_dust.txt -text svneol=native#text/plain
res/cardsfolder/turn_to_slag.txt -text svneol=native#text/plain
res/cardsfolder/turnabout.txt svneol=native#text/plain
res/cardsfolder/turntimber_grove.txt svneol=native#text/plain
res/cardsfolder/turntimber_ranger.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,8 @@
Name:Turn to Slag
ManaCost:3 R R
Types:Sorcery
Text:no text
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/turn_to_slag.jpg
End

View File

@@ -25,6 +25,10 @@ public class CardList implements Iterable<Card> {
addAll(c);
}
public CardList(ArrayList<Card> al) {
addAll(al.toArray());
}
public CardList(Object[] c) {
addAll(c);
}

View File

@@ -4757,6 +4757,36 @@ public class CardFactory_Sorceries {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Turn to Slag")) {
Cost abCost = new Cost("3 R R", cardName, false);
Target target = new Target(card,"Select target creature", "Creature".split(","));
final SpellAbility spell = new Spell(card, abCost, target) {
private static final long serialVersionUID = 3848014348910653252L;
@Override
public boolean canPlayAI() {
return false;
}
@Override
public void resolve() {
Card tgt = getTargetCard();
if(AllZone.GameAction.isCardInPlay(tgt) && CardFactoryUtil.canTarget(card, tgt)) {
tgt.addDamage(5, card);
CardList equipment = new CardList(tgt.getEquippedBy());
for(Card eq : equipment) AllZone.GameAction.destroy(eq);
}
}//resolve()
};//SpellAbility
spell.setDescription(cardName+" deals 5 damage to target creature. Destroy all Equipment attached to that creature.");
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
card.clearFirstSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
return card;
}//getCard
}