mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[DSK] Implement Ghostly Dancers
This commit is contained in:
parent
3bc22b9f9c
commit
2e9660fec8
4 changed files with 123 additions and 1 deletions
87
Mage.Sets/src/mage/cards/g/GhostlyDancers.java
Normal file
87
Mage.Sets/src/mage/cards/g/GhostlyDancers.java
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.abilityword.EerieAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.Spirit31Token;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GhostlyDancers extends CardImpl {
|
||||
|
||||
public GhostlyDancers(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}{W}");
|
||||
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When this creature enters, return an enchantment card from your graveyard to your hand or unlock a locked door of a Room you control.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GhostlyDancersEffect()));
|
||||
|
||||
// Eerie -- Whenever an enchantment you control enters and whenever you fully unlock a Room, create a 3/1 white Spirit creature token with flying.
|
||||
this.addAbility(new EerieAbility(new CreateTokenEffect(new Spirit31Token())));
|
||||
}
|
||||
|
||||
private GhostlyDancers(final GhostlyDancers card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GhostlyDancers copy() {
|
||||
return new GhostlyDancers(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GhostlyDancersEffect extends OneShotEffect {
|
||||
|
||||
GhostlyDancersEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "return an enchantment card from your graveyard to your hand or unlock a locked door of a Room you control";
|
||||
}
|
||||
|
||||
private GhostlyDancersEffect(final GhostlyDancersEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GhostlyDancersEffect copy() {
|
||||
return new GhostlyDancersEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
// TODO: 7/7/25 this needs to be refactored when rooms are implemented
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null || player.getGraveyard().count(StaticFilters.FILTER_CARD_ENCHANTMENT, game) < 1) {
|
||||
return false;
|
||||
}
|
||||
TargetCard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_ENCHANTMENT);
|
||||
target.withNotTarget(true);
|
||||
player.choose(outcome, target, source, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
return card != null && player.moveCards(card, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
|
|
@ -142,6 +142,8 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Get Out", 60, Rarity.UNCOMMON, mage.cards.g.GetOut.class));
|
||||
cards.add(new SetCardInfo("Ghost Vacuum", 248, Rarity.RARE, mage.cards.g.GhostVacuum.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Ghost Vacuum", 326, Rarity.RARE, mage.cards.g.GhostVacuum.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Ghostly Dancers", 13, Rarity.RARE, mage.cards.g.GhostlyDancers.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Ghostly Dancers", 302, Rarity.RARE, mage.cards.g.GhostlyDancers.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Give In to Violence", 101, Rarity.COMMON, mage.cards.g.GiveInToViolence.class));
|
||||
cards.add(new SetCardInfo("Glimmer Seeker", 14, Rarity.UNCOMMON, mage.cards.g.GlimmerSeeker.class));
|
||||
cards.add(new SetCardInfo("Glimmerburst", 62, Rarity.COMMON, mage.cards.g.Glimmerburst.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Spirit31Token extends TokenImpl {
|
||||
|
||||
public Spirit31Token() {
|
||||
super("Spirit Token", "3/1 white Spirit creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
subtype.add(SubType.SPIRIT);
|
||||
power = new MageInt(3);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
private Spirit31Token(final Spirit31Token token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Spirit31Token copy() {
|
||||
return new Spirit31Token(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -2787,7 +2787,8 @@
|
|||
|Generate|TOK:DSK|Primo, the Indivisible|||PrimoTheIndivisibleToken|
|
||||
|Generate|TOK:DSK|Shard|||ShardToken|
|
||||
|Generate|TOK:DSK|Spider|||Spider22Token|
|
||||
|Generate|TOK:DSK|Spirit|||SpiritBlueToken|
|
||||
|Generate|TOK:DSK|Spirit|6||Spirit31Token|
|
||||
|Generate|TOK:DSK|Spirit|8||SpiritBlueToken|
|
||||
|Generate|TOK:DSK|Treasure|||TreasureToken|
|
||||
|
||||
# FIN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue