* Fixed calcultion of available mana for Goblin Clearcutter, Seton Krosan Protector, Urza, Lord High Artificer, Heritage Druid, Birchlore Ranger and Grand architect.

This commit is contained in:
LevelX2 2020-07-11 16:43:38 +02:00
parent 587f05dea4
commit 81e5650972
9 changed files with 283 additions and 51 deletions

View file

@ -0,0 +1,45 @@
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;
/**
*
* @author LevelX2
*/
public class MultipleTimesUsableActivatedManaAbilitiesTest extends CardTestPlayerBase {
/**
* Seton, Krosan Protector - only seems to get counted as if it were one
* mana for determining if a spell can be cast, regardless of how many
* druids you have in playF
*/
@Test
public void testCanBeCastWithSetonKrosanProtector() {
// Tap an untapped Druid you control: Add {G}.
addCard(Zone.BATTLEFIELD, playerA, "Seton, Krosan Protector", 1); // Creature {G}{G}{G}
addCard(Zone.BATTLEFIELD, playerA, "Citanul Druid", 3);
addCard(Zone.HAND, playerA, "Leatherback Baloth", 1); // Creature 4/5
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Leatherback Baloth");
setChoice(playerA, "Citanul Druid");
setChoice(playerA, "Citanul Druid");
setChoice(playerA, "Citanul Druid");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
setStrictChooseMode(true);
execute();
assertAllCommandsUsed();
assertTappedCount("Citanul Druid", true, 3);
assertPermanentCount(playerA, "Leatherback Baloth", 1);
}
}

View file

@ -1,11 +1,15 @@
package org.mage.test.cards.replacement;
import mage.abilities.mana.ManaOptions;
import mage.constants.ManaType;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import mage.counters.CounterType;
import org.junit.Assert;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
import static org.mage.test.utils.ManaOptionsTestUtils.assertDuplicatedManaOptions;
import static org.mage.test.utils.ManaOptionsTestUtils.assertManaOptions;
public class ManaReflectionTest extends CardTestPlayerBase {
@ -54,4 +58,26 @@ public class ManaReflectionTest extends CardTestPlayerBase {
assertManaPool(playerA, ManaType.GREEN, 2);
}
@Test
public void ManaReflectionWithGoblinClearcutterTest() {
// If you tap a permanent for mana, it produces twice as much of that mana instead.
addCard(Zone.BATTLEFIELD, playerA, "Mana Reflection");
// {T}, Sacrifice a Forest: Add three mana in any combination of {R} and/or {G}.
addCard(Zone.BATTLEFIELD, playerA, "Goblin Clearcutter");
addCard(Zone.BATTLEFIELD, playerA, "Forest");
setStopAt(1, PhaseStep.PRECOMBAT_MAIN);
execute();
ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame);
assertDuplicatedManaOptions(manaOptions);
Assert.assertEquals("mana variations don't fit", 4, manaOptions.size());
assertManaOptions("{R}{R}{R}{R}{R}{R}{G}{G}", manaOptions);
assertManaOptions("{R}{R}{R}{R}{G}{G}{G}{G}", manaOptions);
assertManaOptions("{R}{R}{G}{G}{G}{G}{G}{G}", manaOptions);
assertManaOptions("{G}{G}{G}{G}{G}{G}{G}{G}", manaOptions);
}
}