use of mage.game.permanent.token.RedElementalWithTrampleAndHaste in project mage by magefree.
the class ElementalAppealEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
CreateTokenEffect effect = new CreateTokenEffect(new RedElementalWithTrampleAndHaste());
if (effect.apply(game, source)) {
effect.exileTokensCreatedAtNextEndStep(game, source);
if (KickedCondition.instance.apply(game, source)) {
List<Predicate<MageObject>> predList = new ArrayList<>();
for (UUID tokenId : effect.getLastAddedTokenIds()) {
predList.add(new CardIdPredicate(tokenId));
}
if (!predList.isEmpty()) {
FilterCreaturePermanent filter = new FilterCreaturePermanent();
filter.add(Predicates.or(predList));
game.addEffect(new BoostAllEffect(7, 0, Duration.EndOfTurn, filter, false), source);
}
}
return true;
}
return false;
}
Aggregations