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) {
if (ability instanceof SpellAbility) {
int count = game.getBattlefield().getAllActivePermanents(filter, ability.getControllerId(), game).size(); int count = game.getBattlefield().getAllActivePermanents(filter, ability.getControllerId(), game).size();
if (count > 0) { if (count > 0) {
CardUtil.adjustCost((SpellAbility)ability, count); CardUtil.adjustCost((SpellAbility)ability, count);
} }
} }
} }
}