[ECL] Implement Sygg's Command (#14217)

This commit is contained in:
Muz 2026-01-10 12:37:02 -06:00 committed by GitHub
parent 36792373f0
commit eecf8db199
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 105 additions and 2 deletions

View file

@ -24,8 +24,6 @@ import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.TargetPlayer;
import mage.target.common.TargetCreaturePermanent;
import java.util.List;
import java.util.UUID;

View file

@ -0,0 +1,103 @@
package mage.cards.s;
import java.util.UUID;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerIdPredicate;
import mage.game.Game;
import mage.players.Player;
import mage.target.TargetPermanent;
import mage.target.TargetPlayer;
import mage.target.common.TargetCreaturePermanent;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.abilities.effects.common.DrawCardTargetEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.keyword.LifelinkAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
/**
*
* @author muz
*/
public final class SyggsCommand extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.MERFOLK);
public SyggsCommand(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.KINDRED, CardType.SORCERY}, "{1}{W}{U}");
this.subtype.add(SubType.MERFOLK);
// Choose two --
this.getSpellAbility().getModes().setMinModes(2);
this.getSpellAbility().getModes().setMaxModes(2);
// * Create a token that's a copy of target Merfolk you control.
this.getSpellAbility().addEffect(new CreateTokenCopyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(filter));
// * Creatures target player controls gain lifelink until end of turn.
this.getSpellAbility().addMode(new Mode(new SyggsCommandGainLifelinkEffect()).addTarget(new TargetPlayer()));
// * Target player draws a card.
this.getSpellAbility().addMode(new Mode(new DrawCardTargetEffect(1)).addTarget(new TargetPlayer()));
// * Tap target creature. Put a stun counter on it.
Mode mode = new Mode(new TapTargetEffect());
mode.addEffect(new AddCountersTargetEffect(CounterType.STUN.createInstance()).withTargetDescription("it"));
mode.addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addMode(mode);
}
private SyggsCommand(final SyggsCommand card) {
super(card);
}
@Override
public SyggsCommand copy() {
return new SyggsCommand(this);
}
}
class SyggsCommandGainLifelinkEffect extends OneShotEffect {
SyggsCommandGainLifelinkEffect() {
super(Outcome.AddAbility);
staticText = "Creatures target player controls gain lifelink until end of turn";
}
private SyggsCommandGainLifelinkEffect(final SyggsCommandGainLifelinkEffect effect) {
super(effect);
}
@Override
public SyggsCommandGainLifelinkEffect copy() {
return new SyggsCommandGainLifelinkEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source));
if (player != null) {
FilterCreaturePermanent filter = new FilterCreaturePermanent();
filter.add(new ControllerIdPredicate((player.getId())));
ContinuousEffect effect = new GainAbilityAllEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn, filter);
game.addEffect(effect, source);
return true;
}
return false;
}
}

View file

@ -287,6 +287,8 @@ public final class LorwynEclipsed extends ExpansionSet {
cards.add(new SetCardInfo("Swamp", 276, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Swamp", 281, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Swat Away", 75, Rarity.UNCOMMON, mage.cards.s.SwatAway.class));
cards.add(new SetCardInfo("Sygg's Command", 244, Rarity.RARE, mage.cards.s.SyggsCommand.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Sygg's Command", 342, Rarity.RARE, mage.cards.s.SyggsCommand.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Sygg, Wanderwine Wisdom", 288, Rarity.RARE, mage.cards.s.SyggWanderwineWisdom.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Sygg, Wanderwine Wisdom", 76, Rarity.RARE, mage.cards.s.SyggWanderwineWisdom.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Tanufel Rimespeaker", 77, Rarity.UNCOMMON, mage.cards.t.TanufelRimespeaker.class));