From c0d156856a6e6c4b1a17d2366c0744693b1abaca Mon Sep 17 00:00:00 2001 From: elcnesh Date: Sun, 2 Nov 2014 08:18:17 +0000 Subject: [PATCH] Add Magnetic Web. --- .gitattributes | 1 + .../src/main/java/forge/game/combat/AttackConstraints.java | 2 +- forge-gui/res/cardsfolder/m/magnetic_web.txt | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 forge-gui/res/cardsfolder/m/magnetic_web.txt diff --git a/.gitattributes b/.gitattributes index 2f9ecea6b1b..df3023c8207 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8522,6 +8522,7 @@ forge-gui/res/cardsfolder/m/magnetic_flux.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/magnetic_mine.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/magnetic_mountain.txt -text forge-gui/res/cardsfolder/m/magnetic_theft.txt -text +forge-gui/res/cardsfolder/m/magnetic_web.txt -text forge-gui/res/cardsfolder/m/magnify.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/magnigoth_treefolk.txt svneol=native#text/plain forge-gui/res/cardsfolder/m/magnivore.txt svneol=native#text/plain diff --git a/forge-game/src/main/java/forge/game/combat/AttackConstraints.java b/forge-game/src/main/java/forge/game/combat/AttackConstraints.java index 7d1e81adc8c..57c71bf8840 100644 --- a/forge-game/src/main/java/forge/game/combat/AttackConstraints.java +++ b/forge-game/src/main/java/forge/game/combat/AttackConstraints.java @@ -54,7 +54,7 @@ public class AttackConstraints { // Number of "must attack" constraints on each creature with a magnet counter (equal to the number of permanents requiring that constraint). int nMagnetRequirements = 0; - final CardCollectionView magnetAttackers = CardLists.filter(combat.getAttackers(), CardPredicates.hasCounter(CounterType.MAGNET)); + final CardCollectionView magnetAttackers = CardLists.filter(possibleAttackers, CardPredicates.hasCounter(CounterType.MAGNET)); // Only require if a creature with a magnet counter on it attacks. if (!magnetAttackers.isEmpty()) { nMagnetRequirements = CardLists.getAmountOfKeyword( diff --git a/forge-gui/res/cardsfolder/m/magnetic_web.txt b/forge-gui/res/cardsfolder/m/magnetic_web.txt new file mode 100644 index 00000000000..5076ba5bf4c --- /dev/null +++ b/forge-gui/res/cardsfolder/m/magnetic_web.txt @@ -0,0 +1,7 @@ +Name:Magnetic Web +ManaCost:2 +Types:Artifact +K:If a creature with a magnet counter on it attacks, all creatures with magnet counters on them attack if able. +T:Mode$ Attacks | ValidCard$ Creature.counters_GE1_MAGNET | TriggerZones$ Battlefield | Execute$ TrigLure | TriggerDescription$ Whenever a creature with a magnet counter on it attacks, all creatures with magnet counters on them block that creature if able. +SVar:TrigLure:DB$ MustBlock | Defined$ Valid Creature.counters_GE1_MAGNET | DefinedAttacker$ TriggeredAttacker +A:AB$ PutCounter | Cost$ 1 T | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ MAGNET | CounterNum$ 1 | SpellDescription$ Put a magnet counter on target creature. \ No newline at end of file