Atrinik Server 2.5
Defines | Functions
types/food.c File Reference
#include <global.h>
#include <math.h>

Go to the source code of this file.

Defines

#define FOOD_MAX   999

Functions

void apply_food (object *op, object *tmp)
void create_food_force (object *who, object *food, object *force)
void eat_special_food (object *who, object *food)

Detailed Description

Handles code used for food, drinks and flesh.

Definition in file food.c.


Define Documentation

#define FOOD_MAX   999

Maximum allowed food value.

Definition at line 35 of file food.c.


Function Documentation

void apply_food ( object op,
object tmp 
)

Apply a food/drink/flesh object.

Parameters:
opThe object applying this.
tmpThe object to apply.

Definition at line 41 of file food.c.

void create_food_force ( object who,
object food,
object force 
)

Create a food force to include buff/debuff effects of stats and protections to the player.

Parameters:
whoThe player object.
foodThe food.
forceThe force object.

Definition at line 144 of file food.c.

void eat_special_food ( object who,
object food 
)

The food gives specials, like +/- hp or sp, protections and stats.

Food can be good or bad (good effect or bad effect), and cursed or not. If food is "good" (for example, Str +1 and Dex +1), then it puts those effects as force in the player for some time.

If good food is cursed, all positive values are turned to negative values.

If bad food (Str -1, Dex -1) is uncursed, it gives just those values.

If bad food is cursed, all negative values are doubled.

Food effects can stack. For really powerful food, a high food value should be set, so the player can't eat a lot of such food, as his stomach will be full.

Parameters:
whoObject eating the food.
foodThe food object.

Definition at line 259 of file food.c.