Crossfire Server, Branches 1.12  R18729
Convenience macros to determine what kind of things we are dealing with.

Macros

#define IS_ARMOR(op)
 
#define IS_ARROW(op)
 
#define IS_LIVE(op)
 
#define IS_SHIELD(op)   (op->type == SHIELD)
 
#define IS_WEAPON(op)   (op->type == ARROW || op->type == BOW || op->type == WEAPON)
 

Detailed Description

Macro Definition Documentation

#define IS_ARMOR (   op)
Value:
(op->type == ARMOUR || op->type == HELMET || \
op->type == BOOTS || op->type == GLOVES)
#define BOOTS
Definition: define.h:281
#define ARMOUR
Definition: define.h:128
#define GLOVES
Definition: define.h:282
#define HELMET
Definition: define.h:146

Definition at line 452 of file define.h.

Referenced by can_apply_object(), decay_objects(), give_initial_items(), is_special_equipment(), monster_can_pick(), monster_check_apply(), query_base_name(), query_name(), set_materialname(), and transmute_materialname().

#define IS_ARROW (   op)
Value:
(op->type == ARROW || \
(op->type == SPELL_EFFECT && (op->subtype == SP_BULLET || op->subtype == SP_MAGIC_MISSILE)))
#define SP_BULLET
Definition: spells.h:107
#define SPELL_EFFECT
Definition: define.h:284
#define SP_MAGIC_MISSILE
Definition: spells.h:113
#define ARROW
Definition: define.h:125

Definition at line 464 of file define.h.

Referenced by attack_message(), and is_special_equipment().

#define IS_LIVE (   op)
Value:
((op->type == PLAYER || QUERY_FLAG(op, FLAG_MONSTER) || \
!op->type == DOOR)) && (!QUERY_FLAG(op, FLAG_IS_A_TEMPLATE)))
#define DOOR
Definition: define.h:135
#define PLAYER
Definition: define.h:113
#define FLAG_ALIVE
Definition: define.h:526
#define FLAG_IS_A_TEMPLATE
Definition: define.h:671
#define QUERY_FLAG(xyz, p)
Definition: define.h:514
#define FLAG_GENERATOR
Definition: define.h:544
#define FLAG_MONSTER
Definition: define.h:541

Definition at line 459 of file define.h.

Referenced by attack_message(), and decay_objects().

#define IS_WEAPON (   op)    (op->type == ARROW || op->type == BOW || op->type == WEAPON)