use of mage.game.permanent.token.ValdukElementalToken in project mage by magefree.
the class ValdukKeeperOfTheFlameEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
if (sourcePermanent != null) {
EquipmentAttachedCount eamount = new EquipmentAttachedCount();
int value = eamount.calculate(game, source, this);
AuraAttachedCount aamount = new AuraAttachedCount();
value += aamount.calculate(game, source, this);
CreateTokenEffect effect = new CreateTokenEffect(new ValdukElementalToken(), value);
if (effect.apply(game, source)) {
effect.exileTokensCreatedAtNextEndStep(game, source);
return true;
}
}
return false;
}
Aggregations