blob: 89d47bd38830c68904f2224df7a86a40b670eb30 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001
2OBJECT:
3 living
4
5
6SYNOPSIS:
7 inherit "std/living";
8
9 #include <properties.h>
10 #include <living.h>
11
12
13DESCRIPTION:
14 This is the generic living object which 'lives', can move,
15 can fight.
16
17 It has a number of 'stats', also called 'attributes' in
18 the new system. These include the former stats
19 strength, dexterity, intelligence and constitution.
20 These attributes determine the life functions and
21 variables like hitpoints and spellpoints, but also the
22 ability to perform certain actions like spellcasting or
23 swordfighting. Attributs are implemented as a property
24 P_ATTRIBUTES. Attributes can be set by using the functions
25
26 SetAttribute(string attribute, int value)
27 Sets <attribute> to <value>. Certain restrictions might
28 exist, and the requested attribute might not be set.
29 Attributes are integer values, and are in the range
30 of 1 (very bad) to 20 (excellent and highest possible
31 for a normal human).
32
33 int QueryAttribute(string attribute)
34 Returns value of <attribute>
35
36 Abilities. A living creature may have special abilities
37 to perform certain actions. These may be very different
38 types of actions, like fighting with a sword, casting
39 a fireball or climbing up a tree. Abilities are
40 implemented as the P_ABILITIES property. An ability may
41 be accompanied by an object which may define special
42 actions and which uses the values of P_ABILITES, for
43 example a spellbook will store spell levels there or
44 a weapon uses a weapon ability (skill). The abilities
45 can be manipulated:
46
47 SetAbility(string ability, int value)
48 Sets <ability> to <value>.
49
50 int QueryAbility(string ability)
51 Ask the value of <ability>.
52
53 Equipment. Weaponclass and armourclass are defined. Unless
54 a weapon is used, the wc is 0. Unless an armour is used,
55 the ac is 0. (P_WC and P_AC)
56
57 Live variables. A living creature has several needs just
58 because it is alive. The complex life functions are
59 reducced to some crucial factors.
60
61 P_HP
62 These are mainly determined by the constitution and give
63 the ability of the body to absorb damage. If the
64 hitpoints go below zero, the creature is dead.
65
66 P_SP
67 Spellpoints (sometimes called mana) describe the magical
68 (spiritual) capability of the creature. It is mainly
69 determined by Intelligence and Wisdom. It is up to the
70 creature how good it uses the spellpoint resource.
71 Spellpoints will go down when supernatural actions are
72 performed by the creature.
73
74 P_MAX_SP, P_MAX_HP
75 Readonly variable which are computed from attributes.
76
77 P_FOOD, P_DRINK, P_ALCOHOL, (P_POISON)
78 These three variables describe hunger, thirst and
79 intoxication by alcohol. The max is dependent on the
80 constitution of the living, and of the weight.
81 These variables automatically decrease with time.
82 When food or drink goes below zero, the creature
83 suffers hunger or thirst and will lose hitpoints.
84
85 P_MAX_FOOD, P_MAX_DRINK, P_MAX_ALCOHOL
86 Readonly variables which are computed from attributes.
87
88 P_WEIGHT, P_SIZE
89 These variables describe the physical proportions of
90 the creatures body. Both variables are standard properties
91 and are also used in normal objects.
92
93 P_MAX_WEIGHT
94 This is a readonly variable which describes how much
95 a living creature may carry around.
96
97 P_GENDER
98 This is obvious. Gender may be MALE, FEMALE or NEUTER,
99 as defined in <living.h>. Player gender may be only
100 MALE or FEMALE.
101
102 P_RACE
103 A string which defines the race.
104
105 P_ALIGNMENT
106 The alignment of the living, ranging frO
107
108 P_AGE
109 The age of the living creature in seconds
110
111
112INHERITANCE TREE:
113 living
114 |-thing/moving
115 |-thing/properties
116 `-thing/description
117
118
119SEE ALSO:
120 properties(C), units(C)