flowchart TD
subgraph theGame[The Game]
openBox-->doSortingComponents
doSortingComponents-->askFirstTime{First time playing?}
askFirstTime -- Yes --> doFirstTimePlaying
askFirstTime-->|No| doPrepareAdventure
end
subgraph doFirstTimePlaying [First time playing]
direction LR
readRulebook[Read the Rulebook, close to X pages]-->readAdventureBookSetup[Read first X pages of the Adventure Book]
readAdventureBookSetup-->doCombatTutorial-->doExplorationTutorial
doExplorationTutorial-->doPrepareAdventure
end
subgraph doPrepareAdventure[Prepare adventure]
direction LR
grabAdventure-->setupCharacters
setupCharacters-->setupBoard
setupBoard-->startGame
end
subgraph startGame
shuffleMarchingOrder-->whoPlays{Who is next in the marching order?}
whoPlays-->|enemy?| playEnemy
whoPlays-->|character?| playCharacter
playCharacter-->checkConditions
checkConditions-->useApprentice
useApprentice-->usePasives
usePasives-->doTwoActions
doTwoActions-->nextInMarchingOrder
nextInMarchingOrder-->marchingOrderCompleted{Marching Order Completed?}
marchingOrderCompleted -- no --> whoPlays
marchingOrderCompleted -- yes --> checkEvents
checkEvents --> shuffleMarchingOrder
end
subgraph playEnemy
prepareBehaviorCard-->determineCombatantsModifiers
determineCombatantsModifiers-->rollDefenseActionCheck[roll D20]
applyAnyCombatantsModifiers-->compareTargetNumbers
end
subgraph checkEvents
rollEventDie{Roll D6}
rollEventDie -- 1,2 --> doEcho
rollEventDie -- 6 --> doTerrainHazards
end