I made a lot of progress the past few days. I started with the screen in my play above - a simple high screen from the C for the PG. What could happen on a play like this, before the point where we've even decided what the PG does next?
1) Defender commits a foul fighting through the screen.
2) Illegal/moving screen from the C.
Then I thought about how to test each of these conditions. For #1 I set a percentage of this occuring - just plucked a figure of 5% out of the air - and then took the opposing PG's foul rating, which is a rating of 1-20, and 'rolled a d20'. If the result equals or beats the foul rating, an extra 5% is added on top. These are all just arbitary figures at this stage that would need to be tweaked.
For 2 I do something similar, using the offensive awareness rating of the screener as a modifier, along with the defensive awareness of the defender.
If no fouls are triggered by either player, we progress with the actual screen. For the offense some of the factors I want to simulate are the quality of the screen, the use of that screen by the ballhandler (some guards are much better than others in this area IRL), and the creativity of the ballhandler. For the defense it's mainly about reacting to the ballhandler, as well as applying the team strategy - going under screens on fast players who can't shoot, over for good shooters, etc.
Although it's fairly complicated calculating all of the above, the advantage is that once I'm happy with it, I have a function named 'screen' that I can call whenever a screen is required from any play. I feed the required attributes - ball handler, the screener, the defender, team strategy - to the function, and it will give me a result that can then be used to determine the next step of the play.
Politics, n. Strife of interests masquerading as a contest of principles.