Example #1
0
 @Override
 public boolean apply(Game game, Ability source) {
   Player controller = game.getPlayer(source.getControllerId());
   Permanent creature = game.getPermanent(source.getSourceId());
   if (controller != null && creature != null) {
     if (controller.flipCoin(game)) {
       return true;
     } else {
       creature.removeFromCombat(game);
       creature.tap(game);
       return true;
     }
   }
   return false;
 }