[MH3] Implement Kozilek's Unsealing

This commit is contained in:
theelk801 2024-05-16 16:02:29 -04:00
parent 3c18699ab6
commit 2d135b15d9
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,57 @@
package mage.cards.k;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.keyword.DevoidAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.filter.FilterSpell;
import mage.filter.common.FilterCreatureSpell;
import mage.filter.predicate.mageobject.ManaValuePredicate;
import mage.game.permanent.token.EldraziSpawnToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class KozileksUnsealing extends CardImpl {
private static final FilterSpell filter = new FilterCreatureSpell("a creature spell with mana value 4, 5, or 6");
private static final FilterSpell filter2 = new FilterCreatureSpell("a creature spell with mana value 7 or greater");
static {
filter.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 3));
filter.add(new ManaValuePredicate(ComparisonType.FEWER_THAN, 7));
filter2.add(new ManaValuePredicate(ComparisonType.MORE_THAN, 6));
}
public KozileksUnsealing(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
// Devoid
this.addAbility(new DevoidAbility(this.color));
// Whenever you cast a creature spell with mana value 4, 5, or 6, create two 0/1 colorless Eldrazi Spawn creature tokens with "Sacrifice this creature: Add {C}."
this.addAbility(new SpellCastControllerTriggeredAbility(
new CreateTokenEffect(new EldraziSpawnToken(), 2), filter, false
));
// Whenever you cast a creature spell with mana value 7 or greater, draw three cards.
this.addAbility(new SpellCastControllerTriggeredAbility(
new DrawCardSourceControllerEffect(3), filter2, false
));
}
private KozileksUnsealing(final KozileksUnsealing card) {
super(card);
}
@Override
public KozileksUnsealing copy() {
return new KozileksUnsealing(this);
}
}

View file

@ -35,6 +35,7 @@ public final class ModernHorizons3 extends ExpansionSet {
cards.add(new SetCardInfo("Island", 305, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("It That Heralds the End", 9, Rarity.UNCOMMON, mage.cards.i.ItThatHeraldsTheEnd.class));
cards.add(new SetCardInfo("Kappa Cannoneer", 270, Rarity.RARE, mage.cards.k.KappaCannoneer.class));
cards.add(new SetCardInfo("Kozilek's Unsealing", 65, Rarity.UNCOMMON, mage.cards.k.KozileksUnsealing.class));
cards.add(new SetCardInfo("Kudo, King Among Bears", 192, Rarity.RARE, mage.cards.k.KudoKingAmongBears.class));
cards.add(new SetCardInfo("Laelia, the Blade Reforged", 281, Rarity.RARE, mage.cards.l.LaeliaTheBladeReforged.class));
cards.add(new SetCardInfo("Meltdown", 282, Rarity.UNCOMMON, mage.cards.m.Meltdown.class));