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;
}
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;
}
Aggregations