Creating Drinks - Dungeons-of-Kathallion/Bane-Of-Wargs GitHub Wiki

Introduction

Drinks are consumables that you can buy in hostels only. Once you buy them, you automatically consume them. Drinks can only affect the player health by restoring it to a defined amount. The specified amount can only go up to a value of 999; which'll set the player health to its maximum health. Drinks are located in the data/drinks.yaml data file.

Note that the price of drinks can vary depending on the cost value attribute from where you bought it.

Explanation

An example of a drink definition:

Purple Elixir:
  gold: 6.2
  healing level: 12
  description: "Purple Elixirs are expensive drinks but all great adventurers use them to get health back." 

And the syntax:

<drink id>:
  gold: <base cost(float)>
  healing level: <health restoration(int)>
  description: <a clear and concise description(str)>

Full explanation of all attributes:

  • gold // this determine the base price in gold of the drink. Can vary following the hostel/NPC cost value.
  • healing level // the number of hp that this drink restores when con consumed/bought. Can go up to 999, when this value is set to 999, it will set the player health to its maximum health.
  • description // the description of the drink. It is never shown anywhere unless in the code. You do not have to write this attribute for the drink to work.
⚠️ **GitHub.com Fallback** ⚠️