> For the complete documentation index, see [llms.txt](https://infinitypbr.gitbook.io/magic-pig-games/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitypbr.gitbook.io/magic-pig-games/game-modules-4/module-documentation/quests/demo-scene-quests/dont-get-poisoned.md).

# Don't Get Poisoned

This quest should be easy... just don't get poisoned within a certain amount of time! Of course, you can click the button to fail the quest on purpose.

### Quest Details

This quest belongs to all four invididual members of the party. Each one can succeed or fail independently of the rest. It requires the player avoid getting the "Poison" condition for a short period of time. If they don't get the condition, the quest will automatically succeed. If they do get the condition, it will instantly fail.

This is to demonstrate a few things. First, how a **Quest** can be applied to multiple party members at once, and affect each independntly of the others and of the "party quests". It also demonstrates the time limit, which is an option for any **Quest**. Finally, it demonstrates how a **Quest Condition** can cause the **Quest** to fail.

{% hint style="info" %}
In the demo, I wanted to showcase how to get data from a `GameConditionsList` into the **Quest** system. As the failure is only that the character "gets poisoned", another way of achieving this is to simply post to the **Blackboard** the same topic, with the subject "Got Poisoned".&#x20;
{% endhint %}

<figure><img src="https://2431624982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MY3N_li2jPq7az6mYfq%2Fuploads%2FkwsFW1aWrAcarDbX6IS5%2FScreenshot%202022-12-28%20at%2011.35.45%20PM.png?alt=media&amp;token=ae9b6e30-3fae-4b3a-8fc2-a5ebf50945bc" alt=""><figcaption></figcaption></figure>

With *"Has End Time"* toggled true, the *Time Limit* and *On Expiration* options are available. I have set the Time Limit to 3, which is "Three in-game minutes". If you're using the **Gametime** module, you'll just pass the `Now()` value into the system, so it knows what time it is. Otherwise you'll need to handle your own time keeping.

When the time runs out, three outcomes are available. *Remove* means the quest will simply be removed from the list. It will not succeed or fail.

If *Succeed* or *Fail* are selected, all of the **QuestStep** steps will be marked accordingly, and their `canRevert` value will be set `false`. This is to ensure they do not accidentlly revert back.

If *Auto Succeed* or *Auto Fail* are on, and that outcome has occurred, then they will automatically complete one way or the other. If the outcome is not set to automatically complete, then it will be up to you to manually call the `CompleteQuest()` method when you would like.

{% hint style="success" %}
*"Query Every Frame"* is off, which means the `QuestCondition` will not check the `GameConditionList` every frame, and will only check if you call it manually, or if the `GameQuest` receives a notification from the **Blackboard**.

In the demo, when a character is given poison, a call to update the `BlackboardNote` is sent, which also sends a notification. This triggers the `Quest` to check its status, which will cause it to fail. Since the *"Auto Fail"* option is true, as soon as a single `QuestStep` fails, the entire quest will fail.

```
Blackboard.blackboard.UpdateNote(player.ObjectId()
    , "Conditions"
    , player.conditions);
```

{% endhint %}
