From 469e9f3519201739437766a05055a89ddd7d6acf Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 1 Jul 2013 20:26:18 +0200 Subject: [PATCH] Fixed a bug of AffinityForArtifactsAbility causing bug if artifact had an activated ability. --- .../abilities/keyword/AffinityForArtifactsAbility.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Mage/src/mage/abilities/keyword/AffinityForArtifactsAbility.java b/Mage/src/mage/abilities/keyword/AffinityForArtifactsAbility.java index c04b2d41ff..6bb24081cb 100644 --- a/Mage/src/mage/abilities/keyword/AffinityForArtifactsAbility.java +++ b/Mage/src/mage/abilities/keyword/AffinityForArtifactsAbility.java @@ -70,9 +70,11 @@ public class AffinityForArtifactsAbility extends SimpleStaticAbility implements @Override public void adjustCosts(Ability ability, Game game) { - int count = game.getBattlefield().getAllActivePermanents(filter, ability.getControllerId(), game).size(); - if (count > 0) { - CardUtil.adjustCost((SpellAbility)ability, count); + if (ability instanceof SpellAbility) { + int count = game.getBattlefield().getAllActivePermanents(filter, ability.getControllerId(), game).size(); + if (count > 0) { + CardUtil.adjustCost((SpellAbility)ability, count); + } } } }