mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[STX] Implemented Lorehold Command
This commit is contained in:
parent
eec6b4986d
commit
09d3cee8fc
4 changed files with 141 additions and 1 deletions
109
Mage.Sets/src/mage/cards/l/LoreholdCommand.java
Normal file
109
Mage.Sets/src/mage/cards/l/LoreholdCommand.java
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -87,7 +87,7 @@ class WitherbloomCommandEffect extends OneShotEffect {
|
||||||
|
|
||||||
WitherbloomCommandEffect() {
|
WitherbloomCommandEffect() {
|
||||||
super(Outcome.ReturnToHand);
|
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) {
|
private WitherbloomCommandEffect(final WitherbloomCommandEffect effect) {
|
||||||
|
|
|
@ -27,6 +27,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
|
||||||
this.ratioBoosterMythic = 7.4;
|
this.ratioBoosterMythic = 7.4;
|
||||||
this.maxCardNumberInBooster = 275;
|
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("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("Quandrix Command", 217, Rarity.RARE, mage.cards.q.QuandrixCommand.class));
|
||||||
cards.add(new SetCardInfo("Silverquill Command", 232, Rarity.RARE, mage.cards.s.SilverquillCommand.class));
|
cards.add(new SetCardInfo("Silverquill Command", 232, Rarity.RARE, mage.cards.s.SilverquillCommand.class));
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue