Event 1: If (a=1 and b=2) or (c=1 and d=2) then (actions)
Hai. This condition, which you have created and which can be generated in most modern programming languages, shows that your solution to the problem is not optimal. Unfortunately, the speed of development is now valued more than the rational use of computing power. That's why modern AAA games are so demanding on resources.