-
Notifications
You must be signed in to change notification settings - Fork 0
/
items.cpp
executable file
·54 lines (39 loc) · 1.42 KB
/
items.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/***************************************************************\
* *
* KSILYAN *
* *
*****************************************************************
* *
* Lots of various code to handle and deal with items in general.*
* *
\***************************************************************/
#include <stdio.h>
#include <unistd.h>
#include "mud.h"
char * const damage_type_names [] =
{
"slash", "pierce", "whip", "bludgeon",
"cold", "fire", "electricity", "energy",
"acid", "poison"
};
/*
The energy damage type is for all magic that doesn't fall into any category.
*/
char * const weapon_type_names [] =
{
"pugilism", "long blade", "short blade", "flexible arm",
"bludgeon", "polearm", "long bow", "short bow",
"crossbow", "sling", "throwing spear", "throwing knife"
};
int get_weapon_type( OBJ_INDEX_DATA *obj )
{
return obj->value[3];
}
int get_weapon_range( OBJ_INDEX_DATA *obj )
{
return obj->value[4];
}
int get_weapon_damage_type( OBJ_INDEX_DATA *obj )
{
return obj->value[4];
}