use of mage.abilities.keyword.CyclingAbility in project mage by magefree.
the class ValiantRescuerWatcher method checkTrigger.
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ValiantRescuerWatcher watcher = game.getState().getWatcher(ValiantRescuerWatcher.class);
if (watcher == null || !watcher.checkSpell(event.getPlayerId(), event.getSourceId()) || game.getState().getStack().isEmpty() || !event.getPlayerId().equals(this.getControllerId()) || event.getSourceId().equals(this.getSourceId())) {
return false;
}
StackObject item = game.getState().getStack().getFirst();
return item instanceof StackAbility && item.getStackAbility() instanceof CyclingAbility;
}
Aggregations