use of mage.game.permanent.token.ElementalTokenWithHaste in project mage by magefree.
the class ChandraDrawEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
CreateTokenEffect effect = new CreateTokenEffect(new ElementalTokenWithHaste(), 2);
effect.apply(game, source);
effect.exileTokensCreatedAtNextEndStep(game, source);
return true;
}
return false;
}
use of mage.game.permanent.token.ElementalTokenWithHaste in project mage by magefree.
the class FeralLightningEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
CreateTokenEffect effect = new CreateTokenEffect(new ElementalTokenWithHaste(), 3);
effect.apply(game, source);
effect.exileTokensCreatedAtNextEndStep(game, source);
return true;
}
return false;
}
use of mage.game.permanent.token.ElementalTokenWithHaste in project mage by magefree.
the class LightningCoilsEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent p = game.getPermanent(source.getSourceId());
if (p != null && controller != null) {
int counters = p.getCounters(game).getCount(CounterType.CHARGE);
if (counters >= 5) {
// remove all the counters and create that many tokens
p.removeCounters(CounterType.CHARGE.getName(), p.getCounters(game).getCount(CounterType.CHARGE), source, game);
CreateTokenEffect effect = new CreateTokenEffect(new ElementalTokenWithHaste(), counters);
effect.apply(game, source);
// exile those tokens at next end step
effect.exileTokensCreatedAtNextEndStep(game, source);
return true;
}
}
return false;
}
Aggregations