Updated Text Adventure Game Mechanics

Game Flow Chart

graph TD A[Start Game] --> B[Set Initial Tension Level] B --> C[Present Situation] C --> D[Player Action] D --> E[Roll d20] E --> F{Interpret Roll} F -->|High Roll 15-20| G[Very Positive Outcome] F -->|Average Roll 6-14| H[Neutral Outcome] F -->|Low Roll 1-5| I[Negative Outcome] G --> J[Decrease Tension] H --> K[Maintain Tension] I --> L[Increase Tension] J --> M[Update Story] K --> M L --> M M --> N{Check Tension Level} N -->|Critical| O[Trigger Major Event] N -->|Normal| C O --> P{Randomly Select Event} P -->|1| Q[Natural Disaster] P -->|2| R[Enemy Ambush] P -->|3| S[Ally Betrayal] P -->|4| T[Divine Intervention] P -->|5| U[Unexpected Alliance] Q --> V[Apply Event Effects] R --> V S --> V T --> V U --> V V --> W[Display Event Description] W --> X[Update Quest Log] X --> Y[Reset Tension Level] Y --> Z[Flag Event as Recent] Z --> C

Game Mechanics Explanation

  1. Game Start: The game begins by setting an initial tension level.
  2. Gameplay Loop:
    • The game presents a situation to the player.
    • The player takes an action.
    • The game rolls a d20 to determine the outcome.
  3. Outcome Interpretation:
    • High Roll (15-20): Very Positive Outcome
    • Average Roll (6-14): Neutral Outcome
    • Low Roll (1-5): Negative Outcome
  4. Tension Adjustment:
    • Very Positive Outcome: Decrease Tension
    • Neutral Outcome: Maintain Tension
    • Negative Outcome: Increase Tension
  5. Story Update: The game updates the story based on the outcome and tension change.
  6. Tension Check:
    • If tension is at a critical level, a major event is triggered.
    • If tension is normal, the game continues to the next situation.
  7. Major Events: When triggered, the game randomly selects one of five possible events:
    • Natural Disaster
    • Enemy Ambush
    • Ally Betrayal
    • Divine Intervention
    • Unexpected Alliance
  8. Event Handling:
    • Apply the effects of the selected event
    • Display a description of the event
    • Update the quest log
    • Reset the tension level
    • Flag the event as recent to prevent immediate repetition
  9. Continuation: The game returns to presenting the next situation, continuing the gameplay loop.