mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
* Fixes to test and fix for issue #2816
This commit is contained in:
parent
2cf15830d7
commit
0a1356d40e
5 changed files with 13 additions and 11 deletions
|
@ -41,6 +41,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -60,7 +61,8 @@ public class FlameheartWerewolf extends CardImpl {
|
|||
this.transformable = true;
|
||||
|
||||
// Whenever Flameheart Werewolf blocks or becomes blocked by a creature, Flameheart Werewolf deals 2 damage to that creature.
|
||||
this.addAbility(new BlocksOrBecomesBlockedTriggeredAbility(new DamageTargetEffect(2, true, "that creature"), false));
|
||||
this.addAbility(new BlocksOrBecomesBlockedTriggeredAbility(new DamageTargetEffect(2, true, "that creature"),
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE, false, null, true));
|
||||
|
||||
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Flameheart Werewolf.
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false);
|
||||
|
|
|
@ -37,11 +37,12 @@ import mage.abilities.decorator.ConditionalTriggeredAbility;
|
|||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.f.FlameheartWerewolf;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.f.FlameheartWerewolf;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -61,7 +62,8 @@ public class KessigForgemaster extends CardImpl {
|
|||
this.secondSideCardClazz = FlameheartWerewolf.class;
|
||||
|
||||
// Whenever Kessig Forgemaster blocks or becomes blocked by a creature, Kessig Forgemaster deals 1 damage to that creature.
|
||||
this.addAbility(new BlocksOrBecomesBlockedTriggeredAbility(new DamageTargetEffect(1, true, "that creature"), false));
|
||||
this.addAbility(new BlocksOrBecomesBlockedTriggeredAbility(new DamageTargetEffect(1, true, "that creature"),
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE, false, null, true));
|
||||
|
||||
// At the beginning of each upkeep, if no spells were cast last turn, transform Kessig Forgemaster.
|
||||
this.addAbility(new TransformAbility());
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package org.mage.test.cards.abilities.oneshot.damage;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
@ -48,11 +47,9 @@ public class FlameheartWerewolfTest extends CardTestPlayerBase {
|
|||
|
||||
// Flameheart Werewolf is a 3/2 with:
|
||||
// Whenever Flameheart Werewolf blocks or becomes blocked by a creature, Flameheart Werewolf deals 2 damage to that creature.
|
||||
|
||||
// Kalitas, Traitor of Ghet is a 3/4 with:
|
||||
// Lifelink
|
||||
// If a nontoken creature an opponent controls would die, instead exile that card and put a 2/2 black Zombie creature token onto the battlefield
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Flameheart Werewolf");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Kalitas, Traitor of Ghet");
|
||||
|
||||
|
@ -92,8 +89,8 @@ public class FlameheartWerewolfTest extends CardTestPlayerBase {
|
|||
|
||||
// both 2/2s should die before they had a chance to deal damage
|
||||
// to Flameheart Werewolf
|
||||
assertGraveyardCount(playerA, "Kessig Forgemaster", 0);
|
||||
assertPermanentCount(playerA, "Flameheart Werewolf", 1);
|
||||
assertGraveyardCount(playerA, "Flameheart Werewolf", 0);
|
||||
assertPermanentCount(playerB, "Falkenrath Reaver", 0);
|
||||
assertGraveyardCount(playerB, "Falkenrath Reaver", 1);
|
||||
assertPermanentCount(playerB, "Wind Drake", 0);
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
*/
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.constants.Zone;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -48,7 +48,7 @@ public class BlocksOrBecomesBlockedTriggeredAbility extends TriggeredAbilityImpl
|
|||
protected boolean setTargetPointer;
|
||||
|
||||
public BlocksOrBecomesBlockedTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(effect, new FilterCreaturePermanent(), optional, null, true);
|
||||
this(effect, StaticFilters.FILTER_PERMANENT_CREATURE, optional, null, false);
|
||||
}
|
||||
|
||||
public BlocksOrBecomesBlockedTriggeredAbility(Effect effect, FilterPermanent filter, boolean optional) {
|
||||
|
|
|
@ -32,6 +32,7 @@ public class StaticFilters {
|
|||
public static final FilterNonlandCard FILTER_CARD_NON_LAND = new FilterNonlandCard();
|
||||
public static final FilterCard FILTER_CARD_ARTIFACT_OR_CREATURE = new FilterCard("artifact or creature card");
|
||||
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE = new FilterCreaturePermanent();
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent("Goblin", "Goblin creatures");
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent("Sliver", "Sliver creatures");
|
||||
|
||||
|
|
Loading…
Reference in a new issue