Search in sources :

Example 1 with WolfToken

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;
}
Also used : WolfToken(mage.game.permanent.token.WolfToken) Target(mage.target.Target) Player(mage.players.Player) Permanent(mage.game.permanent.Permanent) FilterControlledCreaturePermanent(mage.filter.common.FilterControlledCreaturePermanent) TargetPermanent(mage.target.TargetPermanent) TargetPermanent(mage.target.TargetPermanent)

Example 2 with WolfToken

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;
}
Also used : WolfToken(mage.game.permanent.token.WolfToken) Player(mage.players.Player)

Aggregations

WolfToken (mage.game.permanent.token.WolfToken)2 Player (mage.players.Player)2 FilterControlledCreaturePermanent (mage.filter.common.FilterControlledCreaturePermanent)1 Permanent (mage.game.permanent.Permanent)1 Target (mage.target.Target)1 TargetPermanent (mage.target.TargetPermanent)1