use of mage.game.permanent.token.ElementalMasteryElementalToken in project mage by magefree.
the class ElementalMasteryEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent creatureAttached = game.getPermanent(source.getSourceId());
if (creatureAttached != null) {
int power = creatureAttached.getPower().getValue();
if (power > 0) {
CreateTokenEffect effect = new CreateTokenEffect(new ElementalMasteryElementalToken(), power);
effect.apply(game, source);
effect.exileTokensCreatedAtNextEndStep(game, source);
return true;
}
}
return false;
}
Aggregations