forked from External/mage
implement [MH3] Marionette Apprentice
This commit is contained in:
parent
c73c9fd22a
commit
c9b5d5ad98
4 changed files with 112 additions and 6 deletions
56
Mage.Sets/src/mage/cards/m/MarionetteApprentice.java
Normal file
56
Mage.Sets/src/mage/cards/m/MarionetteApprentice.java
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||
import mage.abilities.keyword.FabricateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class MarionetteApprentice extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent("another creature or artifact you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(Predicates.or(CardType.CREATURE.getPredicate(), CardType.ARTIFACT.getPredicate()));
|
||||
}
|
||||
|
||||
public MarionetteApprentice(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ARTIFICER);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Fabricate 1
|
||||
this.addAbility(new FabricateAbility(1));
|
||||
|
||||
// Whenever another creature or artifact you control is put into a graveyard from the battlefield, each opponent loses 1 life.
|
||||
this.addAbility(new PutIntoGraveFromBattlefieldAllTriggeredAbility(
|
||||
new LoseLifeOpponentsEffect(1), false,
|
||||
filter, false
|
||||
));
|
||||
}
|
||||
|
||||
private MarionetteApprentice(final MarionetteApprentice card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MarionetteApprentice copy() {
|
||||
return new MarionetteApprentice(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +1,29 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.abilities.keyword.FabricateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class MarionetteMaster extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledArtifactPermanent("an artifact you control");
|
||||
|
||||
public MarionetteMaster(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
|
@ -33,9 +35,11 @@ public final class MarionetteMaster extends CardImpl {
|
|||
this.addAbility(new FabricateAbility(3));
|
||||
|
||||
// Whenever an artifact you control is put into a graveyard from the battlefield, target opponent loses life equal to Marionette Master's power.
|
||||
Effect effect = new LoseLifeTargetEffect(new SourcePermanentPowerCount(false));
|
||||
effect.setText("target opponent loses life equal to Marionette Master's power");
|
||||
Ability ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility(effect, false, new FilterControlledArtifactPermanent("an artifact you control"), false);
|
||||
Ability ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility(
|
||||
new LoseLifeTargetEffect(new SourcePermanentPowerCount(false))
|
||||
.setText("target opponent loses life equal to {this}'s power"),
|
||||
false, filter, false
|
||||
);
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public final class ModernHorizons3 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Kozilek's Unsealing", 65, Rarity.UNCOMMON, mage.cards.k.KozileksUnsealing.class));
|
||||
cards.add(new SetCardInfo("Kudo, King Among Bears", 192, Rarity.RARE, mage.cards.k.KudoKingAmongBears.class));
|
||||
cards.add(new SetCardInfo("Laelia, the Blade Reforged", 281, Rarity.RARE, mage.cards.l.LaeliaTheBladeReforged.class));
|
||||
cards.add(new SetCardInfo("Marionette Apprentice", 100, Rarity.UNCOMMON, mage.cards.m.MarionetteApprentice.class));
|
||||
cards.add(new SetCardInfo("Meltdown", 282, Rarity.UNCOMMON, mage.cards.m.Meltdown.class));
|
||||
cards.add(new SetCardInfo("Mogg Mob", 127, Rarity.UNCOMMON, mage.cards.m.MoggMob.class));
|
||||
cards.add(new SetCardInfo("Mountain", 307, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package org.mage.test.cards.single.mh3;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public class MarionetteApprenticeTest extends CardTestPlayerBase {
|
||||
|
||||
/**
|
||||
* {@link mage.cards.m.MarionetteApprentice} {1}{B}
|
||||
* Creature — Human Artificer
|
||||
* Fabricate 1
|
||||
* Whenever another creature or artifact you control is put into a graveyard from the battlefield, each opponent loses 1 life.
|
||||
*/
|
||||
private static final String apprentice = "Marionette Apprentice";
|
||||
|
||||
@Test
|
||||
public void test_Trigger() {
|
||||
setStrictChooseMode(true);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerA, apprentice);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Grizzly Bears", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Grizzly Bears", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mox Ruby", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Mox Ruby", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Sylvan Library", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Sylvan Library", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Plains", 6);
|
||||
addCard(Zone.HAND, playerA, "Akroma's Vengeance"); // Destroy all artifacts, creatures, and enchantments.
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Akroma's Vengeance");
|
||||
setChoice(playerA, "Whenever", 3); // stack triggers, there are 4 total.
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, 8);
|
||||
assertGraveyardCount(playerB, 6);
|
||||
assertLife(playerB, 20 - 4);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue