[DMU] Implemented Haughty Djinn

This commit is contained in:
Daniel Bomar 2022-08-24 10:04:54 -05:00
parent 421ae11f80
commit 514e4d8754
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,55 @@
package mage.cards.h;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
import mage.abilities.effects.common.cost.SpellsCostReductionControllerEffect;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.filter.common.FilterInstantOrSorceryCard;
/**
*
* @author weirddan455
*/
public final class HaughtyDjinn extends CardImpl {
private static final FilterInstantOrSorceryCard filter = new FilterInstantOrSorceryCard("instant and sorcery cards");
private static final FilterInstantOrSorceryCard filter2 = new FilterInstantOrSorceryCard("instant and sorcery spells");
public HaughtyDjinn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}");
this.subtype.add(SubType.DJINN);
this.power = new MageInt(0);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Haughty Djinn's power is equal to the number of instant and sorcery cards in your graveyard.
this.addAbility(new SimpleStaticAbility(
Zone.ALL,
new SetPowerSourceEffect(new CardsInControllerGraveyardCount(filter), Duration.EndOfGame)
));
// Instant and sorcery spells you cast cost {1} less to cast.
this.addAbility(new SimpleStaticAbility(new SpellsCostReductionControllerEffect(filter2, 1)));
}
private HaughtyDjinn(final HaughtyDjinn card) {
super(card);
}
@Override
public HaughtyDjinn copy() {
return new HaughtyDjinn(this);
}
}

View file

@ -59,6 +59,7 @@ public final class DominariaUnited extends ExpansionSet {
cards.add(new SetCardInfo("Forest", 274, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Frostfist Strider", 51, Rarity.UNCOMMON, mage.cards.f.FrostfistStrider.class));
cards.add(new SetCardInfo("Gaea's Might", 164, Rarity.COMMON, mage.cards.g.GaeasMight.class));
cards.add(new SetCardInfo("Haughty Djinn", 52, Rarity.RARE, mage.cards.h.HaughtyDjinn.class));
cards.add(new SetCardInfo("Herd Migration", 165, Rarity.RARE, mage.cards.h.HerdMigration.class));
cards.add(new SetCardInfo("Hero's Heirloom", 231, Rarity.UNCOMMON, mage.cards.h.HerosHeirloom.class));
cards.add(new SetCardInfo("Hurler Cyclops", 130, Rarity.UNCOMMON, mage.cards.h.HurlerCyclops.class));