diff --git a/Mage.Sets/src/mage/cards/a/AcolyteHybrid.java b/Mage.Sets/src/mage/cards/a/AcolyteHybrid.java new file mode 100644 index 0000000000..19431e3156 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AcolyteHybrid.java @@ -0,0 +1,77 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.common.TargetArtifactPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AcolyteHybrid extends CardImpl { + + public AcolyteHybrid(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.subtype.add(SubType.TYRANID); + this.subtype.add(SubType.HUMAN); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Heavy Rock Cutter -- Whenever Acolyte Hybrid attacks, destroy up to one target artifact. If an artifact is destroyed this way, its controller draws a card. + Ability ability = new AttacksTriggeredAbility(new AcolyteHybridEffect()); + ability.addTarget(new TargetArtifactPermanent(0, 1)); + this.addAbility(ability.withFlavorWord("Heavy Rock Cutter")); + } + + private AcolyteHybrid(final AcolyteHybrid card) { + super(card); + } + + @Override + public AcolyteHybrid copy() { + return new AcolyteHybrid(this); + } +} + +class AcolyteHybridEffect extends OneShotEffect { + + AcolyteHybridEffect() { + super(Outcome.Benefit); + staticText = "destroy up to one target artifact. " + + "If an artifact is destroyed this way, its controller draws a card"; + } + + private AcolyteHybridEffect(final AcolyteHybridEffect effect) { + super(effect); + } + + @Override + public AcolyteHybridEffect copy() { + return new AcolyteHybridEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent == null || !permanent.destroy(source, game)) { + return false; + } + Player player = game.getPlayer(permanent.getControllerId()); + if (player != null) { + player.drawCards(1, source, game); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/Warhammer40000.java b/Mage.Sets/src/mage/sets/Warhammer40000.java index bcb8d73c36..4401534d6b 100644 --- a/Mage.Sets/src/mage/sets/Warhammer40000.java +++ b/Mage.Sets/src/mage/sets/Warhammer40000.java @@ -28,6 +28,7 @@ public final class Warhammer40000 extends ExpansionSet { cards.add(new SetCardInfo("Abaddon the Despoiler", 2, Rarity.MYTHIC, mage.cards.a.AbaddonTheDespoiler.class)); cards.add(new SetCardInfo("Aberrant", 86, Rarity.UNCOMMON, mage.cards.a.Aberrant.class)); cards.add(new SetCardInfo("Abundance", 210, Rarity.RARE, mage.cards.a.Abundance.class)); + cards.add(new SetCardInfo("Acolyte Hybrid", 70, Rarity.UNCOMMON, mage.cards.a.AcolyteHybrid.class)); cards.add(new SetCardInfo("Aetherize", 191, Rarity.UNCOMMON, mage.cards.a.Aetherize.class)); cards.add(new SetCardInfo("Arcane Sanctum", 264, Rarity.UNCOMMON, mage.cards.a.ArcaneSanctum.class)); cards.add(new SetCardInfo("Arcane Signet", 227, Rarity.COMMON, mage.cards.a.ArcaneSignet.class));