private MageObject getMageObject(GameEvent event, Game game, TriggeredAbility ability) { MageObject object = game.getPermanent(ability.getSourceId()); if (object == null) { object = game.getLastKnownInformation(ability.getSourceId(), event.getZone()); if (object == null) { object = game.getObject(ability.getSourceId()); } } return object; }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getZone() == Zone.HAND) { Spell spell = game.getStack().getSpell(event.getTargetId()); if (spell != null && !spell.isCopy() && (spell.getCardType().contains(CardType.INSTANT) || spell.getCardType().contains(CardType.SORCERY))) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); } return true; } } return false; }