1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-09 01:01:06 -09:00

[MID] Implemented Devoted Grafkeeper / Departed Soulkeeper

This commit is contained in:
Evan Kranzler 2021-09-11 20:08:54 -04:00
parent 822f8b767b
commit bc4ec72656
3 changed files with 140 additions and 0 deletions

View file

@ -0,0 +1,49 @@
package mage.cards.d;
import mage.MageInt;
import mage.abilities.common.CanBlockOnlyFlyingAbility;
import mage.abilities.common.PutIntoGraveFromAnywhereSourceAbility;
import mage.abilities.effects.common.ExileSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DepartedSoulkeeper extends CardImpl {
public DepartedSoulkeeper(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(3);
this.toughness = new MageInt(1);
this.color.setWhite(true);
this.color.setBlue(true);
this.transformable = true;
this.nightCard = true;
// Flying
this.addAbility(FlyingAbility.getInstance());
// Departed Soulkeeper can block only creatures with flying.
this.addAbility(new CanBlockOnlyFlyingAbility());
// If Departed Soulkeeper would be put into a graveyard from anywhere, exile it instead.
this.addAbility(new PutIntoGraveFromAnywhereSourceAbility(new ExileSourceEffect().setText("exile it instead")));
}
private DepartedSoulkeeper(final DepartedSoulkeeper card) {
super(card);
}
@Override
public DepartedSoulkeeper copy() {
return new DepartedSoulkeeper(this);
}
}

View file

@ -0,0 +1,89 @@
package mage.cards.d;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.MillCardsControllerEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.keyword.DisturbAbility;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class DevotedGrafkeeper extends CardImpl {
public DevotedGrafkeeper(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{U}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.PEASANT);
this.power = new MageInt(2);
this.toughness = new MageInt(1);
this.transformable = true;
this.secondSideCardClazz = mage.cards.d.DepartedSoulkeeper.class;
// When Devoted Grafkeeper enters the battlefield, mill two cards.
this.addAbility(new EntersBattlefieldTriggeredAbility(new MillCardsControllerEffect(2)));
// Whenever you cast a spell from your graveyard, tap target creature you don't control.
this.addAbility(new DevotedGrafkeeperTriggeredAbility());
// Disturb {1}{W}{U}
this.addAbility(new TransformAbility());
this.addAbility(new DisturbAbility(new ManaCostsImpl<>("{1}{W}{U}")));
}
private DevotedGrafkeeper(final DevotedGrafkeeper card) {
super(card);
}
@Override
public DevotedGrafkeeper copy() {
return new DevotedGrafkeeper(this);
}
}
class DevotedGrafkeeperTriggeredAbility extends TriggeredAbilityImpl {
DevotedGrafkeeperTriggeredAbility() {
super(Zone.BATTLEFIELD, new TapTargetEffect(), false);
this.addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
}
private DevotedGrafkeeperTriggeredAbility(DevotedGrafkeeperTriggeredAbility ability) {
super(ability);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.SPELL_CAST;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
return isControlledBy(event.getPlayerId()) && event.getZone() == Zone.GRAVEYARD;
}
@Override
public DevotedGrafkeeperTriggeredAbility copy() {
return new DevotedGrafkeeperTriggeredAbility(this);
}
@Override
public String getRule() {
return "Whenever you cast a spell from your graveyard, tap target creature you don't control.";
}
}

View file

@ -98,8 +98,10 @@ public final class InnistradMidnightHunt extends ExpansionSet {
cards.add(new SetCardInfo("Defend the Celestus", 182, Rarity.UNCOMMON, mage.cards.d.DefendTheCelestus.class));
cards.add(new SetCardInfo("Defenestrate", 95, Rarity.COMMON, mage.cards.d.Defenestrate.class));
cards.add(new SetCardInfo("Delver of Secrets", 47, Rarity.UNCOMMON, mage.cards.d.DelverOfSecrets.class));
cards.add(new SetCardInfo("Departed Soulkeeper", 218, Rarity.UNCOMMON, mage.cards.d.DepartedSoulkeeper.class));
cards.add(new SetCardInfo("Deserted Beach", 260, Rarity.RARE, mage.cards.d.DesertedBeach.class));
cards.add(new SetCardInfo("Devious Cover-Up", 48, Rarity.COMMON, mage.cards.d.DeviousCoverUp.class));
cards.add(new SetCardInfo("Devoted Grafkeeper", 218, Rarity.UNCOMMON, mage.cards.d.DevotedGrafkeeper.class));
cards.add(new SetCardInfo("Dire-Strain Brawler", 203, Rarity.COMMON, mage.cards.d.DireStrainBrawler.class));
cards.add(new SetCardInfo("Dire-Strain Demolisher", 174, Rarity.UNCOMMON, mage.cards.d.DireStrainDemolisher.class));
cards.add(new SetCardInfo("Dire-Strain Rampage", 219, Rarity.RARE, mage.cards.d.DireStrainRampage.class));