How to easily write complex "if" conditions (and clean them) using logic

[removed]