use of mage.game.permanent.token.TrollWarriorToken in project mage by magefree.
the class OldGrowthTrollContinuousEffect method makeAbility.
private static final Ability makeAbility() {
Ability activatedAbility = new SimpleActivatedAbility(new CreateTokenEffect(new TrollWarriorToken(), 1, true, false), new GenericManaCost(1));
activatedAbility.addCost(new TapSourceCost());
Cost cost = new SacrificeSourceCost();
cost.setText("sacrifice this land");
activatedAbility.addCost(cost);
Ability ability = new SimpleStaticAbility(new GainAbilityAttachedEffect(new SimpleManaAbility(Zone.BATTLEFIELD, Mana.GreenMana(2), new TapSourceCost()), AttachmentType.AURA).setText("enchanted Forest has \"{T}: Add {G}{G}\""));
ability.addEffect(new GainAbilityAttachedEffect(activatedAbility, AttachmentType.AURA).setText("and \"{1}, {T}, Sacrifice this land: Create a tapped 4/4 green Troll Warrior creature token with trample.\""));
return ability;
}
use of mage.game.permanent.token.TrollWarriorToken in project mage by magefree.
the class WakingTheTrollsEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
int myLands = game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND, source.getSourceId(), source.getControllerId(), game);
int theirLands = game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND, source.getSourceId(), source.getFirstTarget(), game);
if (myLands <= theirLands) {
return false;
}
return new TrollWarriorToken().putOntoBattlefield(myLands - theirLands, game, source, source.getControllerId());
}
Aggregations