use of mage.watchers.Watcher in project mage by magefree.
the class EbondeathDracolichWatcher method applies.
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
if (sourceId.equals(source.getSourceId()) && source.isControlledBy(affectedControllerId)) {
Card card = game.getCard(source.getSourceId());
Watcher watcher = game.getState().getWatcher(EbondeathDracolichWatcher.class);
if (card != null && watcher != null && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) {
return watcher.conditionMet();
}
}
return false;
}
Aggregations