Crossfire Server, Trunk
define.h File Reference
#include <autoconf.h>
+ Include dependency graph for define.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  typedata
 

Macros

#define AC_PLAYER_STAT_LIMIT   1 /** Limit stats to racial maximum */
 
#define AC_PLAYER_STAT_NO_CHANGE   2 /** Do not make any stat adjustments */
 
#define ALLRUN   6
 
#define AP_APPLY   1
 
#define AP_BASIC_FLAGS   15
 
#define AP_IGNORE_CURSE   32
 
#define AP_NO_MERGE   16
 
#define AP_NOPRINT   128
 
#define AP_NULL   0
 
#define AP_OPEN   3
 
#define AP_PRINT   64
 
#define AP_UNAPPLY   2
 
#define ARMOUR_SPEED(xyz)   (xyz)->last_sp
 
#define ARMOUR_SPELLS(xyz)   (xyz)->gen_sp_armour
 
#define BIG_NAME   32
 
#define BLANK_FACE_NAME   "blank.111"
 
#define CAN_APPLY_NEVER   0x1
 
#define CAN_APPLY_NOT_MASK   0xf
 
#define CAN_APPLY_RESTRICTION   0x2
 
#define CAN_APPLY_UNAPPLY   0x10
 
#define CAN_APPLY_UNAPPLY_CHOICE   0x40
 
#define CAN_APPLY_UNAPPLY_MULT   0x20
 
#define CIRCLE1   32
 
#define CIRCLE2   48
 
#define CLEAR_FLAG(xyz, p)   clear_flag(xyz, p)
 
#define DIRX(xyz)   freearr_x[(xyz)->direction]
 
#define DIRY(xyz)   freearr_y[(xyz)->direction]
 
#define DISTATT   1
 
#define DISTHIT   7
 
#define EMPTY_FACE_NAME   "empty.111"
 
#define EXIT_ALT_X(xyz)   (xyz)->stats.maxhp
 
#define EXIT_ALT_Y(xyz)   (xyz)->stats.maxsp
 
#define EXIT_LEVEL(xyz)   (xyz)->stats.food
 
#define EXIT_PATH(xyz)   (xyz)->slaying
 
#define EXIT_X(xyz)   (xyz)->stats.hp
 
#define EXIT_Y(xyz)   (xyz)->stats.sp
 
#define FABS(x)   ((x) < 0 ? -(x) : (x))
 
#define FLAG_ACTIVATE_ON_PUSH   105
 
#define FLAG_ACTIVATE_ON_RELEASE   106
 
#define FLAG_AFK   111
 
#define FLAG_ALIVE   0
 
#define FLAG_ANIMATE   11
 
#define FLAG_APPLIED   5
 
#define FLAG_AUTO_APPLY   18
 
#define FLAG_BEEN_APPLIED   80
 
#define FLAG_BERSERK   99
 
#define FLAG_BLESSED   112
 
#define FLAG_BLIND   92
 
#define FLAG_BLOCKSVIEW   35
 
#define FLAG_CAN_ROLL   22
 
#define FLAG_CAN_USE_SKILL   79
 
#define FLAG_CAST_SPELL   52
 
#define FLAG_CHANGING   31
 
#define FLAG_CLIENT_ANIM_RANDOM   10
 
#define FLAG_CLIENT_ANIM_SYNC   9
 
#define FLAG_CLIENT_SENT   98
 
#define FLAG_CONFUSED   70
 
#define FLAG_CONTENT_ON_GEN   108
 
#define FLAG_CURSED   74
 
#define FLAG_DAMNED   75
 
#define FLAG_DIALOG_PARSED   12
 
#define FLAG_FREED   3
 
#define FLAG_FRIENDLY   15
 
#define FLAG_GENERATOR   16
 
#define FLAG_HITBACK   33
 
#define FLAG_IDENTIFIED   29
 
#define FLAG_INV_LOCKED   86
 
#define FLAG_IS_A_TEMPLATE   109
 
#define FLAG_IS_BUILDABLE   110
 
#define FLAG_IS_CAULDRON   94
 
#define FLAG_IS_FLOOR   63
 
#define FLAG_IS_HILLY   88
 
#define FLAG_IS_LIGHTABLE   43
 
#define FLAG_IS_LINKED   73
 
#define FLAG_IS_THROWN   17
 
#define FLAG_IS_TURNABLE   24
 
#define FLAG_IS_USED_UP   28
 
#define FLAG_IS_WATER   107
 
#define FLAG_IS_WOODED   87
 
#define FLAG_KNOWN_BLESSED   113
 
#define FLAG_KNOWN_CURSED   78
 
#define FLAG_KNOWN_MAGICAL   77
 
#define FLAG_LIFESAVE   64
 
#define FLAG_MAKE_INVIS   85
 
#define FLAG_MONSTER   14
 
#define FLAG_NEUTRAL   100
 
#define FLAG_NO_APPLY   62
 
#define FLAG_NO_ATTACK   101
 
#define FLAG_NO_DAMAGE   102
 
#define FLAG_NO_DROP   50
 
#define FLAG_NO_FIX_PLAYER   42
 
#define FLAG_NO_MAGIC   41
 
#define FLAG_NO_PICK   8
 
#define FLAG_NO_SAVE   13
 
#define FLAG_NO_SKILL_IDENT   91
 
#define FLAG_NO_STEAL   96
 
#define FLAG_NO_STRENGTH   65
 
#define FLAG_OBJ_ORIGINAL   103
 
#define FLAG_ONE_HIT   97
 
#define FLAG_ONLY_ATTACK   69
 
#define FLAG_OVERLAY_FLOOR   23
 
#define FLAG_PARALYZED   114
 
#define FLAG_PLAYER_SOLD   20
 
#define FLAG_PROBE   25
 
#define FLAG_RANDOM_MOVE   68
 
#define FLAG_READY_BOW   60
 
#define FLAG_READY_RANGE   59
 
#define FLAG_READY_SCROLL   81
 
#define FLAG_READY_SKILL   89
 
#define FLAG_READY_WEAPON   90
 
#define FLAG_REFL_MISSILE   39
 
#define FLAG_REFL_SPELL   40
 
#define FLAG_REFLECTING   30
 
#define FLAG_REMOVED   2
 
#define FLAG_RUN_AWAY   45
 
#define FLAG_SCARED   37
 
#define FLAG_SEE_ANYWHERE   76
 
#define FLAG_SEE_IN_DARK   93
 
#define FLAG_SEE_INVISIBLE   21
 
#define FLAG_SLEEP   66
 
#define FLAG_SPLITTING   32
 
#define FLAG_STAND_STILL   67
 
#define FLAG_STARTEQUIP   34
 
#define FLAG_STEALTH   71
 
#define FLAG_TEAR_DOWN   44
 
#define FLAG_TREASURE   19
 
#define FLAG_UNAGGRESSIVE   38
 
#define FLAG_UNDEAD   36
 
#define FLAG_UNIQUE   49
 
#define FLAG_UNPAID   6
 
#define FLAG_USE_ARMOUR   56
 
#define FLAG_USE_BOW   55
 
#define FLAG_USE_RANGE   54
 
#define FLAG_USE_RING   58
 
#define FLAG_USE_SCROLL   53
 
#define FLAG_USE_SHIELD   7
 
#define FLAG_USE_WEAPON   57
 
#define FLAG_WAS_WIZ   4
 
#define FLAG_WIZ   1
 
#define FLAG_WIZCAST   51
 
#define FLAG_WIZPASS   72
 
#define FLAG_XRAYS   61
 
#define FOR_ABOVE_FINISH()
 
#define FOR_ABOVE_PREPARE(op_, it_)
 
#define FOR_BELOW_FINISH()
 
#define FOR_BELOW_PREPARE(op_, it_)
 
#define FOR_INV_FINISH()
 
#define FOR_INV_PREPARE(op_, it_)
 
#define FOR_MAP_FINISH()
 
#define FOR_MAP_PREPARE(map_, mx_, my_, it_)
 
#define FOR_OB_AND_ABOVE_FINISH()   FOR_OB_FINISH()
 
#define FOR_OB_AND_ABOVE_PREPARE(op_)   FOR_OB_PREPARE(op_, above, __LINE__)
 
#define FOR_OB_AND_BELOW_FINISH()   FOR_OB_FINISH()
 
#define FOR_OB_AND_BELOW_PREPARE(op_)   FOR_OB_PREPARE(op_, below, __LINE__)
 
#define FOR_OB_FINISH()
 
#define FOR_OB_PREPARE(op_, field_, suffix_)   FOR_OB_PREPARE2(op_, field_, suffix_)
 
#define FOR_OB_PREPARE2(op_, field_, suffix_)
 
#define GENERATE_SPEED(xyz)   ((xyz)->stats.maxsp) /* if(!RANDOM()%<speed>) */
 
#define GENERATE_TYPE(xyz)   ((xyz)->stats.sp)
 
#define HAS_RANDOM_ITEMS(op)   (op->randomitems && (!QUERY_FLAG(op, FLAG_IS_A_TEMPLATE)))
 
#define HI4   240
 
#define HITRUN   3
 
#define HUGE_BUF   4096
 
#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)
 
#define LO4   15
 
#define MAX_ANIMATIONS   256
 
#define MAX_BUF   256
 
#define MAX_DARKNESS   5
 
#define MAX_LIGHT_RADII   4
 
#define MAX_NAME   48
 
#define MAX_WEAPON_ITEM_POWER   100
 
#define MIN_ACTIVE_SPEED   0.00001
 
#define MIN_STAT   1
 
#define MOVE_ALL   0x1f
 
#define MOVE_BLOCK_DEFAULT   MOVE_SWIM
 
#define MOVE_BOAT   0x10
 
#define MOVE_FLY_HIGH   0x4
 
#define MOVE_FLY_LOW   0x2
 
#define MOVE_FLYING   0x6
 
#define MOVE_SWIM   0x8
 
#define MOVE_WALK   0x1
 
#define NAME_MAX   255
 
#define NROF_SOUNDS   (23+NROFREALSPELLS) /* Number of sounds */
 
#define NUM_FLAGS   114
 
#define OB_MOVE_BLOCK(ob1, ob2)   ((ob1->move_type&ob2->move_block) == ob1->move_type)
 
#define OB_TYPE_MOVE_BLOCK(ob1, type)   ((type != 0) && (ob1->move_type&type) == ob1->move_type)
 
#define PACEH   64
 
#define PACEH2   80
 
#define PACEV   128
 
#define PACEV2   144
 
#define PETMOVE   16
 
#define PREFER_HIGH   1
 
#define PREFER_LOW   0
 
#define PU_ARMOUR   0x00000800
 
#define PU_ARROW   0x00000100
 
#define PU_BOOTS   0x00001000
 
#define PU_BOW   0x00000080
 
#define PU_CLOAK   0x00004000
 
#define PU_CONTAINER   0x08000000
 
#define PU_CURSED   0x10000000
 
#define PU_DEBUG   0x10000000
 
#define PU_DRINK   0x00000020
 
#define PU_FLESH   0x04000000
 
#define PU_FOOD   0x00000010
 
#define PU_GLOVES   0x00002000
 
#define PU_HELMET   0x00000200
 
#define PU_INHIBIT   0x20000000
 
#define PU_JEWELS   0x02000000
 
#define PU_KEY   0x00008000
 
#define PU_MAGIC_DEVICE   0x00800000
 
#define PU_MAGICAL   0x00040000
 
#define PU_MELEEWEAPON   0x00020000
 
#define PU_MISSILEWEAPON   0x00010000
 
#define PU_NEWMODE   0x80000000
 
#define PU_NOT_CURSED   0x01000000
 
#define PU_NOTHING   0x00000000
 
#define PU_POTION   0x00080000
 
#define PU_RATIO   0x0000000F
 
#define PU_READABLES   0x00400000
 
#define PU_SHIELD   0x00000400
 
#define PU_SKILLSCROLL   0x00200000
 
#define PU_SPELLBOOK   0x00100000
 
#define PU_STOP   0x40000000
 
#define PU_VALUABLES   0x00000040
 
#define QUERY_FLAG(xyz, p)   query_flag(xyz, p)
 
#define RANDO   96
 
#define RANDO2   112
 
#define RANDOM()   cf_random()
 
#define RUNATT   2
 
#define RUSH   5
 
#define SET_FLAG(xyz, p)   set_flag(xyz, p)
 
#define SIZEOFFREE   49
 
#define SIZEOFFREE1   8
 
#define SIZEOFFREE2   24
 
#define SMOOTH_FACE_NAME   "default_smoothed.111"
 
#define SRANDOM(seed)   cf_srandom(seed)
 
#define ST_BD_BUILD   1
 
#define ST_BD_REMOVE   2
 
#define ST_CHANGE_CLASS   3
 
#define ST_CHANGE_PASSWORD_CONFIRM   13
 
#define ST_CHANGE_PASSWORD_NEW   12
 
#define ST_CHANGE_PASSWORD_OLD   11
 
#define ST_CONFIRM_PASSWORD   8
 
#define ST_CONFIRM_QUIT   4
 
#define ST_GET_NAME   6
 
#define ST_GET_PARTY_PASSWORD   10
 
#define ST_GET_PASSWORD   7
 
#define ST_MAT_FLOOR   1
 
#define ST_MAT_ITEM   3
 
#define ST_MAT_WALL   2
 
#define ST_MAT_WINDOW   4
 
#define ST_PLAY_AGAIN   1
 
#define ST_PLAYING   0
 
#define ST_ROLL_STAT   2
 
#define VERY_BIG_BUF   1024
 
#define WAIT2   8
 
#define WAITATT   4
 
#define WEAP_BLUD   8
 
#define WEAP_CLEAVE   3
 
#define WEAP_CRUSH   7
 
#define WEAP_HIT   0
 
#define WEAP_PIERCE   2
 
#define WEAP_SLASH   1
 
#define WEAP_SLICE   4
 
#define WEAP_STAB   5
 
#define WEAP_WHIP   6
 
#define WEAPON_SPEED(xyz)   (xyz)->last_sp
 
#define WEIGHT(op)   (op->nrof ? op->weight : op->weight+op->carrying)
 

Typedefs

typedef unsigned char MoveType
 

Enumerations

enum  fatal_error {
  OUT_OF_MEMORY = 0, MAP_ERROR = 1, ARCHTABLE_TOO_SMALL = 2, ARCHETYPE_ISSUE = 3,
  SEE_LAST_ERROR = 4
}
 

Functions

uint32_t cf_random (void)
 
void cf_srandom (unsigned long seed)
 

Variables

static const int32_t MAX_FOOD = 999
 

Detailed Description

Core defines: object types, flags, etc.

This file is really too large. With all the .h files around, this file should be better split between them - things that deal with objects should be in objects.h, things dealing with players in player.h, etc. As it is, everything just seems to be dumped in here.

This file is best viewed with a window width of about 100 character.

Definition in file define.h.

Macro Definition Documentation

◆ AC_PLAYER_STAT_LIMIT

#define AC_PLAYER_STAT_LIMIT   1 /** Limit stats to racial maximum */

Definition at line 596 of file define.h.

◆ AC_PLAYER_STAT_NO_CHANGE

#define AC_PLAYER_STAT_NO_CHANGE   2 /** Do not make any stat adjustments */

Definition at line 597 of file define.h.

◆ ALLRUN

#define ALLRUN   6

Always run, never attack good for sim. of weak player.

Definition at line 497 of file define.h.

◆ AP_APPLY

#define AP_APPLY   1

Item is to be applied.

Definition at line 574 of file define.h.

◆ AP_BASIC_FLAGS

#define AP_BASIC_FLAGS   15

Definition at line 578 of file define.h.

◆ AP_IGNORE_CURSE

#define AP_IGNORE_CURSE   32

Apply/unapply regardless of cursed/damned status.

Definition at line 582 of file define.h.

◆ AP_NO_MERGE

#define AP_NO_MERGE   16

Don't try to merge object after (un)applying it.

Definition at line 581 of file define.h.

◆ AP_NOPRINT

#define AP_NOPRINT   128

Don't print messages - caller will do that may be some that still print

Definition at line 585 of file define.h.

◆ AP_NULL

#define AP_NULL   0

Nothing specific.

Definition at line 573 of file define.h.

◆ AP_OPEN

#define AP_OPEN   3

Item is a container to be fully opened.

Definition at line 576 of file define.h.

◆ AP_PRINT

#define AP_PRINT   64

Print what to do, don't actually do it Note this is supported in all the functions

Definition at line 583 of file define.h.

◆ AP_UNAPPLY

#define AP_UNAPPLY   2

Item is to be remvoed.

Definition at line 575 of file define.h.

◆ ARMOUR_SPEED

#define ARMOUR_SPEED (   xyz)    (xyz)->last_sp

Definition at line 466 of file define.h.

◆ ARMOUR_SPELLS

#define ARMOUR_SPELLS (   xyz)    (xyz)->gen_sp_armour

Definition at line 467 of file define.h.

◆ BIG_NAME

#define BIG_NAME   32

Definition at line 42 of file define.h.

◆ BLANK_FACE_NAME

#define BLANK_FACE_NAME   "blank.111"

Definition at line 555 of file define.h.

◆ CAN_APPLY_NEVER

#define CAN_APPLY_NEVER   0x1

Definition at line 630 of file define.h.

◆ CAN_APPLY_NOT_MASK

#define CAN_APPLY_NOT_MASK   0xf

Definition at line 632 of file define.h.

◆ CAN_APPLY_RESTRICTION

#define CAN_APPLY_RESTRICTION   0x2

Definition at line 631 of file define.h.

◆ CAN_APPLY_UNAPPLY

#define CAN_APPLY_UNAPPLY   0x10

Definition at line 633 of file define.h.

◆ CAN_APPLY_UNAPPLY_CHOICE

#define CAN_APPLY_UNAPPLY_CHOICE   0x40

Definition at line 635 of file define.h.

◆ CAN_APPLY_UNAPPLY_MULT

#define CAN_APPLY_UNAPPLY_MULT   0x20

Definition at line 634 of file define.h.

◆ CIRCLE1

#define CIRCLE1   32

If the upper four bits of move_type / attack_movement are set to this number, the monster will move in a circle until it is attacked, or the enemy field is set, this is good for non-aggressive monsters and NPC.

Definition at line 509 of file define.h.

◆ CIRCLE2

#define CIRCLE2   48

Same as CIRCLE1 but a larger circle is used.

Definition at line 513 of file define.h.

◆ CLEAR_FLAG

#define CLEAR_FLAG (   xyz,
 
)    clear_flag(xyz, p)

Definition at line 225 of file define.h.

◆ DIRX

#define DIRX (   xyz)    freearr_x[(xyz)->direction]

Definition at line 463 of file define.h.

◆ DIRY

#define DIRY (   xyz)    freearr_y[(xyz)->direction]

Definition at line 464 of file define.h.

◆ DISTATT

#define DISTATT   1

Move toward a player if far, but maintain some space, attack from a distance - good for missile users only.

Definition at line 491 of file define.h.

◆ DISTHIT

#define DISTHIT   7

Attack from a distance if hit as recommended by Frank.

Definition at line 498 of file define.h.

◆ EMPTY_FACE_NAME

#define EMPTY_FACE_NAME   "empty.111"

Definition at line 556 of file define.h.

◆ EXIT_ALT_X

#define EXIT_ALT_X (   xyz)    (xyz)->stats.maxhp

Definition at line 443 of file define.h.

◆ EXIT_ALT_Y

#define EXIT_ALT_Y (   xyz)    (xyz)->stats.maxsp

Definition at line 444 of file define.h.

◆ EXIT_LEVEL

#define EXIT_LEVEL (   xyz)    (xyz)->stats.food

Definition at line 440 of file define.h.

◆ EXIT_PATH

#define EXIT_PATH (   xyz)    (xyz)->slaying

Definition at line 439 of file define.h.

◆ EXIT_X

#define EXIT_X (   xyz)    (xyz)->stats.hp

Definition at line 441 of file define.h.

◆ EXIT_Y

#define EXIT_Y (   xyz)    (xyz)->stats.sp

Definition at line 442 of file define.h.

◆ FABS

#define FABS (   x)    ((x) < 0 ? -(x) : (x))

Decstations have trouble with fabs()...

Definition at line 22 of file define.h.

◆ FLAG_ACTIVATE_ON_PUSH

#define FLAG_ACTIVATE_ON_PUSH   105

connected object is activated when 'pushed'

Definition at line 362 of file define.h.

◆ FLAG_ACTIVATE_ON_RELEASE

#define FLAG_ACTIVATE_ON_RELEASE   106

connected object is activated when 'released'

Definition at line 363 of file define.h.

◆ FLAG_AFK

#define FLAG_AFK   111

Player is AFK

Definition at line 368 of file define.h.

◆ FLAG_ALIVE

FLAG_ALIVE   0

Object can fight (or be fought)

Use

Type(s) Description
Magic Wall Walls with <is destroyable> enabled can be attacked and (eventually) destroyed by the player. If disabled, all other attributes on this tab, as well as resistances, are meaningless.

Definition at line 230 of file define.h.

Referenced by action_makes_visible(), add_abilities(), adj_attackroll(), alchemy(), animate_object(), annotate_ob(), attack_ob_simple(), blocked_link(), calc_skill_exp(), CAN_PROBE(), cancellation(), cast_destruction(), cast_spell(), cast_transfer(), change_exp(), change_object(), check_bullet(), command_create(), common_process_projectile(), common_projectile_move_on(), common_trap_type_move_on(), deep_swamp_type_process(), determine_god(), find_monster_in_room_recursive(), fix_generated_item(), gate_type_process(), hit_map(), hit_player(), hit_with_one_attacktype(), is_magical(), is_susceptible_to_disease(), magic_wall(), main(), matches_sacrifice(), mimic_type_apply(), monster_can_see_enemy(), monster_npc_call_help(), move_aura(), move_ob(), move_player_attack(), move_player_mover(), object_can_pick(), object_free(), object_insert_in_map(), object_update(), pets_get_enemy(), pets_move(), pets_move_golem(), pick_arrow_target(), poison_living(), poisoning_type_process(), polymorph(), reflwall(), remove_monsters(), shop_mat_type_move_on(), skill_attack(), spell_effect_type_move_on(), spring_trap(), tear_down_wall(), thrown_item_effect(), treasure_type_apply(), try_fit(), update_position(), and while().

◆ FLAG_ANIMATE

#define FLAG_ANIMATE   11

The object looks at archetype for faces

Definition at line 242 of file define.h.

◆ FLAG_APPLIED

FLAG_APPLIED   5

Object is ready for use by living

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield If you put this item into the inventory of a monster, and you want the monster to use/wear the item - you must set <is applied>. Enabling this flag doesn't make any sense if the item is NOT in a monster's inventory.

Definition at line 235 of file define.h.

Referenced by adj_stealchance(), adjust_skill_tool(), animate_weapon(), apply_container(), apply_manual(), apply_special(), attempt_steal(), become_follower(), blind_living(), blindness_type_process(), cast_bless(), cast_change_ability(), cast_curse(), change_abil(), change_luck(), command_dropall(), common_pre_ob_move_on(), confuse_living(), create_aura(), do_skill(), do_symptoms(), do_turn(), drain_specific_stat(), drop_object(), eat_special_food(), esrv_move_object(), examine_monster(), find_arrow(), find_best_apply_object_match(), find_better_arrow(), find_key(), find_skill_by_name(), find_skill_by_number(), find_throw_ob(), fix_object(), get_item_from_body_location(), give_initial_items(), god_examines_priest(), hit_with_one_attacktype(), improve_armour(), improve_weapon(), inventory(), kill_player_not_permadeath(), lamp_type_apply(), lamp_type_describe(), make_throw_ob(), meditate(), monster_check_apply(), monster_find_throw_ob(), monsterFight(), object_can_merge(), object_find_by_flag_applied(), object_find_by_type_applied(), object_insert_in_map(), object_insert_in_ob(), object_remove(), pay_for_amount(), pay_for_item(), pick_up(), poison_living(), poisoning_type_process(), polymorph_living(), potion_type_apply(), process_object(), put_object_in_sack(), query_flags(), query_money(), query_name(), rangetostring(), remove_curse(), remove_force(), sack_can_hold(), save_throw_object(), sell_item(), slow_living_by(), START_TEST(), stop_using_item(), swap_random_stats(), transmute_item_to_flower(), unapply_for_ob(), unapply_special(), use_alchemy(), and while().

◆ FLAG_AUTO_APPLY

FLAG_AUTO_APPLY   18

Will be applied when created

Use

Type(s) Description
Shop Floor If enabled, items will appear on this square when the map is loaded. You need to specify a <treasurelist> to define what kinds of items are generated. The items will be unpaid.
Treasure "Auto-generate" must be set in order to have the treasure be created when the map is loaded. If you want to create a random treasure chest, you unset this flag. That way, the player has to apply the object (the chest), then the treasure is generated.

Definition at line 250 of file define.h.

Referenced by apply_auto(), apply_auto_fix(), auto_apply_fix_inventory(), create_player_cmd(), do_auto_apply(), and while().

◆ FLAG_BEEN_APPLIED

#define FLAG_BEEN_APPLIED   80

The object has been applied

Definition at line 323 of file define.h.

◆ FLAG_BERSERK

#define FLAG_BERSERK   99

monster will attack closest living object

Definition at line 352 of file define.h.

◆ FLAG_BLESSED

FLAG_BLESSED   112

Item has a blessing, opposite of cursed/damned.

Use

Type(s) Description
Treasure If checked, no bad or cursed items will be generated.

Definition at line 369 of file define.h.

Referenced by apply_auto(), cast_item_curse_or_bless(), fix_generated_item(), identify(), price_base(), query_flags(), query_name(), scroll_type_apply(), spellbook_type_apply(), and while().

◆ FLAG_BLIND

#define FLAG_BLIND   92

If set, object cannot see (visually)

Definition at line 336 of file define.h.

◆ FLAG_BLOCKSVIEW

◆ FLAG_CAN_ROLL

FLAG_CAN_ROLL   22

Object can be rolled

Use

Type(s) Description
Wall If set, the object is able to "roll", so it can be pushed around. This setting is used for boulders and barrels.

Definition at line 254 of file define.h.

Referenced by alchemy_failure_effect(), gate_type_process(), move_player_attack(), roll_ob(), skill_attack(), and while().

◆ FLAG_CAN_USE_SKILL

FLAG_CAN_USE_SKILL   79

The monster can use skills

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Monster is able to use skills from it's inventory. For example, you can put a throwing skill object and some boulders into the monster's object and set <can use skills>.
Skill The <is native skill> flag has an effect only when this skill object is placed in the inventory of a monster (or player). If it is set, the monster or player knows the skill natively, which means he does not need a skill tool to use it.

Definition at line 321 of file define.h.

Referenced by adjust_skill_tool(), describe_monster(), find_best_player_hth_skill(), food_type_apply(), give_initial_items(), give_skill_by_name(), learn_skill(), monster_can_pick(), old_describe_monster(), use_skill(), and while().

◆ FLAG_CAST_SPELL

FLAG_CAST_SPELL   52

(Monster) can learn and cast spells

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) If <can cast spell> is disabled, the monster cannot cast any spell. Only wands/rods/etc. can be used, given the appropriate abilities.

Definition at line 290 of file define.h.

Referenced by describe_monster(), monster_can_pick(), monster_cast_spell(), monster_check_apply(), monster_move(), new_exp(), old_describe_monster(), and while().

◆ FLAG_CHANGING

FLAG_CHANGING   31

Changes to other_arch when anim is done

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Drink, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Monster & NPC, Monster (Grimreaper), Mood Floor, Mover, Pedestal, Pit, Player, Player Changer, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Rune, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trap, Trapdoor, Treasure, Trigger Marker, Wall, Wand & Staff, Weak Wall, Weapon A <changing> object converts to <food> <other_arch> objects; when it's animation is done. For non-living objects <food> is checked: if it is zero, the change happens; otherwise <food> is decreased by one. I suggest you don't mess with this value - leave the default in place.

Definition at line 263 of file define.h.

Referenced by do_monster(), dump_abilities(), fix_summon_pet(), make_throw_ob(), process_object(), and while().

◆ FLAG_CLIENT_ANIM_RANDOM

◆ FLAG_CLIENT_ANIM_SYNC

◆ FLAG_CLIENT_SENT

#define FLAG_CLIENT_SENT   98

We use it to detect cases were the server is trying to send an upditem when we have not actually sent the item.

Definition at line 346 of file define.h.

◆ FLAG_CONFUSED

#define FLAG_CONFUSED   70

Will also be unable to cast spells

Definition at line 311 of file define.h.

◆ FLAG_CONTENT_ON_GEN

FLAG_CONTENT_ON_GEN   108

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) This only takes effect if <multiply> is enabled. The monster will create a new monster every once in a while by duplicating it's inventory. In this case, the <breed monster> value is never used and can be forgotten. Each time the monster need to generate an object, it will be a randomly chosen item from the inventory. When generator is destroyed, inventory is destroyed.

Definition at line 365 of file define.h.

Referenced by check_generators(), check_loaded_object(), generate_monster(), local_check_loaded_object(), and while().

◆ FLAG_CURSED

FLAG_CURSED   74

The object is cursed

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield A cursed piece of equipment cannot be unwielded unless the curse is removed.
Potion If a potion is cursed, benefits generally turn into penalties. Note that potions can be "uncursed" by praying over an altar, with relative ease. But the potion must be identified to notice that it is cursed >:)
Shooting Weapon A cursed shooting weapon cannot be unwielded unless the curse is removed.
Weapon A cursed weapon cannot be unwielded unless the curse is removed.

Definition at line 316 of file define.h.

Referenced by add_abilities(), alchemy_failure_effect(), apply_auto(), apply_special(), calc_alch_danger(), cancellation(), cast_detection(), cast_item_curse_or_bless(), check_heal_and_mana(), check_item(), create_one_treasure(), describe_item(), detect_curse_on_item(), do_turn(), find_throw_ob(), fix_generated_item(), food_type_apply(), give_initial_items(), god_removes_curse(), identify(), lightable_type_apply(), make_item_from_recipe(), object_matches_string(), potion_type_apply(), price_base(), query_flags(), query_name(), remove_curse(), save_throw_object(), scroll_type_apply(), set_magic(), spellbook_type_apply(), unapply_for_ob(), and while().

◆ FLAG_DAMNED

FLAG_DAMNED   75

The object is very cursed

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield A damned piece of equipment cannot be unwielded unless the curse is removed. Removing damnations is a tick harder than removing curses.
Exit If set, the applying player's save bed is set to the exit's destination, preventing a player from returning using Word of Recall or other mechanisms.
Floor, Floor (Encounter), Hazard Floor, Mood Floor, Swamp If enabled, it is impossible for players to use prayers on that spot. It also prevents players from saving.
Gate, Timed Gate Restricting the use of prayers to pass this door. This has an effect only if <block view> is disabled.
Locked Door Restricting the use of prayers to pass this door. This should be set in most cases.
Shooting Weapon A damned shooting weapon cannot be unwielded unless the curse is removed. Removing damnations is a tick harder than removing curses.
Shop Floor If enabled, it is impossible for players to use prayers on that spot. It also prevents players from saving. (Remember that <no magic> is always set for shop floors.)
Wall This takes effect only with <blocksview> disabled. Restricting the use of spells to pass this wall.
Weapon A damned weapon cannot be unwielded unless the curse is removed. Removing damnations is a tick harder than removing curses.

Definition at line 317 of file define.h.

Referenced by add_abilities(), apply_auto(), apply_special(), calc_alch_danger(), cancellation(), cast_detection(), check_item(), create_one_treasure(), detect_curse_on_item(), do_turn(), enter_exit(), find_throw_ob(), fix_generated_item(), get_jail_exit(), give_initial_items(), god_removes_curse(), identify(), lightable_type_apply(), make_item_from_recipe(), object_matches_string(), object_update(), potion_type_apply(), price_base(), query_flags(), query_name(), remove_curse(), save_throw_object(), scroll_type_apply(), spellbook_type_apply(), unapply_for_ob(), update_position(), and while().

◆ FLAG_DIALOG_PARSED

#define FLAG_DIALOG_PARSED   12

Was the object::msg field parsed? Temporary flag not saved

Definition at line 243 of file define.h.

◆ FLAG_FREED

#define FLAG_FREED   3

Object is in the list of free objects

Definition at line 233 of file define.h.

◆ FLAG_FRIENDLY

◆ FLAG_GENERATOR

FLAG_GENERATOR   16

Will generate type ob->stats.food

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Monsters with <generator> enabled will create a <breed monster> every once in a while. Mice are a good example for this effect. If enabled, you must also set <breed monster> or check <template generation> and put other monsters in the inventory.

Definition at line 248 of file define.h.

Referenced by calculate_difficulty(), check_generators(), check_loaded_object(), fix_summon_pet(), hit_with_one_attacktype(), is_enemy(), local_check_loaded_object(), monster_check_enemy(), mood_change(), polymorph(), process_object(), spell_find_dir(), and while().

◆ FLAG_HITBACK

FLAG_HITBACK   33

Object will hit back when hit

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Monsters with <hitback> enabled hurt the attacker in proportion to the amount of damage the attacker inflicted. This damage is additional to the regular melee damage of the monster. As far as I know, hitback uses acid attack type, and it only takes effect if the monster actually has acid attacktype at it's disposal. Acid spheres for example use this feature.

Definition at line 267 of file define.h.

Referenced by attack_ob_simple(), describe_monster(), new_exp(), old_describe_monster(), singing(), and while().

◆ FLAG_IDENTIFIED

FLAG_IDENTIFIED   29

Player knows full info about item

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Drink, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Monster & NPC, Monster (Grimreaper), Mood Floor, Mover, Pedestal, Pit, Player, Player Changer, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Rune, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trap, Trapdoor, Treasure, Trigger Marker, Wall, Wand & Staff, Weak Wall, Weapon If an item is identified, the player has full knowledge about it.

Definition at line 261 of file define.h.

Referenced by add_abilities(), add_one_item(), alchemy_failure_effect(), apply_auto(), artifact_describe(), ArtifactPanel::artifactChanged(), book_type_apply(), cast_create_missile(), cast_item_curse_or_bless(), check_loaded_object(), command_create(), detect_curse_on_item(), give_initial_items(), identify(), is_identified(), object_can_merge(), place_fountain_with_specials(), potion_type_apply(), query_base_name(), query_flags(), query_name(), query_short_name(), ring_desc(), scroll_type_apply(), spellbook_type_apply(), START_TEST(), and while().

◆ FLAG_INV_LOCKED

#define FLAG_INV_LOCKED   86

Item will not be dropped from inventory

Definition at line 329 of file define.h.

◆ FLAG_IS_A_TEMPLATE

#define FLAG_IS_A_TEMPLATE   109

Object has no ingame life until instantiated

Definition at line 366 of file define.h.

◆ FLAG_IS_BUILDABLE

#define FLAG_IS_BUILDABLE   110

Can build on item

Definition at line 367 of file define.h.

◆ FLAG_IS_CAULDRON

FLAG_IS_CAULDRON   94

container can make alchemical stuff

Use

Type(s) Description
Container If set, the container can be used as alchemy-cauldron. The player can put ingredients inside, close it, cast alchemy and if his formulae is true, he'll get what he longed for.

Definition at line 338 of file define.h.

Referenced by alchemy(), do_skill_detect_curse(), examine_autoidentify(), use_alchemy(), and while().

◆ FLAG_IS_FLOOR

#define FLAG_IS_FLOOR   63

Can't see what's underneath this object

Definition at line 302 of file define.h.

◆ FLAG_IS_HILLY

FLAG_IS_HILLY   88

Item is hilly/mountain terrain

Use

Type(s) Description
Floor, Floor (Encounter), Hazard Floor This flag indicates this spot contains hills or large rocks. Players with activated mountaineer skill can move faster here.

Definition at line 332 of file define.h.

Referenced by object_check_move_on(), and while().

◆ FLAG_IS_LIGHTABLE

#define FLAG_IS_LIGHTABLE   43

object can be lit

Definition at line 278 of file define.h.

◆ FLAG_IS_LINKED

#define FLAG_IS_LINKED   73

The object is linked with other objects

Definition at line 315 of file define.h.

◆ FLAG_IS_THROWN

#define FLAG_IS_THROWN   17

Object is designed to be thrown.

Definition at line 249 of file define.h.

◆ FLAG_IS_TURNABLE

#define FLAG_IS_TURNABLE   24

Object can change face with direction

Definition at line 256 of file define.h.

◆ FLAG_IS_USED_UP

◆ FLAG_IS_WATER

#define FLAG_IS_WATER   107

Definition at line 364 of file define.h.

◆ FLAG_IS_WOODED

FLAG_IS_WOODED   87

Item is wooded terrain

Use

Type(s) Description
Floor, Floor (Encounter), Hazard Floor This flag indicates this spot contains wood or high grass. Players with activated woodsman skill can move faster here.

Definition at line 330 of file define.h.

Referenced by object_check_move_on(), and while().

◆ FLAG_KNOWN_BLESSED

#define FLAG_KNOWN_BLESSED   113

Item is known to be blessed.

Definition at line 370 of file define.h.

◆ FLAG_KNOWN_CURSED

#define FLAG_KNOWN_CURSED   78

The object is known to be cursed

Definition at line 320 of file define.h.

◆ FLAG_KNOWN_MAGICAL

#define FLAG_KNOWN_MAGICAL   77

The object is known to be magical

Definition at line 319 of file define.h.

◆ FLAG_LIFESAVE

FLAG_LIFESAVE   64

Saves a players' life once, then destr.

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield, Weapon

An item with this flag enabled will save the players life for one time: When the player is wearing this item and his health points reach zero, the item disappears, replenishing half of the player's health.

An item with <save life> should not have any decent additional bonuses!

Creator If <infinite uses> is set, the creator will work infinitely, regardless of the value in <number of uses>.
Mover If enabled, the mover gets "used up" after a certain number of moves (specified by <number of uses>). If disabled, the mover works infinitely.
Rune, Trap If set, then the rune will detonate forever if the number of charges is not 0.

Definition at line 305 of file define.h.

Referenced by add_abilities(), calc_item_power(), change_abil(), describe_item(), eat_special_food(), fix_object(), move_cone(), move_creator(), move_player_mover(), ring_desc(), save_life(), spring_trap(), and while().

◆ FLAG_MAKE_INVIS

#define FLAG_MAKE_INVIS   85

(Item) gives invisibility when applied

Definition at line 328 of file define.h.

◆ FLAG_MONSTER

FLAG_MONSTER   14

Will attack players

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) When <monster behavior> is enabled, this object will behave like a monster: It can move and attack enemies (which are typically players). This flag should be set for all monsters as-such. Monsters which don't move, like guards, should also have <monster behavior>, but in combination with <stand still>. It should not be set for things like immobile generators.

Definition at line 245 of file define.h.

Referenced by animate_weapon(), apply_auto_fix(), ArchetypesModel::ArchetypesModel(), attack_ob_simple(), attempt_jump(), MonsterResistances::buildGraph(), calculate_difficulty(), CAN_PROBE(), cast_cause_disease(), cast_detection(), cast_light(), cast_spell(), check_loaded_object(), CREMapInformationManager::checkItem(), command_create(), counterspell(), describe_item(), describe_monster(), do_harvest(), do_monster(), do_monster_change(), do_mood_floor(), dump_abilities(), examine(), find_closest_monster(), find_target_for_friendly_spell(), find_traps(), finish_races(), fix_flesh_item(), fix_generated_item(), fix_object(), fix_summon_pet(), generate_monster_arch(), generate_monster_inv(), get_pointed_target(), hit_player(), hit_with_one_attacktype(), infect_object(), is_enemy(), kill_object(), ArchetypeLoader::load(), local_check_loaded_object(), main(), mimic_type_apply(), monster_check_enemy(), monster_do_living(), monster_move_no_enemy(), mood_change(), move_player_attack(), move_teleporter(), ok_to_put_more(), CREMainWindow::onReportPlayer(), peacemaker_type_process(), pets_move_golem(), pets_summon_golem(), pets_summon_object(), polymorph(), polymorph_living(), print_monsters(), process_map(), process_object(), remove_trap(), singing(), spell_find_dir(), stand_near_hostile(), START_TEST(), steal(), update_position(), use_oratory(), and while().

◆ FLAG_NEUTRAL

#define FLAG_NEUTRAL   100

monster is from type neutral

Definition at line 354 of file define.h.

◆ FLAG_NO_APPLY

#define FLAG_NO_APPLY   62

Avoids step_on/fly_on to this object

Definition at line 301 of file define.h.

◆ FLAG_NO_ATTACK

#define FLAG_NO_ATTACK   101

monster don't attack

Definition at line 355 of file define.h.

◆ FLAG_NO_DAMAGE

FLAG_NO_DAMAGE   102

monster can't be damaged

Use

Type(s) Description
Door If set to non-zero, the door cannot be destroyed by attacking it.
Magic Wall If set to non-zero, the wall cannot be destroyed by attacking it.
Monster & NPC, Monster (Grimreaper) If set to non-zero, the monster cannot be hurt by attacking it.
Weak Wall If set to non-zero, the wall cannot be destroyed by attacking it.

Definition at line 356 of file define.h.

Referenced by hit_player(), and while().

◆ FLAG_NO_DROP

FLAG_NO_DROP   50

Object can't be dropped

Use

Type(s) Description
Projectile When a monster carries a projectile with <don't drop>, this item will never drop to the ground but vanish instead. If this object is shot, it can still drop after hitting an obstacle. You can prevent this by setting <chance to break> 100.

Definition at line 288 of file define.h.

Referenced by cfapi_object_drop(), command_drop(), drop(), drop_object(), eventListener(), free_no_drop(), loot_object(), mark_inventory_as_no_drop(), object_free(), pick_up_object(), polymorph_item(), and while().

◆ FLAG_NO_FIX_PLAYER

#define FLAG_NO_FIX_PLAYER   42

fix_object() won't be called

Definition at line 277 of file define.h.

◆ FLAG_NO_MAGIC

FLAG_NO_MAGIC   41

Spells (some) can't pass this object

Use

Type(s) Description
Floor, Floor (Encounter), Hazard Floor, Mood Floor, Swamp If enabled, it is impossible for players to use (wizard-) spells on that spot.
Gate, Timed Gate Restricting the use of spells to pass this gate. This has an effect only if <block view> is disabled.
Locked Door Restricting the use of spells to pass this door. This should be set in most cases. (Don't forget that the spell "dimension door" is easily available at about wisdom level 10).
Wall This takes effect only with <blocksview> disabled. Restricting the use of spells to pass this wall.

Definition at line 276 of file define.h.

Referenced by new_exp(), object_update(), update_position(), and while().

◆ FLAG_NO_PICK

FLAG_NO_PICK   8

Object can't be picked up

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Creator, Detector, Director, Disease, Door, Drink, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Monster & NPC, Monster (Grimreaper), Mood Floor, Mover, Pedestal, Pit, Player, Player Changer, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trapdoor, Treasure, Trigger Marker, Wall, Wand & Staff, Weak Wall, Weapon If set, the object cannot be picked up (Neither by players nor monsters).

Definition at line 239 of file define.h.

Referenced by add_object_to_socklist(), alchemy(), alchemy_failure_effect(), apply_builder_item(), check_spell_knockback(), create_singularity(), deep_swamp_type_process(), do_test(), esrv_update_item(), examine(), find_insert_pos(), fix_generated_item(), food_type_apply(), gate_type_process(), is_special_equipment(), move_teleporter(), object_can_pick(), object_check_move_on(), Object_GetPickable(), Object_SetPickable(), op_on_battleground(), place_fountain_with_specials(), polymorph(), remove_force(), save_throw_object(), shop_mat_type_move_on(), update_position(), and while().

◆ FLAG_NO_SAVE

#define FLAG_NO_SAVE   13

If set (through plugins), the object is not saved on maps.

Definition at line 244 of file define.h.

◆ FLAG_NO_SKILL_IDENT

#define FLAG_NO_SKILL_IDENT   91

If set, item cannot be identified w/ a skill

Definition at line 335 of file define.h.

◆ FLAG_NO_STEAL

#define FLAG_NO_STEAL   96

Item can't be stolen

Definition at line 342 of file define.h.

◆ FLAG_NO_STRENGTH

FLAG_NO_STRENGTH   65

Strength-bonus not added to wc/dam

Use

Type(s) Description
Shooting Weapon Usually the player's strength takes effect on the damage done by the shooting weapon. If <ignore strength> is set, the player's strength is ignored.

Definition at line 306 of file define.h.

Referenced by fire_bow(), and while().

◆ FLAG_OBJ_ORIGINAL

#define FLAG_OBJ_ORIGINAL   103

NEVER SET THIS. Item was loaded by load_original_map()

Definition at line 357 of file define.h.

◆ FLAG_ONE_HIT

FLAG_ONE_HIT   97

Monster can only hit once before going away (replaces ghosthit)

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Monsters with <one hit only> disappear after one successful hit to a player.

Definition at line 343 of file define.h.

Referenced by hit_player(), and while().

◆ FLAG_ONLY_ATTACK

#define FLAG_ONLY_ATTACK   69

NPC will evaporate if there is no enemy

Definition at line 310 of file define.h.

◆ FLAG_OVERLAY_FLOOR

#define FLAG_OVERLAY_FLOOR   23

Object is an overlay floor

Definition at line 255 of file define.h.

◆ FLAG_PARALYZED

#define FLAG_PARALYZED   114

Monster or player is paralyzed. Currently only used to display message to player of paralysis begin and end.

Definition at line 371 of file define.h.

◆ FLAG_PLAYER_SOLD

#define FLAG_PLAYER_SOLD   20

Object was sold to a shop by a player.

Definition at line 252 of file define.h.

◆ FLAG_PROBE

#define FLAG_PROBE   25

Object displays HP information to player.

Definition at line 257 of file define.h.

◆ FLAG_RANDOM_MOVE

FLAG_RANDOM_MOVE   68

NPC will move randomly

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Living things with the <random_movement> flag set automatically move about in a random fashion.

Definition at line 309 of file define.h.

Referenced by eventListener(), get_npc(), monster_move_no_enemy(), peacemaker_type_process(), and while().

◆ FLAG_READY_BOW

#define FLAG_READY_BOW   60

not implemented yet

Definition at line 299 of file define.h.

◆ FLAG_READY_RANGE

#define FLAG_READY_RANGE   59

(Monster) has a range attack readied... 8)

Definition at line 298 of file define.h.

◆ FLAG_READY_SCROLL

#define FLAG_READY_SCROLL   81

monster has scroll in inv and can use it

Definition at line 324 of file define.h.

◆ FLAG_READY_SKILL

#define FLAG_READY_SKILL   89

(Monster or Player) has a skill readied

Definition at line 333 of file define.h.

◆ FLAG_READY_WEAPON

#define FLAG_READY_WEAPON   90

(Monster or Player) has a weapon readied

Definition at line 334 of file define.h.

◆ FLAG_REFL_MISSILE

FLAG_REFL_MISSILE   39

Arrows will reflect from object

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield, Weapon If a player is wearing any piece of equipment with the ability to <reflect missiles>, all kinds of projectiles (e.g. arrows, bolts, boulders) will bounce off him. This works only about 90% of all times, to avoid players being completely immune to certain types of attacks.
Monster & NPC, Monster (Grimreaper) A monster with this flag has the ability to <reflect missiles>, all kinds of projectiles (e.g. arrows, bolts, boulders) will bounce off.

Definition at line 273 of file define.h.

Referenced by add_abilities(), become_follower(), calc_item_power(), change_abil(), common_process_projectile(), describe_item(), dump_gods(), eat_special_food(), fix_object(), is_magical(), new_exp(), ring_desc(), set_ring_bonus(), and while().

◆ FLAG_REFL_SPELL

FLAG_REFL_SPELL   40

Spells (some) will reflect from object

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield, Weapon

If a player is wearing any piece of equipment with the ability to <reflect spells>, all kinds of spell-bullets and -beams will bounce off him. This works only about 90% of all times, to avoid players being completely immune to certain types of attacks.

This is a very powerful ability and it shouldn't be handed out cheap!

Monster & NPC, Monster (Grimreaper)

A monster with this flag has the ability to <reflect spells>, all kinds of spell-bullets and -beams will bounce off.

Generally this flag should not be set because it puts wizard-type players at an unfair disadvantage.

Definition at line 275 of file define.h.

Referenced by add_abilities(), become_follower(), calc_item_power(), cast_smite_spell(), change_abil(), describe_item(), dump_gods(), eat_special_food(), fix_object(), is_magical(), new_exp(), reflwall(), ring_desc(), set_ring_bonus(), and while().

◆ FLAG_REFLECTING

#define FLAG_REFLECTING   30

Object reflects from walls (lightning)

Definition at line 262 of file define.h.

◆ FLAG_REMOVED

#define FLAG_REMOVED   2

Object is not in any map or invenory

Definition at line 232 of file define.h.

◆ FLAG_RUN_AWAY

FLAG_RUN_AWAY   45

Object runs away from nearest player \ but can still attack at a distance

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) This is a percentage value in the range 0-100. When the monster's health points drop below this percentage (relative to max health), it attempts to run away from the attacker.

Definition at line 280 of file define.h.

Referenced by hit_player(), monster_do_living(), monster_move(), and peacemaker_type_process().

◆ FLAG_SCARED

#define FLAG_SCARED   37

Monster is scared (mb player in future)

Definition at line 271 of file define.h.

◆ FLAG_SEE_ANYWHERE

#define FLAG_SEE_ANYWHERE   76

The object will be visible behind walls

Definition at line 318 of file define.h.

◆ FLAG_SEE_IN_DARK

FLAG_SEE_IN_DARK   93

if set ob not effected by darkness

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) A monster with the ability to <see in darkness> cannot be fooled by spells of darkness or dark maps. This flag is a "should-have" for high-level monsters. When a monster is unable to see in darkness, players can cast darkness and sneak around it safely.

Definition at line 337 of file define.h.

Referenced by add_abilities(), become_follower(), calc_item_power(), cast_change_ability(), change_abil(), describe_item(), dragon_ability_gain(), dump_gods(), eat_special_food(), expand_lighted_sight(), fix_object(), monster_can_detect_enemy(), monster_can_see_enemy(), monster_check_wakeup(), monster_move(), and while().

◆ FLAG_SEE_INVISIBLE

FLAG_SEE_INVISIBLE   21

Will see invisible player

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) A monster with the ability to <see invisible> cannot be fooled with by invisible or hiding players. This flag is a must-have for high-level monsters. When a monster is unable to detect invisible players, it can be killed without fighting back.

Definition at line 253 of file define.h.

Referenced by describe_monster(), monster_can_see_enemy(), monster_check_wakeup(), monster_move(), new_exp(), old_describe_monster(), and while().

◆ FLAG_SLEEP

FLAG_SLEEP   66

NPC is sleeping

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Being <asleep>, a monster won't move unless a player enters the <sensing range> of the monster. Usually the sensing range is larger than the players line of sight. Due to that, in most cases the player won't ever notice whether a monster was asleep or not.

Definition at line 307 of file define.h.

Referenced by adj_stealchance(), attack_ob_simple(), do_mood_floor(), monster_check_wakeup(), monster_find_enemy(), monster_move(), mood_change(), pets_summon_object(), push_ob(), and while().

◆ FLAG_SPLITTING

FLAG_SPLITTING   32

Object splits into stats.food other objs

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, Drink, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Money, Monster & NPC, Monster (Grimreaper), Mood Floor, Mover, Pedestal, Pit, Player, Player Changer, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Rune, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trap, Trapdoor, Treasure, Trigger Marker, Wall, Wand & Staff, Weak Wall, Weapon A <splitting> object converts to <food> <other_arch> objects; when it is hit physically. For non-living objects <food> is checked: if it is zero, the change happens; otherwise <food> is decreased by one. I suggest you don't mess with this value - leave the default in place.

Definition at line 266 of file define.h.

Referenced by fix_summon_pet(), hit_player(), new_exp(), singing(), and while().

◆ FLAG_STAND_STILL

FLAG_STAND_STILL   67

NPC will not (ever) move

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper)

Monsters which <stand still> won't move to leave their position. When aggressive, they will attack all enemies who get close to them. This behavior is commonly known from castle guards.

In older versions of Crossfire it was possible to eventually push a <stand still>-monster out of position by force. I believe this is no longer possible. Nevertheless, you should still be cautious when lining up <stand still>-monster in order to "defend" something: Such monsters are rather easy to kill. It's good for low level maps, but not much more.

Definition at line 308 of file define.h.

Referenced by add_abilities(), eventListener(), fix_summon_pet(), monster_move(), monster_move_no_enemy(), new_exp(), push_ob(), setup(), and while().

◆ FLAG_STARTEQUIP

◆ FLAG_STEALTH

FLAG_STEALTH   71

Will wake monsters with less range

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield, Weapon Stealth allows the player to move silently. This comes to effect if a player turns himself invisible and tries to sneak around monsters. (At least that was the idea behind it)

Definition at line 312 of file define.h.

Referenced by add_abilities(), become_follower(), calc_item_power(), change_abil(), describe_item(), describe_monster(), dragon_ability_gain(), dump_gods(), eat_special_food(), fix_object(), is_magical(), monster_can_detect_enemy(), monster_check_wakeup(), old_describe_monster(), ring_desc(), send_extra_stats(), and while().

◆ FLAG_TEAR_DOWN

#define FLAG_TEAR_DOWN   44

at->faces[hp*animations/maxhp] at hit

Definition at line 279 of file define.h.

◆ FLAG_TREASURE

#define FLAG_TREASURE   19

Will generate treasure when applied

Definition at line 251 of file define.h.

◆ FLAG_UNAGGRESSIVE

◆ FLAG_UNDEAD

◆ FLAG_UNIQUE

FLAG_UNIQUE   49

Item is really unique (UNIQUE_ITEMS)

Use

Type(s) Description
Amulet, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Cloak, Girdle, Gloves, Helmet, Projectile, Ring, Shield, Shooting Weapon, Weapon Unique items exist only one time on a server. If the item is taken, lost or destroyed - it's gone for good.
Container Unique items exist only one time on a server. If the item is taken, lost or destroyed - it's gone for good. All contents of a unique container are unique as well.
Event If set, then the event happens only once.
Exit This flag defines the destined map as "personal unique map". If set, there will be a separate version of that map for every player out there. This feature is used for the permanent apartments (in Scorn/Nuernberg/Caterham...). It should not be used for anything else than apartments, since Crossfire is a *multi*player game. In such a permanent apartment don't forget to set the unique-flag for all floor squares too (see floors). An exit pointing outside of a personal unique map must have the "unique destination"-flag unset.
Floor, Floor (Encounter), Hazard Floor Unique floor means that any items dropped on that spot will be saved beyond map reset. For permanent apartments, all floor squares must be set <unique map>.
Special Key

Unique items exist only one time on a server. If the item is taken, lost or destroyed - it's gone for good.

This can be used if you want to sell apartments on your map: Simply sell a unique passport/key, and place an inventory checker at the entrance of your apartment.

Definition at line 287 of file define.h.

Referenced by apply_builder_floor(), decay_objects(), delete_unique_items(), do_execute_event(), enter_exit(), get_npc(), kill_player_permadeath(), load_objects(), loot_object(), save_objects(), and while().

◆ FLAG_UNPAID

FLAG_UNPAID   6

Object hasn't been paid for yet

Use

Type(s) Description
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Builder, Building material, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Creator, Detector, Director, Disease, Door, Drink, Duplicator, Event, Exit, Flesh, Floor, Floor (Encounter), Food, Gate, Girdle, Gloves, Handle, Handle Trigger, Hazard Floor, Helmet, Holy Altar, Horn, Inorganic, Inventory Checker, Item Transformer, Jewel, Key, Locked Door, Magic Ear, Magic Wall, Marker, Mood Floor, Mover, Pedestal, Pit, Player, Player Changer, Poison Food, Potion, Power Crystal, Projectile, Ring, Rod, Savebed, Scroll, Shield, Shooting Weapon, Shop Floor, Shop Mat, Sign & Magic Mouth, Skill, Skill Scroll, Special Key, Spell, Spellbook, Spinner, Swamp, Teleporter, Timed Gate, Transport, Trapdoor, Treasure, Trigger Marker, Wand & Staff, Weak Wall, Weapon An <unpaid> item cannot be used unless a player carried it over a shop mat, paying the demanded price. Setting this flag makes sense only for pickable items inside shops.

Definition at line 236 of file define.h.

Referenced by add_one_item(), add_shop_item(), alchemy_object(), animate_weapon(), apply_auto(), apply_manual(), apply_map_builder(), check_altar_sacrifice(), check_inv_recursive(), check_item(), check_pick(), converter_type_apply(), decay_objects(), do_item_conversion(), drop_object(), enter_exit(), examine(), find_key(), find_skill_by_name(), find_throw_ob(), monster_can_pick(), object_matches_string(), pick_up_object(), query_flags(), query_name(), remove_unpaid_objects(), save_object_in_sb(), save_objects(), save_throw_object(), sell_item(), shop_inventory_type_apply(), shop_mat_type_move_on(), shop_pay_unpaid_callback(), START_TEST(), unpaid_iter(), use_alchemy(), use_skill(), while(), and write_on_item().

◆ FLAG_USE_ARMOUR

FLAG_USE_ARMOUR   56

(Monster) can wear armour/shield/helmet

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Monster is able to wear protective equipment like breastplate armor, helmets etc.

Definition at line 295 of file define.h.

Referenced by apply_can_apply_object(), become_follower(), check_login(), command_body(), describe_monster(), dump_gods(), fix_object(), give_initial_items(), monster_can_pick(), old_describe_monster(), and while().

◆ FLAG_USE_BOW

FLAG_USE_BOW   55

(Monster) can apply and fire bows

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Monster is able to use missile-weapon type objects.

Definition at line 293 of file define.h.

Referenced by apply_can_apply_object(), describe_monster(), monster_can_pick(), monster_check_apply(), new_exp(), old_describe_monster(), and while().

◆ FLAG_USE_RANGE

FLAG_USE_RANGE   54

(Monster) can apply and use range items

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Monster is able to use wands, staves, and rods.

Definition at line 292 of file define.h.

Referenced by apply_can_apply_object(), describe_monster(), monster_can_pick(), new_exp(), old_describe_monster(), and while().

◆ FLAG_USE_RING

FLAG_USE_RING   58

(Monster) can use rings, boots, gauntlets, etc

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Monster is able to wear rings.

Definition at line 297 of file define.h.

Referenced by apply_can_apply_object(), describe_monster(), monster_can_pick(), old_describe_monster(), and while().

◆ FLAG_USE_SCROLL

FLAG_USE_SCROLL   53

(Monster) can read scroll

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Monster is able to read scrolls.

Definition at line 291 of file define.h.

Referenced by describe_monster(), monster_can_pick(), monster_check_apply(), new_exp(), old_describe_monster(), and while().

◆ FLAG_USE_SHIELD

FLAG_USE_SHIELD   7

Can this creature use a shield?

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Monster is able to wear shields.

Definition at line 237 of file define.h.

Referenced by apply_can_apply_object(), become_follower(), check_login(), give_initial_items(), monster_can_pick(), and while().

◆ FLAG_USE_WEAPON

FLAG_USE_WEAPON   57

(Monster) can wield weapons

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Monster is able to wield weapon type objects.

Definition at line 296 of file define.h.

Referenced by animate_weapon(), apply_can_apply_object(), apply_changes_to_player(), become_follower(), command_body(), describe_monster(), dump_gods(), give_initial_items(), monster_can_pick(), old_describe_monster(), and while().

◆ FLAG_WAS_WIZ

#define FLAG_WAS_WIZ   4

Player was once a wiz

Definition at line 234 of file define.h.

◆ FLAG_WIZ

#define FLAG_WIZ   1

Object has special privilegies

Definition at line 231 of file define.h.

◆ FLAG_WIZCAST

#define FLAG_WIZCAST   51

The wizard can cast spells in no-magic area

Definition at line 289 of file define.h.

◆ FLAG_WIZPASS

#define FLAG_WIZPASS   72

The wizard can go through walls

Definition at line 314 of file define.h.

◆ FLAG_XRAYS

FLAG_XRAYS   61

X-ray vision

Use

Type(s) Description
Amulet, Boots, Bracers, Breastplate Armor, Cloak, Girdle, Gloves, Helmet, Ring, Shield, Weapon Xray vision allows the player to see through obstacles in a two-square-wide radius. This is extremely helpful and desirable, so don't give it away for cheap on equipment.

Definition at line 300 of file define.h.

Referenced by add_abilities(), become_follower(), calc_item_power(), cast_change_ability(), change_abil(), describe_item(), dragon_ability_gain(), dump_gods(), eat_special_food(), fix_object(), is_magical(), monster_can_see_enemy(), send_extra_stats(), update_los(), and while().

◆ FOR_ABOVE_FINISH

#define FOR_ABOVE_FINISH ( )
Value:
} while(0)

Finishes FOR_ABOVE_PREPARE().

Definition at line 694 of file define.h.

◆ FOR_ABOVE_PREPARE

#define FOR_ABOVE_PREPARE (   op_,
  it_ 
)
Value:
do { \
object *it_ = (op_)->above; \
FOR_OB_AND_ABOVE_PREPARE(it_);

Constructs a loop iterating over all objects above an object.

Parameters
op_the object to iterate over
it_a variable name that holds the inventory objects; a new variable will be declared; modifications do not affect the loop

Definition at line 687 of file define.h.

◆ FOR_BELOW_FINISH

#define FOR_BELOW_FINISH ( )
Value:
} while(0)

Finishes FOR_BELOW_PREPARE().

Definition at line 711 of file define.h.

◆ FOR_BELOW_PREPARE

#define FOR_BELOW_PREPARE (   op_,
  it_ 
)
Value:
do { \
object *it_ = (op_)->below; \
FOR_OB_AND_BELOW_PREPARE(it_);

Constructs a loop iterating over all objects below an object.

Parameters
op_the object to iterate over
it_a variable name that holds the inventory objects; a new variable will be declared; modifications do not affect the loop

Definition at line 704 of file define.h.

◆ FOR_INV_FINISH

#define FOR_INV_FINISH ( )
Value:
} while(0)

Finishes FOR_INV_PREPARE().

Definition at line 677 of file define.h.

◆ FOR_INV_PREPARE

#define FOR_INV_PREPARE (   op_,
  it_ 
)
Value:
do { \
object *it_ = (op_)->inv; \
FOR_OB_AND_BELOW_PREPARE(it_);

Constructs a loop iterating over the inventory of an object. Example:

FOR_INV_PREPARE(op, inv)
    LOG(llevInfo, "%s\n", inv->name);
FOR_INV_FINISH();

or

FOR_INV_PREPARE(op, inv) {
    LOG(llevInfo, "%s\n", inv->name);
} FOR_INV_FINISH();
Parameters
op_the object to iterate over
it_a variable name that holds the inventory objects; a new variable will be declared; modifications do not affect the loop

Definition at line 670 of file define.h.

◆ FOR_MAP_FINISH

#define FOR_MAP_FINISH ( )
Value:
} while(0)

Finishes FOR_MAP_PREPARE().

Definition at line 730 of file define.h.

◆ FOR_MAP_PREPARE

#define FOR_MAP_PREPARE (   map_,
  mx_,
  my_,
  it_ 
)
Value:
do { \
object *it_ = GET_MAP_OB((map_), (mx_), (my_)); \
FOR_OB_AND_ABOVE_PREPARE(it_);

Constructs a loop iterating over all objects of a map tile.

Parameters
map_the map to iterate over
mx_the map's x-coordinate to iterate over
my_the map's y-coordinate to iterate over
it_a variable name that holds the inventory objects; a new variable will be declared; modifications do not affect the loop

Definition at line 723 of file define.h.

◆ FOR_OB_AND_ABOVE_FINISH

#define FOR_OB_AND_ABOVE_FINISH ( )    FOR_OB_FINISH()

Finishes FOR_OB_AND_ABOVE_PREPARE().

Definition at line 743 of file define.h.

◆ FOR_OB_AND_ABOVE_PREPARE

#define FOR_OB_AND_ABOVE_PREPARE (   op_)    FOR_OB_PREPARE(op_, above, __LINE__)

Constructs a loop iterating over an object and all objects above it in the same pile.

Parameters
op_the object to start with

Definition at line 739 of file define.h.

◆ FOR_OB_AND_BELOW_FINISH

#define FOR_OB_AND_BELOW_FINISH ( )    FOR_OB_FINISH()

Finishes FOR_OB_AND_BELOW_PREPARE().

Definition at line 754 of file define.h.

◆ FOR_OB_AND_BELOW_PREPARE

#define FOR_OB_AND_BELOW_PREPARE (   op_)    FOR_OB_PREPARE(op_, below, __LINE__)

Constructs a loop iterating over an object and all objects below it in the same pile.

Parameters
op_the object to start with

Definition at line 750 of file define.h.

◆ FOR_OB_FINISH

#define FOR_OB_FINISH ( )
Value:
} \
} while(0)

Finishes FOR_OB_PREPARE().

Definition at line 784 of file define.h.

◆ FOR_OB_PREPARE

#define FOR_OB_PREPARE (   op_,
  field_,
  suffix_ 
)    FOR_OB_PREPARE2(op_, field_, suffix_)

Constructs a loop iterating over a set of objects. This function should not be used directly in client code.

Parameters
op_the object start start with
field_the field that holds the "next" pointer within op_
suffix_a suffix for constructing unique variable names

Definition at line 763 of file define.h.

◆ FOR_OB_PREPARE2

#define FOR_OB_PREPARE2 (   op_,
  field_,
  suffix_ 
)
Value:
do { \
object *next##suffix_ = (op_); \
tag_t next_tag##suffix_ = next##suffix_ == NULL ? 0 : next##suffix_->count;\
while (((op_) = next##suffix_) != NULL) { \
if (object_was_destroyed(next##suffix_, next_tag##suffix_)) {\
break; \
} \
next##suffix_ = next##suffix_->field_; \
next_tag##suffix_ = next##suffix_ == NULL ? 0 : next##suffix_->count;

Constructs a loop iterating over a set of objects. This function should not be used at all. Use FOR_OB_PREPARE() instead.

Parameters
op_the object start start with
field_the field that holds the "next" pointer within op_
suffix_a suffix for constructing unique variable names

Definition at line 771 of file define.h.

◆ GENERATE_SPEED

#define GENERATE_SPEED (   xyz)    ((xyz)->stats.maxsp) /* if(!RANDOM()%<speed>) */

Definition at line 437 of file define.h.

◆ GENERATE_TYPE

#define GENERATE_TYPE (   xyz)    ((xyz)->stats.sp)

Definition at line 436 of file define.h.

◆ HAS_RANDOM_ITEMS

#define HAS_RANDOM_ITEMS (   op)    (op->randomitems && (!QUERY_FLAG(op, FLAG_IS_A_TEMPLATE)))

This return TRUE if object has still randomitems which could be expanded.

Definition at line 184 of file define.h.

◆ HI4

#define HI4   240

Definition at line 531 of file define.h.

◆ HITRUN

#define HITRUN   3

Run to then hit player then run away cyclicly.

Definition at line 494 of file define.h.

◆ HUGE_BUF

#define HUGE_BUF   4096

Used for messages - some can be quite long

Definition at line 37 of file define.h.

◆ IS_ARMOR

#define IS_ARMOR (   op)
Value:
(op->type == ARMOUR || op->type == HELMET || \
op->type == BOOTS || op->type == GLOVES)

Definition at line 166 of file define.h.

◆ IS_ARROW

#define IS_ARROW (   op)
Value:
(op->type == ARROW || \
(op->type == SPELL_EFFECT && (op->subtype == SP_BULLET || op->subtype == SP_MAGIC_MISSILE)))

Definition at line 178 of file define.h.

◆ IS_LIVE

#define IS_LIVE (   op)
Value:

Definition at line 173 of file define.h.

◆ IS_SHIELD

#define IS_SHIELD (   op)    (op->type == SHIELD)

Definition at line 170 of file define.h.

◆ IS_WEAPON

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

Definition at line 163 of file define.h.

◆ LO4

#define LO4   15

bitmasks for upper and lower 4 bits from 8 bit fields

Definition at line 530 of file define.h.

◆ MAX_ANIMATIONS

#define MAX_ANIMATIONS   256

Definition at line 39 of file define.h.

◆ MAX_BUF

#define MAX_BUF   256

Used for all kinds of things

Definition at line 35 of file define.h.

◆ MAX_DARKNESS

#define MAX_DARKNESS   5

Maximum map darkness, there is no practical reason to exceed this

Definition at line 454 of file define.h.

◆ MAX_LIGHT_RADII

#define MAX_LIGHT_RADII   4

Max radii for 'light' object, really large values allow objects that can slow down the game

Definition at line 450 of file define.h.

◆ MAX_NAME

#define MAX_NAME   48

Definition at line 41 of file define.h.

◆ MAX_WEAPON_ITEM_POWER

#define MAX_WEAPON_ITEM_POWER   100

Maximum item power an item can have. If changed, check object::item_power for overflow issues.

Definition at line 459 of file define.h.

◆ MIN_ACTIVE_SPEED

#define MIN_ACTIVE_SPEED   0.00001

Cut off point of when an object is put on the active list or not

Definition at line 639 of file define.h.

◆ MIN_STAT

#define MIN_STAT   1

The minimum legal value of any stat

Definition at line 33 of file define.h.

◆ MOVE_ALL

#define MOVE_ALL   0x1f

Mask of all movement types.

Definition at line 398 of file define.h.

◆ MOVE_BLOCK_DEFAULT

#define MOVE_BLOCK_DEFAULT   MOVE_SWIM

The normal assumption is that objects are walking/flying. So often we don't want to block movement, but still don't want to allow all types (swimming is rather specialized) - I also expect as more movement types show up, this is likely to get updated. Basically, this is the default for spaces that allow movement - anything but swimming right now. If you really want nothing at all, then can always set move_block to 0

Definition at line 409 of file define.h.

◆ MOVE_BOAT

#define MOVE_BOAT   0x10

Boats/sailing.

Definition at line 397 of file define.h.

◆ MOVE_FLY_HIGH

#define MOVE_FLY_HIGH   0x4

High flying object.

Definition at line 394 of file define.h.

◆ MOVE_FLY_LOW

#define MOVE_FLY_LOW   0x2

Low flying object.

Definition at line 393 of file define.h.

◆ MOVE_FLYING

#define MOVE_FLYING   0x6

Combo of fly_low and fly_high.

Definition at line 395 of file define.h.

◆ MOVE_SWIM

#define MOVE_SWIM   0x8

Swimming object.

Definition at line 396 of file define.h.

◆ MOVE_WALK

#define MOVE_WALK   0x1

Object walks.

Definition at line 392 of file define.h.

◆ NAME_MAX

#define NAME_MAX   255

NAME_MAX used by random maps may not be defined on pure ansi systems

Definition at line 30 of file define.h.

◆ NROF_SOUNDS

#define NROF_SOUNDS   (23+NROFREALSPELLS) /* Number of sounds */

Definition at line 157 of file define.h.

◆ NUM_FLAGS

#define NUM_FLAGS   114

Should always be equal to the last defined flag. If you change this, make sure you update the flag_links in common/loader.l

Definition at line 374 of file define.h.

◆ OB_MOVE_BLOCK

#define OB_MOVE_BLOCK (   ob1,
  ob2 
)    ((ob1->move_type&ob2->move_block) == ob1->move_type)

Basic macro to see if ob2 blocks ob1 from moving onto this space. Basically, ob2 has to block all of ob1 movement types.

Definition at line 423 of file define.h.

◆ OB_TYPE_MOVE_BLOCK

#define OB_TYPE_MOVE_BLOCK (   ob1,
  type 
)    ((type != 0) && (ob1->move_type&type) == ob1->move_type)

Basic macro to see if if ob1 can not move onto a space based on the 'type' move_block parameter Add check - if type is 0, don't stop anything from moving onto it.

Definition at line 432 of file define.h.

◆ PACEH

#define PACEH   64

The monster will pace back and forth until attacked. This is HORIZONTAL movement.

Definition at line 514 of file define.h.

◆ PACEH2

#define PACEH2   80

The monster will pace as above but the length of the pace area is longer and the monster stops before changing directions. This is HORIZONTAL movement.

Definition at line 516 of file define.h.

◆ PACEV

#define PACEV   128

The monster will pace back and forth until attacked. This is VERTICAL movement.

Definition at line 524 of file define.h.

◆ PACEV2

#define PACEV2   144

The monster will pace as above but the length of the pace area is longer and the monster stops before changing directions. This is VERTICAL movement.

Definition at line 526 of file define.h.

◆ PETMOVE

#define PETMOVE   16

If the upper four bits of attack_movement are set to this number, the monster follows a player until the owner calls it back or off player followed denoted by ob->owner the monster will try to attack whatever the player is attacking, and will continue to do so until the calls off the monster - a key command will be inserted to do so.

Definition at line 501 of file define.h.

◆ PREFER_HIGH

#define PREFER_HIGH   1

Definition at line 563 of file define.h.

◆ PREFER_LOW

#define PREFER_LOW   0

Definition at line 564 of file define.h.

◆ PU_ARMOUR

#define PU_ARMOUR   0x00000800

Definition at line 123 of file define.h.

◆ PU_ARROW

#define PU_ARROW   0x00000100

Definition at line 120 of file define.h.

◆ PU_BOOTS

#define PU_BOOTS   0x00001000

Definition at line 125 of file define.h.

◆ PU_BOW

#define PU_BOW   0x00000080

Definition at line 118 of file define.h.

◆ PU_CLOAK

#define PU_CLOAK   0x00004000

Definition at line 127 of file define.h.

◆ PU_CONTAINER

#define PU_CONTAINER   0x08000000

Definition at line 143 of file define.h.

◆ PU_CURSED

#define PU_CURSED   0x10000000

Definition at line 144 of file define.h.

◆ PU_DEBUG

#define PU_DEBUG   0x10000000

Definition at line 108 of file define.h.

◆ PU_DRINK

#define PU_DRINK   0x00000020

Definition at line 116 of file define.h.

◆ PU_FLESH

#define PU_FLESH   0x04000000

Definition at line 142 of file define.h.

◆ PU_FOOD

#define PU_FOOD   0x00000010

Definition at line 115 of file define.h.

◆ PU_GLOVES

#define PU_GLOVES   0x00002000

Definition at line 126 of file define.h.

◆ PU_HELMET

#define PU_HELMET   0x00000200

Definition at line 121 of file define.h.

◆ PU_INHIBIT

#define PU_INHIBIT   0x20000000

Definition at line 109 of file define.h.

◆ PU_JEWELS

#define PU_JEWELS   0x02000000

Definition at line 141 of file define.h.

◆ PU_KEY

#define PU_KEY   0x00008000

Definition at line 128 of file define.h.

◆ PU_MAGIC_DEVICE

#define PU_MAGIC_DEVICE   0x00800000

Definition at line 138 of file define.h.

◆ PU_MAGICAL

#define PU_MAGICAL   0x00040000

Definition at line 132 of file define.h.

◆ PU_MELEEWEAPON

#define PU_MELEEWEAPON   0x00020000

Definition at line 131 of file define.h.

◆ PU_MISSILEWEAPON

#define PU_MISSILEWEAPON   0x00010000

Definition at line 130 of file define.h.

◆ PU_NEWMODE

#define PU_NEWMODE   0x80000000

Definition at line 111 of file define.h.

◆ PU_NOT_CURSED

#define PU_NOT_CURSED   0x01000000

Definition at line 140 of file define.h.

◆ PU_NOTHING

#define PU_NOTHING   0x00000000

Definition at line 106 of file define.h.

◆ PU_POTION

#define PU_POTION   0x00080000

Definition at line 133 of file define.h.

◆ PU_RATIO

#define PU_RATIO   0x0000000F

Definition at line 113 of file define.h.

◆ PU_READABLES

#define PU_READABLES   0x00400000

Definition at line 137 of file define.h.

◆ PU_SHIELD

#define PU_SHIELD   0x00000400

Definition at line 122 of file define.h.

◆ PU_SKILLSCROLL

#define PU_SKILLSCROLL   0x00200000

Definition at line 136 of file define.h.

◆ PU_SPELLBOOK

#define PU_SPELLBOOK   0x00100000

Definition at line 135 of file define.h.

◆ PU_STOP

#define PU_STOP   0x40000000

Definition at line 110 of file define.h.

◆ PU_VALUABLES

#define PU_VALUABLES   0x00000040

Definition at line 117 of file define.h.

◆ QUERY_FLAG

#define QUERY_FLAG (   xyz,
 
)    query_flag(xyz, p)

Definition at line 226 of file define.h.

◆ RANDO

#define RANDO   96

The monster will go in a random direction until it is stopped by an obstacle, then it chooses another direction.

Definition at line 520 of file define.h.

◆ RANDO2

#define RANDO2   112

Constantly move in a different random direction.

Definition at line 523 of file define.h.

◆ RANDOM

#define RANDOM ( )    cf_random()

Definition at line 644 of file define.h.

◆ RUNATT

#define RUNATT   2

Run but attack if player catches up to object.

Definition at line 493 of file define.h.

◆ RUSH

#define RUSH   5

Rush toward player blindly, similiar to dumb monster.

Definition at line 496 of file define.h.

◆ SET_FLAG

#define SET_FLAG (   xyz,
 
)    set_flag(xyz, p)

Definition at line 224 of file define.h.

◆ SIZEOFFREE

#define SIZEOFFREE   49

Definition at line 155 of file define.h.

◆ SIZEOFFREE1

#define SIZEOFFREE1   8

Definition at line 153 of file define.h.

◆ SIZEOFFREE2

#define SIZEOFFREE2   24

Definition at line 154 of file define.h.

◆ SMOOTH_FACE_NAME

#define SMOOTH_FACE_NAME   "default_smoothed.111"

Definition at line 557 of file define.h.

◆ SRANDOM

#define SRANDOM (   seed)    cf_srandom(seed)

Definition at line 645 of file define.h.

◆ ST_BD_BUILD

#define ST_BD_BUILD   1

Builds an item

Definition at line 59 of file define.h.

◆ ST_BD_REMOVE

#define ST_BD_REMOVE   2

Removes an item

Definition at line 60 of file define.h.

◆ ST_CHANGE_CLASS

#define ST_CHANGE_CLASS   3

New character, choosing class.

Definition at line 544 of file define.h.

◆ ST_CHANGE_PASSWORD_CONFIRM

#define ST_CHANGE_PASSWORD_CONFIRM   13

Player is confirming new password

Definition at line 552 of file define.h.

◆ ST_CHANGE_PASSWORD_NEW

#define ST_CHANGE_PASSWORD_NEW   12

Player is entering new password

Definition at line 551 of file define.h.

◆ ST_CHANGE_PASSWORD_OLD

#define ST_CHANGE_PASSWORD_OLD   11

Player is entering old password to change password

Definition at line 550 of file define.h.

◆ ST_CONFIRM_PASSWORD

#define ST_CONFIRM_PASSWORD   8

New character, confirm password.

Definition at line 548 of file define.h.

◆ ST_CONFIRM_QUIT

#define ST_CONFIRM_QUIT   4

Player used the 'quit' command, make sure that's ok.

Definition at line 545 of file define.h.

◆ ST_GET_NAME

#define ST_GET_NAME   6

Player just connected.

Definition at line 546 of file define.h.

◆ ST_GET_PARTY_PASSWORD

#define ST_GET_PARTY_PASSWORD   10

Player tried to join a password-protected party.

Definition at line 549 of file define.h.

◆ ST_GET_PASSWORD

#define ST_GET_PASSWORD   7

Name entered, now for password.

Definition at line 547 of file define.h.

◆ ST_MAT_FLOOR

#define ST_MAT_FLOOR   1

Floor.

Definition at line 67 of file define.h.

◆ ST_MAT_ITEM

#define ST_MAT_ITEM   3

Most other items, including doors & such.

Definition at line 69 of file define.h.

◆ ST_MAT_WALL

#define ST_MAT_WALL   2

Wall.

Definition at line 68 of file define.h.

◆ ST_MAT_WINDOW

#define ST_MAT_WINDOW   4

Window.

Definition at line 70 of file define.h.

◆ ST_PLAY_AGAIN

#define ST_PLAY_AGAIN   1

Player left through a bed of reality, and can login again.

Definition at line 542 of file define.h.

◆ ST_PLAYING

#define ST_PLAYING   0

Usual state.

Definition at line 541 of file define.h.

◆ ST_ROLL_STAT

#define ST_ROLL_STAT   2

New character, rolling stats.

Definition at line 543 of file define.h.

◆ VERY_BIG_BUF

#define VERY_BIG_BUF   1024

Definition at line 36 of file define.h.

◆ WAIT2

#define WAIT2   8

Monster does not try to move towards player if far. Maintains comfortable distance.

Definition at line 499 of file define.h.

◆ WAITATT

#define WAITATT   4

Wait for player to approach then hit, move if hit.

Definition at line 495 of file define.h.

◆ WEAP_BLUD

#define WEAP_BLUD   8

bludgeoning, club, stick

Definition at line 85 of file define.h.

◆ WEAP_CLEAVE

#define WEAP_CLEAVE   3

axe

Definition at line 80 of file define.h.

◆ WEAP_CRUSH

#define WEAP_CRUSH   7

big hammers, flails

Definition at line 84 of file define.h.

◆ WEAP_HIT

#define WEAP_HIT   0

the basic

Definition at line 77 of file define.h.

◆ WEAP_PIERCE

#define WEAP_PIERCE   2

arrows, stiletto

Definition at line 79 of file define.h.

◆ WEAP_SLASH

#define WEAP_SLASH   1

slash

Definition at line 78 of file define.h.

◆ WEAP_SLICE

#define WEAP_SLICE   4

katana

Definition at line 81 of file define.h.

◆ WEAP_STAB

#define WEAP_STAB   5

knife, dagger

Definition at line 82 of file define.h.

◆ WEAP_WHIP

#define WEAP_WHIP   6

whips n chains

Definition at line 83 of file define.h.

◆ WEAPON_SPEED

#define WEAPON_SPEED (   xyz)    (xyz)->last_sp

Definition at line 468 of file define.h.

◆ WEIGHT

#define WEIGHT (   op)    (op->nrof ? op->weight : op->weight+op->carrying)

Returns the weight of the given object. Note: it does not take the number of items (nrof) into account.

Definition at line 651 of file define.h.

Typedef Documentation

◆ MoveType

typedef unsigned char MoveType

Typdef here to define type large enough to hold bitmask of all movement types. Make one declaration so easy to update. uint8_t is defined yet, so just use what that would define it at anyways.

Definition at line 417 of file define.h.

Enumeration Type Documentation

◆ fatal_error

Fatal variables; used as arguments to fatal().

Enumerator
OUT_OF_MEMORY 
MAP_ERROR 
ARCHTABLE_TOO_SMALL 
ARCHETYPE_ISSUE 
SEE_LAST_ERROR 

Definition at line 47 of file define.h.

Function Documentation

◆ cf_random()

uint32_t cf_random ( void  )

Definition at line 5 of file cf_random.cpp.

References generator.

Referenced by check_loaded_object(), and test_stand_in_light().

+ Here is the caller graph for this function:

◆ cf_srandom()

void cf_srandom ( unsigned long  seed)

Definition at line 9 of file cf_random.cpp.

References generator.

Referenced by do_magic(), and START_TEST().

+ Here is the caller graph for this function:

Variable Documentation

◆ MAX_FOOD

const int32_t MAX_FOOD = 999
static
object_was_destroyed
#define object_was_destroyed(op, old_tag)
Definition: object.h:70
give.next
def next
Definition: give.py:44
GET_MAP_OB
#define GET_MAP_OB(M, X, Y)
Definition: map.h:170
PLAYER
@ PLAYER
Definition: object.h:112
SP_MAGIC_MISSILE
#define SP_MAGIC_MISSILE
Definition: spells.h:85
FLAG_GENERATOR
#define FLAG_GENERATOR
Definition: define.h:248
GLOVES
@ GLOVES
Definition: object.h:218
QUERY_FLAG
#define QUERY_FLAG(xyz, p)
Definition: define.h:226
ARMOUR
@ ARMOUR
Definition: object.h:125
commongive.inv
inv
Definition: commongive.py:29
FOR_OB_AND_ABOVE_FINISH
#define FOR_OB_AND_ABOVE_FINISH()
Definition: define.h:743
FLAG_ALIVE
#define FLAG_ALIVE
Definition: define.h:230
FLAG_IS_A_TEMPLATE
#define FLAG_IS_A_TEMPLATE
Definition: define.h:366
HELMET
@ HELMET
Definition: object.h:141
SP_BULLET
#define SP_BULLET
Definition: spells.h:79
bigchest.below
below
Definition: bigchest.py:12
FOR_OB_AND_BELOW_FINISH
#define FOR_OB_AND_BELOW_FINISH()
Definition: define.h:754
ARROW
@ ARROW
Definition: object.h:122
FLAG_MONSTER
#define FLAG_MONSTER
Definition: define.h:245
give.op
op
Definition: give.py:33
SPELL_EFFECT
@ SPELL_EFFECT
Definition: object.h:220
DOOR
@ DOOR
Definition: object.h:131
BOOTS
@ BOOTS
Definition: object.h:217