use of mage.game.permanent.token.SpiritWhiteToken in project mage by magefree.
the class GallowsAtWillowHillEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
if (permanent != null) {
Player controller = game.getPlayer(permanent.getControllerId());
permanent.destroy(source, game, false);
if (controller != null) {
CreateTokenTargetEffect effect = new CreateTokenTargetEffect(new SpiritWhiteToken());
effect.setTargetPointer(new FixedTarget(controller.getId()));
effect.apply(game, source);
}
return true;
}
return false;
}
use of mage.game.permanent.token.SpiritWhiteToken in project mage by magefree.
the class KayaTheInexorableEffect method checkTrigger.
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.getTargetId().equals(this.getSourceId())) {
this.getEffects().clear();
this.addEffect(new KayaTheInexorableEffect(new MageObjectReference(zEvent.getTarget(), game)));
this.addEffect(new CreateTokenEffect(new SpiritWhiteToken()));
return true;
}
return false;
}
use of mage.game.permanent.token.SpiritWhiteToken in project mage by magefree.
the class AfterlifeEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
if (permanent != null) {
SpiritWhiteToken token = new SpiritWhiteToken();
token.putOntoBattlefield(1, game, source, permanent.getControllerId());
}
return true;
}
Aggregations