Merge pull request #5487 from ninthworld/Omnath

Fix ManaTypeInManaPoolCount to include conditional mana (Fixes #5458)
This commit is contained in:
LevelX2 2019-01-03 17:38:34 +01:00 committed by GitHub
commit 423115ced5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
package mage.abilities.dynamicvalue.common;
import mage.ConditionalMana;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
@ -29,6 +30,9 @@ public class ManaTypeInManaPoolCount implements DynamicValue {
Player player = game.getPlayer(sourceAbility.getControllerId());
if (player != null) {
amount = player.getManaPool().get(manaType);
for (ConditionalMana mana : player.getManaPool().getConditionalMana()) {
amount += mana.get(manaType);
}
}
return amount;
}