use of mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect in project mage by magefree.
the class GrislySpectacleEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent creature = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
if (creature != null) {
Player controller = game.getPlayer(creature.getControllerId());
if (controller != null) {
int power = creature.getPower().getValue();
Effect effect = new PutLibraryIntoGraveTargetEffect(power);
effect.setTargetPointer(new FixedTarget(controller.getId()));
return effect.apply(game, source);
}
}
return false;
}
use of mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect in project mage by magefree.
the class BelltowerSphinxEffect method checkTrigger.
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getTargetId().equals(this.sourceId)) {
UUID controller = game.getControllerId(event.getSourceId());
if (controller != null) {
Player player = game.getPlayer(controller);
if (player != null) {
getEffects().get(0).setTargetPointer(new FixedTarget(player.getId()));
((PutLibraryIntoGraveTargetEffect) getEffects().get(0)).setAmount(StaticValue.get(event.getAmount()));
return true;
}
}
}
return false;
}
Aggregations