> ## Documentation Index
> Fetch the complete documentation index at: https://docs.borntocraftstudio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Dungeon Facts

> Readable facts that check if a player is inside a dungeon instance — useful for criteria and conditions.

Facts that return `1` (true) or `0` (false) depending on whether the player is inside a dungeon instance.

## Entry Types

### InDungeon Fact

Returns `1` if the player is inside **any** active dungeon instance.

<ResponseField name="indungeon" type="Map" required>
  <Expandable title="Properties">
    <ResponseField name="id" type="String" required>
      Unique identifier for this fact.
    </ResponseField>

    <ResponseField name="name" type="String">
      Display name.
    </ResponseField>

    <ResponseField name="group" type="Ref<GroupEntry>">
      Group this fact belongs to.
    </ResponseField>
  </Expandable>
</ResponseField>

### InDungeonInstance Fact

Returns `1` if the player is inside a **specific** dungeon instance.

<ResponseField name="indungeon_instance" type="Map" required>
  <Expandable title="Properties">
    <ResponseField name="id" type="String" required>
      Unique identifier.
    </ResponseField>

    <ResponseField name="name" type="String">
      Display name.
    </ResponseField>

    <ResponseField name="group" type="Ref<GroupEntry>">
      Group this fact belongs to.
    </ResponseField>

    <ResponseField name="dungeonInstance" type="Ref<DungeonInstanceEntry>">
      Dungeon instance to check.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```yaml theme={null}
# Check if player is in any dungeon
fact:
  type: indungeon
  id: "player_in_dungeon"
  name: "In Dungeon"

# Check if player is in the Ancient Temple specifically
fact:
  type: indungeon_instance
  id: "in_temple"
  name: "In Ancient Temple"
  dungeonInstance: "ancient_temple"
```

## Usage in Criteria

```yaml theme={null}
criteria:
  - type: fact
    fact: "player_in_dungeon"
    operator: ">="
    value: 1
```
