Ejemplo n.º 1
0
 @Override
 public boolean replaceEvent(GameEvent event, Ability source, Game game) {
   MageObject object = game.getObject(event.getSourceId());
   if (object != null) {
     Card card = (Card) object;
     Ability ability = new AffinityForArtifactsAbility();
     card.addAbility(ability);
     ability.setControllerId(source.getControllerId());
     ability.setSourceId(card.getId());
     game.getState().addAbility(ability, source.getSourceId(), card);
   }
   return false;
 }
Ejemplo n.º 2
0
  @Override
  public boolean apply(Game game, Ability source) {
    Card card = game.getCard(source.getFirstTarget());
    if (card != null) {
      card.addAbility(HasteAbility.getInstance());
      card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getId(), source.getControllerId());

      ExileTargetEffect exileEffect = new ExileTargetEffect();
      exileEffect.setTargetPointer(new FixedTarget(card.getId()));
      DelayedTriggeredAbility delayedAbility = new AtEndOfTurnDelayedTriggeredAbility(exileEffect);
      delayedAbility.setSourceId(source.getSourceId());
      delayedAbility.setControllerId(source.getControllerId());
      game.addDelayedTriggeredAbility(delayedAbility);

      return true;
    }

    return false;
  }