{
  "events": [
    {
      "event_id": "whispering_well",
      "title": "The Whispering Well",
      "requirements": {
        "tile": {
          "$gte": 5,
          "$lte": 25
        },
        "event_not_completed": "whispering_well"
      },
      "text": "A stone well whispers your name. Something at the bottom promises to change your fate.",
      "choices": [
        {
          "id": "drink",
          "text": "Drink from the well.",
          "skill_check": {
            "stat": "luck",
            "difficulty": 13
          },
          "outcomes": {
            "success": {
              "text": "Cold light fills your veins.",
              "effects": [
                {
                  "target": "player.max_hp",
                  "operation": "add",
                  "value": 10
                },
                {
                  "target": "player.hp",
                  "operation": "set",
                  "value": "player.max_hp"
                }
              ]
            },
            "failure": {
              "text": "The water tastes of iron. Something moves inside you.",
              "effects": [
                {
                  "target": "player.hp",
                  "operation": "subtract",
                  "value": 20
                },
                {
                  "target": "player.status_effects",
                  "operation": "push",
                  "value": "cursed"
                }
              ]
            }
          }
        },
        {
          "id": "offer_coin",
          "text": "Throw 10 gold into the well.",
          "requirements": {
            "player.gold": {
              "$gte": 10
            }
          },
          "effects": [
            {
              "target": "player.gold",
              "operation": "subtract",
              "value": 10
            },
            {
              "target": "player.luck",
              "operation": "add",
              "value": 1
            }
          ]
        },
        {
          "id": "leave",
          "text": "Leave the well alone.",
          "effects": []
        }
      ]
    },
    {
      "event_id": "injured_serpent",
      "title": "The Wounded Serpent",
      "text": "A young serpent lies trapped beneath a fallen pillar. Unlike the tower's monsters, it does not attack.",
      "choices": [
        {
          "id": "free_serpent",
          "text": "Free the creature.",
          "effects": [
            {
              "target": "player.reputation.serpent_cult",
              "operation": "add",
              "value": 10
            },
            {
              "target": "run.active_flags.serpent_friend",
              "operation": "set",
              "value": true
            }
          ]
        },
        {
          "id": "kill_serpent",
          "text": "Kill it and take its fang.",
          "effects": [
            {
              "target": "player.inventory",
              "operation": "push",
              "value": {
                "item_id": "serpent_fang",
                "quantity": 1
              }
            },
            {
              "target": "run.active_flags.serpent_slayer",
              "operation": "set",
              "value": true
            }
          ]
        },
        {
          "id": "ignore",
          "text": "Walk away.",
          "effects": []
        }
      ]
    },
    {
      "event_id": "three_doors",
      "title": "Three Doors of Fate",
      "text": "Three doors block your path: one of bone, one of gold, and one covered in stars.",
      "choices": [
        {
          "id": "bone",
          "text": "Open the bone door.",
          "outcome_pool": [
            {
              "weight": 60,
              "event": "enemy_encounter"
            },
            {
              "weight": 40,
              "reward": {
                "xp": 100
              }
            }
          ]
        },
        {
          "id": "gold",
          "text": "Open the golden door.",
          "requirements": {
            "player.gold": {
              "$gte": 25
            }
          },
          "effects": [
            {
              "target": "player.gold",
              "operation": "subtract",
              "value": 25
            }
          ],
          "reward": {
            "loot_rolls": 2
          }
        },
        {
          "id": "stars",
          "text": "Open the door of stars.",
          "skill_check": {
            "stat": "luck",
            "difficulty": 16
          },
          "outcomes": {
            "success": {
              "move": {
                "type": "forward",
                "tiles": 8
              }
            },
            "failure": {
              "move": {
                "type": "backward",
                "tiles": 5
              }
            }
          }
        }
      ]
    }
  ],
  "quests": [
    {
      "quest_id": "fang_collector",
      "name": "Fangs for the Alchemist",
      "description": "Collect three venomous serpent fangs.",
      "objectives": [
        {
          "type": "collect",
          "item_id": "serpent_fang",
          "required": 3,
          "current": 0
        }
      ],
      "rewards": {
        "xp": 180,
        "gold": 75,
        "items": [
          {
            "item_id": "minor_healing_potion",
            "quantity": 3
          }
        ]
      }
    },
    {
      "quest_id": "broken_ladder",
      "name": "The Broken Ladder",
      "description": "Find the scattered rune fragments and restore the shattered ladder hidden near the Storm Spires.",
      "objectives": [
        {
          "type": "collect",
          "item_id": "rune_fragment",
          "required": 3,
          "current": 0
        }
      ],
      "rewards": {
        "xp": 250,
        "gold": 100,
        "unlock_ladder": {
          "from_tile": 44,
          "to_tile": 77,
          "id": "restored_ladder",
          "name": "Restored Rune Ladder",
          "description": "The repaired ladder hums with ancient power, opening a new shortcut."
        }
      }
    }
  ]
}