From 3d073c92a842bbf3a5502933e5f5845861d42c4a Mon Sep 17 00:00:00 2001 From: Sol Date: Tue, 12 Mar 2013 03:20:32 +0000 Subject: [PATCH] - Fix NPE related to X Can't be 0 and Announce - Added Simic Manipulator --- .gitattributes | 1 + res/cardsfolder/s/simic_manipulator.txt | 11 +++++++++++ .../java/forge/card/spellability/SpellAbility.java | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 res/cardsfolder/s/simic_manipulator.txt diff --git a/.gitattributes b/.gitattributes index 93262a59a53..dbe94e4438c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9551,6 +9551,7 @@ res/cardsfolder/s/simic_guildgate.txt -text res/cardsfolder/s/simic_guildmage.txt -text res/cardsfolder/s/simic_initiate.txt -text res/cardsfolder/s/simic_keyrune.txt -text +res/cardsfolder/s/simic_manipulator.txt -text res/cardsfolder/s/simic_ragworm.txt svneol=native#text/plain res/cardsfolder/s/simic_signet.txt svneol=native#text/plain res/cardsfolder/s/simic_sky_swallower.txt svneol=native#text/plain diff --git a/res/cardsfolder/s/simic_manipulator.txt b/res/cardsfolder/s/simic_manipulator.txt new file mode 100644 index 00000000000..4d0ff409550 --- /dev/null +++ b/res/cardsfolder/s/simic_manipulator.txt @@ -0,0 +1,11 @@ +Name:Simic Manipulator +ManaCost:1 U U +Types:Creature Merfolk +PT:0/1 +K:Evolve +A:AB$ GainControl | Announce$ X | Cost$ XCantBe0 T SubCounter | ValidTgts$ Creature.powerLEX | TgtPrompt$ Select target with power less than or equal to the number of +1/+1 counters removed this way | SpellDescription$ Gain control of target creature with power less than or equal to the number of +1/+1 counters removed this way. +SVar:X:Count$xPaid +SVar:RemAIDeck:True +SVar:Picture:http://www.wizards.com/global/images/magic/general/simic_manipulator.jpg +Oracle:Evolve (Whenever a creature enters the battlefield under your control, if that creature has greater power or toughness than this creature, put a +1/+1 counter on this creature.)\n{T}, Remove one or more +1/+1 counters from Simic Manipulator: Gain control of target creature with power less than or equal to the number of +1/+1 counters removed this way. +SetInfo:GTC Rare \ No newline at end of file diff --git a/src/main/java/forge/card/spellability/SpellAbility.java b/src/main/java/forge/card/spellability/SpellAbility.java index 655fe32f10c..3b65184dc07 100644 --- a/src/main/java/forge/card/spellability/SpellAbility.java +++ b/src/main/java/forge/card/spellability/SpellAbility.java @@ -1701,7 +1701,8 @@ public abstract class SpellAbility implements ISpellAbility { String value = this.getActivatingPlayer().getController().announceRequirements(this, aVar); if (value == null || !StringUtils.isNumeric(value)) { return false; - } else if (this.getPayCosts().getCostMana().isxCantBe0() && Integer.parseInt(value) == 0) { + } else if (this.getPayCosts().getCostMana() != null && this.getPayCosts().getCostMana().isxCantBe0() + && Integer.parseInt(value) == 0) { return false; } this.setSVar(aVar, "Number$" + value);