mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
Some changes to mana handling to handle {C} mana.
This commit is contained in:
parent
7a3c0bb884
commit
782190bac3
185 changed files with 700 additions and 566 deletions
|
|
@ -141,4 +141,31 @@ public class ConditionalManaTest extends CardTestPlayerBase {
|
|||
|
||||
assertPermanentCount(playerB, "Snapping Drake", 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* I've found a bit of a problem with colorless costs. I've been unable to
|
||||
* pay colorless costs with lands conditionally tapping for 2 colorless i.e
|
||||
* shrine of forsaken gods and eldrazi temple ,including if I float the
|
||||
* mana. Seperately but on a related note, if you float at least one
|
||||
* colorless mana you can pay all colorless costs with floated generic mana.
|
||||
*/
|
||||
@Test
|
||||
public void testPayColorlessWithConditionalMana() {
|
||||
// {T}: Add {C} to your mana pool.
|
||||
// {T}: Add {C}{C} to your mana pool. Spend this mana only to cast colorless spells. Activate this ability only if you control seven or more lands.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Shrine of the Forsaken Gods", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 8);
|
||||
// When you cast Kozilek, the Great Distortion, if you have fewer than seven cards in hand, draw cards equal to the difference.
|
||||
// Menace
|
||||
// Discard a card with converted mana cost X: Counter target spell with converted mana cost X.
|
||||
addCard(Zone.HAND, playerA, "Kozilek, the Great Distortion", 1); // {8}{C}{C}
|
||||
|
||||
activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {C}{C}");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Kozilek, the Great Distortion");
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Kozilek, the Great Distortion", 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,25 +15,25 @@ public class HallOfTheBanditLordTest extends CardTestPlayerBase {
|
|||
* Hall of the Bandit Lord
|
||||
* Legendary Land
|
||||
* Hall of the Bandit Lord enters the battlefield tapped.
|
||||
* {T}, Pay 3 life: Add {C} to your mana pool. If that mana is spent on a
|
||||
* {T}, Pay 3 life: Add {C} to your mana pool. If that mana is spent on a
|
||||
* creature spell, it gains haste.
|
||||
*
|
||||
*/
|
||||
|
||||
*/
|
||||
|
||||
// test that a creature cast using Hall of the Bandit Lord mana gains haste
|
||||
@Test
|
||||
public void testGainsHaste() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Hall of the Bandit Lord");
|
||||
addCard(Zone.HAND, playerA, "Goblin Roughrider");
|
||||
|
||||
addCard(Zone.HAND, playerA, "Goblin Roughrider"); // Creature 3/3 - {2}{R}
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Goblin Roughrider");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
|
||||
this.assertAbility(playerA, "Goblin Roughrider", HasteAbility.getInstance(), true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// test that a creature cast not using Hall of the Bandit Lord mana does not gain haste
|
||||
|
|
@ -42,14 +42,14 @@ public class HallOfTheBanditLordTest extends CardTestPlayerBase {
|
|||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Hall of the Bandit Lord");
|
||||
addCard(Zone.HAND, playerA, "Ember Hauler");
|
||||
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ember Hauler");
|
||||
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
|
||||
this.assertAbility(playerA, "Ember Hauler", HasteAbility.getInstance(), false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,24 +37,25 @@ import org.mage.test.serverside.base.CardTestCommanderDuelBase;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
public class OpalPalaceTest extends CardTestCommanderDuelBase {
|
||||
|
||||
/**
|
||||
* I cast my commander with Opal Palace's second ability and it did not receive a +1/+1 counter
|
||||
* the first time it was cast (rulings say it should on the first time cast).
|
||||
* I cast my commander with Opal Palace's second ability and it did not
|
||||
* receive a +1/+1 counter the first time it was cast (rulings say it should
|
||||
* on the first time cast).
|
||||
*/
|
||||
@Test
|
||||
public void testFirstAbility() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest", 4);
|
||||
|
||||
|
||||
// {T}: Add {C} to your mana pool.
|
||||
// {1}, {T}: Add to your mana pool one mana of any color in your commander's color identity.
|
||||
// {1}, {T}: Add to your mana pool one mana of any color in your commander's color identity.
|
||||
// If you spend this mana to cast your commander, it enters the battlefield with a number of +1/+1 counters on it
|
||||
// equal to the number of times it's been cast from the command zone this game.
|
||||
// equal to the number of times it's been cast from the command zone this game.
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Opal Palace", 1);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ob Nixilis of the Black Oath");
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ob Nixilis of the Black Oath"); // {3}{B}{B}
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
|
|
|||
|
|
@ -90,12 +90,17 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 4, manaOptions.size());
|
||||
Assert.assertEquals("{W}{W}{W}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{U}{W}{W}", getManaOption(1, manaOptions));
|
||||
Assert.assertEquals("{U}{U}{W}", getManaOption(2, manaOptions));
|
||||
Assert.assertEquals("{U}{U}{U}", getManaOption(3, manaOptions));
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 10, manaOptions.size());
|
||||
Assert.assertEquals("{C}{C}{C}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{C}{C}{W}", getManaOption(1, manaOptions));
|
||||
Assert.assertEquals("{C}{C}{U}", getManaOption(2, manaOptions));
|
||||
Assert.assertEquals("{C}{W}{W}", getManaOption(3, manaOptions));
|
||||
Assert.assertEquals("{C}{U}{W}", getManaOption(4, manaOptions));
|
||||
Assert.assertEquals("{C}{U}{U}", getManaOption(5, manaOptions));
|
||||
Assert.assertEquals("{W}{W}{W}", getManaOption(6, manaOptions));
|
||||
Assert.assertEquals("{U}{W}{W}", getManaOption(7, manaOptions));
|
||||
Assert.assertEquals("{U}{U}{W}", getManaOption(8, manaOptions));
|
||||
Assert.assertEquals("{U}{U}{U}", getManaOption(9, manaOptions));
|
||||
}
|
||||
|
||||
// Chromatic Sphere
|
||||
|
|
@ -146,7 +151,7 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{1}{G}{G}{W}{W}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{C}{G}{G}{W}{W}", getManaOption(0, manaOptions));
|
||||
}
|
||||
|
||||
// Crystal Quarry
|
||||
|
|
@ -164,7 +169,7 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 2, manaOptions.size());
|
||||
Assert.assertEquals("{1}{G}{G}{G}{W}{W}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{C}{G}{G}{G}{W}{W}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{R}{G}{U}{W}{B}", getManaOption(1, manaOptions));
|
||||
}
|
||||
|
||||
|
|
@ -182,8 +187,9 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{G}{G}{G}{G}{G}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("mana variations don't fit", 2, manaOptions.size());
|
||||
Assert.assertEquals("{C}{G}{G}{G}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{G}{G}{G}{G}{G}", getManaOption(1, manaOptions));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -198,9 +204,10 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 2, manaOptions.size());
|
||||
Assert.assertEquals("{G}{G}{G}{G}{G}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{R}{R}{R}{G}", getManaOption(1, manaOptions));
|
||||
Assert.assertEquals("mana variations don't fit", 3, manaOptions.size());
|
||||
Assert.assertEquals("{C}{G}{G}{G}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{G}{G}{G}{G}{G}", getManaOption(1, manaOptions));
|
||||
Assert.assertEquals("{R}{R}{R}{G}", getManaOption(2, manaOptions));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -215,7 +222,7 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{1}{G}{Any}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{C}{G}{Any}", getManaOption(0, manaOptions));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -251,10 +258,11 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 3, manaOptions.size());
|
||||
Assert.assertEquals("{W}{W}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{W}{B}", getManaOption(1, manaOptions));
|
||||
Assert.assertEquals("{B}{B}", getManaOption(2, manaOptions));
|
||||
Assert.assertEquals("mana variations don't fit", 4, manaOptions.size());
|
||||
Assert.assertEquals("{C}{W}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{W}{W}", getManaOption(1, manaOptions));
|
||||
Assert.assertEquals("{W}{B}", getManaOption(2, manaOptions));
|
||||
Assert.assertEquals("{B}{B}", getManaOption(3, manaOptions));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -306,7 +314,7 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{1}{W}{B}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{C}{W}{B}", getManaOption(0, manaOptions));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -324,8 +332,9 @@ public class ManaOptionsTest extends CardTestPlayerBase {
|
|||
|
||||
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
|
||||
|
||||
Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
|
||||
Assert.assertEquals("{4}{W}{B}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("mana variations don't fit", 2, manaOptions.size());
|
||||
Assert.assertEquals("{C}{W}{B}", getManaOption(0, manaOptions));
|
||||
Assert.assertEquals("{4}{W}{B}", getManaOption(1, manaOptions));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue