diff --git a/Mage.Sets/src/mage/sets/shadowmoor/ManaReflection.java b/Mage.Sets/src/mage/sets/shadowmoor/ManaReflection.java index ba1e87ed85..9f9c6aed85 100644 --- a/Mage.Sets/src/mage/sets/shadowmoor/ManaReflection.java +++ b/Mage.Sets/src/mage/sets/shadowmoor/ManaReflection.java @@ -90,22 +90,22 @@ class ManaReflectionReplacementEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { Mana mana = ((ManaEvent) event).getMana(); if (mana.getBlack() > 0) { - ((ManaEvent) event).getMana().set(ManaType.BLACK, mana.getBlack()* 2); + mana.set(ManaType.BLACK, mana.getBlack()* 2); } if (mana.getBlue() > 0) { - ((ManaEvent) event).getMana().set(ManaType.BLUE, mana.getBlue() * 2); + mana.set(ManaType.BLUE, mana.getBlue() * 2); } if (mana.getWhite() > 0) { - ((ManaEvent) event).getMana().set(ManaType.WHITE, mana.getWhite() * 2); + mana.set(ManaType.WHITE, mana.getWhite() * 2); } if (mana.getGreen() > 0) { - ((ManaEvent) event).getMana().set(ManaType.GREEN, mana.getGreen() * 2); + mana.set(ManaType.GREEN, mana.getGreen() * 2); } if (mana.getRed() > 0) { - ((ManaEvent) event).getMana().set(ManaType.RED, mana.getRed() * 2); + mana.set(ManaType.RED, mana.getRed() * 2); } if (mana.getColorless() > 0) { - ((ManaEvent) event).getMana().set(ManaType.COLORLESS, mana.getColorless() * 2); + mana.set(ManaType.COLORLESS, mana.getColorless() * 2); } return false; } diff --git a/Mage/src/mage/abilities/effects/common/DynamicManaEffect.java b/Mage/src/mage/abilities/effects/common/DynamicManaEffect.java index 6ca10dce75..14fb26fce3 100644 --- a/Mage/src/mage/abilities/effects/common/DynamicManaEffect.java +++ b/Mage/src/mage/abilities/effects/common/DynamicManaEffect.java @@ -74,6 +74,7 @@ public class DynamicManaEffect extends BasicManaEffect { @Override public boolean apply(Game game, Ability source) { computeMana(false, game, source); + checkToFirePossibleEvents(computedMana, game, source); game.getPlayer(source.getControllerId()).getManaPool().addMana(computedMana, game, source); return true; } @@ -88,7 +89,7 @@ public class DynamicManaEffect extends BasicManaEffect { @Override public Mana getMana(Game game, Ability source) { - return computeMana(false, game, source); + return null; } public Mana computeMana(boolean netMana ,Game game, Ability source){ diff --git a/Mage/src/mage/abilities/mana/DynamicManaAbility.java b/Mage/src/mage/abilities/mana/DynamicManaAbility.java index 33891af58d..431094aff9 100644 --- a/Mage/src/mage/abilities/mana/DynamicManaAbility.java +++ b/Mage/src/mage/abilities/mana/DynamicManaAbility.java @@ -89,6 +89,7 @@ public class DynamicManaAbility extends ManaAbility { public List getNetMana(Game game) { List newNetMana = new ArrayList<>(); if (game != null) { + // TODO: effects from replacement effects like Mana Refelection are not considered yet newNetMana.add(manaEffect.computeMana(true, game, this)); } return newNetMana;