mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[DMU] Implemented Sprouting Goblin
This commit is contained in:
parent
f7f4203dd4
commit
71a6a5f38c
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/s/SproutingGoblin.java
Normal file
76
Mage.Sets/src/mage/cards/s/SproutingGoblin.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class SproutingGoblin extends CardImpl {
|
||||
|
||||
private static final FilterLandCard filter = new FilterLandCard("land card with a basic land type");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
SubType.PLAINS.getPredicate(),
|
||||
SubType.ISLAND.getPredicate(),
|
||||
SubType.SWAMP.getPredicate(),
|
||||
SubType.MOUNTAIN.getPredicate(),
|
||||
SubType.FOREST.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
public SproutingGoblin(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.GOBLIN);
|
||||
this.subtype.add(SubType.DRUID);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Kicker {G}
|
||||
this.addAbility(new KickerAbility("{G}"));
|
||||
|
||||
// When Sprouting Goblin enters the battlefield, if it was kicked, search your library for a land card with a basic land type, reveal it, put it into your hand, then shuffle.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true)),
|
||||
KickedCondition.ONCE,
|
||||
"When {this} enters the battlefield, if it was kicked, search your library for a land card with a basic land type, reveal it, put it into your hand, then shuffle."
|
||||
));
|
||||
|
||||
// {R}, {T}, Sacrifice a land: Draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{R}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_LAND_SHORT_TEXT));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private SproutingGoblin(final SproutingGoblin card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SproutingGoblin copy() {
|
||||
return new SproutingGoblin(this);
|
||||
}
|
||||
}
|
|
@ -128,6 +128,7 @@ public final class DominariaUnited extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Smash to Dust", 144, Rarity.COMMON, mage.cards.s.SmashToDust.class));
|
||||
cards.add(new SetCardInfo("Snarespinner", 179, Rarity.COMMON, mage.cards.s.Snarespinner.class));
|
||||
cards.add(new SetCardInfo("Soul of Windgrace", 220, Rarity.MYTHIC, mage.cards.s.SoulOfWindgrace.class));
|
||||
cards.add(new SetCardInfo("Sprouting Goblin", 145, Rarity.UNCOMMON, mage.cards.s.SproutingGoblin.class));
|
||||
cards.add(new SetCardInfo("Stall for Time", 34, Rarity.COMMON, mage.cards.s.StallForTime.class));
|
||||
cards.add(new SetCardInfo("Strength of the Coalition", 180, Rarity.UNCOMMON, mage.cards.s.StrengthOfTheCoalition.class));
|
||||
cards.add(new SetCardInfo("Stronghold Arena", 110, Rarity.RARE, mage.cards.s.StrongholdArena.class));
|
||||
|
|
Loading…
Reference in a new issue