diff --git a/Mage.Sets/src/mage/cards/h/HourOfRevelation.java b/Mage.Sets/src/mage/cards/h/HourOfRevelation.java index bdbed620dfe..f2b229f4a83 100644 --- a/Mage.Sets/src/mage/cards/h/HourOfRevelation.java +++ b/Mage.Sets/src/mage/cards/h/HourOfRevelation.java @@ -27,7 +27,6 @@ */ package mage.cards.h; -import java.util.UUID; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; import mage.abilities.effects.common.DestroyAllEffect; @@ -39,6 +38,8 @@ import mage.constants.ComparisonType; import mage.constants.Zone; import mage.filter.common.FilterNonlandPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -51,7 +52,7 @@ public class HourOfRevelation extends CardImpl { // Hour of Revelation costs {3} less to cast if there are ten or more nonland permanents on the battlefield. SimpleStaticAbility ability = new SimpleStaticAbility(Zone.STACK, new SpellCostReductionSourceEffect(3, new PermanentsOnTheBattlefieldCondition( - new FilterNonlandPermanent("there are ten or more nonland permanents on the battlefield"), ComparisonType.MORE_THAN, 9))); + new FilterNonlandPermanent("there are ten or more nonland permanents on the battlefield"), ComparisonType.MORE_THAN, 9, false))); ability.setRuleAtTheTop(true); this.addAbility(ability); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/BontusLastReckoningTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/BontusLastReckoningTest.java new file mode 100644 index 00000000000..2846c501740 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/BontusLastReckoningTest.java @@ -0,0 +1,33 @@ +package org.mage.test.cards.single.hou; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class BontusLastReckoningTest extends CardTestPlayerBase { + + private String reckoning = "Bontu's Last Reckoning"; + + @Test + public void testDelayedUntap(){ + String pouncer = "Adorned Pouncer"; + String angel = "Angel of Condemnation"; + addCard(Zone.HAND, playerA, reckoning); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 4); + addCard(Zone.BATTLEFIELD, playerA, pouncer); + addCard(Zone.BATTLEFIELD, playerB, angel); + addCard(Zone.BATTLEFIELD, playerB, "Island"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN,playerA, reckoning); + + setStopAt(3, PhaseStep.PRECOMBAT_MAIN); + + execute(); + + assertTappedCount("Swamp", true, 3); + assertTappedCount("Island", false, 1); + assertGraveyardCount(playerA, pouncer, 1); + assertGraveyardCount(playerB, angel, 1); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/ChampionOfWitsTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/ChampionOfWitsTest.java new file mode 100644 index 00000000000..4a6ec08e3e3 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/ChampionOfWitsTest.java @@ -0,0 +1,40 @@ +package org.mage.test.cards.single.hou; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class ChampionOfWitsTest extends CardTestPlayerBase { + + + private final String champion = "Champion of Wits"; + + @Test + public void testEternalize(){ + addCard(Zone.GRAVEYARD, playerA, champion); + addCard(Zone.BATTLEFIELD,playerA, "Island", 10); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA,"Eternalize {5}{U}{U}"); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + + execute(); + assertHandCount(playerA, 2); + } + + @Test + public void testEternalizeWithAnthem(){ + String anthem = "Glorious Anthem"; + addCard(Zone.GRAVEYARD, playerA, champion); + addCard(Zone.BATTLEFIELD,playerA, "Island", 10); + addCard(Zone.BATTLEFIELD, playerA, anthem); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA,"Eternalize {5}{U}{U}"); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + + execute(); + assertHandCount(playerA, 3); + } +} diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/HourOfRevelationTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/HourOfRevelationTest.java new file mode 100644 index 00000000000..2d1f5998d8d --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/hou/HourOfRevelationTest.java @@ -0,0 +1,26 @@ +package org.mage.test.cards.single.hou; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +public class HourOfRevelationTest extends CardTestPlayerBase { + + private final String hour = "Hour of Revelation"; + + @Test + public void testCountAllPlayers() { + addCard(Zone.HAND, playerA, hour, 1); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 6); + addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 5); + addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 5); + + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, hour); + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertTappedCount("Plains", true, 3); + } +}