mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[MKM] Implement Due Diligence
This commit is contained in:
parent
aeaad989b7
commit
61e1750428
5 changed files with 82 additions and 11 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
74
Mage.Sets/src/mage/cards/d/DueDiligence.java
Normal file
74
Mage.Sets/src/mage/cards/d/DueDiligence.java
Normal 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue