mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
commit
13d915a728
2 changed files with 32 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
||||||
*/
|
*/
|
||||||
package mage.sets.shadowsoverinnistrad;
|
package mage.sets.shadowsoverinnistrad;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
@ -108,7 +109,12 @@ class TheGitrogMonsterTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event;
|
ZoneChangeGroupEvent zEvent = (ZoneChangeGroupEvent) event;
|
||||||
if (Zone.GRAVEYARD == zEvent.getToZone()) {
|
if (Zone.GRAVEYARD == zEvent.getToZone()) {
|
||||||
for (Card card : zEvent.getCards()) {
|
for (Card card : zEvent.getCards()) {
|
||||||
if (card.getOwnerId().equals(getControllerId()) && card.getCardType().contains(CardType.LAND)) {
|
UUID cardOwnerId = card.getOwnerId();
|
||||||
|
List<CardType> cardType = card.getCardType();
|
||||||
|
if(cardOwnerId != null
|
||||||
|
&& card.getOwnerId().equals(getControllerId())
|
||||||
|
&& cardType != null
|
||||||
|
&& cardType.contains(CardType.LAND)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,4 +70,29 @@ public class TheGitrogMonsterTest extends CardTestPlayerBase {
|
||||||
assertPermanentCount(playerA, "The Gitrog Monster", 1);
|
assertPermanentCount(playerA, "The Gitrog Monster", 1);
|
||||||
assertHandCount(playerA, 2); // 1 for turn, 1 more for land sacrificed
|
assertHandCount(playerA, 2); // 1 for turn, 1 more for land sacrificed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Basic sacrifice test when there is a land
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void boardSweeperWithTokens() {
|
||||||
|
|
||||||
|
addCard(Zone.HAND, playerA, "The Gitrog Monster", 1);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Forest", 2);
|
||||||
|
|
||||||
|
addCard(Zone.HAND, playerB, "Planar Outburst", 1); // destroy all non-land creatures
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 7);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Archangel of Tithes", 1);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "The Gitrog Monster");
|
||||||
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Raise the Alarm");
|
||||||
|
castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Planar Outburst");
|
||||||
|
|
||||||
|
setStopAt(3, PhaseStep.DRAW);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertPermanentCount(playerA, "The Gitrog Monster", 0);
|
||||||
|
assertPermanentCount(playerB, "Planar Outburst", 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue