mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Fixed a problem of net mana of activated mana abilities. Added netMana Handling for FoofChain.
This commit is contained in:
parent
802bc7f1c7
commit
961860107e
2 changed files with 28 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue