forked from External/mage
implement [PIP] Screeching Scorchbeast
This commit is contained in:
parent
7c3bbed8f3
commit
53898eeb8b
4 changed files with 194 additions and 0 deletions
62
Mage.Sets/src/mage/cards/s/ScreechingScorchbeast.java
Normal file
62
Mage.Sets/src/mage/cards/s/ScreechingScorchbeast.java
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.common.OneOrMoreMilledTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.SavedMilledValue;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersPlayersEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.ZombieMutantToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class ScreechingScorchbeast extends CardImpl {
|
||||
|
||||
public ScreechingScorchbeast(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}");
|
||||
|
||||
this.subtype.add(SubType.BAT);
|
||||
this.subtype.add(SubType.MUTANT);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Menace
|
||||
this.addAbility(new MenaceAbility());
|
||||
|
||||
// Whenever Screeching Scorchbeast attacks, each player gets two rad counters.
|
||||
this.addAbility(new AttacksTriggeredAbility(
|
||||
new AddCountersPlayersEffect(CounterType.RAD.createInstance(2), TargetController.EACH_PLAYER)
|
||||
));
|
||||
|
||||
// Whenever one or more nonland cards are milled, you may create that many 2/2 black Zombie Mutant creature tokens. Do this only once each turn.
|
||||
this.addAbility(new OneOrMoreMilledTriggeredAbility(
|
||||
StaticFilters.FILTER_CARDS_NON_LAND,
|
||||
new CreateTokenEffect(new ZombieMutantToken(), SavedMilledValue.MANY),
|
||||
true
|
||||
).setDoOnlyOnceEachTurn(true));
|
||||
}
|
||||
|
||||
private ScreechingScorchbeast(final ScreechingScorchbeast card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScreechingScorchbeast copy() {
|
||||
return new ScreechingScorchbeast(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -269,6 +269,7 @@ public final class Fallout extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Ruthless Radrat", 48, Rarity.UNCOMMON, mage.cards.r.RuthlessRadrat.class));
|
||||
cards.add(new SetCardInfo("Scattered Groves", 286, Rarity.RARE, mage.cards.s.ScatteredGroves.class));
|
||||
cards.add(new SetCardInfo("Scavenger Grounds", 287, Rarity.RARE, mage.cards.s.ScavengerGrounds.class));
|
||||
cards.add(new SetCardInfo("Screeching Scorchbeast", 49, Rarity.RARE, mage.cards.s.ScreechingScorchbeast.class));
|
||||
cards.add(new SetCardInfo("Secure the Wastes", 171, Rarity.RARE, mage.cards.s.SecureTheWastes.class));
|
||||
cards.add(new SetCardInfo("Securitron Squadron", 23, Rarity.RARE, mage.cards.s.SecuritronSquadron.class));
|
||||
cards.add(new SetCardInfo("Sentry Bot", 24, Rarity.RARE, mage.cards.s.SentryBot.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,101 @@
|
|||
package org.mage.test.cards.single.pip;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class ScreechingScorchbeastTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.s.ScreechingScorchbeast Screeching Scorchbeast} {4}{B}{B}
|
||||
* Creature — Bat Mutant
|
||||
* Flying, menace
|
||||
* Whenever Screeching Scorchbeast attacks, each player gets two rad counters.
|
||||
* Whenever one or more nonland cards are milled, you may create that many 2/2 black Zombie Mutant creature tokens. Do this only once each turn.
|
||||
* 5/5
|
||||
*/
|
||||
private static final String beast = "Screeching Scorchbeast";
|
||||
|
||||
@Test
|
||||
public void test_Trigger_3NonLand_1Land() {
|
||||
setStrictChooseMode(true);
|
||||
skipInitShuffling();
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, beast);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Whetstone"); // {3}: Each player mills two cards.
|
||||
addCard(Zone.LIBRARY, playerA, "Taiga", 3);
|
||||
addCard(Zone.LIBRARY, playerA, "Baneslayer Angel", 1);
|
||||
addCard(Zone.LIBRARY, playerB, "Memnite", 4);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}");
|
||||
setChoice(playerA, true); // Yes to first trigger.
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}");
|
||||
// The second mill does not trigger the Scrochbeast due to "Do this once each turn"
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Taiga", 3);
|
||||
assertGraveyardCount(playerA, "Baneslayer Angel", 1);
|
||||
assertGraveyardCount(playerB, "Memnite", 4);
|
||||
assertPermanentCount(playerA, "Zombie Mutant Token", 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_Trigger_No_ThenYes() {
|
||||
setStrictChooseMode(true);
|
||||
skipInitShuffling();
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, beast);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 6);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Whetstone"); // : Each player mills two cards.
|
||||
addCard(Zone.LIBRARY, playerA, "Taiga", 3);
|
||||
addCard(Zone.LIBRARY, playerA, "Baneslayer Angel", 1);
|
||||
addCard(Zone.LIBRARY, playerB, "Memnite", 4);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}");
|
||||
setChoice(playerA, false); // No to first trigger. 3 nonlands
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, playerA);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}");
|
||||
setChoice(playerA, true); // Yes to second trigger. 2 nonlands
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Taiga", 3);
|
||||
assertGraveyardCount(playerA, "Baneslayer Angel", 1);
|
||||
assertGraveyardCount(playerB, "Memnite", 4);
|
||||
assertPermanentCount(playerA, "Zombie Mutant Token", 2);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_NoTrigger_AllLands() {
|
||||
setStrictChooseMode(true);
|
||||
skipInitShuffling();
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, beast);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Island", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Whetstone"); // {3}: Each player mills two cards.
|
||||
addCard(Zone.LIBRARY, playerA, "Taiga", 2);
|
||||
addCard(Zone.LIBRARY, playerA, "Taiga", 2);
|
||||
|
||||
activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}");
|
||||
// no trigger, no choice.
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, 2);
|
||||
assertGraveyardCount(playerB, 2);
|
||||
assertPermanentCount(playerA, "Zombie Mutant Token", 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class ZombieMutantToken extends TokenImpl {
|
||||
|
||||
public ZombieMutantToken() {
|
||||
super("Zombie Mutant Token", "2/2 black Zombie Mutant creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
subtype.add(SubType.ZOMBIE);
|
||||
subtype.add(SubType.MUTANT);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
}
|
||||
|
||||
private ZombieMutantToken(final ZombieMutantToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZombieMutantToken copy() {
|
||||
return new ZombieMutantToken(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue