Refactor some cost modification effects

This commit is contained in:
Oleg Agafonov 2020-06-27 19:10:04 +04:00
parent 2c745109e4
commit e8dbd2a3c8
49 changed files with 174 additions and 180 deletions

View file

@ -29,9 +29,7 @@ public class AffinityEffect extends CostModificationEffectImpl {
public boolean apply(Game game, Ability source, Ability abilityToModify) {
// abilityToModify.getControllerId() works with Sen Triplets and in multiplayer games, see https://github.com/magefree/mage/issues/5931
int count = game.getBattlefield().getActivePermanents(filter, abilityToModify.getControllerId(), source.getId(), game).size();
if (count > 0) {
CardUtil.reduceCost(abilityToModify, count);
}
CardUtil.reduceCost(abilityToModify, count);
return true;
}