flowchart TD

    A["Start Kingdom Turn (Month)"] --> B[Upkeep Phase]

  

    subgraph B[Upkeep Phase]

      direction TB

      B1["Check leadership: vacancies, penalties"] --> B2["Adjust Unrest (events, prior month)"]

      B2 --> B3["Pay Consumption (Treasury → if short, +Unrest)"]

      B3 --> B4["Apply ongoing effects (edicts, events, projects)"]

      B4 --> B5["Collect Income / Taxes (add to Treasury)"]

      B5 --> B6[Recalculate Control DC / stats if needed]

    end

  

    B --> C[Commerce Phase]

  

    subgraph C[Commerce Phase]

      direction TB

      C1[Maintain/resolve Trade Agreements] --> C2[Buy/Sell Commodities, Crafting, Hire Services]

      C2 --> C3[Update Treasury & Inventories]

    end

  

    C --> D[Activity Phase]

  

    subgraph D[Activity Phase]

      direction TB

      D1{"Choose Kingdom Activities<br/>(spend RP/Time)"} --> D1a[Claim Hexes / Explore / Reconnoiter]

      D1 --> D1b["Build Terrain Improvements<br/>(roads, farms, bridges)"]

      D1 --> D1c["Found/Improve Settlements<br/>(lots & buildings)"]

      D1 --> D1d["Edicts & Policies<br/>(tax, holidays, recruitment)"]

      D1 --> D1e[Recruit/Assign Leaders & Teams]

      D1 --> D1f[Establish/Upgrade Trade Routes]

      D1a --> D2["Record Changes (Decay, Unrest, Stability, etc.)"]

      D1b --> D2

      D1c --> D2

      D1d --> D2

      D1e --> D2

      D1f --> D2

    end

  

    D --> E[Event Phase]

  

    subgraph E[Event Phase]

     direction TB

      E1["Roll/Determine Event(s)"] --> E2[Resolve Checks & Outcomes]

      E2 --> E3["Apply Effects (Unrest, Decay, Treasury, Conditions)" ]

      E3 --> E4[Log follow-ups for next month]

    end

  

    E --> F[End of Turn] --> G[Next Month]