Search in sources :

Example 86 with ManaOptions

use of mage.abilities.mana.ManaOptions in project mage by magefree.

the class ManaOptionsTest method testChromaticSphere.

// Chromatic Sphere
// {1}, {T}, Sacrifice Chromatic Sphere: Add one mana of any color. Draw a card.
@Test
public void testChromaticSphere() {
    addCard(Zone.BATTLEFIELD, playerA, "Plains", 2);
    addCard(Zone.BATTLEFIELD, playerA, "Chromatic Sphere", 2);
    setStopAt(1, PhaseStep.UPKEEP);
    execute();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    assertDuplicatedManaOptions(manaOptions);
    Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
    assertManaOptions("{Any}{Any}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) ManaOptionsTestUtils.assertDuplicatedManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions) Test(org.junit.Test)

Example 87 with ManaOptions

use of mage.abilities.mana.ManaOptions in project mage by magefree.

the class ManaOptionsTest method testNykthos2.

@Test
public void testNykthos2() {
    addCard(Zone.BATTLEFIELD, playerA, "Sedge Scorpion", 4);
    addCard(Zone.BATTLEFIELD, playerA, "Akroan Crusader", 3);
    // {G}
    addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
    // {C}
    addCard(Zone.BATTLEFIELD, playerA, "Nykthos, Shrine to Nyx", 1);
    setStopAt(1, PhaseStep.UPKEEP);
    execute();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    assertDuplicatedManaOptions(manaOptions);
    Assert.assertEquals("mana variations don't fit", 3, manaOptions.size());
    assertManaOptions("{C}{G}{G}{G}", manaOptions);
    assertManaOptions("{G}{G}{G}{G}{G}", manaOptions);
    assertManaOptions("{R}{R}{R}{G}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) ManaOptionsTestUtils.assertDuplicatedManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions) Test(org.junit.Test)

Example 88 with ManaOptions

use of mage.abilities.mana.ManaOptions in project mage by magefree.

the class ManaOptionsTest method testManaSourcesWithCosts.

@Test
public void testManaSourcesWithCosts() {
    // {T}: Add {C} to your mana pool.
    // {5}, {T}: Add {W}{U}{B}{R}{G} to your mana pool.
    addCard(Zone.BATTLEFIELD, playerA, "Crystal Quarry", 1);
    // {T}: Add {C} to your mana pool.
    // {W/B}, {T}: Add {W}{W}, {W}{B}, or {B}{B} to your mana pool.
    addCard(Zone.BATTLEFIELD, playerA, "Fetid Heath", 3);
    addCard(Zone.BATTLEFIELD, playerA, "Plains", 3);
    setStopAt(1, PhaseStep.UPKEEP);
    execute();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    assertDuplicatedManaOptions(manaOptions);
    Assert.assertEquals("mana variations don't fit", 16, manaOptions.size());
    assertManaOptions("{C}{C}{C}{C}{W}{W}{W}", manaOptions);
    assertManaOptions("{C}{C}{C}{W}{W}{W}{W}", manaOptions);
    assertManaOptions("{C}{C}{C}{W}{W}{W}{B}", manaOptions);
    assertManaOptions("{C}{C}{C}{W}{W}{B}{B}", manaOptions);
    assertManaOptions("{C}{C}{W}{W}{W}{W}{W}", manaOptions);
    assertManaOptions("{C}{C}{W}{W}{W}{W}{B}", manaOptions);
    assertManaOptions("{C}{C}{W}{W}{W}{B}{B}", manaOptions);
    assertManaOptions("{C}{C}{W}{W}{B}{B}{B}", manaOptions);
    assertManaOptions("{C}{C}{W}{B}{B}{B}{B}", manaOptions);
    assertManaOptions("{C}{W}{W}{W}{W}{W}{W}", manaOptions);
    assertManaOptions("{C}{W}{W}{W}{W}{W}{B}", manaOptions);
    assertManaOptions("{C}{W}{W}{W}{W}{B}{B}", manaOptions);
    assertManaOptions("{C}{W}{W}{W}{B}{B}{B}", manaOptions);
    assertManaOptions("{C}{W}{W}{B}{B}{B}{B}", manaOptions);
    assertManaOptions("{C}{W}{B}{B}{B}{B}{B}", manaOptions);
    assertManaOptions("{C}{B}{B}{B}{B}{B}{B}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) ManaOptionsTestUtils.assertDuplicatedManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions) Test(org.junit.Test)

Example 89 with ManaOptions

use of mage.abilities.mana.ManaOptions in project mage by magefree.

the class ManaOptionsTest method testSimpleMana.

@Test
public void testSimpleMana() {
    addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
    setStopAt(1, PhaseStep.UPKEEP);
    execute();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    assertDuplicatedManaOptions(manaOptions);
    Assert.assertEquals("mana variations don't fit", 1, manaOptions.size());
    assertManaOptions("{G}{G}{G}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) ManaOptionsTestUtils.assertDuplicatedManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions) Test(org.junit.Test)

Example 90 with ManaOptions

use of mage.abilities.mana.ManaOptions in project mage by magefree.

the class ManaOptionsTest method testAdarkarWastes.

// Adarkar Wastes
// {T}: Add {C}.
// {T}: Add {W} or {U}. Adarkar Wastes deals 1 damage to you.
@Test
public void testAdarkarWastes() {
    addCard(Zone.BATTLEFIELD, playerA, "Adarkar Wastes", 3);
    setStopAt(1, PhaseStep.UPKEEP);
    execute();
    ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
    assertDuplicatedManaOptions(manaOptions);
    Assert.assertEquals("mana variations don't fit", 10, manaOptions.size());
    assertManaOptions("{C}{C}{C}", manaOptions);
    assertManaOptions("{C}{C}{W}", manaOptions);
    assertManaOptions("{C}{C}{U}", manaOptions);
    assertManaOptions("{C}{W}{W}", manaOptions);
    assertManaOptions("{C}{W}{U}", manaOptions);
    assertManaOptions("{C}{U}{U}", manaOptions);
    assertManaOptions("{W}{W}{W}", manaOptions);
    assertManaOptions("{W}{W}{U}", manaOptions);
    assertManaOptions("{W}{U}{U}", manaOptions);
    assertManaOptions("{U}{U}{U}", manaOptions);
}
Also used : ManaOptions(mage.abilities.mana.ManaOptions) ManaOptionsTestUtils.assertManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions) ManaOptionsTestUtils.assertDuplicatedManaOptions(org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions) Test(org.junit.Test)

Aggregations

ManaOptions (mage.abilities.mana.ManaOptions)99 Test (org.junit.Test)85 ManaOptionsTestUtils.assertManaOptions (org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions)75 ManaOptionsTestUtils.assertDuplicatedManaOptions (org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions)38 Permanent (mage.game.permanent.Permanent)9 Mana (mage.Mana)8 Player (mage.players.Player)5 ActivatedManaAbilityImpl (mage.abilities.mana.ActivatedManaAbilityImpl)4 FilterCard (mage.filter.FilterCard)4 FilterPermanent (mage.filter.FilterPermanent)4 TargetPermanent (mage.target.TargetPermanent)4 AlternateManaPaymentAbility (mage.abilities.costs.mana.AlternateManaPaymentAbility)3 ManaCost (mage.abilities.costs.mana.ManaCost)3 ValueHint (mage.abilities.hint.ValueHint)3 FilterControlledPermanent (mage.filter.common.FilterControlledPermanent)3 UUID (java.util.UUID)2 ConditionalMana (mage.ConditionalMana)2 PassAbility (mage.abilities.common.PassAbility)2 PlayLandAsCommanderAbility (mage.abilities.common.PlayLandAsCommanderAbility)2 WhileSearchingPlayFromLibraryAbility (mage.abilities.common.WhileSearchingPlayFromLibraryAbility)2