[MKM] Implement Barbed Servitor

This commit is contained in:
theelk801 2024-01-27 10:04:20 -05:00
parent 645b79d07e
commit 1389655802
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,61 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.DealtDamageToSourceTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.common.SavedDamageValue;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.effects.common.SuspectSourceEffect;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.common.TargetOpponent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BarbedServitor extends CardImpl {
public BarbedServitor(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.CONSTRUCT);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Indestructible
this.addAbility(IndestructibleAbility.getInstance());
// When Barbed Servitor enters the battlefield, suspect it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new SuspectSourceEffect()));
// Whenever Barbed Servitor deals combat damage to a player, you draw a card and you lose 1 life.
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(
new DrawCardSourceControllerEffect(1, "you"), true
);
ability.addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and"));
this.addAbility(ability);
// Whenever Barbed Servitor is dealt damage, target opponent loses that much life.
ability = new DealtDamageToSourceTriggeredAbility(new LoseLifeTargetEffect(SavedDamageValue.MUCH), true);
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}
private BarbedServitor(final BarbedServitor card) {
super(card);
}
@Override
public BarbedServitor copy() {
return new BarbedServitor(this);
}
}

View file

@ -38,6 +38,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet {
cards.add(new SetCardInfo("Audience with Trostani", 152, Rarity.RARE, mage.cards.a.AudienceWithTrostani.class));
cards.add(new SetCardInfo("Aurelia, the Law Above", 188, Rarity.RARE, mage.cards.a.AureliaTheLawAbove.class));
cards.add(new SetCardInfo("Auspicious Arrival", 5, Rarity.COMMON, mage.cards.a.AuspiciousArrival.class));
cards.add(new SetCardInfo("Barbed Servitor", 77, Rarity.RARE, mage.cards.b.BarbedServitor.class));
cards.add(new SetCardInfo("Basilica Stalker", 78, Rarity.COMMON, mage.cards.b.BasilicaStalker.class));
cards.add(new SetCardInfo("Benthic Criminologists", 40, Rarity.COMMON, mage.cards.b.BenthicCriminologists.class));
cards.add(new SetCardInfo("Bolrac-Clan Basher", 112, Rarity.UNCOMMON, mage.cards.b.BolracClanBasher.class));