Search in sources :

Example 1 with EldraziSpawnToken

use of mage.game.permanent.token.EldraziSpawnToken in project mage by magefree.

the class RapaciousOneTriggeredAbility method checkTrigger.

@Override
public boolean checkTrigger(GameEvent event, Game game) {
    if (event.getSourceId().equals(this.sourceId) && ((DamagedPlayerEvent) event).isCombatDamage()) {
        this.getEffects().clear();
        this.addEffect(new CreateTokenEffect(new EldraziSpawnToken(), event.getAmount()));
        return true;
    }
    return false;
}
Also used : CreateTokenEffect(mage.abilities.effects.common.CreateTokenEffect) EldraziSpawnToken(mage.game.permanent.token.EldraziSpawnToken)

Example 2 with EldraziSpawnToken

use of mage.game.permanent.token.EldraziSpawnToken in project mage by magefree.

the class BroodBirthingEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Eldrazi Spawn");
    filter.add(SubType.ELDRAZI.getPredicate());
    filter.add(SubType.SPAWN.getPredicate());
    EldraziSpawnToken token = new EldraziSpawnToken();
    int count = game.getBattlefield().countAll(filter, source.getControllerId(), game) > 0 ? 3 : 1;
    token.putOntoBattlefield(count, game, source, source.getControllerId());
    return true;
}
Also used : FilterControlledCreaturePermanent(mage.filter.common.FilterControlledCreaturePermanent) EldraziSpawnToken(mage.game.permanent.token.EldraziSpawnToken)

Aggregations

EldraziSpawnToken (mage.game.permanent.token.EldraziSpawnToken)2 CreateTokenEffect (mage.abilities.effects.common.CreateTokenEffect)1 FilterControlledCreaturePermanent (mage.filter.common.FilterControlledCreaturePermanent)1