[YDMU] Implement Marwyn's Kindred & Wandering Treefolk (#12625)

This commit is contained in:
karapuzz14 2024-08-15 04:11:45 +03:00 committed by GitHub
parent 4a041aa89c
commit 3321cd03bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 174 additions and 1 deletions

View file

@ -0,0 +1,67 @@
package mage.cards.m;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.ConjureCardEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author karapuzz14
*/
public final class MarwynsKindred extends CardImpl {
public MarwynsKindred(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{2}{G}{G}");
// Conjure a card named Marwyn, the Nurturer and X cards named Llanowar Elves onto the battlefield.
this.getSpellAbility().addEffect(new MarwynsKindredEffect());
}
private MarwynsKindred(final MarwynsKindred card) {
super(card);
}
@Override
public mage.cards.m.MarwynsKindred copy() {
return new MarwynsKindred(this);
}
}
class MarwynsKindredEffect extends OneShotEffect {
MarwynsKindredEffect() {
super(Outcome.PutCreatureInPlay);
staticText = "conjure a card named Marwyn, the Nurturer and X cards named Llanowar Elves onto the battlefield";
}
private MarwynsKindredEffect(final MarwynsKindredEffect effect) {
super(effect);
}
@Override
public MarwynsKindredEffect copy() {
return new MarwynsKindredEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
ConjureCardEffect conjureMarwynCardEffect = new ConjureCardEffect("Marwyn, the Nurturer",
Zone.BATTLEFIELD, 1);
int amount = CardUtil.getSourceCostsTag(game, source, "X", 0);
ConjureCardEffect conjureElvesCardEffect = new ConjureCardEffect("Llanowar Elves",
Zone.BATTLEFIELD, amount);
return conjureMarwynCardEffect.apply(game, source) && conjureElvesCardEffect.apply(game, source);
}
}

View file

@ -0,0 +1,58 @@
package mage.cards.w;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.costadjusters.DomainAdjuster;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.SeekCardEffect;
import mage.abilities.hint.common.DomainHint;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author karapuzz14
*/
public final class WanderingTreefolk extends CardImpl {
public WanderingTreefolk(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
this.subtype.add(SubType.TREEFOLK);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Domain -- {7}{G}: Seek a creature card. This ability costs {1} less to activate for each basic land type among lands you control.
Ability ability = new SimpleActivatedAbility(
Zone.BATTLEFIELD,
new SeekCardEffect(StaticFilters.FILTER_CARD_CREATURE),
new ManaCostsImpl<>("{7}{G}")
);
ability.addEffect(new InfoEffect("This ability costs {1} less to activate " +
"for each basic land type among lands you control."));
ability.addHint(DomainHint.instance);
ability.setAbilityWord(AbilityWord.DOMAIN);
ability.setCostAdjuster(DomainAdjuster.instance);
this.addAbility(ability);
}
private WanderingTreefolk(final WanderingTreefolk card) {
super(card);
}
@Override
public WanderingTreefolk copy() {
return new WanderingTreefolk(this);
}
}

View file

@ -23,6 +23,7 @@ public final class AlchemyDominaria extends ExpansionSet {
cards.add(new SetCardInfo("Ancestral Recall", 32, Rarity.MYTHIC, mage.cards.a.AncestralRecall.class));
cards.add(new SetCardInfo("Black Lotus", 35, Rarity.MYTHIC, mage.cards.b.BlackLotus.class));
cards.add(new SetCardInfo("Marwyn's Kindred", 16, Rarity.MYTHIC, mage.cards.m.MarwynsKindred.class));
cards.add(new SetCardInfo("Mox Emerald", 36, Rarity.MYTHIC, mage.cards.m.MoxEmerald.class));
cards.add(new SetCardInfo("Mox Jet", 37, Rarity.MYTHIC, mage.cards.m.MoxJet.class));
cards.add(new SetCardInfo("Mox Pearl", 38, Rarity.MYTHIC, mage.cards.m.MoxPearl.class));
@ -33,6 +34,7 @@ public final class AlchemyDominaria extends ExpansionSet {
cards.add(new SetCardInfo("Time Walk", 33, Rarity.MYTHIC, mage.cards.t.TimeWalk.class));
cards.add(new SetCardInfo("Timetwister", 34, Rarity.MYTHIC, mage.cards.t.Timetwister.class));
cards.add(new SetCardInfo("Vinesoul Spider", 18, Rarity.UNCOMMON, mage.cards.v.VinesoulSpider.class));
cards.add(new SetCardInfo("Wandering Treefolk", 19, Rarity.UNCOMMON, mage.cards.w.WanderingTreefolk.class));

View file

@ -0,0 +1,46 @@
package mage.abilities.effects.common;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Player;
/**
* @author karapuzz14
*/
public class SeekCardEffect extends OneShotEffect {
private final FilterCard filter;
/**
* @param filter for selecting a card
*/
public SeekCardEffect(FilterCard filter) {
super(Outcome.Benefit);
this.filter = filter;
this.staticText = "seek a " + filter.getMessage();
}
private SeekCardEffect(final SeekCardEffect effect) {
super(effect);
this.filter = effect.filter;
}
@Override
public SeekCardEffect copy() {
return new SeekCardEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
return controller.seekCard(filter, source, game);
}
return false;
}
}

View file

@ -40813,7 +40813,7 @@ Spellchain Scatter|Alchemy: Dominaria|15|U|{R}|Instant|||Kicker {U}$When you cas
Marwyn's Kindred|Alchemy: Dominaria|16|M|{X}{2}{G}{G}|Sorcery|||Conjure a card named Marwyn, the Nurturer and X cards named Llanowar Elves onto the battlefield.|
Nantuko Slicer|Alchemy: Dominaria|17|R|{2}{G}{G}|Creature - Insect|3|2|Kicker {B}$When Nantuko Slicer enters the battlefield, return target card from your graveyard to your hand. If this spell was kicked, conjure a duplicate of target card in an opponent's graveyard into your hand. It perpetually gains "You may spend mana as though it were mana of any color to cast this spell."|
Vinesoul Spider|Alchemy: Dominaria|18|U|{1}{G}|Creature - Elemental Spider|3|2|Reach$At the beginning of your end step, put a random land card from your library into your graveyard.|
Wandering Treefolk|Alchemy: Dominaria|19|U|{1}{G}|Creature - Treefolk|2|3|Vigilance$Domain -- {7}{G}: Seek a creature card. This ability costs{1} less to activate for each basic land type among lands you control.|
Wandering Treefolk|Alchemy: Dominaria|19|U|{1}{G}|Creature - Treefolk|2|3|Vigilance$Domain -- {7}{G}: Seek a creature card. This ability costs {1} less to activate for each basic land type among lands you control.|
Arvad, Weatherlight Smuggler|Alchemy: Dominaria|20|R|{W}{B}|Legendary Creature - Vampire Knight|1|1|Deathtouch, lifelink$At the beginning of your end step, if a creature died this turn, Arvad, Weatherlight Smuggler perpetually gets +X/+X where X is the number of creatures that died this turn. This ability also triggers if Arvad is in your graveyard.|
Bloodsprout Talisman|Alchemy: Dominaria|21|R|{B}{G}|Artifact|||Bloodsprout Talisman enters the battlefield tapped.${T}, Pay 1 life: Choose a nonland card in your hand. It perpetually gains "This spell costs{1} less to cast."|
Darigaaz, Shivan Champion|Alchemy: Dominaria|22|M|{2}{B}{R}{G}|Legendary Creature - Dragon|5|5|Flying$At the beginning of your end step, conjure a random card from Darigaaz, Shivan Champion's spellbook into exile face down with three egg counters on it. It gains "At the beginning of your upkeep, if this card is exiled, remove an egg counter from it. Then if it has no egg counters on it, put it onto the battlefield."|