Go to the documentation of this file.
56 {
"body_range",
"in your range slot",
"in a human's range slot" },
57 {
"body_arm",
"on your arm",
"on a human's arm" },
58 {
"body_torso",
"on your body",
"on a human's torso" },
59 {
"body_head",
"on your head",
"on a human's head" },
60 {
"body_neck",
"around your neck",
"around a human's neck" },
61 {
"body_skill",
"in your skill slot",
"in a human's skill slot" },
62 {
"body_finger",
"on your finger",
"on a human's finger" },
63 {
"body_shoulder",
"around your shoulders",
"around a human's shoulders" },
64 {
"body_foot",
"on your feet",
"on a human's feet" },
65 {
"body_hand",
"on your hands",
"on a human's hands" },
66 {
"body_wrist",
"around your wrists",
"around a human's wrist" },
67 {
"body_waist",
"around your waist",
"around a human's waist" },
68 {
"body_leg",
"around your legs",
"around a human's legs" },
80 { 0,
"none",
"none", 0, 0 },
81 {
PLAYER,
"player",
"players", 0, 0 },
82 {
TRANSPORT,
"transport",
"transports", 0, 0 },
84 {
TREASURE,
"treasure",
"treasure", 0, 0 },
89 {
CLOCK,
"clock",
"clocks", 0, 0 },
94 {
PEDESTAL,
"pedestal",
"pedestals", 0, 0 },
95 {
ALTAR,
"altar",
"altars", 0, 0 },
96 {
LOCKED_DOOR,
"locked door",
"locked doors", 0, 0 },
97 {
SPECIAL_KEY,
"special key",
"special keys", 0, 0 },
98 {
MAP,
"map",
"maps", 0, 0 },
99 {
DOOR,
"door",
"doors", 0, 0 },
100 {
KEY,
"key",
"keys", 0, 0 },
101 {
TIMED_GATE,
"timed_gate",
"timed_gates", 0, 0 },
102 {
TRIGGER,
"trigger",
"triggers", 0, 0 },
103 {
GRIMREAPER,
"grimreaper",
"grimreapers", 0, 0 },
104 {
MAGIC_EAR,
"magic ear",
"magic ears", 0, 0 },
110 {
MONEY,
"money",
"money", 0, 0 },
111 {
CLASS,
"class",
"classes", 0, 0 },
113 {
PLAYERMOVER,
"player mover",
"player movers", 0, 0 },
114 {
TELEPORTER,
"teleporter",
"teleporters", 0, 0 },
115 {
CREATOR,
"creator",
"creators", 0, 0 },
116 {
SKILL,
"skill",
"skills", 0, 0 },
117 {
EARTHWALL,
"earthwall",
"earthwalls", 0, 0 },
118 {
GOLEM,
"golem",
"golems", 0, 0 },
119 {
THROWN_OBJ,
"projectile",
"projectiles", 0, 0 },
120 {
BLINDNESS,
"blindness",
"blindness", 0, 0 },
121 {
GOD,
"god",
"gods", 0, 0 },
122 {
DETECTOR,
"detector",
"detectors", 0, 0 },
124 {
DEAD_OBJECT,
"dead object",
"dead objects", 0, 0 },
126 {
MARKER,
"marker",
"markers", 0, 0 },
127 {
HOLY_ALTAR,
"holy altar",
"holy altars", 0, 0 },
129 {
BATTLEGROUND,
"battleground",
"battlegrounds", 0, 0 },
130 {
PEACEMAKER,
"peacemaker",
"peacemakers", 0, 0 },
132 {
FIREWALL,
"firewall",
"firewalls", 0, 0 },
133 {
CHECK_INV,
"inventory checker",
"inventory checkers", 0, 0 },
134 {
MOOD_FLOOR,
"mood floor",
"mood floors", 0, 0 },
135 {
EXIT,
"exit",
"exits", 0, 0 },
136 {
ENCOUNTER,
"encounter",
"encounters", 0, 0 },
137 {
SHOP_FLOOR,
"shop floor",
"shop floors", 0, 0 },
138 {
SHOP_MAT,
"shop mat",
"shop mats", 0, 0 },
140 {
FLOOR,
"floor",
"floors", 0, 0 },
143 {
SKILL_TOOL,
"skill tool",
"skill tools", 0, 0 },
144 {
LIGHTER,
"lighter",
"lighters", 0, 0 },
145 {
WALL,
"wall",
"walls", 0, 0 },
146 {
MISC_OBJECT,
"bric-a-brac",
"bric-a-brac", 0, 0 },
147 {
MONSTER,
"monster",
"monsters", 0, 0 },
148 {
LAMP,
"lamp",
"lamps", 0, 0 },
149 {
DUPLICATOR,
"duplicator",
"duplicators", 0, 0 },
152 {
SPINNER,
"spinner",
"spinners", 0, 0 },
153 {
GATE,
"gate",
"gates", 0, 0 },
154 {
BUTTON,
"button",
"buttons", 0, 0 },
155 {
CF_HANDLE,
"cf handle",
"cf handles", 0, 0 },
156 {
HOLE,
"hole",
"holes", 0, 0 },
157 {
TRAPDOOR,
"trapdoor",
"trapdoors", 0, 0 },
158 {
SIGN,
"sign",
"signs", 0, 0 },
161 {
SPELL,
"spell",
"spells", 0, 0 },
162 {
SPELL_EFFECT,
"spell effect",
"spell effects", 0, 0 },
163 {
CONVERTER,
"converter",
"converters", 0, 0 },
165 {
POISONING,
"poisoning",
"poisonings", 0, 0 },
166 {
SAVEBED,
"savebed",
"savebeds", 0, 0 },
169 {
DIRECTOR,
"director",
"directors", 0, 0 },
171 {
FORCE,
"force",
"forces", 0, 0 },
178 {
DEEP_SWAMP,
"deep swamp",
"deep swamps", 0, 0 },
181 {
RUNE,
"rune",
"runes", 0, 0 },
182 {
TRAP,
"trap",
"traps", 0, 0 },
184 {
CORPSE,
"corpse",
"corpses", 0, 0 },
185 {
DISEASE,
"disease",
"diseases", 0, 0 },
186 {
SYMPTOM,
"symptom",
"symptoms", 0, 0 },
187 {
BUILDER,
"item builder",
"item builders", 0, 0 },
188 {
MATERIAL,
"building material",
"building materials", 0, 0 },
190 {
LIGHTABLE,
"lightable",
"lightables", 0, 0 },
221 std::bitset<32> xs =
x;
256 tmp +=
op->resist[i];
286 enc +=
op->stats.food;
289 enc +=
op->stats.grace;
290 enc +=
op->stats.exp;
292 enc +=
op->stats.luck;
380 if (use_media_tags) {
384 if (
op->resist[tmpvar] == 100 ||
op->resist[tmpvar] == -100) {
392 if (use_media_tags) {
393 if (
op->resist[tmpvar] == 100 ||
op->resist[tmpvar] == -100) {
419 snprintf(
buf, size,
" ");
421 snprintf(
buf, size,
"%6.1f", i/1000.0);
423 snprintf(
buf, size,
"%4d ", i/1000);
452 for (attr = 0; attr <
NUM_STATS; attr++) {
468 if (
op->stats.food != 0)
516 if (
op->name == NULL) {
517 snprintf(
buf, size,
"(null)");
542 if (!
op->title && (
op->inv)) {
547 snprintf(
buf+len, size-len,
" (lvl %d)",
op->level);
548 len += strlen(
buf+len);
572 snprintf(
buf+len, size-len,
" %+d",
op->magic);
573 len += strlen(
buf+len);
692 if ((!plural && !
op->name)
693 || (plural && !
op->name_pl)) {
694 strncpy(
buf,
"(null)", size);
699 strncpy(
buf,
op->name, size);
719 if (!
op->title && (
op->inv)) {
731 snprintf(
buf+len, size-len,
" (lvl %d)",
op->level);
732 len += strlen(
buf+len);
756 snprintf(
buf+strlen(
buf), size-strlen(
buf),
" %+d",
op->magic);
789 switch ((
int)((
FABS(
op->speed))*15)) {
852 if (
op->randomitems != NULL) {
856 for (
t =
op->randomitems->items;
t != NULL;
t =
t->next)
857 if (
t->item && (
t->item->clone.type ==
SPELL)) {
866 if (
op->contr->digestion) {
867 if (
op->contr->digestion != 0)
870 if (
op->contr->gen_grace) {
873 if (
op->contr->gen_sp) {
876 if (
op->contr->gen_hp) {
879 if (
op->stats.luck) {
893 if (
tmp &&
tmp->attacktype != 0) {
1017 if (
op->item_power) {
1035 for (attr = 0; attr <
NUM_STATS; attr++) {
1040 if (
op->glow_radius)
1048 if (
op->stats.exp) {
1072 if (
op->stats.dam) {
1103 if (
op->item_power) {
1171 if (
op->stats.food) {
1172 if (
op->stats.food != 0)
1175 if (
op->stats.grace) {
1186 if (
op->stats.luck) {
1197 if (
op->slaying != NULL &&
op->type !=
FOOD) {
1235 if (
op->title != NULL)
1242 && (
op->stats.ac ||
op->stats.food ||
op->stats.exp ||
op->stats.dam ||
op->stats.wc ||
op->stats.grace ||
op->stats.sp ||
op->stats.hp ||
op->stats.luck))
1379 op->anim_speed = atoi(
key);
1439 if (
op->inv &&
op->randomitems) {
1443 }
else if (
op->arch) {
1464 }
else if (
op->env) {
1477 else if (
op->env->map &&
1479 && (
pl->container ==
op->env)) {
size_t stringbuffer_length(StringBuffer *sb)
#define NUM_BODY_LOCATIONS
#define GET_MAP_TOP(M, X, Y)
#define FLAG_CLIENT_ANIM_RANDOM
void LOG(LogLevel logLevel, const char *format,...)
void safe_strcat(char *dest, const char *orig, size_t *curlen, size_t maxlen)
#define QUERY_FLAG(xyz, p)
#define FLAG_REFL_MISSILE
object * object_merge(object *op, object *top)
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
StringBuffer * stringbuffer_new(void)
static int bits_set(uint32_t x)
#define FLAG_SEE_INVISIBLE
int get_power_from_ench(int ench)
#define ARMOUR_SPELLS(xyz)
void esrv_update_item(int flags, object *pl, object *op)
#define ARMOUR_SPEED(xyz)
const char * object_get_value(const object *op, const char *const key)
static const typedata item_types[]
const char *const short_stat_name[NUM_STATS]
char * stringbuffer_finish(StringBuffer *sb)
void object_update(object *op, int action)
static uint32_t NROF(const object *const ob)
sstring add_refcount(sstring str)
StringBuffer * describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf)
const typedata * get_typedata(int itemtype)
void query_name(const object *op, char *buf, size_t size)
#define FLAG_KNOWN_BLESSED
object * map_find_by_type(mapstruct *m, int x, int y, uint8_t type)
#define FLAG_KNOWN_CURSED
StringBuffer * describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf)
object * object_find_by_type_and_name(const object *who, int type, const char *name)
void query_short_name(const object *op, char *buf, size_t size)
static StringBuffer * ring_desc(const object *op, int use_media_tags, StringBuffer *buf)
StringBuffer * describe_attacktype(const char *attack, int value, StringBuffer *buf)
const char *const change_resist_msg[NROFATTACKS]
int is_identified(const object *op)
#define FREE_AND_COPY(sv, nv)
#define FLAG_UNAGGRESSIVE
body_locations_struct body_locations[NUM_BODY_LOCATIONS]
void stringbuffer_append_string(StringBuffer *sb, const char *str)
#define FLAG_CAN_USE_SKILL
const typedata * get_typedata_by_name(const char *name)
const char *const resist_plus[NROFATTACKS]
size_t strlcpy(char *dst, const char *src, size_t size)
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
void free_string(sstring str)
static const int item_types_size
Animations * try_find_animation(const char *name)
#define FLAG_CLIENT_ANIM_SYNC
#define FLAG_KNOWN_MAGICAL
void query_weight(const object *op, char *buf, size_t size)
#define WEAPON_SPEED(xyz)
int is_dragon_pl(const object *op)
int is_magical(const object *op)
int is_identifiable_type(const object *op)
const typedef char * sstring
void animate_object(object *op, int dir)
#define FLAG_BEEN_APPLIED
#define CLEAR_FLAG(xyz, p)
int atnr_is_dragon_enabled(int attacknr)
static const int enc_to_item_power[]
const char *const resist_color[NROFATTACKS]
void object_give_identified_properties(object *op)
const Face * try_find_face(const char *name, const Face *error)
StringBuffer * describe_monster(const object *op, int use_media_tags, StringBuffer *buf)
void query_base_name(const object *op, int plural, char *buf, size_t size)
int object_set_value(object *op, const char *key, const char *value, int add_key)
int8_t get_attr_value(const living *stats, int attr)
int calc_item_power(const object *op)
#define FLAG_NO_SKILL_IDENT
object * object_get_player_container(object *op)
object * identify(object *op)