Source:NetHack 3.4.0/artilist.h
Revision as of 12:24, 4 March 2008 by Kernigh bot (talk | contribs) (NetHack 3.4.0/artilist.h moved to Source:NetHack 3.4.0/artilist.h: Robot: moved page)
Below is the full text to artilist.h from the source code of NetHack 3.4.0. To link to a particular line, write [[NetHack 3.4.0/artilist.h#line123]], for example.
Warning! This is the source code from an old release. For the latest release, see Source code
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. /* SCCS Id: @(#)artilist.h 3.4 2001/11/17 */ 2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. /* NetHack may be freely redistributed. See license for details. */ 4. 5. #ifdef MAKEDEFS_C 6. /* in makedefs.c, all we care about is the list of names */ 7. 8. #define A(nam,typ,s1,s2,mt,atk,dfn,cry,inv,al,cl,rac,cost) nam 9. 10. static const char *artifact_names[] = { 11. #else 12. /* in artifact.c, set up the actual artifact list structure */ 13. 14. #define A(nam,typ,s1,s2,mt,atk,dfn,cry,inv,al,cl,rac,cost) \ 15. { typ, nam, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost } 16. 17. #define NO_ATTK {0,0,0,0} /* no attack */ 18. #define NO_DFNS {0,0,0,0} /* no defense */ 19. #define NO_CARY {0,0,0,0} /* no carry effects */ 20. #define DFNS(c) {0,c,0,0} 21. #define CARY(c) {0,c,0,0} 22. #define PHYS(a,b) {0,AD_PHYS,a,b} /* physical */ 23. #define DRLI(a,b) {0,AD_DRLI,a,b} /* life drain */ 24. #define COLD(a,b) {0,AD_COLD,a,b} 25. #define FIRE(a,b) {0,AD_FIRE,a,b} 26. #define ELEC(a,b) {0,AD_ELEC,a,b} /* electrical shock */ 27. #define STUN(a,b) {0,AD_STUN,a,b} /* magical attack */ 28. 29. STATIC_OVL NEARDATA struct artifact artilist[] = { 30. #endif /* MAKEDEFS_C */ 31. 32. /* Artifact cost rationale: 33. * 1. The more useful the artifact, the better its cost. 34. * 2. Quest artifacts are highly valued. 35. * 3. Chaotic artifacts are inflated due to scarcity (and balance). 36. */ 37. 38. 39. /* dummy element #0, so that all interesting indices are non-zero */ 40. A("", STRANGE_OBJECT, 41. 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 0L ), 42. 43. A("Excalibur", LONG_SWORD, 44. (SPFX_NOGEN|SPFX_RESTR|SPFX_SEEK|SPFX_DEFN|SPFX_INTEL|SPFX_SEARCH),0,0, 45. PHYS(5,10), DRLI(0,0), NO_CARY, 0, A_LAWFUL, PM_KNIGHT, NON_PM, 4000L ), 46. /* 47. * Stormbringer only has a 2 because it can drain a level, 48. * providing 8 more. 49. */ 50. A("Stormbringer", RUNESWORD, 51. (SPFX_RESTR|SPFX_ATTK|SPFX_DEFN|SPFX_INTEL|SPFX_DRLI), 0, 0, 52. DRLI(5,2), DRLI(0,0), NO_CARY, 0, A_CHAOTIC, NON_PM, NON_PM, 8000L ), 53. /* 54. * Mjollnir will return to the hand of the wielder when thrown 55. * if the wielder is a Valkyrie wearing Gauntlets of Power. 56. */ 57. A("Mjollnir", WAR_HAMMER, /* Mjo:llnir */ 58. (SPFX_RESTR|SPFX_ATTK), 0, 0, 59. ELEC(5,24), NO_DFNS, NO_CARY, 0, A_NEUTRAL, PM_VALKYRIE, NON_PM, 4000L ), 60. 61. A("Cleaver", BATTLE_AXE, 62. SPFX_RESTR, 0, 0, 63. PHYS(3,6), NO_DFNS, NO_CARY, 0, A_NEUTRAL, PM_BARBARIAN, NON_PM, 1500L ), 64. 65. A("Grimtooth", ORCISH_DAGGER, 66. SPFX_RESTR, 0, 0, 67. PHYS(2,6), NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ORC, 300L ), 68. /* 69. * Orcrist and Sting have same alignment as elves. 70. */ 71. A("Orcrist", ELVEN_BROADSWORD, 72. SPFX_DFLAG2, 0, M2_ORC, 73. PHYS(5,0), NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 2000L ), 74. 75. /* 76. * The combination of SPFX_WARN and M2_something on an artifact 77. * will trigger EWarn_of_mon for all monsters that have the appropriate 78. * M2_something flags. In Sting's case it will trigger EWarn_of_mon 79. * for M2_ORC monsters. 80. */ 81. A("Sting", ELVEN_DAGGER, 82. (SPFX_WARN|SPFX_DFLAG2), 0, M2_ORC, 83. PHYS(5,0), NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 800L ), 84. /* 85. * Magicbane is a bit different! Its magic fanfare 86. * unbalances victims in addition to doing some damage. 87. */ 88. A("Magicbane", ATHAME, 89. (SPFX_RESTR|SPFX_ATTK|SPFX_DEFN), 0, 0, 90. STUN(3,4), DFNS(AD_MAGM), NO_CARY, 0, A_NEUTRAL, PM_WIZARD, NON_PM, 3500L ), 91. 92. A("Frost Brand", LONG_SWORD, 93. (SPFX_RESTR|SPFX_ATTK|SPFX_DEFN), 0, 0, 94. COLD(5,0), COLD(0,0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L ), 95. 96. A("Fire Brand", LONG_SWORD, 97. (SPFX_RESTR|SPFX_ATTK|SPFX_DEFN), 0, 0, 98. FIRE(5,0), FIRE(0,0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L ), 99. 100. A("Dragonbane", BROADSWORD, 101. (SPFX_RESTR|SPFX_DCLAS), 0, S_DRAGON, 102. PHYS(5,0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 500L ), 103. 104. A("Demonbane", LONG_SWORD, 105. (SPFX_RESTR|SPFX_DFLAG2), 0, M2_DEMON, 106. PHYS(5,0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 2500L ), 107. 108. A("Werebane", SILVER_SABER, 109. (SPFX_RESTR|SPFX_DFLAG2), 0, M2_WERE, 110. PHYS(5,0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 1500L ), 111. 112. A("Grayswandir", SILVER_SABER, 113. (SPFX_RESTR|SPFX_HALRES), 0, 0, 114. PHYS(5,0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 8000L ), 115. 116. A("Giantslayer", LONG_SWORD, 117. (SPFX_RESTR|SPFX_DFLAG2), 0, M2_GIANT, 118. PHYS(5,0), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 200L ), 119. 120. A("Ogresmasher", WAR_HAMMER, 121. (SPFX_RESTR|SPFX_DCLAS), 0, S_OGRE, 122. PHYS(5,0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 200L ), 123. 124. A("Trollsbane", MORNING_STAR, 125. (SPFX_RESTR|SPFX_DCLAS), 0, S_TROLL, 126. PHYS(5,0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 200L ), 127. /* 128. * Two problems: 1) doesn't let trolls regenerate heads, 129. * 2) doesn't give unusual message for 2-headed monsters (but 130. * allowing those at all causes more problems than worth the effort). 131. */ 132. A("Vorpal Blade", LONG_SWORD, 133. (SPFX_RESTR|SPFX_BEHEAD), 0, 0, 134. PHYS(5,1), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 4000L ), 135. /* 136. * Ah, never shall I forget the cry, 137. * or the shriek that shrieked he, 138. * As I gnashed my teeth, and from my sheath 139. * I drew my Snickersnee! 140. * --Koko, Lord high executioner of Titipu 141. * (From Sir W.S. Gilbert's "The Mikado") 142. */ 143. A("Snickersnee", KATANA, 144. SPFX_RESTR, 0, 0, 145. PHYS(0,8), NO_DFNS, NO_CARY, 0, A_LAWFUL, PM_SAMURAI, NON_PM, 1200L ), 146. 147. A("Sunsword", LONG_SWORD, 148. (SPFX_RESTR|SPFX_DFLAG2), 0, M2_UNDEAD, 149. PHYS(5,0), DFNS(AD_BLND), NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 1500L ), 150. 151. /* 152. * The artifacts for the quest dungeon, all self-willed. 153. */ 154. 155. A("The Orb of Detection", CRYSTAL_BALL, 156. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), (SPFX_ESP|SPFX_HSPDAM), 0, 157. NO_ATTK, NO_DFNS, CARY(AD_MAGM), 158. INVIS, A_LAWFUL, PM_ARCHEOLOGIST, NON_PM, 2500L ), 159. 160. A("The Heart of Ahriman", LUCKSTONE, 161. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), SPFX_STLTH, 0, 162. /* this stone does double damage if used as a projectile weapon */ 163. PHYS(5,0), NO_DFNS, NO_CARY, 164. LEVITATION, A_NEUTRAL, PM_BARBARIAN, NON_PM, 2500L ), 165. 166. A("The Sceptre of Might", MACE, 167. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_DALIGN), 0, 0, 168. PHYS(5,0), NO_DFNS, CARY(AD_MAGM), 169. CONFLICT, A_LAWFUL, PM_CAVEMAN, NON_PM, 2500L ), 170. 171. #if 0 /* OBSOLETE */ 172. A("The Palantir of Westernesse", CRYSTAL_BALL, 173. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), 174. (SPFX_ESP|SPFX_REGEN|SPFX_HSPDAM), 0, 175. NO_ATTK, NO_DFNS, NO_CARY, 176. TAMING, A_CHAOTIC, NON_PM , PM_ELF, 8000L ), 177. #endif 178. 179. A("The Staff of Aesculapius", QUARTERSTAFF, 180. (SPFX_NOGEN|SPFX_RESTR|SPFX_ATTK|SPFX_INTEL|SPFX_DRLI|SPFX_REGEN), 0,0, 181. DRLI(0,0), DRLI(0,0), NO_CARY, 182. HEALING, A_NEUTRAL, PM_HEALER, NON_PM, 5000L ), 183. 184. A("The Magic Mirror of Merlin", MIRROR, 185. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_SPEAK), SPFX_ESP, 0, 186. NO_ATTK, NO_DFNS, CARY(AD_MAGM), 187. 0, A_LAWFUL, PM_KNIGHT, NON_PM, 1500L ), 188. 189. A("The Eyes of the Overworld", LENSES, 190. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_XRAY), 0, 0, 191. NO_ATTK, NO_DFNS, CARY(AD_MAGM), 192. ENLIGHTENING, A_NEUTRAL, PM_MONK, NON_PM, 2500L ), 193. 194. A("The Mitre of Holiness", HELM_OF_BRILLIANCE, 195. (SPFX_NOGEN|SPFX_RESTR|SPFX_DFLAG2|SPFX_INTEL), 0, M2_UNDEAD, 196. NO_ATTK, NO_DFNS, CARY(AD_FIRE), 197. ENERGY_BOOST, A_LAWFUL, PM_PRIEST, NON_PM, 2000L ), 198. 199. A("The Longbow of Diana", BOW, 200. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_REFLECT), SPFX_ESP, 0, 201. PHYS(5,0), NO_DFNS, NO_CARY, 202. CREATE_AMMO, A_CHAOTIC, PM_RANGER, NON_PM, 4000L ), 203. 204. A("The Master Key of Thievery", SKELETON_KEY, 205. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_SPEAK), 206. (SPFX_WARN|SPFX_TCTRL|SPFX_HPHDAM), 0, 207. NO_ATTK, NO_DFNS, NO_CARY, 208. UNTRAP, A_CHAOTIC, PM_ROGUE, NON_PM, 3500L ), 209. 210. A("The Tsurugi of Muramasa", TSURUGI, 211. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_BEHEAD|SPFX_LUCK), 0, 0, 212. PHYS(0,8), NO_DFNS, NO_CARY, 213. 0, A_LAWFUL, PM_SAMURAI, NON_PM, 4500L ), 214. 215. #ifdef TOURIST 216. A("The Platinum Yendorian Express Card", CREDIT_CARD, 217. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_DEFN), 218. (SPFX_ESP|SPFX_HSPDAM), 0, 219. NO_ATTK, NO_DFNS, CARY(AD_MAGM), 220. CHARGE_OBJ, A_NEUTRAL, PM_TOURIST, NON_PM, 7000L ), 221. #endif 222. 223. A("The Orb of Fate", CRYSTAL_BALL, 224. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_LUCK), 225. (SPFX_WARN|SPFX_HSPDAM|SPFX_HPHDAM), 0, 226. NO_ATTK, NO_DFNS, NO_CARY, 227. LEV_TELE, A_NEUTRAL, PM_VALKYRIE, NON_PM, 3500L ), 228. 229. A("The Eye of the Aethiopica", AMULET_OF_ESP, 230. (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), (SPFX_EREGEN|SPFX_HSPDAM), 0, 231. NO_ATTK, NO_DFNS, CARY(AD_MAGM), 232. CREATE_PORTAL, A_NEUTRAL, PM_WIZARD, NON_PM, 4000L ), 233. 234. /* 235. * terminator; otyp must be zero 236. */ 237. A(0, 0, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 0L ) 238. 239. }; /* artilist[] (or artifact_names[]) */ 240. 241. #undef A 242. 243. #ifndef MAKEDEFS_C 244. #undef NO_ATTK 245. #undef NO_DFNS 246. #undef DFNS 247. #undef PHYS 248. #undef DRLI 249. #undef COLD 250. #undef FIRE 251. #undef ELEC 252. #undef STUN 253. #endif 254. 255. /*artilist.h*/