diff --git a/.gitattributes b/.gitattributes index 0465782f0b5..37809bfd1e4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3386,6 +3386,7 @@ res/cardsfolder/g/granulate.txt svneol=native#text/plain res/cardsfolder/g/grapeshot.txt svneol=native#text/plain res/cardsfolder/g/grapeshot_catapult.txt svneol=native#text/plain res/cardsfolder/g/grappler_spider.txt svneol=native#text/plain +res/cardsfolder/g/grappling_hook.txt -text res/cardsfolder/g/grasp_of_darkness.txt svneol=native#text/plain res/cardsfolder/g/grasp_of_phantoms.txt -text res/cardsfolder/g/grassland_crusader.txt svneol=native#text/plain diff --git a/res/cardsfolder/g/giant_ambush_beetle.txt b/res/cardsfolder/g/giant_ambush_beetle.txt index ff635ea777c..caf095b8775 100644 --- a/res/cardsfolder/g/giant_ambush_beetle.txt +++ b/res/cardsfolder/g/giant_ambush_beetle.txt @@ -5,7 +5,7 @@ Text:no text PT:4/3 K:Haste T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.Self | Execute$ TrigProvoke | OptionalDecider$ You | TriggerDescription$ When CARDNAME enters the battlefield, you may have target creature block it this turn if able. -SVar:TrigProvoke:DB$ MustBlock | ValidTgts$ Creature | TgtPrompt$ Select target creature +SVar:TrigProvoke:AB$ MustBlock | Cost$ 0 | ValidTgts$ Creature | TgtPrompt$ Select target creature SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/giant_ambush_beetle.jpg SetInfo:ARB|Uncommon|http://magiccards.info/scans/en/arb/137.jpg diff --git a/res/cardsfolder/g/grappling_hook.txt b/res/cardsfolder/g/grappling_hook.txt new file mode 100644 index 00000000000..cbd81a77813 --- /dev/null +++ b/res/cardsfolder/g/grappling_hook.txt @@ -0,0 +1,12 @@ +Name:Grappling Hook +ManaCost:4 +Types:Artifact Equipment +Text:Equipped creature has double strike. +K:eqPump 4:+0/+0/Double Strike +T:Mode$ Attacks | ValidCard$ Card.AttachedBy | Execute$ TrigProvoke | OptionalDecider$ You | TriggerDescription$ Whenever equipped creature attacks, you may have target creature block it this turn if able. +SVar:TrigProvoke:AB$ MustBlock | Cost$ 0 | ValidTgts$ Creature | DefinedAttacker$ Equipped | TgtPrompt$ Select target creature +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/grappling_hook.jpg +SetInfo:ZEN|Rare|http://magiccards.info/scans/en/zen/203.jpg +Oracle:Equipped creature has double strike.\nWhenever equipped creature attacks, you may have target creature block it this turn if able.\nEquip {4} +End \ No newline at end of file diff --git a/res/cardsfolder/t/touch_of_vitae.txt b/res/cardsfolder/t/touch_of_vitae.txt index a3c47b97218..5700111e719 100644 --- a/res/cardsfolder/t/touch_of_vitae.txt +++ b/res/cardsfolder/t/touch_of_vitae.txt @@ -1,13 +1,14 @@ -Name:Touch of Vitae -ManaCost:2 G -Types:Instant -Text:no text -A:SP$ Pump | Cost$ 2 G | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ Haste | SubAbility$ DBAnimate | SpellDescription$ Until end of turn, target creature gains haste and "0: Untap this creature. Activate this ability only once." Draw a card at the beginning of the next turn's upkeep. -SVar:DBAnimate:DB$ Animate | Defined$ Targeted | Abilities$ ABUntap | SubAbility$ DBDraw -SVar:ABUntap:AB$ Untap | Cost$ 0 | Defined$ Self | ActivationLimit$ 1 | SpellDescription$ Untap this creature. Activate this ability only once. -SVar:DBDraw:DB$Draw | NumCards$ 1 | NextUpkeep$ True -SVar:Rarity:Uncommon -SVar:Picture:http://www.wizards.com/global/images/magic/general/touch_of_vitae.jpg -SetInfo:ICE|Uncommon|http://magiccards.info/scans/en/ia/159.jpg -Oracle:Until end of turn, target creature gains haste and "{0}: Untap this creature. Activate this ability only once."\nDraw a card at the beginning of the next turn's upkeep. +Name:Touch of Vitae +ManaCost:2 G +Types:Instant +Text:no text +A:SP$ Pump | Cost$ 2 G | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ Haste | SubAbility$ DBAnimate | SpellDescription$ Until end of turn, target creature gains haste and "0: Untap this creature. Activate this ability only once." Draw a card at the beginning of the next turn's upkeep. +SVar:DBAnimate:DB$ Animate | Defined$ Targeted | Abilities$ ABUntap | SubAbility$ DBDraw +SVar:ABUntap:AB$ Untap | Cost$ 0 | Defined$ Self | ActivationLimit$ 1 | SpellDescription$ Untap this creature. Activate this ability only once. +SVar:DBDraw:DB$Draw | NumCards$ 1 | NextUpkeep$ True +SVar:RemAIDeck:True +SVar:Rarity:Uncommon +SVar:Picture:http://www.wizards.com/global/images/magic/general/touch_of_vitae.jpg +SetInfo:ICE|Uncommon|http://magiccards.info/scans/en/ia/159.jpg +Oracle:Until end of turn, target creature gains haste and "{0}: Untap this creature. Activate this ability only once."\nDraw a card at the beginning of the next turn's upkeep. End \ No newline at end of file diff --git a/src/main/java/forge/card/abilityFactory/AbilityFactory_Combat.java b/src/main/java/forge/card/abilityFactory/AbilityFactory_Combat.java index 1872a08080e..975638bc1b7 100644 --- a/src/main/java/forge/card/abilityFactory/AbilityFactory_Combat.java +++ b/src/main/java/forge/card/abilityFactory/AbilityFactory_Combat.java @@ -839,6 +839,7 @@ public final class AbilityFactory_Combat { private static boolean mustBlockDoTriggerAI(final AbilityFactory af, final SpellAbility sa, final boolean mandatory) { + HashMap params = af.getMapParams(); final Card source = sa.getSourceCard(); Target abTgt = sa.getTarget(); @@ -850,6 +851,20 @@ public final class AbilityFactory_Combat { //only use on creatures that can attack if (!AllZone.getPhase().isBefore(Constant.Phase.Main2)) return false; + + Card attacker = null; + if (params.containsKey("DefinedAttacker")) { + ArrayList cards = AbilityFactory.getDefinedCards(sa.getSourceCard(), params.get("DefinedAttacker"), sa); + if (cards.isEmpty()) + return false; + + attacker = cards.get(0); + } + + if (attacker == null) + attacker = source; + + final Card definedAttacker = attacker; boolean chance = false; @@ -860,11 +875,11 @@ public final class AbilityFactory_Combat { list = list.getValidCards(abTgt.getValidTgts(), source.getController(), source); list = list.filter(new CardListFilter() { public boolean addCard(Card c) { - if (!CombatUtil.canBlock(source, c)) + if (!CombatUtil.canBlock(definedAttacker, c)) return false; - if (CombatUtil.canDestroyAttacker(source, c, null, false)) + if (CombatUtil.canDestroyAttacker(definedAttacker, c, null, false)) return false; - if (!CombatUtil.canDestroyBlocker(c, source, null, false)) + if (!CombatUtil.canDestroyBlocker(c, definedAttacker, null, false)) return false; return true; }