… | |
… | |
274 | && can_merge_slow (op1, op2); |
274 | && can_merge_slow (op1, op2); |
275 | } |
275 | } |
276 | |
276 | |
277 | MTH void set_owner (object *owner); |
277 | MTH void set_owner (object *owner); |
278 | MTH void set_speed (float speed); |
278 | MTH void set_speed (float speed); |
|
|
279 | MTH void set_weapon (object *ob); |
279 | |
280 | |
280 | MTH void open_container (object *new_container); |
281 | MTH void open_container (object *new_container); |
281 | MTH void close_container () |
282 | MTH void close_container () |
282 | { |
283 | { |
283 | open_container (0); |
284 | open_container (0); |
… | |
… | |
295 | MTH void drain_specific_stat (int deplete_stats); |
296 | MTH void drain_specific_stat (int deplete_stats); |
296 | MTH void change_luck (int value); |
297 | MTH void change_luck (int value); |
297 | |
298 | |
298 | // info must hold 256 * 3 bytes currently |
299 | // info must hold 256 * 3 bytes currently |
299 | const char *debug_desc (char *info) const; |
300 | const char *debug_desc (char *info) const; |
300 | MTH const char *debug_desc () const; |
301 | MTH const char *debug_desc () const; // uses at least 3 round-robin buffers |
301 | const char *debug_desc2 () const; // another debug_desc, pure convinience function |
|
|
302 | const char *flag_desc (char *desc, int len) const; |
302 | const char *flag_desc (char *desc, int len) const; |
303 | |
303 | |
304 | int number_of () const |
304 | int number_of () const |
305 | { |
305 | { |
306 | return nrof ? nrof : 1; |
306 | return nrof ? nrof : 1; |
… | |
… | |
332 | || (flag [FLAG_ALIVE] && !flag [FLAG_GENERATOR] && type != DOOR)) |
332 | || (flag [FLAG_ALIVE] && !flag [FLAG_GENERATOR] && type != DOOR)) |
333 | && !flag [FLAG_IS_A_TEMPLATE]; } |
333 | && !flag [FLAG_IS_A_TEMPLATE]; } |
334 | MTH bool is_arrow () const { return type == ARROW |
334 | MTH bool is_arrow () const { return type == ARROW |
335 | || (type == SPELL_EFFECT |
335 | || (type == SPELL_EFFECT |
336 | && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } |
336 | && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } |
|
|
337 | MTH bool is_range () const { return type == BOW || type == ROD || type == WAND || type == HORN; } |
337 | |
338 | |
338 | MTH bool has_active_speed () const { return FABS(speed) >= MIN_ACTIVE_SPEED; } |
339 | MTH bool has_active_speed () const { return FABS(speed) >= MIN_ACTIVE_SPEED; } |
339 | |
340 | |
340 | // temporary: wether the object can be saved in a map file |
341 | // temporary: wether the object can be saved in a map file |
341 | // contr => is a player |
342 | // contr => is a player |
… | |
… | |
371 | |
372 | |
372 | // If this object has no extra parts but should have them, |
373 | // If this object has no extra parts but should have them, |
373 | // add them, effectively expanding heads into multipart |
374 | // add them, effectively expanding heads into multipart |
374 | // objects. This method only works on objects not inserted |
375 | // objects. This method only works on objects not inserted |
375 | // anywhere. |
376 | // anywhere. |
376 | void expand_tail (); |
377 | MTH void expand_tail (); |
|
|
378 | |
|
|
379 | MTH void create_treasure (treasurelist *tl, int flags = 0); |
377 | |
380 | |
378 | // insert object at same map position as 'where' |
381 | // insert object at same map position as 'where' |
379 | // handles both inventory and map "positions" |
382 | // handles both inventory and map "positions" |
380 | MTH object *insert_at (object *where, object *originator = 0, int flags = 0); |
383 | MTH object *insert_at (object *where, object *originator = 0, int flags = 0); |
381 | |
384 | |
… | |
… | |
385 | MTH void deactivate_recursive (); |
388 | MTH void deactivate_recursive (); |
386 | |
389 | |
387 | // set the givne flag on all objects in the inventory recursively |
390 | // set the givne flag on all objects in the inventory recursively |
388 | MTH void set_flag_inv (int flag, int value = 1); |
391 | MTH void set_flag_inv (int flag, int value = 1); |
389 | |
392 | |
390 | void enter_exit (object *exit);//PERL |
393 | void enter_exit (object *exit);//Perl |
391 | MTH void enter_map (maptile *newmap, int x, int y); |
394 | MTH void enter_map (maptile *newmap, int x, int y); |
392 | |
395 | |
393 | // returns the mapspace this object is in |
396 | // returns the mapspace this object is in |
394 | mapspace &ms () const; |
397 | mapspace &ms () const; |
395 | |
398 | |