Ejemplo n.º 1
0
  @Override
  public boolean apply(Game game, Ability source) {
    Permanent creatureToMoveCountersFrom =
        game.getPermanent(source.getTargets().get(0).getFirstTarget());
    Permanent creatureToMoveCountersTo =
        game.getPermanent(source.getTargets().get(1).getFirstTarget());

    if (creatureToMoveCountersFrom != null && creatureToMoveCountersTo != null) {
      Permanent copyCreature = creatureToMoveCountersFrom.copy();
      for (Counter counter : copyCreature.getCounters(game).values()) {
        creatureToMoveCountersFrom.removeCounters(counter, game);
        creatureToMoveCountersTo.addCounters(counter, game);
      }
      return true;
    }
    return false;
  }
Ejemplo n.º 2
0
 @Override
 public boolean apply(Game game, Ability source) {
   Player controller = game.getPlayer(source.getControllerId());
   MageObject mageObject = game.getObject(source.getSourceId());
   if (controller == null || mageObject == null) {
     return false;
   }
   Permanent faceDownCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
   if (faceDownCreature != null) {
     Permanent copyFaceDown = faceDownCreature.copy();
     copyFaceDown.setFaceDown(false, game);
     Cards cards = new CardsImpl();
     cards.add(copyFaceDown);
     Player player = game.getPlayer(faceDownCreature.getControllerId());
     controller.lookAtCards("face down card - " + mageObject.getName(), cards, game);
     if (player != null) {
       game.informPlayers(
           controller.getLogName() + " looks at a face down creature of " + player.getLogName());
     }
   } else {
     return false;
   }
   return true;
 }