示例#1
0
 @Override
 public boolean checkTrigger(GameEvent event, Game game) {
   return GameEvent.EventType.DISCARDED_CARD.equals(event.getType())
       && game.getOpponents(this.getControllerId())
           .contains(game.getControllerId(event.getSourceId()))
       && getSourceId().equals(event.getTargetId());
 }
示例#2
0
文件: Vex.java 项目: nigelzor/mage
 @Override
 public boolean apply(Game game, Ability source) {
   UUID targetId = source.getFirstTarget();
   Player controller = null;
   boolean countered = false;
   if (targetId != null) {
     controller = game.getPlayer(game.getControllerId(targetId));
   }
   if (targetId != null && game.getStack().counter(targetId, source.getSourceId(), game)) {
     countered = true;
   }
   if (controller != null) {
     controller.drawCards(1, game);
   }
   return countered;
 }