use of mage.game.permanent.token.SpiritToken in project mage by magefree.
the class SokenzanCrucibleOfDefianceEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Token token = new SpiritToken();
token.putOntoBattlefield(2, game, source);
game.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance()).setTargetPointer(new FixedTargets(token, game)), source);
return true;
}
use of mage.game.permanent.token.SpiritToken in project mage by magefree.
the class KirinTouchedOrochiCounterEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
UUID targetId = source.getFirstTarget();
Card card = game.getCard(targetId);
if (controller == null || card == null || game.getState().getZone(targetId) != Zone.GRAVEYARD) {
return false;
}
if (!controller.moveCards(card, Zone.EXILED, source, game)) {
return false;
}
ReflexiveTriggeredAbility reflexiveTokenAbility = new ReflexiveTriggeredAbility(new CreateTokenEffect(new SpiritToken()), false);
game.fireReflexiveTriggeredAbility(reflexiveTokenAbility, source);
return true;
}
use of mage.game.permanent.token.SpiritToken in project mage by magefree.
the class PromiseOfBunreiEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(source.getSourceId());
if (controller != null && permanent != null) {
if (permanent.sacrifice(source, game)) {
return new CreateTokenEffect(new SpiritToken(), 4).apply(game, source);
}
return true;
}
return false;
}
use of mage.game.permanent.token.SpiritToken in project mage by magefree.
the class ReleaseToMemoryEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getFirstTarget());
if (player == null) {
return false;
}
int creatures = player.getGraveyard().count(StaticFilters.FILTER_CARD_CREATURE, game);
player.moveCards(player.getGraveyard(), Zone.EXILED, source, game);
if (creatures > 0) {
new SpiritToken().putOntoBattlefield(creatures, game, source);
}
return true;
}
use of mage.game.permanent.token.SpiritToken in project mage by magefree.
the class SekkiSeasonsGuideEffect method replaceEvent.
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
int damage = event.getAmount();
preventDamageAction(event, source, game);
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
permanent.removeCounters(CounterType.P1P1.createInstance(damage), source, game);
}
new CreateTokenEffect(new SpiritToken(), damage).apply(game, source);
return true;
}
Aggregations