Ejemplo n.º 1
0
 @Override
 public boolean checkTrigger(GameEvent event, Game game) {
   ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
   if (zEvent.getFromZone().equals(Zone.GRAVEYARD)) {
     Card card = game.getCard(zEvent.getTargetId());
     Player controller = game.getPlayer(getControllerId());
     return card != null
         && card.getCardType().contains(CardType.CREATURE)
         && controller != null
         && controller.hasOpponent(card.getOwnerId(), game);
   }
   return false;
 }
Ejemplo n.º 2
0
 @Override
 public boolean applies(GameEvent event, Ability source, Game game) {
   ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
   return zEvent.getToZone() == Zone.GRAVEYARD && zEvent.getTargetId().equals(this.cardId);
 }