mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
implement [ECL] Foraging Wickermaw
This commit is contained in:
parent
a6fbb55ea9
commit
131a8b7ed0
2 changed files with 103 additions and 0 deletions
102
Mage.Sets/src/mage/cards/f/ForagingWickermaw.java
Normal file
102
Mage.Sets/src/mage/cards/f/ForagingWickermaw.java
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.continuous.BecomesColorTargetEffect;
|
||||
import mage.abilities.effects.keyword.SurveilEffect;
|
||||
import mage.abilities.effects.mana.AddManaOfAnyColorEffect;
|
||||
import mage.abilities.mana.LimitedTimesPerTurnActivatedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.choices.ChoiceColor;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author xenohedron
|
||||
*/
|
||||
public final class ForagingWickermaw extends CardImpl {
|
||||
|
||||
public ForagingWickermaw(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}");
|
||||
|
||||
this.subtype.add(SubType.SCARECROW);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// When this creature enters, surveil 1.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SurveilEffect(1)));
|
||||
|
||||
// {1}: Add one mana of any color. This creature becomes that color until end of turn. Activate only once each turn.
|
||||
this.addAbility(new LimitedTimesPerTurnActivatedManaAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new ForagingWickermawManaEffect(),
|
||||
new GenericManaCost(1)
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
private ForagingWickermaw(final ForagingWickermaw card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForagingWickermaw copy() {
|
||||
return new ForagingWickermaw(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ForagingWickermawManaEffect extends AddManaOfAnyColorEffect {
|
||||
|
||||
ForagingWickermawManaEffect() {
|
||||
super(1);
|
||||
this.staticText = "Add one mana of any color. {this} becomes that color until end of turn";
|
||||
}
|
||||
|
||||
private ForagingWickermawManaEffect(final ForagingWickermawManaEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForagingWickermawManaEffect copy() {
|
||||
return new ForagingWickermawManaEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mana produceMana(Game game, Ability source) {
|
||||
if (game != null) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
String mes = String.format("Select a color of mana to add %d of it", this.amount);
|
||||
ChoiceColor choice = new ChoiceColor(true, mes, game.getObject(source));
|
||||
if (controller.choose(outcome, choice, game)) {
|
||||
ObjectColor color = choice.getColor();
|
||||
if (color != null) {
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (permanent != null) {
|
||||
game.addEffect(new BecomesColorTargetEffect(color, false, Duration.EndOfTurn)
|
||||
.setTargetPointer(new FixedTarget(permanent, game)), source);
|
||||
}
|
||||
Mana mana = choice.getMana(amount);
|
||||
mana.setFlag(setFlag);
|
||||
return mana;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Mana();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -165,6 +165,7 @@ public final class LorwynEclipsed extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Flitterwing Nuisance", 304, Rarity.RARE, mage.cards.f.FlitterwingNuisance.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Flitterwing Nuisance", 48, Rarity.RARE, mage.cards.f.FlitterwingNuisance.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Flock Impostor", 16, Rarity.UNCOMMON, mage.cards.f.FlockImpostor.class));
|
||||
cards.add(new SetCardInfo("Foraging Wickermaw", 256, Rarity.COMMON, mage.cards.f.ForagingWickermaw.class));
|
||||
cards.add(new SetCardInfo("Forest", 273, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Forest", 278, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Forest", 283, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue