even more refactoring of ConditionalInterveningIfTriggeredAbility
All checks were successful
/ build_release (push) Successful in 10m45s

This commit is contained in:
theelk801 2025-06-09 18:53:44 -04:00 committed by Failure
parent 6bbd4f457c
commit 8d93cb8bcd
56 changed files with 443 additions and 642 deletions

View file

@ -12,14 +12,17 @@ public enum SourceHasCountersCondition implements Condition {
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = source.getSourcePermanentOrLKI(game);
if (permanent == null) {
return false;
}
return permanent
return permanent != null
&& permanent
.getCounters(game)
.values()
.stream()
.mapToInt(Counter::getCount)
.anyMatch(x -> x > 0);
}
@Override
public String toString() {
return "{this} has counters on it";
}
}