mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Implemented Ivy Seer
This commit is contained in:
parent
90e31b3664
commit
63363eab88
2 changed files with 90 additions and 0 deletions
89
Mage.Sets/src/mage/cards/i/IvySeer.java
Normal file
89
Mage.Sets/src/mage/cards/i/IvySeer.java
Normal file
|
@ -0,0 +1,89 @@
|
|||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.RevealTargetFromHandCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class IvySeer extends CardImpl {
|
||||
|
||||
public IvySeer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {2}{G}, {tap}: Reveal any number of green cards in your hand. Target creature gets +X/+X until end of turn, where X is the number of cards revealed this way.
|
||||
Ability ability = new SimpleActivatedAbility(new IvySeerEffect(), new ManaCostsImpl("{2}{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public IvySeer(final IvySeer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IvySeer copy() {
|
||||
return new IvySeer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class IvySeerEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("any number of green cards in your hand");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
public IvySeerEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = "reveal any number of green cards in your hand. "
|
||||
+ "Target creature gets +X/+X until end of turn, where X is the number of cards revealed this way";
|
||||
}
|
||||
|
||||
public IvySeerEffect(final IvySeerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IvySeerEffect copy() {
|
||||
return new IvySeerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
RevealTargetFromHandCost cost = new RevealTargetFromHandCost(new TargetCardInHand(0, Integer.MAX_VALUE, filter));
|
||||
if (!cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) {
|
||||
return false;
|
||||
}
|
||||
int xValue = cost.getNumberRevealedCards();
|
||||
game.addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn), source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -82,6 +82,7 @@ public final class UrzasDestiny extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Illuminated Wings", 34, Rarity.COMMON, mage.cards.i.IlluminatedWings.class));
|
||||
cards.add(new SetCardInfo("Impatience", 88, Rarity.RARE, mage.cards.i.Impatience.class));
|
||||
cards.add(new SetCardInfo("Iridescent Drake", 35, Rarity.UNCOMMON, mage.cards.i.IridescentDrake.class));
|
||||
cards.add(new SetCardInfo("Ivy Seer", 110, Rarity.UNCOMMON, mage.cards.i.IvySeer.class));
|
||||
cards.add(new SetCardInfo("Junk Diver", 132, Rarity.RARE, mage.cards.j.JunkDiver.class));
|
||||
cards.add(new SetCardInfo("Keldon Champion", 90, Rarity.UNCOMMON, mage.cards.k.KeldonChampion.class));
|
||||
cards.add(new SetCardInfo("Keldon Vandals", 91, Rarity.COMMON, mage.cards.k.KeldonVandals.class));
|
||||
|
|
Loading…
Reference in a new issue