fix The Great Henge cost reduction (#11165)

This commit is contained in:
Susucre 2023-09-18 02:19:21 +02:00 committed by GitHub
parent 15ca9679d9
commit 6b7c0529b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,10 +16,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.util.CardUtil;
@ -79,7 +76,7 @@ class TheGreatHengeCostReductionEffect extends CostModificationEffectImpl {
public boolean apply(Game game, Ability source, Ability abilityToModify) {
int reductionAmount = game.getBattlefield()
.getAllActivePermanents(
StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game
StaticFilters.FILTER_PERMANENT_CREATURE, abilityToModify.getControllerId(), game
).stream()
.map(Permanent::getPower)
.mapToInt(MageInt::getValue)