Object flags
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.
- flags[0] is 0 to 31
- flags[1] is 32 to 63
- flags[2] is 64 to 95
- flags[3] is 96 to 127
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, |
|
|
p |
|
) |
((xyz)->flags[p/32] &= ~(1U<<(p%32))) |
#define COMPARE_FLAGS |
( |
p, |
|
|
q |
|
) |
|
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.
Object can fight (or be fought)
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.
The object looks at archetype for faces
Definition at line 501 of file define.h.
Object is ready for use by living
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.
Will be applied when created
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.
monster will attack closest living object
Definition at line 611 of file define.h.
Item has a blessing, opposite of cursed/damned.
Definition at line 628 of file define.h.
If set, object cannot see (visually)
Definition at line 595 of file define.h.
Object blocks view
Type(s) | Description |
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, 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, 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 set to block view, players (and monsters) cannot see beyond it unless they cross it or manage to stand on top. |
Definition at line 528 of file define.h.
Object can be rolled
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.
The monster can use skills
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.
(Monster) can learn and cast spells
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.
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.
Will also be unable to cast spells
Definition at line 570 of file define.h.
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.
The object is cursed
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.
The object is _very_ cursed
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 |
Object is in the list of free objects
Definition at line 492 of file define.h.
Will help players
Definition at line 505 of file define.h.
Will generate type ob->stats.food
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.
Object will hit back when hit
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.
Player knows full info about item
Type(s) | Description |
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Converter, Creator, Detector, Director, Disease, Door, 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, 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 520 of file define.h.
#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.
container can make alchemical stuff
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.
Can't see what's underneath this object
Definition at line 561 of file define.h.
Item is hilly/mountain terrain
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 |
Item is wooded terrain
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.
Saves a players' life once, then destr.
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.
Will attack players
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.
monster is from type neutral
Definition at line 613 of file define.h.
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.
monster can't be damaged
Definition at line 615 of file define.h.
Object can't be dropped
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 |
Spells (some) can't pass this object
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.
Object can't be picked up
Type(s) | Description |
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Creator, Detector, Director, Disease, Door, 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, 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 498 of file define.h.
#define FLAG_NO_SKILL_IDENT 91 |
If set, item cannot be identified w/ a skill
Definition at line 594 of file define.h.
Item can't be stolen
Definition at line 601 of file define.h.
Strength-bonus not added to wc/dam
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 |
Monster can only hit once before going away (replaces ghosthit)
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.
Arrows will reflect from object
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.
Spells (some) will reflect from object
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.
Object is not in any map or invenory
Definition at line 491 of file define.h.
Object runs away from nearest player \ but can still attack at a distance
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.
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.
if set ob not effected by darkness
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.
Will see invisible player
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.
NPC is sleeping
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.
NPC will not (ever) move
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.
Object was given to player at start
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.
Will wake monsters with less range
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.
Will generate treasure when applied
Definition at line 510 of file define.h.
Monster doesn't attack players
Definition at line 531 of file define.h.
Monster is undead
Definition at line 529 of file define.h.
Item is really unique (UNIQUE_ITEMS)
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.
Object hasn't been paid for yet
Type(s) | Description |
Altar, Altar Trigger, Amulet, Battleground, Book, Boots, Bracers, Breastplate Armor, Button, Button Trigger, Class Changer, Cloak, Clock, Container, Creator, Detector, Director, Disease, Door, 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, 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 495 of file define.h.
(Monster) can wear armour/shield/helmet
Definition at line 554 of file define.h.
(Monster) can apply and fire bows
Definition at line 552 of file define.h.
(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.
(Monster) can use rings, boots, gauntlets, etc
Definition at line 556 of file define.h.
(Monster) can apply and use rods
Definition at line 584 of file define.h.
(Monster) can read scroll
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.
(Monster) can wield weapons
Definition at line 555 of file define.h.
Player was once a wiz
Definition at line 493 of file define.h.
Object has special privilegies
Definition at line 490 of file define.h.
The wizard can cast spells in no-magic area
Definition at line 548 of file define.h.
The wizard can go through walls
Definition at line 573 of file define.h.
X-ray vision
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.
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, |
|
|
p |
|
) |
((xyz)->flags[p/32]&(1U<<(p%32))) |
#define SET_FLAG |
( |
xyz, |
|
|
p |
|
) |
((xyz)->flags[p/32] |= (1U<<(p%32))) |