@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { new ManifestEffect(1).apply(game, source); Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance()); effect.setTargetPointer(new FixedTarget(card.getId())); return effect.apply(game, source); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { new ManifestEffect(1).apply(game, source); Permanent permanent = game.getPermanent(card.getId()); if (permanent != null) { Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)); effect.setTargetPointer(new FixedTarget(permanent.getId())); return effect.apply(game, source); } } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { new ManifestEffect(1).apply(game, source); int xValue = source.getManaCostsToPay().getX(); if (xValue > 0) { Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(xValue)); effect.setTargetPointer(new FixedTarget(card.getId())); return effect.apply(game, source); } } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent enchantment = game.getPermanent(source.getSourceId()); if (controller != null && enchantment != null) { // manifest top card Card card = controller.getLibrary().getFromTop(game); if (card != null) { new ManifestEffect(1).apply(game, source); Permanent enchantedCreature = game.getPermanent(card.getId()); if (enchantedCreature != null) { enchantedCreature.addAttachment(enchantment.getId(), game); FilterCreaturePermanent filter = new FilterCreaturePermanent(); Target target = new TargetCreaturePermanent(filter); target.addTarget(enchantedCreature.getId(), source, game); game.addEffect(new BecomesAuraSourceEffect(target), source); } } return true; } return false; } }
controller.getLibrary().putOnTop(cardToManifest, game); new ManifestEffect(1).apply(game, source); if (controller.getLibrary().hasCards()) { Card cardToPutBack = controller.getLibrary().getFromTop(game);