forked from External/mage
[YDMU] Implement Marwyn's Kindred & Wandering Treefolk (#12625)
This commit is contained in:
parent
4a041aa89c
commit
3321cd03bc
5 changed files with 174 additions and 1 deletions
67
Mage.Sets/src/mage/cards/m/MarwynsKindred.java
Normal file
67
Mage.Sets/src/mage/cards/m/MarwynsKindred.java
Normal 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);
|
||||
}
|
||||
}
|
||||
58
Mage.Sets/src/mage/cards/w/WanderingTreefolk.java
Normal file
58
Mage.Sets/src/mage/cards/w/WanderingTreefolk.java
Normal 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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));
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue