mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
parent
41c5076755
commit
89f5e84ba7
2 changed files with 45 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.TargetPlayer;
|
import mage.target.TargetPlayer;
|
||||||
|
|
@ -42,7 +43,8 @@ public final class ElectroAssaultingBattery extends CardImpl {
|
||||||
this.addAbility(new SimpleStaticAbility(new YouDontLoseManaEffect(ManaType.RED)));
|
this.addAbility(new SimpleStaticAbility(new YouDontLoseManaEffect(ManaType.RED)));
|
||||||
|
|
||||||
// Whenever you cast an instant or sorcery spell, add {R}.
|
// Whenever you cast an instant or sorcery spell, add {R}.
|
||||||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.RedMana(1)), false));
|
this.addAbility(new SpellCastControllerTriggeredAbility(new AddManaToManaPoolSourceControllerEffect(Mana.RedMana(1)),
|
||||||
|
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false));
|
||||||
|
|
||||||
// When Electro leaves the battlefield, you may pay x. When you do, he deals X damage to target player.
|
// When Electro leaves the battlefield, you may pay x. When you do, he deals X damage to target player.
|
||||||
this.addAbility(new LeavesBattlefieldTriggeredAbility(new ElectroAssaultingBatteryEffect()));
|
this.addAbility(new LeavesBattlefieldTriggeredAbility(new ElectroAssaultingBatteryEffect()));
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
package org.mage.test.cards.single.spm;
|
package org.mage.test.cards.single.spm;
|
||||||
|
|
||||||
|
import mage.constants.ManaType;
|
||||||
import mage.constants.PhaseStep;
|
import mage.constants.PhaseStep;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.mage.test.player.TestPlayer;
|
||||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -39,6 +41,16 @@ public class ElectroAssaultingBatteryTest extends CardTestPlayerBase {
|
||||||
*/
|
*/
|
||||||
private static final String lightningBolt = "Lightning Bolt";
|
private static final String lightningBolt = "Lightning Bolt";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Final Showdown
|
||||||
|
{W}
|
||||||
|
Instant
|
||||||
|
Spree
|
||||||
|
+ {1} -- All creatures lose all abilities until end of turn.
|
||||||
|
+ {1} -- Choose a creature you control. It gains indestructible until end of turn.
|
||||||
|
+ {3}{W}{W} -- Destroy all creatures.
|
||||||
|
*/
|
||||||
|
private static final String finalShowdown = "Final Showdown";
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testElectroAssaultingBattery() {
|
public void testElectroAssaultingBattery() {
|
||||||
|
|
@ -62,4 +74,34 @@ public class ElectroAssaultingBatteryTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
assertLife(playerB, 20 - 4);
|
assertLife(playerB, 20 - 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testElectroAssaultingBatteryFinalShowdown() {
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, electroAssaultingBattery);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Mountain");
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, "Plains", 7);
|
||||||
|
addCard(Zone.HAND, playerB, finalShowdown);
|
||||||
|
addCard(Zone.HAND, playerA, lightningBolt);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, lightningBolt, playerB);
|
||||||
|
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, true);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, finalShowdown);
|
||||||
|
setModeChoice(playerB, "1");
|
||||||
|
setModeChoice(playerB, "3");
|
||||||
|
setModeChoice(playerB, TestPlayer.MODE_SKIP);
|
||||||
|
|
||||||
|
checkManaPool("Should have 1 red mana", 1, PhaseStep.PRECOMBAT_MAIN, playerA, "R", 1);
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerA, lightningBolt, 1);
|
||||||
|
assertGraveyardCount(playerB, finalShowdown, 1);
|
||||||
|
assertGraveyardCount(playerA, electroAssaultingBattery, 1);
|
||||||
|
|
||||||
|
assertManaPool(playerA, ManaType.RED, 0); // Electro's ability is gone
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue