[DSK] Implement Scrabbling Skullcrab

This commit is contained in:
theelk801 2024-09-01 09:45:41 -04:00
parent 3368d66850
commit ed764b5066
4 changed files with 95 additions and 0 deletions

View file

@ -0,0 +1,42 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.abilityword.EerieAbility;
import mage.abilities.effects.common.MillCardsTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ScrabblingSkullcrab extends CardImpl {
public ScrabblingSkullcrab(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
this.subtype.add(SubType.CRAB);
this.subtype.add(SubType.SKELETON);
this.power = new MageInt(0);
this.toughness = new MageInt(3);
// Eerie -- Whenever an enchantment you control enters and whenever you fully unlock a Room, target player mills two cards.
Ability ability = new EerieAbility(new MillCardsTargetEffect(2));
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
}
private ScrabblingSkullcrab(final ScrabblingSkullcrab card) {
super(card);
}
@Override
public ScrabblingSkullcrab copy() {
return new ScrabblingSkullcrab(this);
}
}

View file

@ -32,6 +32,7 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
cards.add(new SetCardInfo("Leyline of Hope", 18, Rarity.RARE, mage.cards.l.LeylineOfHope.class));
cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Plains", 272, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Scrabbling Skullcrab", 71, Rarity.UNCOMMON, mage.cards.s.ScrabblingSkullcrab.class));
cards.add(new SetCardInfo("Screaming Nemesis", 157, Rarity.MYTHIC, mage.cards.s.ScreamingNemesis.class));
cards.add(new SetCardInfo("Swamp", 274, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("The Wandering Rescuer", 41, Rarity.MYTHIC, mage.cards.t.TheWanderingRescuer.class));

View file

@ -0,0 +1,51 @@
package mage.abilities.abilityword;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
import mage.constants.AbilityWord;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
/**
* TODO: This only triggers off of enchantments entering as the room mechanic hasn't been implemented yet
*
* @author TheElk801
*/
public class EerieAbility extends TriggeredAbilityImpl {
public EerieAbility(Effect effect) {
this(effect, false);
}
public EerieAbility(Effect effect, boolean optional) {
super(Zone.BATTLEFIELD, effect, optional);
setAbilityWord(AbilityWord.EERIE);
setTriggerPhrase("Whenever an enchantment you control enters and whenever you fully unlock a Room, ");
}
protected EerieAbility(final EerieAbility ability) {
super(ability);
}
@Override
public EerieAbility copy() {
return new EerieAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (!isControlledBy(event.getPlayerId())) {
return false;
}
Permanent permanent = game.getPermanent(event.getTargetId());
return permanent != null && permanent.isEnchantment(game);
}
}

View file

@ -25,6 +25,7 @@ public enum AbilityWord {
DESCEND_4("Descend 4"),
DESCEND_8("Descend 8"),
DOMAIN("Domain"),
EERIE("Eerie"),
EMINENCE("Eminence"),
ENRAGE("Enrage"),
FATEFUL_HOUR("Fateful hour"),