mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Fixed color mana payment
This commit is contained in:
parent
5be6f78d59
commit
3c9e3de9a2
2 changed files with 8 additions and 4 deletions
|
|
@ -2,6 +2,7 @@ package org.mage.test.cards.mana.phyrexian;
|
|||
|
||||
import mage.Constants;
|
||||
import mage.Constants.PhaseStep;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -22,8 +23,10 @@ public class PhyrexianManaTest extends CardTestPlayerBase {
|
|||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertHandCount(playerA, 1);
|
||||
int life = playerA.getLife();
|
||||
int hand = playerA.getHand().size();
|
||||
// can be played only through life pay
|
||||
Assert.assertTrue(life == 20 && hand == 1 || life == 18 && hand == 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@
|
|||
|
||||
package mage.abilities.costs.mana;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.Constants.ColoredManaSymbol;
|
||||
import mage.Constants.ManaType;
|
||||
import mage.Mana;
|
||||
|
|
@ -41,6 +39,8 @@ import mage.game.Game;
|
|||
import mage.players.ManaPool;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class ManaCostImpl<T extends ManaCostImpl<T>> extends CostImpl<T> implements ManaCost {
|
||||
|
||||
protected Mana payment;
|
||||
|
|
@ -116,6 +116,7 @@ public abstract class ManaCostImpl<T extends ManaCostImpl<T>> extends CostImpl<T
|
|||
this.payment.addWhite();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case G:
|
||||
if (pool.pay(ManaType.GREEN, ability, sourceFilter, game)) {
|
||||
this.payment.addGreen();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue