[AFC] fixed Mantle of the Ancients not boosting enchanted creature (fixes #8458)

This commit is contained in:
Evan Kranzler 2021-11-15 18:19:56 -05:00
parent a6ca9a095c
commit 20bf4bcf5a

View file

@ -137,11 +137,12 @@ enum MantleOfTheAncientsValue implements DynamicValue {
@Override @Override
public int calculate(Game game, Ability sourceAbility, Effect effect) { public int calculate(Game game, Ability sourceAbility, Effect effect) {
Permanent permanent = sourceAbility.getSourcePermanentOrLKI(game); Permanent sourcePermanent = sourceAbility.getSourcePermanentOrLKI(game);
if (permanent == null) { if (sourcePermanent == null) {
return 0; return 0;
} }
return permanent Permanent permanent = game.getPermanent(sourcePermanent.getAttachedTo());
return permanent == null ? 0 : permanent
.getAttachments() .getAttachments()
.stream() .stream()
.map(game::getPermanentOrLKIBattlefield) .map(game::getPermanentOrLKIBattlefield)