[MKM] Implement Due Diligence

This commit is contained in:
theelk801 2024-01-27 10:21:15 -05:00
parent aeaad989b7
commit 61e1750428
5 changed files with 82 additions and 11 deletions

View file

@ -1,7 +1,5 @@
package mage.cards.c;
import java.util.UUID;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.dynamicvalue.common.StaticValue;
@ -11,18 +9,15 @@ import mage.abilities.keyword.ConvokeAbility;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.constants.*;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherEnchantedPredicate;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author Galatolol
*/
public final class ConclavesBlessing extends CardImpl {
@ -30,7 +25,7 @@ public final class ConclavesBlessing extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other creature you control");
static {
filter.add(new AnotherEnchantedPredicate());
filter.add(AnotherEnchantedPredicate.instance);
}
public ConclavesBlessing(UUID ownerId, CardSetInfo setInfo) {

View file

@ -0,0 +1,74 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.permanent.AnotherEnchantedPredicate;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DueDiligence extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("creature you control other than enchanted creature");
static {
filter.add(AnotherEnchantedPredicate.instance);
}
public DueDiligence(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget));
// When Due Diligence enters the battlefield, target creature you control other than enchanted creature gets +2/+2 and gains vigilance until end of turn.
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(2, 2)
.setText("target creature you control other than enchanted creature gets +2/+2"));
ability.addEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance())
.setText("and gains vigilance until end of turn"));
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
// Enchanted creature gets +2/+2 and has vigilance.
ability = new SimpleStaticAbility(new BoostEnchantedEffect(2, 2));
ability.addEffect(new GainAbilityAttachedEffect(
VigilanceAbility.getInstance(), AttachmentType.AURA
).setText("and has vigilance"));
this.addAbility(ability);
}
private DueDiligence(final DueDiligence card) {
super(card);
}
@Override
public DueDiligence copy() {
return new DueDiligence(this);
}
}

View file

@ -28,7 +28,7 @@ public final class KjeldoranPride extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature other than enchanted creature");
static {
filter.add(new AnotherEnchantedPredicate());
filter.add(AnotherEnchantedPredicate.instance);
}
public KjeldoranPride(UUID ownerId, CardSetInfo setInfo) {

View file

@ -66,6 +66,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet {
cards.add(new SetCardInfo("Doppelgang", 198, Rarity.RARE, mage.cards.d.Doppelgang.class));
cards.add(new SetCardInfo("Drag the Canal", 199, Rarity.RARE, mage.cards.d.DragTheCanal.class));
cards.add(new SetCardInfo("Dramatic Accusation", 53, Rarity.COMMON, mage.cards.d.DramaticAccusation.class));
cards.add(new SetCardInfo("Due Diligence", 14, Rarity.COMMON, mage.cards.d.DueDiligence.class));
cards.add(new SetCardInfo("Elegant Parlor", 260, Rarity.RARE, mage.cards.e.ElegantParlor.class));
cards.add(new SetCardInfo("Eliminate the Impossible", 54, Rarity.UNCOMMON, mage.cards.e.EliminateTheImpossible.class));
cards.add(new SetCardInfo("Escape Tunnel", 261, Rarity.COMMON, mage.cards.e.EscapeTunnel.class));

View file

@ -10,7 +10,8 @@ import mage.game.permanent.Permanent;
*
* @author LevelX2
*/
public class AnotherEnchantedPredicate implements ObjectSourcePlayerPredicate<Permanent> {
public enum AnotherEnchantedPredicate implements ObjectSourcePlayerPredicate<Permanent> {
instance;
@Override
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {