mirror of
https://github.com/correl/mage.git
synced 2025-01-11 11:05:23 +00:00
* Port Town - Fixed that it did no longer work with basic Plains (fixes #3633).
This commit is contained in:
parent
88a8612b06
commit
a28dc88479
3 changed files with 47 additions and 14 deletions
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.EndOfCombatTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -38,30 +39,23 @@ import mage.filter.predicate.Predicates;
|
|||
import mage.filter.predicate.permanent.BlockedPredicate;
|
||||
import mage.filter.predicate.permanent.BlockingPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author dustinroepsch
|
||||
*/
|
||||
public class HeatStroke extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new BlockedPredicate(), new BlockingPredicate()
|
||||
));
|
||||
filter.add(Predicates.or(new BlockedPredicate(), new BlockingPredicate()));
|
||||
}
|
||||
|
||||
public HeatStroke(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
|
||||
|
||||
// At end of combat, destroy each creature that blocked or was blocked this turn.
|
||||
this.addAbility(
|
||||
new EndOfCombatTriggeredAbility(
|
||||
new DestroyAllEffect(filter).setText("destroy each creature that blocked or was blocked this turn."),
|
||||
false
|
||||
)
|
||||
);
|
||||
this.addAbility(new EndOfCombatTriggeredAbility(new DestroyAllEffect(filter)
|
||||
.setText("destroy each creature that blocked or was blocked this turn"), false));
|
||||
}
|
||||
|
||||
public HeatStroke(final HeatStroke card) {
|
||||
|
@ -73,4 +67,3 @@ public class HeatStroke extends CardImpl {
|
|||
return new HeatStroke(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,12 +51,12 @@ public class PortTown extends CardImpl {
|
|||
private static final FilterCard filter = new FilterCard("a Plains or Island card from your hand");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(new SubtypePredicate(SubType.ISLAND),
|
||||
filter.add(Predicates.or(new SubtypePredicate(SubType.PLAINS),
|
||||
new SubtypePredicate(SubType.ISLAND)));
|
||||
}
|
||||
|
||||
public PortTown(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
// As Port Town enters the battlefield, you may reveal a Plains or Island card from your hand. If you don't, Port Town enters the battlefield tapped.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new TapSourceUnlessPaysEffect(new RevealTargetFromHandCost(new TargetCardInHand(filter))),
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.mage.test.cards.abilities.oneshot.destroy;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class HeatStrokeTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testWithValidTarget() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Heat Stroke");
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Pillarfield Ox");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Pillarfield Ox");
|
||||
|
||||
attack(2, playerB, "Pillarfield Ox");
|
||||
block(2, playerA, "Pillarfield Ox", "Pillarfield Ox");
|
||||
|
||||
setStopAt(2, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Pillarfield Ox", 0);
|
||||
assertPermanentCount(playerB, "Pillarfield Ox", 0);
|
||||
|
||||
assertGraveyardCount(playerA, "Pillarfield Ox", 1);
|
||||
assertGraveyardCount(playerB, "Pillarfield Ox", 1);
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue