mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Merge 98e0530a7e into 96ec1a65c1
This commit is contained in:
commit
89fc5784b6
3 changed files with 136 additions and 0 deletions
63
Mage.Sets/src/mage/cards/t/TakeTheBait.java
Normal file
63
Mage.Sets/src/mage/cards/t/TakeTheBait.java
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.OnOpponentsTurnCondition;
|
||||
import mage.abilities.effects.common.AdditionalCombatPhaseEffect;
|
||||
import mage.abilities.effects.common.PreventAllDamageToAllEffect;
|
||||
import mage.abilities.effects.common.UntapAllEffect;
|
||||
import mage.abilities.effects.common.combat.GoadAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.filter.FilterPlayer;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterPermanentOrPlayer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author matoro
|
||||
*/
|
||||
public final class TakeTheBait extends CardImpl {
|
||||
|
||||
public TakeTheBait(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}{W}");
|
||||
|
||||
// Cast this spell only during an opponent's turn and only during combat.
|
||||
this.addAbility(new CastOnlyDuringPhaseStepSourceAbility(TurnPhase.COMBAT, OnOpponentsTurnCondition.instance));
|
||||
|
||||
// Prevent all combat damage that would be dealt to you and planeswalkers you control this turn.
|
||||
this.getSpellAbility().addEffect(
|
||||
new PreventAllDamageToAllEffect(
|
||||
Duration.EndOfTurn,
|
||||
new FilterPermanentOrPlayer(
|
||||
"you and planeswalkers you control",
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT_PLANESWALKER,
|
||||
new FilterPlayer()
|
||||
),
|
||||
true
|
||||
)
|
||||
);
|
||||
|
||||
// Untap all attacking creatures
|
||||
this.getSpellAbility().addEffect(new UntapAllEffect(StaticFilters.FILTER_ATTACKING_CREATURES));
|
||||
|
||||
// and goad them.
|
||||
this.getSpellAbility().addEffect(new GoadAllEffect(StaticFilters.FILTER_ATTACKING_CREATURES));
|
||||
|
||||
// After this phase, there is an additional combat phase.
|
||||
this.getSpellAbility().addEffect(new AdditionalCombatPhaseEffect());
|
||||
}
|
||||
|
||||
private TakeTheBait(final TakeTheBait card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TakeTheBait copy() {
|
||||
return new TakeTheBait(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -277,6 +277,8 @@ public final class MurdersAtKarlovManorCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Swords to Plowshares", 88, Rarity.UNCOMMON, mage.cards.s.SwordsToPlowshares.class));
|
||||
cards.add(new SetCardInfo("Syr Konrad, the Grim", 141, Rarity.UNCOMMON, mage.cards.s.SyrKonradTheGrim.class));
|
||||
cards.add(new SetCardInfo("Tainted Isle", 300, Rarity.UNCOMMON, mage.cards.t.TaintedIsle.class));
|
||||
cards.add(new SetCardInfo("Take the Bait", 43, Rarity.RARE, mage.cards.t.TakeTheBait.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Take the Bait", 353, Rarity.RARE, mage.cards.t.TakeTheBait.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Talisman of Conviction", 240, Rarity.UNCOMMON, mage.cards.t.TalismanOfConviction.class));
|
||||
cards.add(new SetCardInfo("Talisman of Curiosity", 241, Rarity.UNCOMMON, mage.cards.t.TalismanOfCuriosity.class));
|
||||
cards.add(new SetCardInfo("Talisman of Dominance", 242, Rarity.UNCOMMON, mage.cards.t.TalismanOfDominance.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
package org.mage.test.cards.single.mkc;
|
||||
|
||||
import java.util.Set;
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author matoro
|
||||
*/
|
||||
public class TakeTheBaitTest extends CardTestPlayerBase {
|
||||
|
||||
/*
|
||||
Take the Bait
|
||||
{2}{R}{W}
|
||||
Instant
|
||||
Cast this spell only during an opponent's turn and only during combat.
|
||||
Prevent all combat damage that would be dealt to you and planeswalkers you control this turn. Untap all attacking creatures and goad them. After this phase, there is an additional combat phase.
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void testTakeTheBait() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Balduvian Bears");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears");
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Forest Bear");
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Plains", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Jace, Arcane Strategist");
|
||||
addCard(Zone.HAND, playerB, "Take the Bait");
|
||||
|
||||
attack(1, playerA, "Balduvian Bears", playerB);
|
||||
attack(1, playerA, "Grizzly Bears", "Jace, Arcane Strategist");
|
||||
castSpell(1, PhaseStep.DECLARE_BLOCKERS, playerB, "Take the Bait");
|
||||
|
||||
setStopAt(1, PhaseStep.COMBAT_DAMAGE);
|
||||
execute();
|
||||
|
||||
assertTapped("Balduvian Bears", false);
|
||||
assertTapped("Grizzly Bears", false);
|
||||
assertTapped("Forest Bear", false);
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
assertCounterCount(playerB, "Jace, Arcane Strategist", CounterType.LOYALTY, 4);
|
||||
|
||||
Assert.assertEquals(Set.of(playerB.getId()), getPermanent("Balduvian Bears").getGoadingPlayers());
|
||||
Assert.assertEquals(Set.of(playerB.getId()), getPermanent("Grizzly Bears").getGoadingPlayers());
|
||||
Assert.assertEquals(Set.of(), getPermanent("Forest Bear").getGoadingPlayers());
|
||||
|
||||
addTarget(playerA, playerB); // for Balduvian Bears
|
||||
addTarget(playerA, "Jace, Arcane Strategist"); // for Grizzly Bears
|
||||
setStopAt(1, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertTapped("Balduvian Bears", true);
|
||||
assertTapped("Grizzly Bears", true);
|
||||
assertTapped("Forest Bear", false);
|
||||
assertLife(playerB, 20);
|
||||
assertCounterCount(playerB, "Jace, Arcane Strategist", CounterType.LOYALTY, 4);
|
||||
|
||||
// still goaded
|
||||
Assert.assertEquals(Set.of(playerB.getId()), getPermanent("Balduvian Bears").getGoadingPlayers());
|
||||
Assert.assertEquals(Set.of(playerB.getId()), getPermanent("Grizzly Bears").getGoadingPlayers());
|
||||
Assert.assertEquals(Set.of(), getPermanent("Forest Bear").getGoadingPlayers());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue