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

# Items.lua

Located in `shared/config/items.lua`.

This file defines all item-based interactions used by Doctorjob V2. Items are grouped into three tables:

* `MedicineItems`: temporary or permanent disease cures (e.g., bandages, antibiotics)
* `ReviveItems`: revive unconscious/dead players (e.g., syringe)
* `HealItems`: heals *injury/bone damage* (e.g., ointment)

## MedicineItems

Medicine items can cure one or more diseases with per-disease probability, and can optionally expire after a duration.

Common properties:

* `healProbability`: map of disease id -> probability (`1.0` = 100%).
* `cureDuration`: milliseconds before the cure expires (`-1` for permanent).
* `applyDuration`: milliseconds the progressbar/interaction takes.
* `healthAmount`: health to add when used.
* `innerCoreHealth`: inner core health added (0 to 100).
* `language`: table of texts used during apply/expire.
* `animationDict` + `animation`: play an animation (set both to `nil` to use a scenario).
* `scenario`: scenario string (set to `nil` to use animation instead).
* `damageType`: optional damage state to set (used for bandage-style workflows).

Example:

```lua theme={null}
MedicineItems = {
    ['bandage'] = {
        healProbability = {
            ['bleeding'] = 1.0,
            ['cold'] = 0.001
        },
        cureDuration = 60000,
        applyDuration = 10000,
        healthAmount = 200,
        innerCoreHealth = 20,
        language = {
            cureExpired = "The bandage has fallen, you start bleeding again. Put on a bandage and visit a doctor.",
            applying = "Applying bandage...",
            applied = "Bandage applied, you stopped bleeding."
        },
        animationDict = nil,
        animation = nil,
        scenario = 'WORLD_HUMAN_CROUCH_INSPECT',
        damageType = 'bandaged'
    }
}
```

## ReviveItems

Revive items are used to revive a player. They add health and core health, and may be restricted to certain jobs.

Additional properties:

* `reviveProbability`: probability of successful revive.
* `allowedJobs`: list of jobs allowed to use the item (`nil` = everyone).

```lua theme={null}
ReviveItems = {
    ['syringe'] = {
        reviveProbability = 1.0,
        applyDuration = 20000,
        healthAmount = 200,
        innerCoreHealth = 20,
        animationDict = "mech_revive@unapproved",
        animation = "revive",
        scenario = nil,
        language = {
            applying = "Injecting syringe..."
        },
        allowedJobs = { 'doctor' }
    }
}
```

## HealItems

Heal items affect injury/bone damage. They do not target diseases directly.

Common properties:

* `healAmount`: percentage of health to cure on a specific body part.
* `applyDuration`: milliseconds to apply.
* `allowedJobs`: list of jobs allowed to use the item (`nil` = everyone).

```lua theme={null}
HealItems = {
    ['simple_ointment'] = {
        healAmount = 20.0,
        applyDuration = 5000,
        animationDict = nil,
        animation = nil,
        scenario = 'WORLD_HUMAN_CROUCH_INSPECT',
        language = {
            applying = "Applying ointment...",
            applied = "Ointment applied, light wounds are healed"
        },
        allowedJobs = nil
    }
}
```
