Back Story
I'm working on a 2-Players 2D game that players play multiple rounds ,until one win.
In each round, each player choose some items (1 or more) for his/her car ( e.g. shield, anti-shield, power-up, speed, ... ) and their chosen items are hidden for opponent. when both player get ready, they just sit and see what happen to their cars which move toward each other (each round).
Problem
As I said, there are multiple items (read "magics") with different effect in my game. Each Item's effect may differ depends on item which it interact with. each item have some positive effect and some cost.
For instance, If player 1 uses "speed" item, his car may cause more damage to opponent's car ,whereas if opponent had used a "truck-bumper", this "speed" would cause player 1 to get more damage instead!
After writing all the rules and effects of each item on a paper, I need your helps to find a good and structural way to handle them in code (except many nested if-else ).
Finally
I need some kind of structure or coding style for converting these rules to code and determining the net result of items interaction in each round according to items relations.
yes
! but I also look forward to one-to-one item solution =) \$\endgroup\$