Object flags


Defines

#define SET_FLAG(xyz, p)   ((xyz)->flags[p/32] |= (1U<<(p%32)))
#define CLEAR_FLAG(xyz, p)   ((xyz)->flags[p/32] &= ~(1U<<(p%32)))
#define QUERY_FLAG(xyz, p)   ((xyz)->flags[p/32]&(1U<<(p%32)))
#define COMPARE_FLAGS(p, q)
#define FLAG_ALIVE   0
#define FLAG_WIZ   1
#define FLAG_REMOVED   2
#define FLAG_FREED   3
#define FLAG_WAS_WIZ   4
#define FLAG_APPLIED   5
#define FLAG_UNPAID   6
#define FLAG_USE_SHIELD   7
#define FLAG_NO_PICK   8
#define FLAG_CLIENT_ANIM_SYNC   9
#define FLAG_CLIENT_ANIM_RANDOM   10
#define FLAG_ANIMATE   11
#define FLAG_DIALOG_PARSED   12
#define FLAG_MONSTER   14
#define FLAG_FRIENDLY   15
#define FLAG_GENERATOR   16
#define FLAG_IS_THROWN   17
#define FLAG_AUTO_APPLY   18
#define FLAG_TREASURE   19
#define FLAG_PLAYER_SOLD   20
#define FLAG_SEE_INVISIBLE   21
#define FLAG_CAN_ROLL   22
#define FLAG_OVERLAY_FLOOR   23
#define FLAG_IS_TURNABLE   24
#define FLAG_IS_USED_UP   28
#define FLAG_IDENTIFIED   29
#define FLAG_REFLECTING   30
#define FLAG_CHANGING   31
#define FLAG_SPLITTING   32
#define FLAG_HITBACK   33
#define FLAG_STARTEQUIP   34
#define FLAG_BLOCKSVIEW   35
#define FLAG_UNDEAD   36
#define FLAG_SCARED   37
#define FLAG_UNAGGRESSIVE   38
#define FLAG_REFL_MISSILE   39
#define FLAG_REFL_SPELL   40
#define FLAG_NO_MAGIC   41
#define FLAG_NO_FIX_PLAYER   42
#define FLAG_IS_LIGHTABLE   43
#define FLAG_TEAR_DOWN   44
#define FLAG_RUN_AWAY   45
#define FLAG_UNIQUE   49
#define FLAG_NO_DROP   50
#define FLAG_WIZCAST   51
#define FLAG_CAST_SPELL   52
#define FLAG_USE_SCROLL   53
#define FLAG_USE_RANGE   54
#define FLAG_USE_BOW   55
#define FLAG_USE_ARMOUR   56
#define FLAG_USE_WEAPON   57
#define FLAG_USE_RING   58
#define FLAG_READY_RANGE   59
#define FLAG_READY_BOW   60
#define FLAG_XRAYS   61
#define FLAG_NO_APPLY   62
#define FLAG_IS_FLOOR   63
#define FLAG_LIFESAVE   64
#define FLAG_NO_STRENGTH   65
#define FLAG_SLEEP   66
#define FLAG_STAND_STILL   67
#define FLAG_RANDOM_MOVE   68
#define FLAG_ONLY_ATTACK   69
#define FLAG_CONFUSED   70
#define FLAG_STEALTH   71
#define FLAG_WIZPASS   72
#define FLAG_IS_LINKED   73
#define FLAG_CURSED   74
#define FLAG_DAMNED   75
#define FLAG_SEE_ANYWHERE   76
#define FLAG_KNOWN_MAGICAL   77
#define FLAG_KNOWN_CURSED   78
#define FLAG_CAN_USE_SKILL   79
#define FLAG_BEEN_APPLIED   80
#define FLAG_READY_SCROLL   81
#define FLAG_USE_ROD   82
#define FLAG_USE_HORN   84
#define FLAG_MAKE_INVIS   85
#define FLAG_INV_LOCKED   86
#define FLAG_IS_WOODED   87
#define FLAG_IS_HILLY   88
#define FLAG_READY_SKILL   89
#define FLAG_READY_WEAPON   90
#define FLAG_NO_SKILL_IDENT   91
#define FLAG_BLIND   92
#define FLAG_SEE_IN_DARK   93
#define FLAG_IS_CAULDRON   94
#define FLAG_NO_STEAL   96
#define FLAG_ONE_HIT   97
#define FLAG_CLIENT_SENT   98
#define FLAG_BERSERK   99
#define FLAG_NEUTRAL   100
#define FLAG_NO_ATTACK   101
#define FLAG_NO_DAMAGE   102
#define FLAG_OBJ_ORIGINAL   103
#define FLAG_ACTIVATE_ON_PUSH   105
#define FLAG_ACTIVATE_ON_RELEASE   106
#define FLAG_IS_WATER   107
#define FLAG_CONTENT_ON_GEN   108
#define FLAG_IS_A_TEMPLATE   109
#define FLAG_IS_BUILDABLE   110
#define FLAG_AFK   111
#define FLAG_BLESSED   112
#define FLAG_KNOWN_BLESSED   113
#define NUM_FLAGS   113

Detailed Description

Those flags are object-related flags, stored in the obj::flags fields.

Flag structure now changed. Each flag is now a bit offset, starting at zero. The macros will update/read the appropriate flag element in the object structure.

Hopefully, since these offsets are integer constants set at run time, the compiler will reduce the macros something as simple as the old system was.

Flags now have FLAG as the prefix. This to be clearer, and also to make sure F_ names are not still being used anyplace.

The macros below assume that the flag size for each element is 32 bits. IF it is smaller, bad things will happen. See structs.h for more info.

All functions should use the macros below. In process of converting to the new system, I find several files that did not use the previous macros.

If any FLAG's are or changed, make sure the flag_names structure in common/loader.l is updated.

Values can go up to 127 before the size of the flags array in the object structure needs to be enlarged. So there are 18 available flags slots


Define Documentation

#define CLEAR_FLAG ( xyz,
 )     ((xyz)->flags[p/32] &= ~(1U<<(p%32)))

Definition at line 475 of file define.h.

#define COMPARE_FLAGS ( p,
 ) 

Value:

(                                                \
        ((p)->flags[0] == (q)->flags[0]) &&          \
        ((p)->flags[1] == (q)->flags[1]) &&          \
        ((p)->flags[2] == (q)->flags[2]) &&          \
        ((p)->flags[3] == (q)->flags[3])             \
    )

Definition at line 479 of file define.h.

#define FLAG_ACTIVATE_ON_PUSH   105

connected object is activated when 'pushed'

Definition at line 621 of file define.h.

#define FLAG_ACTIVATE_ON_RELEASE   106

connected object is activated when 'released'

Definition at line 622 of file define.h.

#define FLAG_AFK   111

Player is AFK

Definition at line 627 of file define.h.

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 489 of file define.h.

#define FLAG_ANIMATE   11

The object looks at archetype for faces

Definition at line 501 of file define.h.

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 494 of file define.h.

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 509 of file define.h.

#define FLAG_BEEN_APPLIED   80

The object has been applied

Definition at line 582 of file define.h.

#define FLAG_BERSERK   99

monster will attack closest living object

Definition at line 611 of file define.h.

#define FLAG_BLESSED   112

Item has a blessing, opposite of cursed/damned.

Definition at line 628 of file define.h.

#define FLAG_BLIND   92

If set, object cannot see (visually)

Definition at line 595 of file define.h.

FLAG_BLOCKSVIEW   35

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 513 of file define.h.

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 580 of file define.h.

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 549 of file define.h.

#define FLAG_CHANGING   31

Changes to other_arch when anim is done

Definition at line 522 of file define.h.

#define FLAG_CLIENT_ANIM_RANDOM   10

Client animate this, randomized

Definition at line 500 of file define.h.

#define FLAG_CLIENT_ANIM_SYNC   9

Let client animate this, synchronized

Definition at line 499 of file define.h.

#define FLAG_CLIENT_SENT   98

THIS IS A DEBUG FLAG ONLY. 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 605 of file define.h.

#define FLAG_CONFUSED   70

Will also be unable to cast spells

Definition at line 570 of file define.h.

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 624 of file define.h.

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 575 of file define.h.

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.
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 576 of file define.h.

#define FLAG_DIALOG_PARSED   12

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

Definition at line 502 of file define.h.

#define FLAG_FREED   3

Object is in the list of free objects

Definition at line 492 of file define.h.

FLAG_FRIENDLY   15

Will help players

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) <friendly> monsters help the player, attacking any non-friendly monsters in range.

Definition at line 505 of file define.h.

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 507 of file define.h.

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 attacktype, 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 526 of file define.h.

FLAG_IDENTIFIED   29

#define FLAG_INV_LOCKED   86

Item will not be dropped from inventory

Definition at line 588 of file define.h.

#define FLAG_IS_A_TEMPLATE   109

Object has no ingame life until instantiated

Definition at line 625 of file define.h.

#define FLAG_IS_BUILDABLE   110

Can build on item

Definition at line 626 of file define.h.

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 597 of file define.h.

#define FLAG_IS_FLOOR   63

Can't see what's underneath this object

Definition at line 561 of file define.h.

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 591 of file define.h.

#define FLAG_IS_LIGHTABLE   43

object can be lit

Definition at line 537 of file define.h.

#define FLAG_IS_LINKED   73

The object is linked with other objects

Definition at line 574 of file define.h.

#define FLAG_IS_THROWN   17

Object is designed to be thrown.

Definition at line 508 of file define.h.

#define FLAG_IS_TURNABLE   24

Object can change face with direction

Definition at line 515 of file define.h.

#define FLAG_IS_USED_UP   28

When (--food<0) the object will exit

Definition at line 519 of file define.h.

#define FLAG_IS_WATER   107

Definition at line 623 of file define.h.

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 589 of file define.h.

#define FLAG_KNOWN_BLESSED   113

Item is known to be blessed.

Definition at line 629 of file define.h.

#define FLAG_KNOWN_CURSED   78

The object is known to be cursed

Definition at line 579 of file define.h.

#define FLAG_KNOWN_MAGICAL   77

The object is known to be magical

Definition at line 578 of file define.h.

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.

Definition at line 564 of file define.h.

#define FLAG_MAKE_INVIS   85

(Item) gives invisibility when applied

Definition at line 587 of file define.h.

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 504 of file define.h.

#define FLAG_NEUTRAL   100

monster is from type neutral

Definition at line 613 of file define.h.

#define FLAG_NO_APPLY   62

Avoids step_on/fly_on to this object

Definition at line 560 of file define.h.

#define FLAG_NO_ATTACK   101

monster don't attack

Definition at line 614 of file define.h.

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, Weak 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.

Definition at line 615 of file define.h.

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 547 of file define.h.

#define FLAG_NO_FIX_PLAYER   42

fix_object() won't be called

Definition at line 536 of file define.h.

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 535 of file define.h.

FLAG_NO_PICK   8

#define FLAG_NO_SKILL_IDENT   91

If set, item cannot be identified w/ a skill

Definition at line 594 of file define.h.

#define FLAG_NO_STEAL   96

Item can't be stolen

Definition at line 601 of file define.h.

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 565 of file define.h.

#define FLAG_OBJ_ORIGINAL   103

NEVER SET THIS. Item was loaded by load_original_map()

Definition at line 616 of file define.h.

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 602 of file define.h.

#define FLAG_ONLY_ATTACK   69

NPC will evaporate if there is no enemy

Definition at line 569 of file define.h.

#define FLAG_OVERLAY_FLOOR   23

Object is an overlay floor

Definition at line 514 of file define.h.

#define FLAG_PLAYER_SOLD   20

Object was sold to a shop by a player.

Definition at line 511 of file define.h.

#define FLAG_RANDOM_MOVE   68

NPC will move randomly

Definition at line 568 of file define.h.

#define FLAG_READY_BOW   60

not implemented yet

Definition at line 558 of file define.h.

#define FLAG_READY_RANGE   59

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

Definition at line 557 of file define.h.

#define FLAG_READY_SCROLL   81

monster has scroll in inv and can use it

Definition at line 583 of file define.h.

#define FLAG_READY_SKILL   89

(Monster or Player) has a skill readied

Definition at line 592 of file define.h.

#define FLAG_READY_WEAPON   90

(Monster or Player) has a weapon readied

Definition at line 593 of file define.h.

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 532 of file define.h.

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 534 of file define.h.

#define FLAG_REFLECTING   30

Object reflects from walls (lightning)

Definition at line 521 of file define.h.

#define FLAG_REMOVED   2

Object is not in any map or invenory

Definition at line 491 of file define.h.

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 539 of file define.h.

#define FLAG_SCARED   37

Monster is scared (mb player in future)

Definition at line 530 of file define.h.

#define FLAG_SEE_ANYWHERE   76

The object will be visible behind walls

Definition at line 577 of file define.h.

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 596 of file define.h.

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 512 of file define.h.

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 weither a monster was asleep or not.

Definition at line 566 of file define.h.

#define FLAG_SPLITTING   32

Object splits into stats.food other objs

Definition at line 525 of file define.h.

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 567 of file define.h.

FLAG_STARTEQUIP   34

Object was given to player at start

Use

Type(s) Description
Amulet, Book, Boots, Bracers, Breastplate Armor, Cloak, Container, Flesh, Food, Girdle, Gloves, Helmet, Horn, Item Transformer, Key, Potion, Projectile, Ring, Rod, Scroll, Shield, Shooting Weapon, Special Key, Spellbook, Wand & Staff, Weapon A godgiven item vanishes as soon as the player drops it to the ground.

Definition at line 527 of file define.h.

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 571 of file define.h.

#define FLAG_TEAR_DOWN   44

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

Definition at line 538 of file define.h.

#define FLAG_TREASURE   19

Will generate treasure when applied

Definition at line 510 of file define.h.

FLAG_UNAGGRESSIVE   38

Monster doesn't attack players

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) <unaggressive> monsters do not attack players unless attacked first.

Definition at line 531 of file define.h.

FLAG_UNDEAD   36

Monster is undead

Use

Type(s) Description
Monster & NPC, Monster (Grimreaper) Several spells only affect undead monsters: turn undead, banish undead, holy word, etc.

Definition at line 529 of file define.h.

FLAG_UNIQUE   49

Item is really unique (UNIQUE_ITEMS)

Use

Type(s) Description
Amulet, Book, Boots, Bracers, Breastplate Armor, 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.
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 tiles 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 tiles 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 546 of file define.h.

FLAG_UNPAID   6

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, shields, helmets etc.

Definition at line 554 of file define.h.

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 552 of file define.h.

#define FLAG_USE_HORN   84

(Monster) can apply and use horns

Definition at line 586 of file define.h.

#define FLAG_USE_RANGE   54

(Monster) can apply and use range items

Definition at line 551 of file define.h.

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 556 of file define.h.

FLAG_USE_ROD   82

(Monster) can apply and use rods

Use

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

Definition at line 584 of file define.h.

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 550 of file define.h.

#define FLAG_USE_SHIELD   7

Can this creature use a shield?

Definition at line 496 of file define.h.

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 555 of file define.h.

#define FLAG_WAS_WIZ   4

Player was once a wiz

Definition at line 493 of file define.h.

#define FLAG_WIZ   1

Object has special privilegies

Definition at line 490 of file define.h.

#define FLAG_WIZCAST   51

The wizard can cast spells in no-magic area

Definition at line 548 of file define.h.

#define FLAG_WIZPASS   72

The wizard can go through walls

Definition at line 573 of file define.h.

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 559 of file define.h.

#define NUM_FLAGS   113

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 630 of file define.h.

#define QUERY_FLAG ( xyz,
 )     ((xyz)->flags[p/32]&(1U<<(p%32)))

Definition at line 477 of file define.h.

#define SET_FLAG ( xyz,
 )     ((xyz)->flags[p/32] |= (1U<<(p%32)))

Definition at line 473 of file define.h.


Generated on Thu Mar 25 23:27:51 2010 for Crossfire Server, Branch 1.12 by  doxygen 1.5.8