mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
* Fixed a problem that conditional mana could not be correctly used with AsThoughEffects (fixes #6880).
This commit is contained in:
parent
202e25208e
commit
85d18899b1
4 changed files with 117 additions and 16 deletions
|
|
@ -2,6 +2,7 @@ package org.mage.test.cards.asthough;
|
|||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
|
|
@ -200,4 +201,60 @@ public class SpendOtherManaTest extends CardTestPlayerBase {
|
|||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20 - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Chromatic Orrery allows it's controller to spend mana of any color as
|
||||
* though it were mana of any color. With mana from Food Chain I should be
|
||||
* able to cast creature spells using abritrary color of mana. But the game
|
||||
* still requires to pay appropriate color as though there was no Orrery on
|
||||
* my side of battlefield.
|
||||
*/
|
||||
@Test
|
||||
public void testFoodChainWithChromaticOrrery() {
|
||||
setStrictChooseMode(true);
|
||||
addCard(Zone.HAND, playerA, "Adriana, Captain of the Guard", 1); // Creature {3}{R}{W}
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Pillarfield Ox", 1); // Creature {3}{W}
|
||||
|
||||
// Exile a creature you control: Add X mana of any one color, where X is the exiled creature's converted mana cost plus one.
|
||||
// Spend this mana only to cast creature spells.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Food Chain"); // Enchantment {2}{G}
|
||||
|
||||
// You may spend mana as though it were mana of any color.
|
||||
// {T}: Add {C}{C}{C}{C}{C}.
|
||||
// {5}, {T}: Draw a card for each color among permanents you control.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Chromatic Orrery"); // Artifact {7}
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Exile a creature you control");
|
||||
setChoice(playerA, "Pillarfield Ox");
|
||||
setChoice(playerA, "Red");
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Adriana, Captain of the Guard");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
Assert.assertTrue("Mana pool of conditional mana has to be empty", playerA.getManaPool().getConditionalMana().isEmpty());
|
||||
assertExileCount("Pillarfield Ox", 1);
|
||||
assertPermanentCount(playerA, "Adriana, Captain of the Guard", 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testChromaticOrrery() {
|
||||
setStrictChooseMode(true);
|
||||
addCard(Zone.HAND, playerA, "Adriana, Captain of the Guard", 1); // Creature {3}{R}{W}
|
||||
|
||||
// You may spend mana as though it were mana of any color.
|
||||
// {T}: Add {C}{C}{C}{C}{C}.
|
||||
// {5}, {T}: Draw a card for each color among permanents you control.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Chromatic Orrery"); // Artifact {7}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Adriana, Captain of the Guard");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertPermanentCount(playerA, "Adriana, Captain of the Guard", 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -296,4 +296,22 @@ public class TappedForManaRelatedTest extends CardTestPlayerBase {
|
|||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
assertManaOptions("{B}{B}{Any}{Any}{Any}{Any}", manaOptions);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void TestChromaticOrrery() {
|
||||
setStrictChooseMode(true);
|
||||
// You may spend mana as though it were mana of any color.
|
||||
// {T}: Add {C}{C}{C}{C}{C}.
|
||||
// {5}, {T}: Draw a card for each color among permanents you control.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Chromatic Orrery", 1);
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertAllCommandsUsed();
|
||||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
assertManaOptions("{C}{C}{C}{C}{C}", manaOptions);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue