use of mage.game.permanent.token.Pest11GainLifeToken in project mage by magefree.
the class ValentinDeanOfTheVeinEffect method replaceEvent.
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
((ZoneChangeEvent) event).setToZone(Zone.EXILED);
game.fireReflexiveTriggeredAbility(new ReflexiveTriggeredAbility(new DoIfCostPaid(new CreateTokenEffect(new Pest11GainLifeToken()), new GenericManaCost(2)), false, "you may pay {2}. If you do, create a 1/1 black and green " + "Pest creature token with \"When this creature dies, you gain 1 life.\""), source);
return false;
}
use of mage.game.permanent.token.Pest11GainLifeToken in project mage by magefree.
the class ContainmentBreachEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent == null) {
return false;
}
permanent.destroy(source, game, false);
if (permanent.getManaValue() <= 2) {
new Pest11GainLifeToken().putOntoBattlefield(1, game, source, source.getControllerId());
}
return true;
}
Aggregations