Fixed a bug of AffinityForArtifactsAbility causing bug if artifact had an activated ability.

This commit is contained in:
LevelX2 2013-07-01 20:26:18 +02:00
parent 06163d6ac5
commit 469e9f3519

View file

@ -70,9 +70,11 @@ public class AffinityForArtifactsAbility extends SimpleStaticAbility implements
@Override @Override
public void adjustCosts(Ability ability, Game game) { public void adjustCosts(Ability ability, Game game) {
int count = game.getBattlefield().getAllActivePermanents(filter, ability.getControllerId(), game).size(); if (ability instanceof SpellAbility) {
if (count > 0) { int count = game.getBattlefield().getAllActivePermanents(filter, ability.getControllerId(), game).size();
CardUtil.adjustCost((SpellAbility)ability, count); if (count > 0) {
CardUtil.adjustCost((SpellAbility)ability, count);
}
} }
} }
} }