* Fixed a problem of net mana of activated mana abilities. Added netMana Handling for FoofChain.

This commit is contained in:
LevelX2 2018-06-03 12:10:58 +02:00
parent 802bc7f1c7
commit 961860107e
2 changed files with 28 additions and 4 deletions

View file

@ -1,4 +1,3 @@
package mage.abilities.mana;
import java.util.ArrayList;
@ -71,11 +70,13 @@ public abstract class ActivatedManaAbilityImpl extends ActivatedAbilityImpl impl
@Override
public List<Mana> getNetMana(Game game) {
if (netMana.isEmpty()) {
ArrayList<Mana> dynamicNetMana = new ArrayList<>();
for (Effect effect : getEffects()) {
if (effect instanceof ManaEffect) {
netMana.addAll(((ManaEffect) effect).getNetMana(game, this));
dynamicNetMana.addAll(((ManaEffect) effect).getNetMana(game, this));
}
}
return dynamicNetMana;
}
ArrayList<Mana> netManaCopy = new ArrayList<>();
for (Mana mana : netMana) {