Atrinik Server  4.0
living.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
31 #ifndef LIVING_H
32 #define LIVING_H
33 
39 #define STR 0
40 
41 #define DEX 1
42 
43 #define CON 2
44 
45 #define INT 3
46 
47 #define POW 4
48 
49 #define NUM_STATS 5
50 
52 /* Changed from NO_STAT to NO_STAT_VAL to fix conflict on
53  * AIX systems */
54 
55 /* needed by skills code -b.t. */
56 #define NO_STAT_VAL 99
57 
61 #define LEVEL_DAMAGE(level) (float) ((level) > 0 ? 0.75 + (level) * 0.25 : 1.0)
62 
67 typedef struct liv {
69  int64_t exp;
70 
72  int32_t hp;
73 
75  int32_t maxhp;
76 
78  int16_t sp;
79 
81  int16_t maxsp;
82 
84  int16_t food;
85 
87  int16_t dam;
88 
90  int16_t wc;
91 
93  int16_t ac;
94 
100  uint8_t wc_range;
101 
103  int8_t Str;
104 
106  int8_t Dex;
107 
109  int8_t Con;
110 
112  int8_t Int;
113 
115  int8_t Pow;
116 } living;
117 
118 #endif
int16_t ac
Definition: living.h:93
struct liv living
int64_t exp
Definition: living.h:69
Definition: living.h:67
int16_t sp
Definition: living.h:78
int8_t Int
Definition: living.h:112
int16_t maxsp
Definition: living.h:81
int8_t Con
Definition: living.h:109
int32_t hp
Definition: living.h:72
int32_t maxhp
Definition: living.h:75
int16_t dam
Definition: living.h:87
uint8_t wc_range
Definition: living.h:100
int16_t wc
Definition: living.h:90
int8_t Dex
Definition: living.h:106
int8_t Str
Definition: living.h:103
int8_t Pow
Definition: living.h:115
int16_t food
Definition: living.h:84