65 {
"body_range",
"in your range slot",
"in a human's range slot" },
66 {
"body_arm",
"on your arm",
"on a human's arm" },
67 {
"body_torso",
"on your body",
"on a human's torso" },
68 {
"body_head",
"on your head",
"on a human's head" },
69 {
"body_neck",
"around your neck",
"around a humans neck" },
70 {
"body_skill",
"in your skill slot",
"in a human's skill slot" },
71 {
"body_finger",
"on your finger",
"on a human's finger" },
72 {
"body_shoulder",
"around your shoulders",
"around a human's shoulders" },
73 {
"body_foot",
"on your feet",
"on a human's feet" },
74 {
"body_hand",
"on your hands",
"on a human's hands" },
75 {
"body_wrist",
"around your wrists",
"around a human's wrist" },
76 {
"body_waist",
"around your waist",
"around a human's waist" },
77 {
"body_leg",
"around your legs",
"around a human's legs" },
84 "zero",
"ten",
"twenty",
"thirty",
"fourty",
"fifty",
"sixty",
"seventy",
90 "zeroth",
"first",
"second",
"third",
"fourth",
"fifth",
"sixth",
"seventh",
91 "eighth",
"ninth",
"tenth",
"eleventh",
"twelfth",
"thirteenth",
92 "fourteenth",
"fifteenth",
"sixteenth",
"seventeenth",
"eighteen",
93 "nineteen",
"twentieth"
98 "zeroth",
"tenth",
"twentieth",
"thirtieth",
"fortieth",
"fiftieth",
"sixtieth",
99 "seventieth",
"eightieth",
"ninetieth"
110 {
PLAYER,
"player",
"players", 0, 0 },
112 {
TREASURE,
"treasure",
"treasure", 0, 0 },
117 {
CLOCK,
"clock",
"clocks", 0, 0 },
122 {
PEDESTAL,
"pedestal",
"pedestals", 0, 0 },
123 {
ALTAR,
"altar",
"altars", 0, 0 },
124 {
LOCKED_DOOR,
"locked door",
"locked doors", 0, 0 },
125 {
SPECIAL_KEY,
"special key",
"special keys", 0, 0 },
126 {
MAP,
"map",
"maps", 0, 0 },
127 {
DOOR,
"door",
"doors", 0, 0 },
128 {
KEY,
"key",
"keys", 0, 0 },
129 {
TIMED_GATE,
"timed_gate",
"timed_gates", 0, 0 },
130 {
TRIGGER,
"trigger",
"triggers", 0, 0 },
131 {
GRIMREAPER,
"grimreaper",
"grimreapers", 0, 0 },
132 {
MAGIC_EAR,
"magic ear",
"magic ears", 0, 0 },
139 {
MONEY,
"money",
"money", 0, 0 },
140 {
CLASS,
"class",
"classes", 0, 0 },
142 {
PLAYERMOVER,
"player mover",
"player movers", 0, 0 },
143 {
TELEPORTER,
"teleporter",
"teleporters", 0, 0 },
144 {
CREATOR,
"creator",
"creators", 0, 0 },
145 {
SKILL,
"skill",
"skills", 0, 0 },
146 {
EXPERIENCE,
"experience",
"experience", 0, 0 },
147 {
EARTHWALL,
"earthwall",
"earthwalls", 0, 0 },
148 {
GOLEM,
"golem",
"golems", 0, 0 },
149 {
THROWN_OBJ,
"projectile",
"projectiles", 0, 0 },
150 {
BLINDNESS,
"blindness",
"blindness", 0, 0 },
151 {
GOD,
"god",
"gods", 0, 0 },
152 {
DETECTOR,
"detector",
"detectors", 0, 0 },
154 {
DEAD_OBJECT,
"dead object",
"dead objects", 0, 0 },
156 {
MARKER,
"marker",
"markers", 0, 0 },
157 {
HOLY_ALTAR,
"holy altar",
"holy altars", 0, 0 },
159 {
BATTLEGROUND,
"battleground",
"battlegrounds", 0, 0 },
160 {
PEACEMAKER,
"peacemaker",
"peacemakers", 0, 0 },
162 {
FIREWALL,
"firewall",
"firewalls", 0, 0 },
163 {
CHECK_INV,
"inventory checker",
"inventory checkers", 0, 0 },
164 {
MOOD_FLOOR,
"mood floor",
"mood floors", 0, 0 },
165 {
EXIT,
"exit",
"exits", 0, 0 },
166 {
ENCOUNTER,
"encounter",
"encounters", 0, 0 },
167 {
SHOP_FLOOR,
"shop floor",
"shop floors", 0, 0 },
168 {
SHOP_MAT,
"shop mat",
"shop mats", 0, 0 },
170 {
FLOOR,
"floor",
"floors", 0, 0 },
173 {
SKILL_TOOL,
"skill tool",
"skill tools", 0, 0 },
174 {
LIGHTER,
"lighter",
"lighters", 0, 0 },
175 {
WALL,
"wall",
"walls", 0, 0 },
176 {
MISC_OBJECT,
"bric-a-brac",
"bric-a-brac", 0, 0 },
177 {
MONSTER,
"monster",
"monsters", 0, 0 },
178 {
LAMP,
"lamp",
"lamps", 0, 0 },
179 {
DUPLICATOR,
"duplicator",
"duplicators", 0, 0 },
182 {
SPINNER,
"spinner",
"spinners", 0, 0 },
183 {
GATE,
"gate",
"gates", 0, 0 },
184 {
BUTTON,
"button",
"buttons", 0, 0 },
185 {
CF_HANDLE,
"cf handle",
"cf handles", 0, 0 },
186 {
HOLE,
"hole",
"holes", 0, 0 },
187 {
TRAPDOOR,
"trapdoor",
"trapdoors", 0, 0 },
188 {
SIGN,
"sign",
"signs", 0, 0 },
191 {
SPELL,
"spell",
"spells", 0, 0 },
192 {
SPELL_EFFECT,
"spell effect",
"spell effects", 0, 0 },
193 {
CONVERTER,
"converter",
"converters", 0, 0 },
195 {
POISONING,
"poisoning",
"poisonings", 0, 0 },
196 {
SAVEBED,
"savebed",
"savebeds", 0, 0 },
199 {
DIRECTOR,
"director",
"directors", 0, 0 },
201 {
FORCE,
"force",
"forces", 0, 0 },
203 {
CLOSE_CON,
"closed container",
"closed container", 0, 0 },
207 {
SKILLSCROLL,
"skillscroll",
"skillscrolls", 0, 0 },
208 {
DEEP_SWAMP,
"deep swamp",
"deep swamps", 0, 0 },
211 {
RUNE,
"rune",
"runes", 0, 0 },
212 {
TRAP,
"trap",
"traps", 0, 0 },
214 {
CORPSE,
"corpse",
"corpses", 0, 0 },
215 {
DISEASE,
"disease",
"diseases", 0, 0 },
216 {
SYMPTOM,
"symptom",
"symptoms", 0, 0 },
217 {
BUILDER,
"item builder",
"item builders", 0, 0 },
218 {
MATERIAL,
"building material",
"building materials", 0, 0 },
245 return enc_to_item_power[ench];
356 if (item_types[i].number == itemtype)
357 return &item_types[i];
376 if (!strcmp(item_types[i].name, name))
377 return &item_types[i];
379 if (!strcmp(item_types[i].name_pl, name)) {
380 LOG(
llevInfo,
"get_typedata_by_name: I have been sent the plural %s, the singular form %s is preffered\n", name, item_types[i].name);
381 return &item_types[i];
430 snprintf(buf, size,
"%6.1f", i/1000.0);
432 snprintf(buf, size,
"%4d ", i/1000);
445 if (i > 99 || i < 0) {
483 static void ring_desc(
const object *op,
char *buf,
size_t size) {
492 for (attr = 0; attr <
NUM_STATS; attr++) {
498 snprintf(buf+strlen(buf), size-strlen(buf),
"(speed %+"FMT64
")", op->
stats.
exp);
515 snprintf(buf+strlen(buf), size-strlen(buf),
"(magic%+d)", op->
stats.
sp);
517 snprintf(buf+strlen(buf), size-strlen(buf),
"(regeneration%+d)", op->
stats.
hp);
521 snprintf(buf+strlen(buf), size-strlen(buf),
"(lifesaving)");
523 snprintf(buf+strlen(buf), size-strlen(buf),
"(reflect spells)");
525 snprintf(buf+strlen(buf), size-strlen(buf),
"(reflect missiles)");
527 snprintf(buf+strlen(buf), size-strlen(buf),
"(stealth)");
537 snprintf(buf, size,
"of adornment");
554 if (op->
name == NULL) {
589 len += strlen(buf+len);
613 len += strlen(buf+len);
630 #ifdef NEW_MATERIAL_CODE
636 #ifdef NEW_MATERIAL_CODE
647 len += strlen(buf+len);
734 #ifdef NEW_MATERIAL_CODE
738 if ((!plural && !op->
name)
740 strncpy(buf,
"(null)", size);
745 strncpy(buf, op->
name, size);
751 #ifdef NEW_MATERIAL_CODE
768 #ifdef NEW_MATERIAL_CODE
792 len += strlen(buf+len);
815 snprintf(buf+strlen(buf), size-strlen(buf),
" %+d", op->
magic);
853 snprintf(retbuf, size,
"(very slow movement)");
857 snprintf(retbuf, size,
"(slow movement)");
861 snprintf(retbuf, size,
"(normal movement)");
866 snprintf(retbuf, size,
"(fast movement)");
871 snprintf(retbuf, size,
"(very fast movement)");
878 snprintf(retbuf, size,
"(extremely fast movement)");
882 snprintf(retbuf, size,
"(lightning fast movement)");
887 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(undead)");
889 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(see invisible)");
891 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(wield weapon)");
893 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(archer)");
895 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(wear armour)");
897 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(wear ring)");
899 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(read scroll)");
901 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(fires wand/rod/horn)");
903 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(skill user)");
905 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(spellcaster)");
907 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(friendly)");
909 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(unaggressive)");
911 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(hitback)");
913 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(stealthy)");
922 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(Spell abilities:)");
939 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(regeneration%+d)", op->
contr->
gen_hp);
942 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(luck%+d)", op->
stats.
luck);
947 len = strlen(retbuf);
955 for (tmp = op->
inv; tmp != NULL; tmp = tmp->
below)
1018 void describe_item(
const object *op,
const object *owner,
char *retbuf,
size_t size) {
1032 snprintf(retbuf, size,
"(unidentified)");
1059 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(capacity %d).", op->
stats.
maxsp);
1064 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(capacity %d.%dk). It is ", op->
stats.
maxsp/1000, i);
1066 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(capacity %dk). It is ", op->
stats.
maxsp/1000);
1068 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(capacity %d). It is ", op->
stats.
maxsp);
1071 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"empty.");
1073 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"almost empty.");
1075 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"partially filled.");
1077 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"half full.");
1079 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"well charged.");
1081 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"fully charged.");
1083 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"almost full.");
1091 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(food+%d)", op->
stats.
food);
1099 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(heals)");
1101 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(spellpoint regen)");
1104 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(damages)");
1106 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(spellpoint depletion)");
1115 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(item_power %+d)", op->
item_power);
1118 ring_desc(op, retbuf+strlen(retbuf), size-strlen(retbuf));
1132 for (attr = 0; attr <
NUM_STATS; attr++) {
1138 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(glowing)");
1146 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(speed %+"FMT64
")", op->
stats.
exp);
1167 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(wc%+d)", op->
stats.
wc);
1170 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(dam%+d)", op->
stats.
dam);
1173 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(ac%+d)", op->
stats.
ac);
1184 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(xray-vision)");
1186 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(infravision)");
1190 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(levitate)");
1193 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(fly)");
1196 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(swim)");
1201 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(item_power %+d)", op->
item_power);
1235 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(Max speed %1.2f)",
ARMOUR_SPEED(op)/10.0);
1238 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(Spell regen penalty %d)",
ARMOUR_SPELLS(op));
1251 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(weapon speed %d)", i);
1258 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(sustenance%+d)", op->
stats.
food);
1264 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(magic%+d)", op->
stats.
sp);
1267 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(regeneration%+d)", op->
stats.
hp);
1272 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(luck%+d)", op->
stats.
luck);
1275 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(lifesaving)");
1277 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(reflect spells)");
1279 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(reflect missiles)");
1281 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(stealth)");
1283 snprintf(retbuf+strlen(retbuf), size-strlen(retbuf),
"(slay %s)", op->
slaying);
1285 len = strlen(retbuf);
1293 len = strlen(retbuf);
1320 if (op->
title != NULL)
1468 }
else if (op->
arch) {
#define FLAG_KNOWN_BLESSED
#define NUM_BODY_LOCATIONS
#define WEAPON_SPEED(xyz)
materialtype_t * name_to_material(const char *name)
int is_magical(const object *op)
static const char levelnumbers_10[11][20]
sstring add_refcount(sstring str)
#define ARMOUR_SPELLS(xyz)
int get_power_from_ench(int ench)
void get_levelnumber(int i, char *buf, size_t size)
sint8 get_attr_value(const living *stats, int attr)
void free_string(sstring str)
struct treasureliststruct * randomitems
void query_base_name(const object *op, int plural, char *buf, size_t size)
void query_weight(const object *op, char *buf, size_t size)
static const int enc_to_item_power[21]
void update_object(object *op, int action)
static const char numbers_10[10][20]
static void safe_strcat(char *dest, const char *orig, size_t *curlen, size_t maxlen)
body_locations_struct body_locations[NUM_BODY_LOCATIONS]
static const typedata item_types[]
const typedata * get_typedata_by_name(const char *name)
#define FLAG_KNOWN_MAGICAL
const typedata * get_typedata(int itemtype)
static void ring_desc(const object *op, char *buf, size_t size)
#define FLAG_SEE_INVISIBLE
void describe_resistance(const object *op, int newline, char *buf, size_t size)
static const int item_types_size
object * get_player_container(object *op)
const char * materialname
#define FLAG_CAN_USE_SKILL
#define FLAG_UNAGGRESSIVE
int is_dragon_pl(const object *op)
void identify(object *op)
#define ARMOUR_SPEED(xyz)
object * present(uint8 type, mapstruct *m, int x, int y)
EXTERN const char *const change_resist_msg[NROFATTACKS]
#define QUERY_FLAG(xyz, p)
#define CLEAR_FLAG(xyz, p)
#define FLAG_BEEN_APPLIED
struct treasurestruct * items
sint16 resist[NROFATTACKS]
#define FLAG_KNOWN_CURSED
int need_identify(const object *op)
#define DESCRIBE_PATH_SAFE(retbuf, variable, name, len, maxlen)
int snprintf(char *dest, int max, const char *format,...)
void esrv_update_item(int flags, object *pl, object *op)
EXTERN const char *const resist_plus[NROFATTACKS]
void query_short_name(const object *op, char *buf, size_t size)
void describe_monster(const object *op, char *retbuf, size_t size)
#define DESCRIBE_ABILITY_SAFE(retbuf, variable, name, len, maxlen)
void describe_item(const object *op, const object *owner, char *retbuf, size_t size)
void LOG(LogLevel logLevel, const char *format,...)
int calc_item_power(const object *op, int flag)
void query_name(const object *op, char *buf, size_t size)
#define FLAG_NO_SKILL_IDENT
const char *const short_stat_name[NUM_STATS]
struct treasurestruct * next
#define FLAG_REFL_MISSILE
int atnr_is_dragon_enabled(int attacknr)
static const char levelnumbers[21][20]