mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[DSC] Implement Formless Genesis
This commit is contained in:
parent
f3f2c3cf66
commit
10f03d0d12
3 changed files with 120 additions and 0 deletions
84
Mage.Sets/src/mage/cards/f/FormlessGenesis.java
Normal file
84
Mage.Sets/src/mage/cards/f/FormlessGenesis.java
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.ChangelingAbility;
|
||||
import mage.abilities.keyword.RetraceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.ShapeshifterDeathtouchToken;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FormlessGenesis extends CardImpl {
|
||||
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Lands in your graveyard", new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_LAND)
|
||||
);
|
||||
|
||||
public FormlessGenesis(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.KINDRED, CardType.SORCERY}, "{2}{G}");
|
||||
|
||||
this.subtype.add(SubType.SHAPESHIFTER);
|
||||
|
||||
// Changeling
|
||||
this.addAbility(new ChangelingAbility());
|
||||
|
||||
// Create an X/X colorless Shapeshifter creature token with changeling and deathtouch, where X is the number of land cards in your graveyard.
|
||||
this.getSpellAbility().addEffect(new FormlessGenesisEffect());
|
||||
this.getSpellAbility().addHint(hint);
|
||||
|
||||
// Retrace
|
||||
this.addAbility(new RetraceAbility(this));
|
||||
}
|
||||
|
||||
private FormlessGenesis(final FormlessGenesis card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FormlessGenesis copy() {
|
||||
return new FormlessGenesis(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FormlessGenesisEffect extends OneShotEffect {
|
||||
|
||||
FormlessGenesisEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "create an X/X colorless Shapeshifter creature token with changeling and deathtouch, " +
|
||||
"where X is the number of land cards in your graveyard";
|
||||
}
|
||||
|
||||
private FormlessGenesisEffect(final FormlessGenesisEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FormlessGenesisEffect copy() {
|
||||
return new FormlessGenesisEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int amount = Optional
|
||||
.ofNullable(game.getPlayer(source.getControllerId()))
|
||||
.map(Player::getGraveyard)
|
||||
.map(g -> g.count(StaticFilters.FILTER_CARD_LAND, game))
|
||||
.orElse(0);
|
||||
return new ShapeshifterDeathtouchToken(amount).putOntoBattlefield(1, game, source);
|
||||
}
|
||||
}
|
||||
|
|
@ -111,6 +111,7 @@ public final class DuskmournHouseOfHorrorCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Flooded Grove", 276, Rarity.RARE, mage.cards.f.FloodedGrove.class));
|
||||
cards.add(new SetCardInfo("Florian, Voldaren Scion", 217, Rarity.RARE, mage.cards.f.FlorianVoldarenScion.class));
|
||||
cards.add(new SetCardInfo("Foreboding Ruins", 277, Rarity.RARE, mage.cards.f.ForebodingRuins.class));
|
||||
cards.add(new SetCardInfo("Formless Genesis", 34, Rarity.RARE, mage.cards.f.FormlessGenesis.class));
|
||||
cards.add(new SetCardInfo("Geothermal Bog", 278, Rarity.COMMON, mage.cards.g.GeothermalBog.class));
|
||||
cards.add(new SetCardInfo("Giant Adephage", 179, Rarity.MYTHIC, mage.cards.g.GiantAdephage.class));
|
||||
cards.add(new SetCardInfo("Gleeful Arsonist", 27, Rarity.RARE, mage.cards.g.GleefulArsonist.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.ChangelingAbility;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ShapeshifterDeathtouchToken extends TokenImpl {
|
||||
|
||||
public ShapeshifterDeathtouchToken() {
|
||||
this(0);
|
||||
}
|
||||
|
||||
public ShapeshifterDeathtouchToken(int amount) {
|
||||
super("Shapeshifter Token", "X/X colorless Shapeshifter creature token with changeling and deathtouch");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add(SubType.SHAPESHIFTER);
|
||||
power = new MageInt(amount);
|
||||
toughness = new MageInt(amount);
|
||||
addAbility(new ChangelingAbility());
|
||||
addAbility(DeathtouchAbility.getInstance());
|
||||
}
|
||||
|
||||
private ShapeshifterDeathtouchToken(final ShapeshifterDeathtouchToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public ShapeshifterDeathtouchToken copy() {
|
||||
return new ShapeshifterDeathtouchToken(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue