add Wing Puncture (from Scars of Mirrodin)

This commit is contained in:
jendave
2011-08-06 23:23:48 +00:00
parent c8fffb75cb
commit f01788c42a
3 changed files with 63 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -7923,6 +7923,7 @@ res/cardsfolder/windseeker_centaur.txt -text svneol=native#text/plain
res/cardsfolder/windstorm.txt -text svneol=native#text/plain
res/cardsfolder/windswept_heath.txt -text svneol=native#text/plain
res/cardsfolder/windwright_mage.txt -text svneol=native#text/plain
res/cardsfolder/wing_puncture.txt -text svneol=native#text/plain
res/cardsfolder/wing_shards.txt -text svneol=native#text/plain
res/cardsfolder/wing_snare.txt -text svneol=native#text/plain
res/cardsfolder/wing_splicer.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,8 @@
Name:Wing Puncture
ManaCost:G
Types:Instant
Text:no text
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/wing_puncture.jpg
End

View File

@@ -23,6 +23,7 @@ import forge.Player;
import forge.PlayerZone;
import forge.Phase;
import forge.card.spellability.Ability_Activated;
import forge.card.spellability.Ability_Sub;
import forge.card.spellability.Cost;
import forge.card.spellability.Spell;
import forge.card.spellability.SpellAbility;
@@ -2154,6 +2155,59 @@ public class CardFactory_Instants {
card.addSpellAbility(spell);
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Wing Puncture")) {
Target t2 = new Target(card, "Select target creature with flying", "Creature.withFlying".split(","));
final Ability_Sub sub = new Ability_Sub(card, t2) {
private static final long serialVersionUID = 4618047889975691050L;
@Override
public boolean chkAI_Drawback() {
return false;
}
@Override
public void resolve() {
Card myc = this.getParent().getTargetCard();
Card tgt = getTargetCard();
if(AllZoneUtil.isCardInPlay(myc) && AllZoneUtil.isCardInPlay(tgt)) {
if(CardFactoryUtil.canTarget(card, myc) && CardFactoryUtil.canTarget(card, tgt)) {
tgt.addDamage(myc.getNetAttack(), myc);
}
}
}
@Override
public boolean doTrigger(boolean b) {
return false;
}
};
Cost abCost = new Cost("G", cardName, false);
Target t1 = new Target(card, "Select target creature you control", "Creature.YouCtrl".split(","));
final SpellAbility spell = new Spell(card, abCost, t1) {
private static final long serialVersionUID = 8964235807056739219L;
@Override
public boolean canPlayAI() {
return false;
}
@Override
public void resolve() {
sub.resolve();
}
};
spell.setSubAbility(sub);
spell.setDescription("Target creature you control deals damage equal to its power to target creature with flying.");
spell.setStackDescription(card+" - Creature you control deals damage equal to its power to creature with flying.");
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
card.clearFirstSpellAbility();
card.addSpellAbility(spell);
}//*************** END ************ END **************************
return card;
}//getCard
}