From 564c97571b8007f9236a79e80dd953b46cd07dde Mon Sep 17 00:00:00 2001 From: swordshine Date: Thu, 28 Mar 2013 05:33:54 +0000 Subject: [PATCH] - Added Grifter's Blade --- .gitattributes | 1 + res/cardsfolder/g/grifters_blade.txt | 12 ++++++++++++ src/main/java/forge/Card.java | 9 ++++++--- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 res/cardsfolder/g/grifters_blade.txt diff --git a/.gitattributes b/.gitattributes index 6baed16fd0b..a73561f8cb3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4519,6 +4519,7 @@ res/cardsfolder/g/griffin_guide.txt svneol=native#text/plain res/cardsfolder/g/griffin_protector.txt -text res/cardsfolder/g/griffin_rider.txt svneol=native#text/plain res/cardsfolder/g/griffin_sentinel.txt svneol=native#text/plain +res/cardsfolder/g/grifters_blade.txt -text res/cardsfolder/g/grim_affliction.txt svneol=native#text/plain res/cardsfolder/g/grim_backwoods.txt -text res/cardsfolder/g/grim_discovery.txt -text diff --git a/res/cardsfolder/g/grifters_blade.txt b/res/cardsfolder/g/grifters_blade.txt new file mode 100644 index 00000000000..aee4a4d4403 --- /dev/null +++ b/res/cardsfolder/g/grifters_blade.txt @@ -0,0 +1,12 @@ +Name:Grifter's Blade +ManaCost:3 +Types:Artifact Equipment +K:Equip 1 +K:Flash +K:ETBReplacement:Other:ChooseC +SVar:ChooseC:DB$ ChooseCard | Defined$ You | Choices$ Creature.YouCtrl+CanBeEquippedBy | Amount$ 1 | Mandatory$ True | SubAbility$ DBAttach | SpellDescription$ As CARDNAME enters the battlefield, choose a creature you control it could be attached to. If you do, it enters the battlefield attached to that creature. +SVar:DBAttach:DB$ Attach | Object$ Self | Defined$ ChosenCard +S:Mode$ Continuous | Affected$ Creature.EquippedBy | AddPower$ 1 | AddToughness$ 1 | Description$ Equipped creature gets +1/+1. +SVar:Picture:http://www.wizards.com/global/images/magic/general/grifters_blade.jpg +Oracle:Flash\nAs Grifter's Blade enters the battlefield, choose a creature you control it could be attached to. If you do, it enters the battlefield attached to that creature.\nEquipped creature gets +1/+1.\nEquip {1} +SetInfo:RAV Uncommon \ No newline at end of file diff --git a/src/main/java/forge/Card.java b/src/main/java/forge/Card.java index 68427220fce..f82b936fee5 100644 --- a/src/main/java/forge/Card.java +++ b/src/main/java/forge/Card.java @@ -6445,6 +6445,10 @@ public class Card extends GameEntity implements Comparable { return false; } } + } else if (property.startsWith("CanBeEquippedBy")) { + if (!this.canBeEquippedBy(source)) { + return false; + } } else if (property.startsWith("Equipped")) { if (!this.equipping.contains(source)) { return false; @@ -6542,9 +6546,8 @@ public class Card extends GameEntity implements Comparable { } } } else if (restriction.equals("Equipped")) { - if (!source.isEquipment() || !source.isEquipping()) { - return false; - } else if (!this.sharesColorWith(source.getEquippingCard())) { + if (!source.isEquipment() || !source.isEquipping() + || !this.sharesColorWith(source.getEquippingCard())) { return false; } } else if (restriction.equals("MostProminentColor")) {