mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Make Vastwood Animist use CreatureToken instead of custom private token
This commit is contained in:
parent
96ec1a65c1
commit
8dd20a3e2e
2 changed files with 15 additions and 29 deletions
|
|
@ -12,11 +12,14 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -34,7 +37,7 @@ public final class VastwoodAnimist extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}: Target land you control becomes an X/X Elemental creature until end of turn, where X is the number of Allies you control. It's still a land.
|
||||
// {T}: Target land you control becomes an X/X Elemental creature until end of turn, where X is the number of Allies you control. It's still a land.
|
||||
Ability ability = new SimpleActivatedAbility(new VastwoodAnimistEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledPermanent(new FilterControlledLandPermanent()));
|
||||
this.addAbility(ability);
|
||||
|
|
@ -52,14 +55,10 @@ public final class VastwoodAnimist extends CardImpl {
|
|||
|
||||
class VastwoodAnimistEffect extends OneShotEffect {
|
||||
|
||||
static final FilterControlledPermanent filterAllies = new FilterControlledPermanent("allies you control");
|
||||
|
||||
static {
|
||||
filterAllies.add(SubType.ALLY.getPredicate());
|
||||
}
|
||||
static final FilterControlledPermanent filterAllies = new FilterControlledPermanent(SubType.ALLY);
|
||||
|
||||
public VastwoodAnimistEffect() {
|
||||
super(Outcome.Benefit);
|
||||
super(Outcome.BecomeCreature);
|
||||
this.staticText = "Target land you control becomes an X/X Elemental creature until end of turn, where X is the number of Allies you control. It's still a land.";
|
||||
}
|
||||
|
||||
|
|
@ -75,27 +74,14 @@ class VastwoodAnimistEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int amount = new PermanentsOnBattlefieldCount(filterAllies).calculate(game, source, this);
|
||||
ContinuousEffect effect = new BecomesCreatureTargetEffect(new VastwoodAnimistElementalToken(amount), false, true, Duration.EndOfTurn);
|
||||
ContinuousEffect effect = new BecomesCreatureTargetEffect(
|
||||
new CreatureToken(amount, amount, "X/X Elemental creature, where X is the number of Allies you control", SubType.ELEMENTAL),
|
||||
false,
|
||||
true,
|
||||
Duration.EndOfTurn
|
||||
);
|
||||
effect.setTargetPointer(this.getTargetPointer().copy());
|
||||
game.addEffect(effect, source);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class VastwoodAnimistElementalToken extends TokenImpl {
|
||||
|
||||
VastwoodAnimistElementalToken(int amount) {
|
||||
super("", "X/X Elemental creature, where X is the number of Allies you control");
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add(SubType.ELEMENTAL);
|
||||
power = new MageInt(amount);
|
||||
toughness = new MageInt(amount);
|
||||
}
|
||||
private VastwoodAnimistElementalToken(final VastwoodAnimistElementalToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public VastwoodAnimistElementalToken copy() {
|
||||
return new VastwoodAnimistElementalToken(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27190,7 +27190,7 @@ Snapping Creeper|Worldwake|112|C|{2}{G}|Creature - Plant|2|3|Landfall - Whenever
|
|||
Strength of the Tajuru|Worldwake|113|R|{X}{G}{G}|Instant|||Multikicker {1} <i>(You may pay an additional {1} any number of times as you cast this spell.)</i>$Choose target creature, then choose another target creature for each time Strength of the Tajuru was kicked. Put X +1/+1 counters on each of them.|
|
||||
Summit Apes|Worldwake|114|U|{3}{G}|Creature - Ape|5|2|As long as you control a Mountain, Summit Apes can't be blocked except by two or more creatures.|
|
||||
Terastodon|Worldwake|115|R|{6}{G}{G}|Creature - Elephant|9|9|When Terastodon enters the battlefield, you may destroy up to three target noncreature permanents. For each permanent put into a graveyard this way, its controller puts a 3/3 green Elephant creature token onto the battlefield.|
|
||||
Vastwood Animist|Worldwake|116|U|{2}{G}|Creature - Elf Shaman Ally|1|1|{tap}: Target land you control becomes an X/X Elemental creature until end of turn, where X is the number of Allies you control. It's still a land.|
|
||||
Vastwood Animist|Worldwake|116|U|{2}{G}|Creature - Elf Shaman Ally|1|1|{T}: Target land you control becomes an X/X Elemental creature until end of turn, where X is the number of Allies you control. It's still a land.|
|
||||
Vastwood Zendikon|Worldwake|117|C|{4}{G}|Enchantment - Aura|||Enchant land$Enchanted land is a 6/4 green Elemental creature. It's still a land.$When enchanted land dies, return that card to its owner's hand.|
|
||||
Wolfbriar Elemental|Worldwake|118|R|{2}{G}{G}|Creature - Elemental|4|4|Multikicker {G} <i>(You may pay an additional {G} any number of times as you cast this spell.)</i>$When Wolfbriar Elemental enters the battlefield, put a 2/2 green Wolf creature token onto the battlefield for each time it was kicked.|
|
||||
Novablast Wurm|Worldwake|119|M|{3}{G}{G}{W}{W}|Creature - Wurm|7|7|Whenever Novablast Wurm attacks, destroy all other creatures.|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue