diff --git a/Mage.Sets/src/mage/cards/l/LoreholdCommand.java b/Mage.Sets/src/mage/cards/l/LoreholdCommand.java new file mode 100644 index 0000000000..56a333d42e --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LoreholdCommand.java @@ -0,0 +1,109 @@ +package mage.cards.l; + +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.SacrificeControllerEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.SpiritRedWhiteToken; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.target.common.TargetAnyTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class LoreholdCommand extends CardImpl { + + public LoreholdCommand(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}{W}"); + + // Choose two — + this.getSpellAbility().getModes().setMinModes(2); + this.getSpellAbility().getModes().setMaxModes(2); + + // • Create a 3/2 red and white Spirit creature token. + this.getSpellAbility().addEffect(new CreateTokenEffect(new SpiritRedWhiteToken())); + + // • Creatures you control get +1/+0 and gain indestructible and haste until end of turn. + Mode mode = new Mode(new BoostControlledEffect( + 1, 0, Duration.EndOfTurn + ).setText("creatures you control get +1/+0")); + mode.addEffect(new GainAbilityControlledEffect( + IndestructibleAbility.getInstance(), Duration.EndOfTurn + ).setText("and gain indestructible")); + mode.addEffect(new GainAbilityControlledEffect( + HasteAbility.getInstance(), Duration.EndOfTurn + ).setText("and haste until end of turn")); + this.getSpellAbility().addMode(mode); + + // • Lorehold Command deals 3 damage to any target. Target player gains 3 life. + mode = new Mode(new LoreholdCommandEffect()); + mode.addTarget(new TargetAnyTarget().withChooseHint("To deal damage")); + mode.addTarget(new TargetPlayer().withChooseHint("To gain life")); + this.getSpellAbility().addMode(mode); + + // • Sacrifice a permanent, then draw two cards. + mode = new Mode(new SacrificeControllerEffect(StaticFilters.FILTER_PERMANENT, 1, "")); + mode.addEffect(new DrawCardSourceControllerEffect(2).concatBy(", then")); + this.getSpellAbility().addMode(mode); + } + + private LoreholdCommand(final LoreholdCommand card) { + super(card); + } + + @Override + public LoreholdCommand copy() { + return new LoreholdCommand(this); + } +} + +class LoreholdCommandEffect extends OneShotEffect { + + LoreholdCommandEffect() { + super(Outcome.Benefit); + staticText = "{this} deals 3 damage to any target. Target player gains 3 life"; + } + + private LoreholdCommandEffect(final LoreholdCommandEffect effect) { + super(effect); + } + + @Override + public LoreholdCommandEffect copy() { + return new LoreholdCommandEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player targetPlayer = game.getPlayer(source.getFirstTarget()); + if (targetPlayer != null) { + targetPlayer.damage(3, source.getSourceId(), source, game); + } + Permanent targetPermanent = game.getPermanent(source.getFirstTarget()); + if (targetPermanent != null) { + targetPermanent.damage(3, source.getSourceId(), source, game); + } + Player player = game.getPlayer(source.getTargets().get(1).getFirstTarget()); + if (player != null) { + player.gainLife(3, game, source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/w/WitherbloomCommand.java b/Mage.Sets/src/mage/cards/w/WitherbloomCommand.java index 553b5b56e3..12c8c06b65 100644 --- a/Mage.Sets/src/mage/cards/w/WitherbloomCommand.java +++ b/Mage.Sets/src/mage/cards/w/WitherbloomCommand.java @@ -87,7 +87,7 @@ class WitherbloomCommandEffect extends OneShotEffect { WitherbloomCommandEffect() { super(Outcome.ReturnToHand); - staticText = "target player mills three cards, then you return a land card from your graveyard to your hand"; + staticText = ", then you return a land card from your graveyard to your hand"; } private WitherbloomCommandEffect(final WitherbloomCommandEffect effect) { diff --git a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java index 68e69cdb88..6bd8beee9e 100644 --- a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java +++ b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java @@ -27,6 +27,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet { this.ratioBoosterMythic = 7.4; this.maxCardNumberInBooster = 275; + cards.add(new SetCardInfo("Lorehold Command", 199, Rarity.RARE, mage.cards.l.LoreholdCommand.class)); cards.add(new SetCardInfo("Prismari Command", 214, Rarity.RARE, mage.cards.p.PrismariCommand.class)); cards.add(new SetCardInfo("Quandrix Command", 217, Rarity.RARE, mage.cards.q.QuandrixCommand.class)); cards.add(new SetCardInfo("Silverquill Command", 232, Rarity.RARE, mage.cards.s.SilverquillCommand.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/SpiritRedWhiteToken.java b/Mage/src/main/java/mage/game/permanent/token/SpiritRedWhiteToken.java new file mode 100644 index 0000000000..6671b9f977 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/SpiritRedWhiteToken.java @@ -0,0 +1,30 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class SpiritRedWhiteToken extends TokenImpl { + + public SpiritRedWhiteToken() { + super("Spirit", "3/2 red and white Spirit creature token"); + cardType.add(CardType.CREATURE); + color.setRed(true); + color.setWhite(true); + subtype.add(SubType.SPIRIT); + power = new MageInt(3); + toughness = new MageInt(2); + } + + private SpiritRedWhiteToken(final SpiritRedWhiteToken token) { + super(token); + } + + @Override + public SpiritRedWhiteToken copy() { + return new SpiritRedWhiteToken(this); + } +}