>>! In D2115#89434, @wraitii wrote:
> //You've been struck by, you've been struck by, a boolean logic error !//
> Didn't expect that the AI would have so many such checks, and TBH I'm not sure it really improves readability that much :/
> Still, there's one case in which you did the conversion wrong:
> !A || !B ≠ !(A || B), indeed !(A || B) == !A && !B, and !A || !B == !(A && B)
> I think I got all cases where you've changed it wrong.
> I think it could be worth splitting this in the AI change the not-AI change, since I'm less convinced about the AI change and it's definitely trickier to review.
// I can see clearly now ... // (At least I hope this has improved ;) )
This patch replaces many `hasClass` calls with `MatchesClassList` from `Templates.js` in PetraAI. Originally done in D2115 but split due to the error proneness in PetraAI and the difficulty of finding errors there.