Crossfire Server, Trunk  R20513
Macros
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)
See Helmet.
Definition: object.h:136
See Boots.
Definition: object.h:212
See Gloves.
Definition: object.h:213
See Breastplate Armor.
Definition: object.h:120

Definition at line 165 of file define.h.

Referenced by apply_can_apply_object(), decay_objects(), give_initial_items(), is_special_equipment(), monster_can_pick(), monster_check_apply(), and transmute_materialname().

#define IS_ARROW (   op)
Value:
(op->type == ARROW || \
(op->type == SPELL_EFFECT && (op->subtype == SP_BULLET || op->subtype == SP_MAGIC_MISSILE)))
See Projectile.
Definition: object.h:117
#define SP_BULLET
Definition: spells.h:79
#define SP_MAGIC_MISSILE
Definition: spells.h:85

Definition at line 177 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 FLAG_ALIVE
Object can fight (or be fought)
Definition: define.h:230
#define FLAG_IS_A_TEMPLATE
Object has no ingame life until instantiated.
Definition: define.h:375
#define QUERY_FLAG(xyz, p)
Definition: define.h:225
See Door.
Definition: object.h:126
See Player.
Definition: object.h:107
#define FLAG_GENERATOR
Will generate type ob->stats.food.
Definition: define.h:248
#define FLAG_MONSTER
Will attack players.
Definition: define.h:245

Definition at line 172 of file define.h.

Referenced by attack_message(), and decay_objects().

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