diff --git a/Mage.Sets/src/mage/cards/l/LosheelClockworkScholar.java b/Mage.Sets/src/mage/cards/l/LosheelClockworkScholar.java new file mode 100644 index 00000000000..119405d2795 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LosheelClockworkScholar.java @@ -0,0 +1,61 @@ +package mage.cards.l; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.PreventAllDamageToAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterArtifactCreaturePermanent; +import mage.filter.predicate.permanent.AttackingPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class LosheelClockworkScholar extends CardImpl { + + private static final FilterPermanent filter + = new FilterArtifactCreaturePermanent("attacking artifact creatures you control"); + private static final FilterPermanent filter2 + = new FilterArtifactCreaturePermanent("one or more artifact creatures"); + + static { + filter.add(TargetController.YOU.getControllerPredicate()); + filter.add(AttackingPredicate.instance); + filter2.add(TargetController.YOU.getControllerPredicate()); + } + + public LosheelClockworkScholar(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.ELEPHANT); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Prevent all combat damage that would be dealt to attacking artifact creatures you control. + this.addAbility(new SimpleStaticAbility(new PreventAllDamageToAllEffect( + Duration.WhileOnBattlefield, filter, true + ))); + + // Whenever one or more artifact creatures enter the battlefield under your control, draw a card. This ability triggers only once each turn. + this.addAbility(new EntersBattlefieldControlledTriggeredAbility( + new DrawCardSourceControllerEffect(1), filter2 + ).setTriggersOnce(true)); + } + + private LosheelClockworkScholar(final LosheelClockworkScholar card) { + super(card); + } + + @Override + public LosheelClockworkScholar copy() { + return new LosheelClockworkScholar(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Commander2021Edition.java b/Mage.Sets/src/mage/sets/Commander2021Edition.java index b8475dd56ce..406ad7eb6ca 100644 --- a/Mage.Sets/src/mage/sets/Commander2021Edition.java +++ b/Mage.Sets/src/mage/sets/Commander2021Edition.java @@ -179,6 +179,7 @@ public final class Commander2021Edition extends ExpansionSet { cards.add(new SetCardInfo("Llanowar Reborn", 296, Rarity.UNCOMMON, mage.cards.l.LlanowarReborn.class)); cards.add(new SetCardInfo("Llanowar Wastes", 297, Rarity.RARE, mage.cards.l.LlanowarWastes.class)); cards.add(new SetCardInfo("Lonely Sandbar", 298, Rarity.COMMON, mage.cards.l.LonelySandbar.class)); + cards.add(new SetCardInfo("Losheel, Clockwork Scholar", 18, Rarity.RARE, mage.cards.l.LosheelClockworkScholar.class)); cards.add(new SetCardInfo("Loxodon Warhammer", 249, Rarity.RARE, mage.cards.l.LoxodonWarhammer.class)); cards.add(new SetCardInfo("Lumbering Falls", 299, Rarity.RARE, mage.cards.l.LumberingFalls.class)); cards.add(new SetCardInfo("Mage-Ring Network", 300, Rarity.UNCOMMON, mage.cards.m.MageRingNetwork.class));