Esempio n. 1
0
 @Override
 public boolean apply(Game game, Ability source) {
   Player player = game.getPlayer(source.getControllerId());
   if (player != null) {
     player.drawCards(1, game);
     TargetDiscard target = new TargetDiscard(player.getId());
     player.choose(Outcome.Discard, target, source.getSourceId(), game);
     Card card = player.getHand().get(target.getFirstTarget(), game);
     if (card != null) {
       player.discard(card, source, game);
       if (card.getCardType().contains(CardType.CREATURE)) {
         Permanent permanent = game.getPermanent(source.getSourceId());
         if (permanent != null) {
           permanent.untap(game);
           permanent.transform(game);
         }
       }
       return true;
     }
     return false;
   }
   return false;
 }