abstract
| - Below is the full text to youprop.h from the source code of NetHack 3.1.0. To link to a particular line, write [[NetHack 3.1.0/youprop.h#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code 1. /* SCCS Id: @(#)youprop.h 3.1 92/11/01 */ 2. /* Copyright (c) 1989 Mike Threepoint */ 3. /* NetHack may be freely redistributed. See license for details. */ 4. 5. #ifndef YOUPROP_H 6. #define YOUPROP_H 7. 8. #ifndef PROP_H 9. #include "prop.h" 10. #endif 11. #ifndef PERMONST_H 12. #include "permonst.h" 13. #endif 14. #ifndef MONDATA_H 15. #include "mondata.h" 16. #endif 17. #ifndef PM_H 18. #include "pm.h" 19. #endif 20. 21. #ifdef POLYSELF 22. # define UPROP(base,poly) (base || (poly)) 23. #else 24. # define UPROP(base,poly) (base) 25. #endif 26. 27. /* three pseudo-properties */ 28. #define Blindfolded (ublindf) 29. #define Punished (uball) 30. #define Underwater (u.uinwater) 31. /* Note that Underwater and u.uinwater are both used in code. 32. The latter form is for later implementation of other in-water 33. states, like swimming, wading, etc. */ 34. 35. #define HFire_resistance u.uprops[FIRE_RES].p_flgs 36. #define Fire_resistance UPROP(HFire_resistance,resists_fire(uasmon)) 37. 38. #define HCold_resistance u.uprops[COLD_RES].p_flgs 39. #define Cold_resistance UPROP(HCold_resistance,resists_cold(uasmon)) 40. 41. #define HSleep_resistance u.uprops[SLEEP_RES].p_flgs 42. #define Sleep_resistance UPROP(HSleep_resistance,resists_sleep(uasmon)) 43. 44. #define HDisint_resistance u.uprops[DISINT_RES].p_flgs 45. #define Disint_resistance UPROP(HDisint_resistance,resists_disint(uasmon)) 46. 47. #define HShock_resistance u.uprops[SHOCK_RES].p_flgs 48. #define Shock_resistance UPROP(HShock_resistance,resists_elec(uasmon)) 49. 50. #define HPoison_resistance u.uprops[POISON_RES].p_flgs 51. #define Poison_resistance UPROP(HPoison_resistance,resists_poison(uasmon)) 52. 53. #define Adornment u.uprops[ADORNED].p_flgs 54. 55. #define HRegeneration u.uprops[REGENERATION].p_flgs 56. #define Regeneration UPROP(HRegeneration,regenerates(uasmon)) 57. 58. #define Searching u.uprops[SEARCHING].p_flgs 59. 60. #define HSee_invisible u.uprops[SEE_INVIS].p_flgs 61. #define See_invisible UPROP(HSee_invisible,perceives(uasmon)) 62. 63. #define HInvis u.uprops[INVIS].p_flgs 64. #define Invis UPROP(HInvis,u.usym == S_STALKER) 65. #define Invisible (Invis && !See_invisible) 66. 67. #define HTeleportation u.uprops[TELEPORT].p_flgs 68. #define Teleportation UPROP(HTeleportation,can_teleport(uasmon)) 69. 70. #define HTeleport_control u.uprops[TELEPORT_CONTROL].p_flgs 71. #define Teleport_control UPROP(HTeleport_control,control_teleport(uasmon)) 72. 73. #ifdef POLYSELF 74. #define Polymorph u.uprops[POLYMORPH].p_flgs 75. #define Polymorph_control u.uprops[POLYMORPH_CONTROL].p_flgs 76. #endif 77. 78. #define HLevitation u.uprops[LEVITATION].p_flgs 79. #define Levitation UPROP(HLevitation,is_floater(uasmon)) 80. 81. #define Stealth u.uprops[STEALTH].p_flgs 82. #define Aggravate_monster u.uprops[AGGRAVATE_MONSTER].p_flgs 83. #define Conflict u.uprops[CONFLICT].p_flgs 84. #define Protection u.uprops[PROTECTION].p_flgs 85. #define Protection_from_shape_changers \ 86. u.uprops[PROT_FROM_SHAPE_CHANGERS].p_flgs 87. #define Warning u.uprops[WARNING].p_flgs 88. 89. #define HTelepat u.uprops[TELEPAT].p_flgs 90. #define Telepat UPROP(HTelepat,telepathic(uasmon)) 91. 92. #define Fast u.uprops[FAST].p_flgs 93. 94. #define HStun u.uprops[STUNNED].p_flgs 95. #define Stunned UPROP(HStun,u.usym==S_BAT || u.usym==S_STALKER) 96. 97. #define HConfusion u.uprops[CONFUSION].p_flgs 98. #define Confusion HConfusion 99. 100. #define Sick u.uprops[SICK].p_flgs 101. #define Blinded u.uprops[BLINDED].p_flgs 102. #define Blind UPROP(Blinded || Blindfolded,!haseyes(uasmon)) 103. #define Sleeping u.uprops[SLEEPING].p_flgs 104. #define Wounded_legs u.uprops[WOUNDED_LEGS].p_flgs 105. #define Stoned u.uprops[STONED].p_flgs 106. #define Strangled u.uprops[STRANGLED].p_flgs 107. #define HHallucination u.uprops[HALLUC].p_flgs 108. #define HHalluc_resistance u.uprops[HALLUC_RES].p_flgs 109. #define Hallucination (HHallucination && !HHalluc_resistance) 110. #define Fumbling u.uprops[FUMBLING].p_flgs 111. #define Jumping u.uprops[JUMPING].p_flgs 112. /* Wwalking is meaningless on water level */ 113. #define Wwalking (u.uprops[WWALKING].p_flgs && \ 114. !Is_waterlevel(&u.uz)) 115. #define Hunger u.uprops[HUNGER].p_flgs 116. #define Glib u.uprops[GLIB].p_flgs 117. #define Reflecting u.uprops[REFLECTING].p_flgs 118. #define Lifesaved u.uprops[LIFESAVED].p_flgs 119. #define Antimagic u.uprops[ANTIMAGIC].p_flgs 120. #define Displaced u.uprops[DISPLACED].p_flgs 121. #define Clairvoyant u.uprops[CLAIRVOYANT].p_flgs 122. #define Vomiting u.uprops[VOMITING].p_flgs 123. #define Energy_regeneration u.uprops[ENERGY_REGENERATION].p_flgs 124. #define HMagical_breathing u.uprops[MAGICAL_BREATHING].p_flgs 125. #define Magical_breathing UPROP(HMagical_breathing,\ 126. magic_breathing(uasmon)) 127. #define Half_spell_damage u.uprops[HALF_SPDAM].p_flgs 128. #define Half_physical_damage u.uprops[HALF_PHDAM].p_flgs 129. 130. #endif /* YOUPROP_H */
|