Source:NetHack 3.6.1/include/prop.h

From NetHackWiki
(Redirected from Prop.h)
Jump to: navigation, search

Below is the full text to prop.h from the source code of NetHack 3.6.1. To link to a particular line, write [[Source:NetHack 3.6.1/include/prop.h#line123]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

  1.  /* NetHack 3.6	prop.h	$NHDT-Date: 1437877163 2015/07/26 02:19:23 $  $NHDT-Branch: master $:$NHDT-Revision: 1.16 $ */
  2.  /* Copyright (c) 1989 Mike Threepoint				  */
  3.  /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5.  #ifndef PROP_H
  6.  #define PROP_H
  7.  
  8.  /*** What the properties are ***
  9.   *
  10.   * note:  propertynames[] array in timeout.c has string values for these.
  11.   *        Property #0 is not used.
  12.   */
  13.  /* Resistances to troubles */
  14.  enum prop_types {
  15.      FIRE_RES = 1,
  16.      COLD_RES,
  17.      SLEEP_RES,
  18.      DISINT_RES,
  19.      SHOCK_RES,
  20.      POISON_RES,
  21.      ACID_RES,
  22.      STONE_RES,
  23.      /* note: for the first eight properties, MR_xxx == (1 << (xxx_RES - 1)) */
  24.      DRAIN_RES,
  25.      SICK_RES,
  26.      INVULNERABLE,
  27.      ANTIMAGIC,
  28.      /* Troubles */
  29.      STUNNED,
  30.      CONFUSION,
  31.      BLINDED,
  32.      DEAF,
  33.      SICK,
  34.      STONED,
  35.      STRANGLED,
  36.      VOMITING,
  37.      GLIB,
  38.      SLIMED,
  39.      HALLUC,
  40.      HALLUC_RES,
  41.      FUMBLING,
  42.      WOUNDED_LEGS,
  43.      SLEEPY,
  44.      HUNGER,
  45.      /* Vision and senses */
  46.      SEE_INVIS,
  47.      TELEPAT,
  48.      WARNING,
  49.      WARN_OF_MON,
  50.      WARN_UNDEAD,
  51.      SEARCHING,
  52.      CLAIRVOYANT,
  53.      INFRAVISION,
  54.      DETECT_MONSTERS,
  55.      /* Appearance and behavior */
  56.      ADORNED,
  57.      INVIS,
  58.      DISPLACED,
  59.      STEALTH,
  60.      AGGRAVATE_MONSTER,
  61.      CONFLICT,
  62.      /* Transportation */
  63.      JUMPING,
  64.      TELEPORT,
  65.      TELEPORT_CONTROL,
  66.      LEVITATION,
  67.      FLYING,
  68.      WWALKING,
  69.      SWIMMING,
  70.      MAGICAL_BREATHING,
  71.      PASSES_WALLS,
  72.      /* Physical attributes */
  73.      SLOW_DIGESTION,
  74.      HALF_SPDAM,
  75.      HALF_PHDAM,
  76.      REGENERATION,
  77.      ENERGY_REGENERATION,
  78.      PROTECTION,
  79.      PROT_FROM_SHAPE_CHANGERS,
  80.      POLYMORPH,
  81.      POLYMORPH_CONTROL,
  82.      UNCHANGING,
  83.      FAST,
  84.      REFLECTING,
  85.      FREE_ACTION,
  86.      FIXED_ABIL,
  87.      LIFESAVED
  88.  };
  89.  #define LAST_PROP (LIFESAVED)
  90.  
  91.  /*** Where the properties come from ***/
  92.  /* Definitions were moved here from obj.h and you.h */
  93.  struct prop {
  94.      /*** Properties conveyed by objects ***/
  95.      long extrinsic;
  96.  /* Armor */
  97.  #define W_ARM 0x00000001L  /* Body armor */
  98.  #define W_ARMC 0x00000002L /* Cloak */
  99.  #define W_ARMH 0x00000004L /* Helmet/hat */
  100.  #define W_ARMS 0x00000008L /* Shield */
  101.  #define W_ARMG 0x00000010L /* Gloves/gauntlets */
  102.  #define W_ARMF 0x00000020L /* Footwear */
  103.  #define W_ARMU 0x00000040L /* Undershirt */
  104.  #define W_ARMOR (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_ARMU)
  105.  /* Weapons and artifacts */
  106.  #define W_WEP 0x00000100L     /* Wielded weapon */
  107.  #define W_QUIVER 0x00000200L  /* Quiver for (f)iring ammo */
  108.  #define W_SWAPWEP 0x00000400L /* Secondary weapon */
  109.  #define W_WEAPON (W_WEP | W_SWAPWEP | W_QUIVER)
  110.  #define W_ART 0x00001000L     /* Carrying artifact (not really worn) */
  111.  #define W_ARTI 0x00002000L    /* Invoked artifact  (not really worn) */
  112.  /* Amulets, rings, tools, and other items */
  113.  #define W_AMUL 0x00010000L    /* Amulet */
  114.  #define W_RINGL 0x00020000L   /* Left ring */
  115.  #define W_RINGR 0x00040000L   /* Right ring */
  116.  #define W_RING (W_RINGL | W_RINGR)
  117.  #define W_TOOL 0x00080000L   /* Eyewear */
  118.  #define W_ACCESSORY (W_RING | W_AMUL | W_TOOL)
  119.      /* historical note: originally in slash'em, 'worn' saddle stayed in
  120.         hero's inventory; in nethack, it's kept in the steed's inventory */
  121.  #define W_SADDLE 0x00100000L /* KMH -- For riding monsters */
  122.  #define W_BALL 0x00200000L   /* Punishment ball */
  123.  #define W_CHAIN 0x00400000L  /* Punishment chain */
  124.  
  125.      /*** Property is blocked by an object ***/
  126.      long blocked; /* Same assignments as extrinsic */
  127.  
  128.      /*** Timeouts, permanent properties, and other flags ***/
  129.      long intrinsic;
  130.  /* Timed properties */
  131.  #define TIMEOUT 0x00ffffffL     /* Up to 16 million turns */
  132.                                  /* Permanent properties */
  133.  #define FROMEXPER 0x01000000L   /* Gain/lose with experience, for role */
  134.  #define FROMRACE 0x02000000L    /* Gain/lose with experience, for race */
  135.  #define FROMOUTSIDE 0x04000000L /* By corpses, prayer, thrones, etc. */
  136.  #define INTRINSIC (FROMOUTSIDE | FROMRACE | FROMEXPER)
  137.  /* Control flags */
  138.  #define FROMFORM 0x10000000L  /* Polyd; conferred by monster form */
  139.  #define I_SPECIAL 0x20000000L /* Property is controllable */
  140.  };
  141.  
  142.  /*** Definitions for backwards compatibility ***/
  143.  #define LEFT_RING W_RINGL
  144.  #define RIGHT_RING W_RINGR
  145.  #define LEFT_SIDE LEFT_RING
  146.  #define RIGHT_SIDE RIGHT_RING
  147.  #define BOTH_SIDES (LEFT_SIDE | RIGHT_SIDE)
  148.  #define WORN_ARMOR W_ARM
  149.  #define WORN_CLOAK W_ARMC
  150.  #define WORN_HELMET W_ARMH
  151.  #define WORN_SHIELD W_ARMS
  152.  #define WORN_GLOVES W_ARMG
  153.  #define WORN_BOOTS W_ARMF
  154.  #define WORN_AMUL W_AMUL
  155.  #define WORN_BLINDF W_TOOL
  156.  #define WORN_SHIRT W_ARMU
  157.  
  158.  #endif /* PROP_H */