use of mage.game.permanent.token.WolfToken in project mage by magefree.
the class FeedThePackEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Target target = new TargetPermanent(filter);
Player player = game.getPlayer(source.getControllerId());
if (player != null && player.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
Permanent permanent = game.getPermanent(target.getFirstTarget());
if (permanent != null && permanent.sacrifice(source, game)) {
int toughness = permanent.getToughness().getValue();
WolfToken token = new WolfToken();
token.putOntoBattlefield(toughness, game, source, source.getControllerId());
return true;
}
}
return false;
}
use of mage.game.permanent.token.WolfToken in project mage by magefree.
the class KessigCagebreakersEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
WolfToken token = new WolfToken();
int count = player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
for (int i = 0; i < count; i++) {
token.putOntoBattlefield(1, game, source, source.getControllerId(), true, true);
}
return true;
}
return false;
}
Aggregations