… | |
… | |
51 | body_wrist, |
51 | body_wrist, |
52 | body_waist, |
52 | body_waist, |
53 | NUM_BODY_LOCATIONS |
53 | NUM_BODY_LOCATIONS |
54 | }; |
54 | }; |
55 | |
55 | |
56 | enum slottype_t |
|
|
57 | { |
|
|
58 | slot_none, |
|
|
59 | slot_combat, |
|
|
60 | slot_ranged, |
|
|
61 | }; |
|
|
62 | |
|
|
63 | /* See common/item.c */ |
56 | /* See common/item.c */ |
64 | |
57 | |
65 | typedef struct Body_Locations |
58 | typedef struct Body_Locations |
66 | { |
59 | { |
67 | keyword save_name; /* Name used to load/save it to disk */ |
60 | keyword save_name; /* Name used to load/save it to disk */ |
… | |
… | |
290 | |
283 | |
291 | const_utf8_string query_weight (const object *op); |
284 | const_utf8_string query_weight (const object *op); |
292 | const_utf8_string query_short_name (const object *op); |
285 | const_utf8_string query_short_name (const object *op); |
293 | const_utf8_string query_name (const object *op); |
286 | const_utf8_string query_name (const object *op); |
294 | const_utf8_string query_base_name (const object *op, int plural); |
287 | const_utf8_string query_base_name (const object *op, int plural); |
|
|
288 | sint64 query_cost (const object *tmp, object *who, int flag); |
|
|
289 | const char *query_cost_string (const object *tmp, object *who, int flag); |
|
|
290 | |
|
|
291 | int change_ability_duration (object *spell, object *caster); |
|
|
292 | int min_casting_level (object *caster, object *spell); |
|
|
293 | int casting_level (object *caster, object *spell); |
|
|
294 | sint16 SP_level_spellpoint_cost (object *caster, object *spell, int flags); |
|
|
295 | int SP_level_dam_adjust (object *caster, object *spob); |
|
|
296 | int SP_level_duration_adjust (object *caster, object *spob); |
|
|
297 | int SP_level_range_adjust (object *caster, object *spob); |
295 | |
298 | |
296 | struct object : zero_initialised, object_copy |
299 | struct object : zero_initialised, object_copy |
297 | { |
300 | { |
298 | // These variables are not changed by ->copy_to |
301 | // These variables are not changed by ->copy_to |
299 | maptile *ACC (RW, map); /* Pointer to the map in which this object is present */ |
302 | maptile *ACC (RW, map); /* Pointer to the map in which this object is present */ |
… | |
… | |
361 | bool parse_kv (object_thawer &f); // parse kv pairs, (ab-)used by archetypes, which should not exist at all |
364 | bool parse_kv (object_thawer &f); // parse kv pairs, (ab-)used by archetypes, which should not exist at all |
362 | MTH void post_load_check (); // do some adjustments after parsing |
365 | MTH void post_load_check (); // do some adjustments after parsing |
363 | static object *read (object_thawer &f, maptile *map = 0); // map argument due to toal design bogosity, must go. |
366 | static object *read (object_thawer &f, maptile *map = 0); // map argument due to toal design bogosity, must go. |
364 | bool write (object_freezer &f); |
367 | bool write (object_freezer &f); |
365 | |
368 | |
366 | MTH int slottype () const; |
|
|
367 | MTH static object *create (); |
369 | MTH static object *create (); |
368 | const mapxy &operator =(const mapxy &pos); |
370 | const mapxy &operator =(const mapxy &pos); |
369 | MTH void copy_to (object *dst); |
371 | MTH void copy_to (object *dst); |
370 | MTH object *clone (); // create + copy_to a single object |
372 | MTH object *clone (); // create + copy_to a single object |
371 | MTH object *deep_clone (); // copy whole more chain and inventory |
373 | MTH object *deep_clone (); // copy whole more chain and inventory |
… | |
… | |
610 | |
612 | |
611 | MTH bool is_player () const |
613 | MTH bool is_player () const |
612 | { |
614 | { |
613 | return !!contr; |
615 | return !!contr; |
614 | } |
616 | } |
|
|
617 | |
|
|
618 | /* elmex: this method checks whether the object is in a shop */ |
|
|
619 | MTH bool is_in_shop () const; |
615 | |
620 | |
616 | MTH bool affects_los () const |
621 | MTH bool affects_los () const |
617 | { |
622 | { |
618 | return glow_radius || flag [FLAG_BLOCKSVIEW]; |
623 | return glow_radius || flag [FLAG_BLOCKSVIEW]; |
619 | } |
624 | } |