diff --git a/Mage.Sets/src/mage/cards/l/Lucille.java b/Mage.Sets/src/mage/cards/l/Lucille.java new file mode 100644 index 0000000000..c9009ef503 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/Lucille.java @@ -0,0 +1,96 @@ +package mage.cards.l; + +import mage.abilities.Ability; +import mage.abilities.common.AttacksAttachedTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.WalkerToken; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Lucille extends CardImpl { + + public Lucille(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{B}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +2/+0 and has menace. + Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(2, 0)); + ability.addEffect(new GainAbilityAttachedEffect( + new MenaceAbility(), AttachmentType.EQUIPMENT + ).setText("and has menace")); + this.addAbility(ability); + + // Whenever equipped creature attacks, defending player sacrifices a creature. If they do, you create a Walker token. + this.addAbility(new AttacksAttachedTriggeredAbility(new LucilleEffect())); + + // Equip {4} + this.addAbility(new EquipAbility(4)); + } + + private Lucille(final Lucille card) { + super(card); + } + + @Override + public Lucille copy() { + return new Lucille(this); + } +} + +class LucilleEffect extends OneShotEffect { + + LucilleEffect() { + super(Outcome.Benefit); + staticText = "defending player sacrifices a creature. If they do, you create a Walker token"; + } + + private LucilleEffect(final LucilleEffect effect) { + super(effect); + } + + @Override + public LucilleEffect copy() { + return new LucilleEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent equipment = game.getPermanent(source.getSourceId()); + if (equipment == null) { + return false; + } + Player player = game.getPlayer(game.getCombat().getDefendingPlayerId(equipment.getAttachedTo(), game)); + if (player == null) { + return false; + } + TargetPermanent target = new TargetControlledCreaturePermanent(); + target.setNotTarget(true); + if (!target.canChoose(player.getId(), game)) { + return false; + } + player.choose(outcome, target, source.getSourceId(), game); + Permanent permanent = game.getPermanent(target.getFirstTarget()); + return permanent.sacrifice(source.getSourceId(), game) + && new WalkerToken().putOntoBattlefield( + 1, game, source.getSourceId(), source.getControllerId() + ); + } +} diff --git a/Mage.Sets/src/mage/sets/SecretLairDrop.java b/Mage.Sets/src/mage/sets/SecretLairDrop.java index f127a42bf4..596825e8e5 100644 --- a/Mage.Sets/src/mage/sets/SecretLairDrop.java +++ b/Mage.Sets/src/mage/sets/SecretLairDrop.java @@ -73,6 +73,7 @@ public class SecretLairDrop extends ExpansionSet { cards.add(new SetCardInfo("Lightning Bolt", 85, Rarity.RARE, mage.cards.l.LightningBolt.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Lightning Bolt", 86, Rarity.RARE, mage.cards.l.LightningBolt.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Lightning Greaves", 99, Rarity.RARE, mage.cards.l.LightningGreaves.class)); + cards.add(new SetCardInfo("Lucille", 581, Rarity.MYTHIC, mage.cards.l.Lucille.class)); cards.add(new SetCardInfo("Marrow-Gnawer", 34, Rarity.RARE, mage.cards.m.MarrowGnawer.class)); cards.add(new SetCardInfo("Meren of Clan Nel Toth", 52, Rarity.MYTHIC, mage.cards.m.MerenOfClanNelToth.class)); cards.add(new SetCardInfo("Michonne, Ruthless Survivor", 146, Rarity.MYTHIC, mage.cards.m.MichonneRuthlessSurvivor.class));