diff --git a/.gitattributes b/.gitattributes index 8d0807319f4..3772fc34382 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/res/cardsfolder/wing_puncture.txt b/res/cardsfolder/wing_puncture.txt new file mode 100644 index 00000000000..a052e768e05 --- /dev/null +++ b/res/cardsfolder/wing_puncture.txt @@ -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 \ No newline at end of file diff --git a/src/forge/card/cardFactory/CardFactory_Instants.java b/src/forge/card/cardFactory/CardFactory_Instants.java index dda16738e8b..a737eb6f832 100644 --- a/src/forge/card/cardFactory/CardFactory_Instants.java +++ b/src/forge/card/cardFactory/CardFactory_Instants.java @@ -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; @@ -2153,6 +2154,59 @@ public class CardFactory_Instants { card.clearFirstSpellAbility(); 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