[EOE] Implement Hardlight Containment

This commit is contained in:
theelk801 2025-07-14 18:19:08 -04:00
parent 15a5d19af5
commit 15214648f5
2 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,59 @@
package mage.cards.h;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.ExileUntilSourceLeavesEffect;
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.WardAbility;
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.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetOpponentsCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HardlightContainment extends CardImpl {
public HardlightContainment(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
this.subtype.add(SubType.AURA);
// Enchant artifact you control
TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT);
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget));
// When this Aura enters, exile target creature an opponent controls until this Aura leaves the battlefield.
Ability ability = new EntersBattlefieldTriggeredAbility(new ExileUntilSourceLeavesEffect());
ability.addTarget(new TargetOpponentsCreaturePermanent());
this.addAbility(ability);
// Enchanted permanent has ward {1}.
this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect(
new WardAbility(new GenericManaCost(1)), AttachmentType.AURA
).setText("enchanted permanent has ward {1}")));
}
private HardlightContainment(final HardlightContainment card) {
super(card);
}
@Override
public HardlightContainment copy() {
return new HardlightContainment(this);
}
}

View file

@ -108,6 +108,7 @@ public final class EdgeOfEternities extends ExpansionSet {
cards.add(new SetCardInfo("Gravkill", 103, Rarity.COMMON, mage.cards.g.Gravkill.class));
cards.add(new SetCardInfo("Haliya, Guided by Light", 19, Rarity.RARE, mage.cards.h.HaliyaGuidedByLight.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Haliya, Guided by Light", 289, Rarity.RARE, mage.cards.h.HaliyaGuidedByLight.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Hardlight Containment", 20, Rarity.RARE, mage.cards.h.HardlightContainment.class));
cards.add(new SetCardInfo("Harmonious Grovestrider", 189, Rarity.UNCOMMON, mage.cards.h.HarmoniousGrovestrider.class));
cards.add(new SetCardInfo("Hemosymbic Mite", 190, Rarity.UNCOMMON, mage.cards.h.HemosymbicMite.class));
cards.add(new SetCardInfo("Hullcarver", 105, Rarity.COMMON, mage.cards.h.Hullcarver.class));