Skip to main content

add_eat_effect

Discworld food help

add_eat_effect

Name

add_eat_effect - Adds an eat effect.

Syntax

void add_eat_effect(string effect, int number);

Description

Adds an eat effect to the food. This will be added to the player or NPC when the food is eaten.

The effect is added with a number as the argument. The number is based on the amount which is eaten (in weight units). If the object is continuous, the weight is calculated from the amount and weight_unit array:


eff_num = (amount * number * weight_unit[0]) / weight_unit[1]

Where number is the the number passed into the add_eat_effect function.

See also

query_eat_effects, set_eat_effects, query_weight_unit, set_weight_unit, remove_eat_effect