@Override public boolean checkInterveningIfClause(Game game) { if (interveningIfClauseCondition != null) { return interveningIfClauseCondition.apply(game, this); } return true; }
@Override public boolean apply(Game game, Ability source) { if(!conditionChecked) { result = condition.apply(game, source); conditionChecked = true; } return result; }
@Override public boolean apply(Game game, Ability source) { return !condition.apply(game, source); }
@Override public boolean checkInterveningIfClause(Game game) { return condition.apply(game, this); }
@Override public boolean apply(Game game, Ability source) { return conditions.stream().allMatch(condition -> condition.apply(game, source)); }
@Override public boolean apply(Game game, Ability source) { return conditions.stream().anyMatch(condition -> condition.apply(game, source)); }
@Override public Effects getEffects(Game game, EffectType effectType) { if (!condition.apply(game, this)) { return emptyEffects; } return super.getEffects(game, effectType); }
@Override public Effects getEffects(Game game, EffectType effectType) { if (!condition.apply(game, this)) { return emptyEffects; } return super.getEffects(game, effectType); }
@Override public boolean apply(Game game, Ability source) { if (condition.apply(game, source)) { return applyEffect(game, source); } return false; }
@Override public Effects getEffects(Game game, EffectType effectType) { if (!condition.apply(game, this)) { return emptyEffects; } return super.getEffects(game, effectType); }
@Override public Effects getEffects(Game game, EffectType effectType) { if (!condition.apply(game, this)) { return emptyEffects; } return super.getEffects(game, effectType); }
@Override public Effects getEffects(Game game, EffectType effectType) { if (!condition.apply(game, this)) { return emptyEffects; } return super.getEffects(game, effectType); }
@Override public boolean applies(GameEvent event, Ability source, Game game) { if (event.getTargetId().equals(source.getSourceId())) { if (condition == null || condition.apply(game, source)) { return true; } } return false; }
@Override public boolean applies(GameEvent event, Ability source, Game game) { // has to return true, if the spell cannot be cast in the current phase / step if (event.getSourceId().equals(source.getSourceId())) { if (condition != null && !condition.apply(game, source)) { return true; } } return false; // cast not prevented by this effect }
@Override public boolean applies(Ability abilityToModify, Ability source, Game game) { if (abilityToModify.getSourceId().equals(source.getSourceId()) && (abilityToModify instanceof SpellAbility)) { return condition.apply(game, source); } return false; }
@Override public boolean applies(Permanent permanent, Ability source, Game game) { return permanent.getId().equals(source.getSourceId()) && !condition.apply(game, source); }
@Override public ActivationStatus canActivate(UUID playerId, Game game) { if (!condition.apply(game, this)) { return ActivationStatus.getFalse(); } return super.canActivate(playerId, game); }
@Override public Effects getEffects(Game game, EffectType effectType) { if (!condition.apply(game, this)) { return new Effects(); } return super.getEffects(game, effectType); }
@Override public List<Mana> getNetMana(Game game, Ability source) { if (condition.apply(game, source)) { return effect.getNetMana(game, source); } else if (otherwiseEffect != null) { return otherwiseEffect.getNetMana(game, source); } return null; }
@Override public boolean applies(GameEvent event, Ability source, Game game) { if (((ZoneChangeEvent)event).getToZone() == Zone.GRAVEYARD && event.getTargetId().equals(source.getSourceId())) { if (condition == null || condition.apply(game, source)) { return true; } } return false; }