# Candy

### Properties

The following table details each property available in the `CandyData` configuration.

| Property Name           | Type          | Description                                                                                                                   |
| ----------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `CandyType`             | `CandyKindID` | The specific type of the candy.                                                                                               |
| `EatingMessage`         | `string`      | The message displayed to the player when they consume the candy.                                                              |
| `EatingMessageDuration` | `float`       | How long, in seconds, the `EatingMessage` is displayed on the screen.                                                         |
| `DestroyOnUse`          | `bool`        | If `true`, the candy item is consumed and removed from inventory after use. If `false`, it remains.                           |
| `Chance`                | `float`       | The probability (0 to 100) of a certain effect or outcome occurring when the candy is used. For example, 50 for a 50% chance. |
| `ApplyEffects`          | `bool`        | If `true`, any associated effects (e.g., buffs, debuffs, healing) will be applied upon consumption.                           |
| `AllowSpawningAsItem`   | `bool`        | If `true`, this candy can be spawned as a item when the round starts.                                                         |

### Example Configuration (YAML)

Below is an example of how you might configure these properties in a typical YAML file that would be loaded into this data class.

```yaml
CustomData:
  candy_type: Red
  eating_message: "You feel a delightful sugar rush!"
  eating_message_duration: 3.0
  destroy_on_use: true
  chance: 0.75
  apply_effects: true
  allow_spawning_as_item: false
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.uci.ucserver.it/uncomplicatedcustomitems/api/custom-data/candy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
