Go to the documentation of this file.
55 {
"body_range",
"in your range slot",
"in a human's range slot" },
56 {
"body_arm",
"on your arm",
"on a human's arm" },
57 {
"body_torso",
"on your body",
"on a human's torso" },
58 {
"body_head",
"on your head",
"on a human's head" },
59 {
"body_neck",
"around your neck",
"around a human's neck" },
60 {
"body_skill",
"in your skill slot",
"in a human's skill slot" },
61 {
"body_finger",
"on your finger",
"on a human's finger" },
62 {
"body_shoulder",
"around your shoulders",
"around a human's shoulders" },
63 {
"body_foot",
"on your feet",
"on a human's feet" },
64 {
"body_hand",
"on your hands",
"on a human's hands" },
65 {
"body_wrist",
"around your wrists",
"around a human's wrist" },
66 {
"body_waist",
"around your waist",
"around a human's waist" },
67 {
"body_leg",
"around your legs",
"around a human's legs" },
79 { 0,
"none",
"none", 0, 0 },
80 {
PLAYER,
"player",
"players", 0, 0 },
81 {
TRANSPORT,
"transport",
"transports", 0, 0 },
83 {
TREASURE,
"treasure",
"treasure", 0, 0 },
88 {
CLOCK,
"clock",
"clocks", 0, 0 },
93 {
PEDESTAL,
"pedestal",
"pedestals", 0, 0 },
94 {
ALTAR,
"altar",
"altars", 0, 0 },
95 {
LOCKED_DOOR,
"locked door",
"locked doors", 0, 0 },
96 {
SPECIAL_KEY,
"special key",
"special keys", 0, 0 },
97 {
MAP,
"map",
"maps", 0, 0 },
98 {
DOOR,
"door",
"doors", 0, 0 },
99 {
KEY,
"key",
"keys", 0, 0 },
100 {
TIMED_GATE,
"timed_gate",
"timed_gates", 0, 0 },
101 {
TRIGGER,
"trigger",
"triggers", 0, 0 },
102 {
GRIMREAPER,
"grimreaper",
"grimreapers", 0, 0 },
103 {
MAGIC_EAR,
"magic ear",
"magic ears", 0, 0 },
109 {
MONEY,
"money",
"money", 0, 0 },
110 {
CLASS,
"class",
"classes", 0, 0 },
112 {
PLAYERMOVER,
"player mover",
"player movers", 0, 0 },
113 {
TELEPORTER,
"teleporter",
"teleporters", 0, 0 },
114 {
CREATOR,
"creator",
"creators", 0, 0 },
115 {
SKILL,
"skill",
"skills", 0, 0 },
116 {
EARTHWALL,
"earthwall",
"earthwalls", 0, 0 },
117 {
GOLEM,
"golem",
"golems", 0, 0 },
118 {
THROWN_OBJ,
"projectile",
"projectiles", 0, 0 },
119 {
BLINDNESS,
"blindness",
"blindness", 0, 0 },
120 {
GOD,
"god",
"gods", 0, 0 },
121 {
DETECTOR,
"detector",
"detectors", 0, 0 },
123 {
DEAD_OBJECT,
"dead object",
"dead objects", 0, 0 },
125 {
MARKER,
"marker",
"markers", 0, 0 },
126 {
HOLY_ALTAR,
"holy altar",
"holy altars", 0, 0 },
128 {
BATTLEGROUND,
"battleground",
"battlegrounds", 0, 0 },
129 {
PEACEMAKER,
"peacemaker",
"peacemakers", 0, 0 },
131 {
FIREWALL,
"firewall",
"firewalls", 0, 0 },
132 {
CHECK_INV,
"inventory checker",
"inventory checkers", 0, 0 },
133 {
MOOD_FLOOR,
"mood floor",
"mood floors", 0, 0 },
134 {
EXIT,
"exit",
"exits", 0, 0 },
135 {
ENCOUNTER,
"encounter",
"encounters", 0, 0 },
136 {
SHOP_FLOOR,
"shop floor",
"shop floors", 0, 0 },
137 {
SHOP_MAT,
"shop mat",
"shop mats", 0, 0 },
139 {
FLOOR,
"floor",
"floors", 0, 0 },
142 {
SKILL_TOOL,
"skill tool",
"skill tools", 0, 0 },
143 {
LIGHTER,
"lighter",
"lighters", 0, 0 },
144 {
WALL,
"wall",
"walls", 0, 0 },
145 {
MISC_OBJECT,
"bric-a-brac",
"bric-a-brac", 0, 0 },
146 {
MONSTER,
"monster",
"monsters", 0, 0 },
147 {
LAMP,
"lamp",
"lamps", 0, 0 },
148 {
DUPLICATOR,
"duplicator",
"duplicators", 0, 0 },
151 {
SPINNER,
"spinner",
"spinners", 0, 0 },
152 {
GATE,
"gate",
"gates", 0, 0 },
153 {
BUTTON,
"button",
"buttons", 0, 0 },
154 {
CF_HANDLE,
"cf handle",
"cf handles", 0, 0 },
155 {
HOLE,
"hole",
"holes", 0, 0 },
156 {
TRAPDOOR,
"trapdoor",
"trapdoors", 0, 0 },
157 {
SIGN,
"sign",
"signs", 0, 0 },
160 {
SPELL,
"spell",
"spells", 0, 0 },
161 {
SPELL_EFFECT,
"spell effect",
"spell effects", 0, 0 },
162 {
CONVERTER,
"converter",
"converters", 0, 0 },
164 {
POISONING,
"poisoning",
"poisonings", 0, 0 },
165 {
SAVEBED,
"savebed",
"savebeds", 0, 0 },
168 {
DIRECTOR,
"director",
"directors", 0, 0 },
170 {
FORCE,
"force",
"forces", 0, 0 },
177 {
DEEP_SWAMP,
"deep swamp",
"deep swamps", 0, 0 },
180 {
RUNE,
"rune",
"runes", 0, 0 },
181 {
TRAP,
"trap",
"traps", 0, 0 },
183 {
CORPSE,
"corpse",
"corpses", 0, 0 },
184 {
DISEASE,
"disease",
"diseases", 0, 0 },
185 {
SYMPTOM,
"symptom",
"symptoms", 0, 0 },
186 {
BUILDER,
"item builder",
"item builders", 0, 0 },
187 {
MATERIAL,
"building material",
"building materials", 0, 0 },
189 {
LIGHTABLE,
"lightable",
"lightables", 0, 0 },
221 for (
int i = start; i < end; i++) {
260 tmp +=
op->resist[i];
290 enc +=
op->stats.food;
293 enc +=
op->stats.grace;
294 enc +=
op->stats.exp;
296 enc +=
op->stats.luck;
384 if (use_media_tags) {
388 if (
op->resist[tmpvar] == 100 ||
op->resist[tmpvar] == -100) {
396 if (use_media_tags) {
397 if (
op->resist[tmpvar] == 100 ||
op->resist[tmpvar] == -100) {
423 snprintf(
buf, size,
" ");
425 snprintf(
buf, size,
"%6.1f", i/1000.0);
427 snprintf(
buf, size,
"%4d ", i/1000);
456 for (attr = 0; attr <
NUM_STATS; attr++) {
472 if (
op->stats.food != 0)
520 if (
op->name == NULL) {
521 snprintf(
buf, size,
"(null)");
546 if (!
op->title && (
op->inv)) {
551 snprintf(
buf+len, size-len,
" (lvl %d)",
op->level);
552 len += strlen(
buf+len);
576 snprintf(
buf+len, size-len,
" %+d",
op->magic);
577 len += strlen(
buf+len);
696 if ((!plural && !
op->name)
697 || (plural && !
op->name_pl)) {
698 strncpy(
buf,
"(null)", size);
703 strncpy(
buf,
op->name, size);
723 if (!
op->title && (
op->inv)) {
735 snprintf(
buf+len, size-len,
" (lvl %d)",
op->level);
736 len += strlen(
buf+len);
760 snprintf(
buf+strlen(
buf), size-strlen(
buf),
" %+d",
op->magic);
793 switch ((
int)((
FABS(
op->speed))*15)) {
856 if (
op->randomitems != NULL) {
860 for (
t =
op->randomitems->items;
t != NULL;
t =
t->next)
861 if (
t->item && (
t->item->clone.type ==
SPELL)) {
870 if (
op->contr->digestion) {
871 if (
op->contr->digestion != 0)
874 if (
op->contr->gen_grace) {
877 if (
op->contr->gen_sp) {
880 if (
op->contr->gen_hp) {
883 if (
op->stats.luck) {
897 if (
tmp &&
tmp->attacktype != 0) {
1021 if (
op->item_power) {
1039 for (attr = 0; attr <
NUM_STATS; attr++) {
1044 if (
op->glow_radius)
1052 if (
op->stats.exp) {
1076 if (
op->stats.dam) {
1107 if (
op->item_power) {
1175 if (
op->stats.food) {
1176 if (
op->stats.food != 0)
1179 if (
op->stats.grace) {
1190 if (
op->stats.luck) {
1201 if (
op->slaying != NULL &&
op->type !=
FOOD) {
1239 if (
op->title != NULL)
1246 && (
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))
1383 op->anim_speed = atoi(
key);
1443 if (
op->inv &&
op->randomitems) {
1447 }
else if (
op->arch) {
1468 }
else if (
op->env) {
1481 else if (
op->env->map &&
1483 && (
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, int start, int end)
#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)
StringBuffer * describe_attacktype(const char *attack, int value, StringBuffer *buf)
static const typedata item_types[]
Plugin animator file specs[Config] name
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
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)
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
StringBuffer * describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf)
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)
Crossfire Protocol most of the time after the actual code was already omit certain important and possibly make life miserable any new developer or curious player should be able to find most of the relevant information here If inconsistencies are found or this documentation proves to be consider the latest server side protocol code in the public source code repository as the authoritative reference Introduction If you were ever curious enough to telnet or netcat to a Crossfire chances are you were sorely disappointed While the protocol may seem to use plain text at first
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)