title: Updating a game board in steps
body: <p>I am building a turn based game with a fair amount of triggered abilities. A single action can trigger multiple auto-casted abilities. I am trying to stay away from a priority system or letting the player choose what triggered ability fires first (like in MTG). This is just unnecessarily adds to game complexity. So I want to try to trigger multiple abilities simultaneously.</p>
  
  <p><img src="https://i.imgur.com/XhTFl1K.png" alt="gameflow"></p>
  
  <p>In this example ability <strong>A</strong> triggers ability <strong>B</strong> and ability <strong>C</strong>. If <strong>B</strong> and <strong>C</strong> affect different game objects then executing <strong>B</strong> and then executing <strong>C</strong> is fine. However, if they both affect the same game object then the execution order may matter (executing <strong>B</strong> then <strong>C</strong> results in a different state than executing <strong>C</strong> then <strong>B</strong>). </p>
  
  <p>I was wondering how to get around this issue. I was thinking about an event system. Most complex game mechanics boil down to a few simple mechanics (movement, damage, (de)buff, unit placement/removal). I could create an event for each and separate Exeuction into two steps. First would be a planning phase where damage is calculated, movements planned, etc. This data is fed into an event system. After everything is done the events are dispatched and the actions actually execute. The only issue I see with this is if two objects want to move to/be created at the same location.</p>