Implemented Silversmote Ghoul

This commit is contained in:
Evan Kranzler 2020-06-12 20:20:00 -04:00
parent 21e8c6427b
commit 3a7e60de63
5 changed files with 90 additions and 13 deletions

View file

@ -5,6 +5,8 @@ import mage.abilities.condition.Condition;
import mage.abilities.condition.common.YouGainedLifeCondition; import mage.abilities.condition.common.YouGainedLifeCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -21,6 +23,7 @@ import java.util.UUID;
public final class GriffinAerie extends CardImpl { public final class GriffinAerie extends CardImpl {
private static final Condition condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2); private static final Condition condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2);
private static final Hint hint = new ConditionHint(condition, "You gained 3 or more life this turn");
public GriffinAerie(UUID ownerId, CardSetInfo setInfo) { public GriffinAerie(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
@ -31,7 +34,7 @@ public final class GriffinAerie extends CardImpl {
new CreateTokenEffect(new GriffinToken()), TargetController.YOU, false new CreateTokenEffect(new GriffinToken()), TargetController.YOU, false
), condition, "At the beginning of your end step, " + ), condition, "At the beginning of your end step, " +
"if you gained 3 or more life this turn, create a 2/2 white Griffin creature token with flying." "if you gained 3 or more life this turn, create a 2/2 white Griffin creature token with flying."
), new PlayerGainedLifeWatcher()); ).addHint(hint), new PlayerGainedLifeWatcher());
} }
private GriffinAerie(final GriffinAerie card) { private GriffinAerie(final GriffinAerie card) {

View file

@ -6,6 +6,8 @@ import mage.abilities.condition.Condition;
import mage.abilities.condition.common.YouGainedLifeCondition; import mage.abilities.condition.common.YouGainedLifeCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.LoseLifeOpponentsEffect; import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -24,6 +26,7 @@ import java.util.UUID;
public final class IndulgingPatrician extends CardImpl { public final class IndulgingPatrician extends CardImpl {
private static final Condition condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2); private static final Condition condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2);
private static final Hint hint = new ConditionHint(condition, "You gained 3 or more life this turn");
public IndulgingPatrician(UUID ownerId, CardSetInfo setInfo) { public IndulgingPatrician(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{B}");
@ -45,7 +48,7 @@ public final class IndulgingPatrician extends CardImpl {
new LoseLifeOpponentsEffect(3), TargetController.YOU, false new LoseLifeOpponentsEffect(3), TargetController.YOU, false
), condition, "At the beginning of your end step, " + ), condition, "At the beginning of your end step, " +
"if you gained 3 or more life this turn, each opponent loses 3 life." "if you gained 3 or more life this turn, each opponent loses 3 life."
), new PlayerGainedLifeWatcher()); ).addHint(hint), new PlayerGainedLifeWatcher());
} }
private IndulgingPatrician(final IndulgingPatrician card) { private IndulgingPatrician(final IndulgingPatrician card) {

View file

@ -1,31 +1,34 @@
package mage.cards.l; package mage.cards.l;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbility; import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.condition.Condition;
import mage.abilities.condition.common.YouGainedLifeCondition; import mage.abilities.condition.common.YouGainedLifeCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.LifelinkAbility;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ComparisonType; import mage.constants.ComparisonType;
import mage.game.events.GameEvent; import mage.constants.SubType;
import mage.constants.TargetController;
import mage.watchers.common.PlayerGainedLifeWatcher; import mage.watchers.common.PlayerGainedLifeWatcher;
import java.util.UUID;
/** /**
* @author fireshoes * @author fireshoes
*/ */
public final class LoneRider extends CardImpl { public final class LoneRider extends CardImpl {
private static final String ruleText = "At the beginning of the end step, if you gained 3 or more life this turn, transform {this}"; private static final String ruleText = "At the beginning of the end step, if you gained 3 or more life this turn, transform {this}";
private static final Condition condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2);
private static final Hint hint = new ConditionHint(condition, "You gained 3 or more life this turn");
public LoneRider(UUID ownerId, CardSetInfo setInfo) { public LoneRider(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
@ -45,11 +48,14 @@ public final class LoneRider extends CardImpl {
// At the beginning of the end step, if you gained 3 or more life this turn, transform Lone Rider. // At the beginning of the end step, if you gained 3 or more life this turn, transform Lone Rider.
this.addAbility(new TransformAbility()); this.addAbility(new TransformAbility());
TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new TransformSourceEffect(true)); this.addAbility(new ConditionalInterveningIfTriggeredAbility(
this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2), ruleText), new PlayerGainedLifeWatcher()); new BeginningOfEndStepTriggeredAbility(
new TransformSourceEffect(true), TargetController.NEXT, false
), condition, ruleText
), new PlayerGainedLifeWatcher());
} }
public LoneRider(final LoneRider card) { private LoneRider(final LoneRider card) {
super(card); super(card);
} }

View file

@ -0,0 +1,64 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.YouGainedLifeCondition;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
import mage.abilities.hint.ConditionHint;
import mage.abilities.hint.Hint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.watchers.common.PlayerGainedLifeWatcher;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SilversmoteGhoul extends CardImpl {
private static final Condition condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2);
private static final Hint hint = new ConditionHint(condition, "You gained 3 or more life this turn");
public SilversmoteGhoul(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.subtype.add(SubType.ZOMBIE);
this.subtype.add(SubType.VAMPIRE);
this.power = new MageInt(3);
this.toughness = new MageInt(1);
// At the beginning of your end step, if you gained 3 or more life this turn, return Silversmote Ghoul from your graveyard to the battlefield tapped.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfEndStepTriggeredAbility(
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true),
TargetController.YOU, null, false
), condition, "At the beginning of your end step, " +
"if you gained 3 or more life this turn, return {this} from your graveyard to the battlefield tapped."
).addHint(hint), new PlayerGainedLifeWatcher());
// {1}{B}, Sacrifice Silversmote Ghoul: Draw a card.
Ability ability = new SimpleActivatedAbility(
new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{1}{B}")
);
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}
private SilversmoteGhoul(final SilversmoteGhoul card) {
super(card);
}
@Override
public SilversmoteGhoul copy() {
return new SilversmoteGhoul(this);
}
}

View file

@ -139,6 +139,7 @@ public final class CoreSet2021 extends ExpansionSet {
cards.add(new SetCardInfo("Shipwreck Dowser", 71, Rarity.UNCOMMON, mage.cards.s.ShipwreckDowser.class)); cards.add(new SetCardInfo("Shipwreck Dowser", 71, Rarity.UNCOMMON, mage.cards.s.ShipwreckDowser.class));
cards.add(new SetCardInfo("Siege Striker", 37, Rarity.UNCOMMON, mage.cards.s.SiegeStriker.class)); cards.add(new SetCardInfo("Siege Striker", 37, Rarity.UNCOMMON, mage.cards.s.SiegeStriker.class));
cards.add(new SetCardInfo("Sigiled Contender", 323, Rarity.UNCOMMON, mage.cards.s.SigiledContender.class)); cards.add(new SetCardInfo("Sigiled Contender", 323, Rarity.UNCOMMON, mage.cards.s.SigiledContender.class));
cards.add(new SetCardInfo("Silversmote Ghoul", 122, Rarity.UNCOMMON, mage.cards.s.SilversmoteGhoul.class));
cards.add(new SetCardInfo("Solemn Simulacrum", 239, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class)); cards.add(new SetCardInfo("Solemn Simulacrum", 239, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class));
cards.add(new SetCardInfo("Soul Sear", 160, Rarity.UNCOMMON, mage.cards.s.SoulSear.class)); cards.add(new SetCardInfo("Soul Sear", 160, Rarity.UNCOMMON, mage.cards.s.SoulSear.class));
cards.add(new SetCardInfo("Sparkhunter Masticore", 240, Rarity.RARE, mage.cards.s.SparkhunterMasticore.class)); cards.add(new SetCardInfo("Sparkhunter Masticore", 240, Rarity.RARE, mage.cards.s.SparkhunterMasticore.class));