[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
public int calculate(Game game, Ability sourceAbility, Effect effect) {
Permanent permanent = sourceAbility.getSourcePermanentOrLKI(game);
if (permanent == null) {
Permanent sourcePermanent = sourceAbility.getSourcePermanentOrLKI(game);
if (sourcePermanent == null) {
return 0;
}
return permanent
Permanent permanent = game.getPermanent(sourcePermanent.getAttachedTo());
return permanent == null ? 0 : permanent
.getAttachments()
.stream()
.map(game::getPermanentOrLKIBattlefield)