mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[SPM] implement Sandman's Quicksand
This commit is contained in:
parent
411e25661a
commit
43d315861d
3 changed files with 136 additions and 0 deletions
54
Mage.Sets/src/mage/cards/s/SandmansQuicksand.java
Normal file
54
Mage.Sets/src/mage/cards/s/SandmansQuicksand.java
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
package mage.cards.s;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||||
|
import mage.abilities.keyword.MayhemAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.common.FilterCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jmlundeen
|
||||||
|
*/
|
||||||
|
public final class SandmansQuicksand extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures your opponents control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(TargetController.OPPONENT.getControllerPredicate());
|
||||||
|
}
|
||||||
|
|
||||||
|
public SandmansQuicksand(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
|
||||||
|
|
||||||
|
|
||||||
|
// Mayhem {3}{B}
|
||||||
|
Ability mayhem = new MayhemAbility(this, "{3}{B}");
|
||||||
|
mayhem.addEffect(new BoostAllEffect(-2, -2, Duration.EndOfTurn, filter, false));
|
||||||
|
this.addAbility(mayhem);
|
||||||
|
|
||||||
|
// All creatures get -2/-2 until end of turn. If this spell's mayhem cost was paid, creatures your opponents control get -2/-2 until end of turn instead.
|
||||||
|
ContinuousEffect effect = new BoostAllEffect(-2, -2, Duration.EndOfTurn);
|
||||||
|
effect.setText("All creatures get -2/-2 until end of turn. If this spell's mayhem cost was paid, " +
|
||||||
|
"creatures your opponents control get -2/-2 until end of turn instead"
|
||||||
|
);
|
||||||
|
this.getSpellAbility().addEffect(effect);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private SandmansQuicksand(final SandmansQuicksand card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SandmansQuicksand copy() {
|
||||||
|
return new SandmansQuicksand(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -164,6 +164,7 @@ public final class MarvelsSpiderMan extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Robotics Mastery", 41, Rarity.UNCOMMON, mage.cards.r.RoboticsMastery.class));
|
cards.add(new SetCardInfo("Robotics Mastery", 41, Rarity.UNCOMMON, mage.cards.r.RoboticsMastery.class));
|
||||||
cards.add(new SetCardInfo("Rocket-Powered Goblin Glider", 172, Rarity.RARE, mage.cards.r.RocketPoweredGoblinGlider.class));
|
cards.add(new SetCardInfo("Rocket-Powered Goblin Glider", 172, Rarity.RARE, mage.cards.r.RocketPoweredGoblinGlider.class));
|
||||||
cards.add(new SetCardInfo("Romantic Rendezvous", 86, Rarity.COMMON, mage.cards.r.RomanticRendezvous.class));
|
cards.add(new SetCardInfo("Romantic Rendezvous", 86, Rarity.COMMON, mage.cards.r.RomanticRendezvous.class));
|
||||||
|
cards.add(new SetCardInfo("Sandman's Quicksand", 63, Rarity.UNCOMMON, mage.cards.s.SandmansQuicksand.class));
|
||||||
cards.add(new SetCardInfo("Sandman, Shifting Scoundrel", 112, Rarity.RARE, mage.cards.s.SandmanShiftingScoundrel.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Sandman, Shifting Scoundrel", 112, Rarity.RARE, mage.cards.s.SandmanShiftingScoundrel.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Sandman, Shifting Scoundrel", 266, Rarity.RARE, mage.cards.s.SandmanShiftingScoundrel.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Sandman, Shifting Scoundrel", 266, Rarity.RARE, mage.cards.s.SandmanShiftingScoundrel.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Scarlet Spider, Kaine", 143, Rarity.UNCOMMON, mage.cards.s.ScarletSpiderKaine.class));
|
cards.add(new SetCardInfo("Scarlet Spider, Kaine", 143, Rarity.UNCOMMON, mage.cards.s.ScarletSpiderKaine.class));
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
package org.mage.test.cards.single.spm;
|
||||||
|
|
||||||
|
import mage.constants.PhaseStep;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Jmlundeen
|
||||||
|
*/
|
||||||
|
public class SandmansQuicksandTest extends CardTestPlayerBase {
|
||||||
|
|
||||||
|
/*
|
||||||
|
Sandman's Quicksand
|
||||||
|
{1}{B}{B}
|
||||||
|
Sorcery
|
||||||
|
Mayhem {3}{B}
|
||||||
|
All creatures get -2/-2 until end of turn. If this spell's mayhem cost was paid, creatures your opponents control get -2/-2 until end of turn instead.
|
||||||
|
*/
|
||||||
|
private static final String sandmansQuicksand = "Sandman's Quicksand";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Bear Cub
|
||||||
|
{1}{G}
|
||||||
|
Creature - Bear
|
||||||
|
|
||||||
|
2/2
|
||||||
|
*/
|
||||||
|
private static final String bearCub = "Bear Cub";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Thought Courier
|
||||||
|
{1}{U}
|
||||||
|
Creature - Human Wizard
|
||||||
|
{tap}: Draw a card, then discard a card.
|
||||||
|
1/1
|
||||||
|
*/
|
||||||
|
private static final String thoughtCourier = "Thought Courier";
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSandmansQuicksand() {
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
|
addCard(Zone.HAND, playerA, sandmansQuicksand);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, bearCub);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, bearCub);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 3);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, sandmansQuicksand);
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerA, bearCub, 1);
|
||||||
|
assertGraveyardCount(playerB, bearCub, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSandmansQuicksandMayhem() {
|
||||||
|
setStrictChooseMode(true);
|
||||||
|
|
||||||
|
addCard(Zone.HAND, playerA, sandmansQuicksand);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, bearCub);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, thoughtCourier);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerB, bearCub);
|
||||||
|
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
|
||||||
|
|
||||||
|
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Draw");
|
||||||
|
setChoice(playerA, sandmansQuicksand);
|
||||||
|
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN);
|
||||||
|
|
||||||
|
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, sandmansQuicksand + " with Mayhem");
|
||||||
|
|
||||||
|
setStopAt(1, PhaseStep.END_TURN);
|
||||||
|
execute();
|
||||||
|
|
||||||
|
assertGraveyardCount(playerA, bearCub, 0);
|
||||||
|
assertGraveyardCount(playerB, bearCub, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue