[CLB] Implemented Nimblewright Schematic

This commit is contained in:
Evan Kranzler 2022-05-30 10:46:33 -04:00
parent 5ab9ba66ae
commit ca7de23eb5
6 changed files with 65 additions and 25 deletions

View file

@ -2,25 +2,26 @@
package mage.cards.i;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
import mage.abilities.common.EntersBattlefieldOrDiesSourceTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import java.util.UUID;
/**
* @author ayratn
*/
public final class IchorWellspring extends CardImpl {
public IchorWellspring(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
// When Ichor Wellspring enters the battlefield or is put into a graveyard from the battlefield, draw a card.
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new DrawCardSourceControllerEffect(1)));
this.addAbility(new EntersBattlefieldOrDiesSourceTriggeredAbility(
new DrawCardSourceControllerEffect(1), false, false
));
}
private IchorWellspring(final IchorWellspring card) {

View file

@ -1,8 +1,7 @@
package mage.cards.m;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.EntersBattlefieldOrDiesSourceTriggeredAbility;
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -13,18 +12,18 @@ import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/**
*
* @author North
*/
public final class MycosynthWellspring extends CardImpl {
public MycosynthWellspring(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
// When Mycosynth Wellspring enters the battlefield or is put into a graveyard from the battlefield,
// you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, true), true));
this.addAbility(new DiesSourceTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, true), true));
this.addAbility(new EntersBattlefieldOrDiesSourceTriggeredAbility(new SearchLibraryPutInHandEffect(
new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, true
), true, false));
}
private MycosynthWellspring(final MycosynthWellspring card) {

View file

@ -0,0 +1,34 @@
package mage.cards.n;
import mage.abilities.common.EntersBattlefieldOrDiesSourceTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.permanent.token.ConstructToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class NimblewrightSchematic extends CardImpl {
public NimblewrightSchematic(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
// When Nimblewright Schematic enters the battlefield or is put into a graveyard from the battlefield, create a 1/1 colorless Construct artifact creature token.
this.addAbility(new EntersBattlefieldOrDiesSourceTriggeredAbility(
new CreateTokenEffect(new ConstructToken()), false, false
));
}
private NimblewrightSchematic(final NimblewrightSchematic card) {
super(card);
}
@Override
public NimblewrightSchematic copy() {
return new NimblewrightSchematic(this);
}
}

View file

@ -1,17 +1,16 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility;
import mage.abilities.common.EntersBattlefieldOrDiesSourceTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.game.permanent.token.ServoToken;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public final class ServoSchematic extends CardImpl {
@ -20,8 +19,9 @@ public final class ServoSchematic extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
// When Servo Schematic enters the battlefield or is put into a graveyard from the battlefield, create a 1/1 colorless Servo artifact creature token.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new ServoToken())));
this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new CreateTokenEffect(new ServoToken())));
this.addAbility(new EntersBattlefieldOrDiesSourceTriggeredAbility(
new CreateTokenEffect(new ServoToken()), false, false
));
}
private ServoSchematic(final ServoSchematic card) {

View file

@ -191,6 +191,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
cards.add(new SetCardInfo("Navigation Orb", 329, Rarity.COMMON, mage.cards.n.NavigationOrb.class));
cards.add(new SetCardInfo("Nemesis Phoenix", 189, Rarity.UNCOMMON, mage.cards.n.NemesisPhoenix.class));
cards.add(new SetCardInfo("Nimbleclaw Adept", 86, Rarity.COMMON, mage.cards.n.NimbleclawAdept.class));
cards.add(new SetCardInfo("Nimblewright Schematic", 330, Rarity.COMMON, mage.cards.n.NimblewrightSchematic.class));
cards.add(new SetCardInfo("Nine-Fingers Keene", 289, Rarity.RARE, mage.cards.n.NineFingersKeene.class));
cards.add(new SetCardInfo("Noble's Purse", 331, Rarity.UNCOMMON, mage.cards.n.NoblesPurse.class));
cards.add(new SetCardInfo("Nothic", 138, Rarity.UNCOMMON, mage.cards.n.Nothic.class));

View file

@ -1,5 +1,3 @@
package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl;
@ -7,23 +5,28 @@ import mage.abilities.effects.Effect;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.events.ZoneChangeEvent;
/**
*
* @author LevelX2
*/
public class EntersBattlefieldOrDiesSourceTriggeredAbility extends TriggeredAbilityImpl {
private final boolean diesText;
public EntersBattlefieldOrDiesSourceTriggeredAbility(Effect effect, boolean optional) {
this(effect, optional, true);
}
public EntersBattlefieldOrDiesSourceTriggeredAbility(Effect effect, boolean optional, boolean diesText) {
super(Zone.BATTLEFIELD, effect, optional);
this.diesText = diesText;
setLeavesTheBattlefieldTrigger(true);
}
public EntersBattlefieldOrDiesSourceTriggeredAbility(final EntersBattlefieldOrDiesSourceTriggeredAbility ability) {
super(ability);
this.diesText = ability.diesText;
}
@Override
@ -33,7 +36,8 @@ public class EntersBattlefieldOrDiesSourceTriggeredAbility extends TriggeredAbil
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD || event.getType() == GameEvent.EventType.ZONE_CHANGE ;
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD
|| event.getType() == GameEvent.EventType.ZONE_CHANGE;
}
@Override
@ -53,6 +57,7 @@ public class EntersBattlefieldOrDiesSourceTriggeredAbility extends TriggeredAbil
@Override
public String getTriggerPhrase() {
return "When {this} enters the battlefield or dies, " ;
return "When {this} enters the battlefield or " +
(diesText ? "dies" : "is put into a graveyard from the battlefield") + ", ";
}
}