Atrinik Server 2.5
Data Structures | Defines | Typedefs | Variables
include/living.h File Reference

Go to the source code of this file.

Data Structures

struct  liv

Defines

#define STR   0
#define DEX   1
#define CON   2
#define WIS   3
#define CHA   4
#define INT   5
#define POW   6
#define NUM_STATS   7
#define NO_STAT_VAL   99
#define LEVEL_DAMAGE(level)   (float) ((level) ? 0.75f + (level) * 0.25f : 1.0f)

Typedefs

typedef struct liv living

Variables

int dam_bonus [MAX_STAT+1]
int thaco_bonus [MAX_STAT+1]
float cha_bonus [MAX_STAT+1]
float speed_bonus [MAX_STAT+1]
uint32 weight_limit [MAX_STAT+1]
int learn_spell [MAX_STAT+1]
int savethrow [MAXLEVEL+1]
const char *const restore_msg [NUM_STATS]
const char *const lose_msg [NUM_STATS]
const char *const statname [NUM_STATS]
const char *const short_stat_name [NUM_STATS]
char * spellpathnames [NRSPELLPATHS]

Detailed Description

Structures and defines related to living objects, including stats of objects.

Definition in file living.h.


Define Documentation

#define LEVEL_DAMAGE (   level)    (float) ((level) ? 0.75f + (level) * 0.25f : 1.0f)

Calculates damage based on level.

Definition at line 77 of file living.h.


Typedef Documentation

typedef struct liv living

Mostly used by "alive" objects, but also by other objects like gates, buttons, waypoints and a number of other objects.


Variable Documentation

float cha_bonus[MAX_STAT+1]

Charisma bonus.

As a base value, you get in a shop 20% of the real value of an item.

With a charisma bonus, you can go up to 30% at maximum or 5% at minimum (actually this is 10% minimum, because stats cannot go below 1). For buying, these values are used in reverse. You can buy for 90% at best, or 115% (110%, because stats cannot go below 1) at worst.

Definition at line 89 of file living.c.

int dam_bonus[MAX_STAT+1]

dam_bonus, thaco_bonus, weight limit all are based on strength.

Definition at line 38 of file living.c.

int learn_spell[MAX_STAT+1]

Probability to learn a spell or skill, based on intelligence or wisdom.

Definition at line 134 of file living.c.

const char* const lose_msg[NUM_STATS]

Message when a player decreases a stat.

Definition at line 203 of file living.c.

const char* const restore_msg[NUM_STATS]

Message when a player has a stat restored.

Definition at line 179 of file living.c.

int savethrow[MAXLEVEL+1]

Probability to avoid something.

Definition at line 155 of file living.c.

const char* const short_stat_name[NUM_STATS]

Short names of stats.

Definition at line 227 of file living.c.

float speed_bonus[MAX_STAT+1]

Speed bonus. Uses dexterity as its stat.

Definition at line 102 of file living.c.

char* spellpathnames[NRSPELLPATHS]

Spell paths

Definition at line 454 of file spellist.h.

const char* const statname[NUM_STATS]

Names of stats.

Definition at line 215 of file living.c.

int thaco_bonus[MAX_STAT+1]

THAC0 bonus - WC bonus

Definition at line 46 of file living.c.

uint32 weight_limit[MAX_STAT+1]

The absolute most a character can carry - a character can't pick stuff up if it would put him above this limit.

Value is in grams, so we don't need to do conversion later

These limits are probably overly generous, but being there were no values before, you need to start someplace.

Definition at line 120 of file living.c.