This is the same issue you were running into here:
Your major hint that [<book>search:<advantage>[Ranged]] isn’t valid syntax is the >[ — if you ever see two types of brackets in a row (i.e. without a filter operator between them) it’s generally a sign that something has gone wrong! In this case, since search:<advantage> isn’t valid syntax, the filter ignores it and replaces all the previous content of the filter run with the literal string Ranged. The filter run becomes effectively
<% if [<advantage>attack[yes]] [[Ranged]] %>
and since the [[Ranged]] run is always true (because you’re not testing it for anything), the conditional as a whole is also true.
Try replacing the conditional with a $list as I showed you last time. As a slight modification, you may also want to use the ~/:else filter run prefix before the second run. This would ensure that the second filter run is only used if the first filter run does not return any results, so it would make your filter slightly more efficient. ![]()