mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
fixes 3443
This commit is contained in:
parent
6733a5f338
commit
b0a6c76228
3 changed files with 52 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.cards.d;
|
||||
|
||||
import mage.ConditionalMana;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
@ -93,7 +94,16 @@ class DoublingCubeEffect extends ManaEffect {
|
|||
int greenMana = pool.getGreen();
|
||||
int redMana = pool.getRed();
|
||||
int colorlessMana = pool.getColorless();
|
||||
Mana mana = new Mana(redMana, greenMana, blueMana, whiteMana, blackMana, colorlessMana, 0, 0);
|
||||
|
||||
for(ConditionalMana conditionalMana : pool.getConditionalMana()){
|
||||
blackMana += conditionalMana.getBlack();
|
||||
whiteMana += conditionalMana.getWhite();
|
||||
blueMana += conditionalMana.getBlue();
|
||||
greenMana += conditionalMana.getGreen();
|
||||
redMana += conditionalMana.getRed();
|
||||
colorlessMana += conditionalMana.getColorless();
|
||||
}
|
||||
Mana mana = new Mana(redMana, greenMana, blueMana, whiteMana, blackMana, 0, 0, colorlessMana);
|
||||
checkToFirePossibleEvents(mana, game, source);
|
||||
pool.addMana(mana, game, source);
|
||||
return true;
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
package org.mage.test.cards.mana;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
import org.mage.test.serverside.base.impl.CardTestAPIImpl;
|
||||
|
||||
public class DoublingCubeTest extends CardTestPlayerBase {
|
||||
|
||||
String cube = "Doubling Cube";
|
||||
String temple = "Eldrazi Temple";
|
||||
|
||||
@Test
|
||||
public void DoublingCubeEldraziTemple() {
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, temple);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, cube);
|
||||
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {G} to your mana pool");
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {G} to your mana pool");
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {G} to your mana pool");
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {C}{C}");
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3},{T}:");
|
||||
|
||||
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
|
||||
execute();
|
||||
assertManaPool(playerA);
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -22,6 +22,7 @@ import mage.game.GameOptions;
|
|||
import mage.game.command.CommandObject;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentCard;
|
||||
import mage.players.ManaPool;
|
||||
import mage.players.Player;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
|
@ -833,6 +834,11 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
|||
Assert.assertEquals("(Hand) Card counts for card " + cardName + " for " + player.getName() + " are not equal ", count, actual);
|
||||
}
|
||||
|
||||
|
||||
public void assertManaPool(Player player){
|
||||
ManaPool manaPool = currentGame.getPlayer(player.getId()).getManaPool();
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert card count in player's graveyard.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue