mirror of
https://github.com/correl/mage.git
synced 2025-03-13 01:09:53 -09:00
Repaired Affinity for artifacts
This commit is contained in:
parent
24d436276e
commit
897bb4503f
1 changed files with 6 additions and 1 deletions
|
@ -29,13 +29,14 @@ package mage.abilities.keyword;
|
|||
|
||||
import mage.Constants;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.AdjustingSourceCosts;
|
||||
import mage.abilities.effects.CostModificationEffect;
|
||||
import mage.abilities.effects.common.AffinityEffect;
|
||||
import mage.filter.Filter;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* Affinity for artifacts
|
||||
|
@ -68,5 +69,9 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue