Difference between revisions of "Source:NetHack 3.4.3/src/objects.c"
Jump to navigation
Jump to search
m (Decided it'd be easier to modify my Perl script. :)) |
(Ran Jayt's wikify script (and ported in annotations) because the original creator of this wiki page left out some blank lines :() |
||
Line 1: | Line 1: | ||
− | Below is the full text to src/objects.c from NetHack 3.4.3. To link to a particular line, write [[objects.c#line123| | + | Below is the full text to src/objects.c from NetHack 3.4.3. To link to a particular line, write [[objects.c#line123|[[objects.c#line123]]]], for example. |
− | + | ||
− | <span id="line1">1. | + | == Top of file == |
− | <span id="line2">2. | + | <span id="line1">1. /* SCCS Id: @(#)objects.c 3.4 2002/07/31 */</span> |
− | <span id="line3">3. | + | <span id="line2">2. /* Copyright (c) Mike Threepoint, 1989. */</span> |
+ | <span id="line3">3. /* NetHack may be freely redistributed. See license for details. */</span> | ||
+ | <span id="line4">4. </span> | ||
{{NGPL}} | {{NGPL}} | ||
− | <span id=" | + | <span id="line5">5. #ifndef OBJECTS_PASS_2_</span> |
− | <span id=" | + | <span id="line6">6. /* first pass */</span> |
− | <span id=" | + | <span id="line7">7. struct monst { struct monst *dummy; }; /* lint: struct obj's union */</span> |
− | <span id=" | + | <span id="line8">8. #include "config.h"</span> |
− | <span id=" | + | <span id="line9">9. #include "obj.h"</span> |
− | <span id=" | + | <span id="line10">10. #include "objclass.h"</span> |
− | <span id=" | + | <span id="line11">11. #include "prop.h"</span> |
− | <span id=" | + | <span id="line12">12. #include "skills.h"</span> |
− | <span id=" | + | <span id="line13">13. </span> |
− | <span id=" | + | <span id="line14">14. #else /* !OBJECTS_PASS_2_ */</span> |
− | <span id=" | + | <span id="line15">15. /* second pass */</span> |
− | <span id=" | + | <span id="line16">16. #include "color.h"</span> |
− | <span id=" | + | <span id="line17">17. # define COLOR_FIELD(X) X,</span> |
− | <span id=" | + | <span id="line18">18. #endif /* !OBJECTS_PASS_2_ */</span> |
− | <span id=" | + | <span id="line19">19. </span> |
− | <span id=" | + | <span id="line20">20. </span> |
− | <span id=" | + | <span id="line21">21. /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */</span> |
− | <span id=" | + | <span id="line22">22. </span> |
− | <span id=" | + | <span id="line23">23. /*</span> |
− | <span id=" | + | <span id="line24">24. * Note: OBJ() and BITS() macros are used to avoid exceeding argument</span> |
− | <span id=" | + | <span id="line25">25. * limits imposed by some compilers. The ctnr field of BITS currently</span> |
− | <span id=" | + | <span id="line26">26. * does not map into struct objclass, and is ignored in the expansion.</span> |
− | <span id=" | + | <span id="line27">27. * The 0 in the expansion corresponds to oc_pre_discovered, which is</span> |
− | <span id=" | + | <span id="line28">28. * set at run-time during role-specific character initialization.</span> |
− | <span id=" | + | <span id="line29">29. */</span> |
− | <span id=" | + | <span id="line30">30. </span> |
− | |||
− | <span id=" | + | == Object macros == |
− | <span id=" | + | |
− | <span id=" | + | <span id="line31">31. #ifndef OBJECTS_PASS_2_</span> |
+ | <span id="line32">32. /* first pass -- object descriptive text */</span> | ||
+ | <span id="line33">33. # define OBJ(name,desc) name,desc</span> | ||
Object name and description. The description field can be <tt>(char *)0</tt>, in which case there is no description, and only the object name is used. | Object name and description. The description field can be <tt>(char *)0</tt>, in which case there is no description, and only the object name is used. | ||
− | <span id=" | + | <span id="line34">34. # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \</span> |
− | <span id=" | + | <span id="line35">35. {obj}</span> |
+ | <span id="line36">36. </span> | ||
The OBJECT macro. | The OBJECT macro. | ||
Line 59: | Line 63: | ||
# <tt>nut</tt> is nutrition gained when the object is eaten. | # <tt>nut</tt> is nutrition gained when the object is eaten. | ||
# <tt>color</tt> is the object color, as used in the TTY windowport. | # <tt>color</tt> is the object color, as used in the TTY windowport. | ||
− | + | ||
− | <span id=" | + | <span id="line37">37. NEARDATA struct objdescr obj_descr[] = {</span> |
− | <span id=" | + | <span id="line38">38. #else</span> |
− | <span id=" | + | <span id="line39">39. /* second pass -- object definitions */</span> |
− | <span id=" | + | <span id="line40">40. </span> |
− | <span id=" | + | <span id="line41">41. # define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl) \</span> |
− | <span id=" | + | <span id="line42">42. nmkn,mrg,uskn,0,mgc,chrg,uniq,nwsh,big,tuf,dir,mtrl,sub /* SCO ODT 1.1 cpp fodder */</span> |
The BITS macro. Each value is either 1 or 0. | The BITS macro. Each value is either 1 or 0. | ||
− | |||
# <tt>nmkn</tt> tells whether to use the object description or the object real name by default. (See the OBJ macro, above) | # <tt>nmkn</tt> tells whether to use the object description or the object real name by default. (See the OBJ macro, above) | ||
# <tt>mrg</tt> tells whether the object can be merged with similar objects or not. | # <tt>mrg</tt> tells whether the object can be merged with similar objects or not. | ||
Line 83: | Line 86: | ||
# <tt>mtrl</tt> takes one of the material definitions, eg. <tt>LEATHER</tt> or <tt>IRON</tt>, as defined in [[objclass.h]] | # <tt>mtrl</tt> takes one of the material definitions, eg. <tt>LEATHER</tt> or <tt>IRON</tt>, as defined in [[objclass.h]] | ||
− | <span id=" | + | <span id="line43">43. # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \</span> |
− | <span id=" | + | <span id="line44">44. {0, 0, (char *)0, bits, prp, sym, dly, COLOR_FIELD(color) \</span> |
− | <span id=" | + | <span id="line45">45. prob, wt, cost, sdam, ldam, oc1, oc2, nut}</span> |
− | <span id=" | + | <span id="line46">46. # ifndef lint</span> |
− | <span id=" | + | <span id="line47">47. # define HARDGEM(n) (n >= 8)</span> |
− | <span id=" | + | <span id="line48">48. # else</span> |
− | <span id=" | + | <span id="line49">49. # define HARDGEM(n) (0)</span> |
− | <span id=" | + | <span id="line50">50. # endif</span> |
− | <span id=" | + | <span id="line51">51. </span> |
− | <span id=" | + | <span id="line52">52. NEARDATA struct objclass objects[] = {</span> |
− | <span id=" | + | <span id="line53">53. #endif</span> |
− | <span id=" | + | <span id="line54">54. /* dummy object[0] -- description [2nd arg] *must* be NULL */</span> |
− | <span id=" | + | <span id="line55">55. OBJECT(OBJ("strange object",(char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,P_NONE,0),</span> |
− | <span id=" | + | <span id="line56">56. 0, ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),</span> |
+ | <span id="line57">57. </span> | ||
=== Weapons === | === Weapons === | ||
− | + | ==== Weapon macros ==== | |
− | + | ||
− | + | <span id="line58">58. /* weapons ... */</span> | |
− | + | <span id="line59">59. #define WEAPON(name,app,kn,mg,bi,prob,wt,cost,sdam,ldam,hitbon,typ,sub,metal,color) \</span> | |
− | + | <span id="line60">60. OBJECT( \</span> | |
− | + | <span id="line61">61. OBJ(name,app), BITS(kn,mg,1,0,0,1,0,0,bi,0,typ,sub,metal), 0, \</span> | |
− | + | <span id="line62">62. WEAPON_CLASS, prob, 0, \</span> | |
+ | <span id="line63">63. wt, cost, sdam, ldam, hitbon, 0, wt, color )</span> | ||
+ | <span id="line64">64. #define PROJECTILE( | ||
=== Armor === | === Armor === | ||
==== Armor macros ==== | ==== Armor macros ==== | ||
− | <span id=" | + | |
− | <span id=" | + | <span id="line273">273. /* armor ... */</span> |
− | <span id=" | + | <span id="line274">274. /* IRON denotes ferrous metals, including steel.</span> |
− | <span id=" | + | <span id="line275">275. * Only IRON weapons and armor can rust.</span> |
− | <span id=" | + | <span id="line276">276. * Only COPPER (including brass) corrodes.</span> |
− | <span id=" | + | <span id="line277">277. * Some creatures are vulnerable to SILVER.</span> |
− | <span id=" | + | <span id="line278">278. */</span> |
− | <span id=" | + | <span id="line279">279. #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,sub,metal,c) \</span> |
− | <span id=" | + | <span id="line280">280. OBJECT( \</span> |
− | <span id=" | + | <span id="line281">281. OBJ(name,desc), BITS(kn,0,1,0,mgc,1,0,0,blk,0,0,sub,metal), power, \</span> |
− | <span id=" | + | <span id="line282">282. ARMOR_CLASS, prob, delay, wt, cost, \</span> |
− | <span id=" | + | <span id="line283">283. 0, 0, 10 - ac, can, wt, c )</span> |
− | <span id=" | + | <span id="line284">284. #define HELM(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \</span> |
− | <span id=" | + | <span id="line285">285. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_HELM,metal,c)</span> |
− | <span id=" | + | <span id="line286">286. #define CLOAK(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \</span> |
− | <span id=" | + | <span id="line287">287. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_CLOAK,metal,c)</span> |
− | <span id=" | + | <span id="line288">288. #define SHIELD(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,metal,c) \</span> |
− | <span id=" | + | <span id="line289">289. ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,ARM_SHIELD,metal,c)</span> |
− | <span id=" | + | <span id="line290">290. #define GLOVES(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \</span> |
− | <span id=" | + | <span id="line291">291. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_GLOVES,metal,c)</span> |
− | <span id=" | + | <span id="line292">292. #define BOOTS(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \</span> |
+ | <span id="line293">293. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_BOOTS,metal,c)</span> | ||
+ | <span id="line294">294. </span> | ||
==== Helmets ==== | ==== Helmets ==== | ||
− | <span id=" | + | <span id="line295">295. /* helmets */</span> |
− | <span id=" | + | <span id="line296">296. HELM("elven leather helm", "leather hat",</span> |
− | <span id=" | + | <span id="line297">297. 0, 0, 0, 6, 1, 3, 8, 9, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line298">298. HELM("orcish helm", "iron skull cap",</span> |
− | <span id=" | + | <span id="line299">299. 0, 0, 0, 6, 1, 30, 10, 9, 0, IRON, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line300">300. HELM("dwarvish iron helm", "hard hat",</span> |
− | <span id=" | + | <span id="line301">301. 0, 0, 0, 6, 1, 40, 20, 8, 0, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line302">302. HELM("fedora", (char *)0,</span> |
− | <span id=" | + | <span id="line303">303. 1, 0, 0, 0, 0, 3, 1,10, 0, CLOTH, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line304">304. HELM("cornuthaum", "conical hat",</span> |
− | <span id=" | + | <span id="line305">305. 0, 1, CLAIRVOYANT,</span> |
− | <span id=" | + | <span id="line306">306. 3, 1, 4, 80,10, 2, CLOTH, CLR_BLUE),</span> |
− | <span id=" | + | <span id="line307">307. HELM("dunce cap", "conical hat",</span> |
− | <span id=" | + | <span id="line308">308. 0, 1, 0, 3, 1, 4, 1,10, 0, CLOTH, CLR_BLUE),</span> |
− | <span id=" | + | <span id="line309">309. HELM("dented pot", (char *)0,</span> |
− | <span id=" | + | <span id="line310">310. 1, 0, 0, 2, 0, 10, 8, 9, 0, IRON, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line311">311. /* With shuffled appearances... */</span> |
− | <span id=" | + | <span id="line312">312. HELM("helmet", "plumed helmet",</span> |
− | <span id=" | + | <span id="line313">313. 0, 0, 0, 10, 1, 30, 10, 9, 0, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line314">314. HELM("helm of brilliance", "etched helmet",</span> |
− | <span id=" | + | <span id="line315">315. 0, 1, 0, 6, 1, 50, 50, 9, 0, IRON, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line316">316. HELM("helm of opposite alignment", "crested helmet",</span> |
− | <span id=" | + | <span id="line317">317. 0, 1, 0, 6, 1, 50, 50, 9, 0, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line318">318. HELM("helm of telepathy", "visored helmet",</span> |
− | <span id=" | + | <span id="line319">319. 0, 1, TELEPAT, 2, 1, 50, 50, 9, 0, IRON, HI_METAL),</span> |
+ | <span id="line320">320. </span> | ||
+ | |||
+ | ==== Body armor ==== | ||
+ | <span id="line321">321. /* suits of armor */</span> | ||
+ | <span id="line322">322. /*</span> | ||
+ | <span id="line323">323. * There is code in polyself.c that assumes (1) and (2).</span> | ||
+ | <span id="line324">324. * There is code in obj.h, objnam.c, mon.c, read.c that assumes (2).</span> | ||
+ | <span id="line325">325. *</span> | ||
+ | <span id="line326">326. * (1) The dragon scale mails and the dragon scales are together.</span> | ||
+ | <span id="line327">327. * (2) That the order of the dragon scale mail and dragon scales is the</span> | ||
+ | <span id="line328">328. * the same defined in monst.c.</span> | ||
+ | <span id="line329">329. */</span> | ||
+ | <span id="line330">330. #define DRGN_ARMR(name,mgc,power,cost,ac,color) \</span> | ||
+ | <span id="line331">331. ARMOR(name,(char *)0,1,mgc,1,power,0,5,40,cost,ac,0,ARM_SUIT,DRAGON_HIDE,color)</span> | ||
+ | <span id="line332">332. /* 3.4.1: dragon scale mail reclassified as "magic" since magic is</span> | ||
+ | <span id="line333">333. needed to create them */</span> | ||
+ | <span id="line334">334. DRGN_ARMR("gray dragon scale mail", 1, ANTIMAGIC, 1200, 1, CLR_GRAY),</span> | ||
+ | <span id="line335">335. DRGN_ARMR("silver dragon scale mail", 1, REFLECTING, 1200, 1, DRAGON_SILVER),</span> | ||
+ | <span id="line336">336. #if 0 /* DEFERRED */</span> | ||
+ | <span id="line337">337. DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN),</span> | ||
+ | <span id="line338">338. #endif</span> | ||
+ | <span id="line339">339. DRGN_ARMR("red dragon scale mail", 1, FIRE_RES, 900, 1, CLR_RED),</span> | ||
+ | <span id="line340">340. DRGN_ARMR("white dragon scale mail", 1, COLD_RES, 900, 1, CLR_WHITE),</span> | ||
+ | <span id="line341">341. DRGN_ARMR("orange dragon scale mail", 1, SLEEP_RES, 900, 1, CLR_ORANGE),</span> | ||
+ | <span id="line342">342. DRGN_ARMR("black dragon scale mail", 1, DISINT_RES, 1200, 1, CLR_BLACK),</span> | ||
+ | <span id="line343">343. DRGN_ARMR("blue dragon scale mail", 1, SHOCK_RES, 900, 1, CLR_BLUE),</span> | ||
+ | <span id="line344">344. DRGN_ARMR("green dragon scale mail", 1, POISON_RES, 900, 1, CLR_GREEN),</span> | ||
+ | <span id="line345">345. DRGN_ARMR("yellow dragon scale mail", 1, ACID_RES, 900, 1, CLR_YELLOW),</span> | ||
+ | <span id="line346">346. </span> | ||
+ | <span id="line347">347. /* For now, only dragons leave these. */</span> | ||
+ | <span id="line348">348. /* 3.4.1: dragon scales left classified as "non-magic"; they confer</span> | ||
+ | <span id="line349">349. magical properties but are produced "naturally" */</span> | ||
+ | <span id="line350">350. DRGN_ARMR("gray dragon scales", 0, ANTIMAGIC, 700, 7, CLR_GRAY),</span> | ||
+ | <span id="line351">351. DRGN_ARMR("silver dragon scales", 0, REFLECTING, 700, 7, DRAGON_SILVER),</span> | ||
+ | <span id="line352">352. #if 0 /* DEFERRED */</span> | ||
+ | <span id="line353">353. DRGN_ARMR("shimmering dragon scales", 0, DISPLACED, 700, 7, CLR_CYAN),</span> | ||
+ | <span id="line354">354. #endif</span> | ||
+ | <span id="line355">355. DRGN_ARMR("red dragon scales", 0, FIRE_RES, 500, 7, CLR_RED),</span> | ||
+ | <span id="line356">356. DRGN_ARMR("white dragon scales", 0, COLD_RES, 500, 7, CLR_WHITE),</span> | ||
+ | <span id="line357">357. DRGN_ARMR("orange dragon scales", 0, SLEEP_RES, 500, 7, CLR_ORANGE),</span> | ||
+ | <span id="line358">358. DRGN_ARMR("black dragon scales", 0, DISINT_RES, 700, 7, CLR_BLACK),</span> | ||
+ | <span id="line359">359. DRGN_ARMR("blue dragon scales", 0, SHOCK_RES, 500, 7, CLR_BLUE),</span> | ||
+ | <span id="line360">360. DRGN_ARMR("green dragon scales", 0, POISON_RES, 500, 7, CLR_GREEN),</span> | ||
+ | <span id="line361">361. DRGN_ARMR("yellow dragon scales", 0, ACID_RES, 500, 7, CLR_YELLOW),</span> | ||
+ | <span id="line362">362. #undef DRGN_ARMR</span> | ||
+ | <span id="line363">363. </span> | ||
+ | <span id="line364">364. ARMOR("plate mail", (char *)0,</span> | ||
+ | <span id="line365">365. 1, 0, 1, 0, 44, 5, 450, 600, 3, 2, ARM_SUIT, IRON, HI_METAL),</span> | ||
+ | <span id="line366">366. ARMOR("crystal plate mail", (char *)0,</span> | ||
+ | <span id="line367">367. 1, 0, 1, 0, 10, 5, 450, 820, 3, 2, ARM_SUIT, GLASS, CLR_WHITE),</span> | ||
+ | <span id="line368">368. #ifdef TOURIST</span> | ||
+ | <span id="line369">369. ARMOR("bronze plate mail", (char *)0,</span> | ||
+ | <span id="line370">370. 1, 0, 1, 0, 25, 5, 450, 400, 4, 0, ARM_SUIT, COPPER, HI_COPPER),</span> | ||
+ | <span id="line371">371. #else</span> | ||
+ | <span id="line372">372. ARMOR("bronze plate mail", (char *)0,</span> | ||
+ | <span id="line373">373. 1, 0, 1, 0, 35, 5, 450, 400, 4, 0, ARM_SUIT, COPPER, HI_COPPER),</span> | ||
+ | <span id="line374">374. #endif</span> | ||
+ | <span id="line375">375. ARMOR("splint mail", (char *)0,</span> | ||
+ | <span id="line376">376. 1, 0, 1, 0, 62, 5, 400, 80, 4, 1, ARM_SUIT, IRON, HI_METAL),</span> | ||
+ | <span id="line377">377. ARMOR("banded mail", (char *)0,</span> | ||
+ | <span id="line378">378. 1, 0, 1, 0, 72, 5, 350, 90, 4, 0, ARM_SUIT, IRON, HI_METAL),</span> | ||
+ | <span id="line379">379. ARMOR("dwarvish mithril-coat", (char *)0,</span> | ||
+ | <span id="line380">380. 1, 0, 0, 0, 10, 1, 150, 240, 4, 3, ARM_SUIT, MITHRIL, HI_METAL),</span> | ||
+ | <span id="line381">381. ARMOR("elven mithril-coat", (char *)0,</span> | ||
+ | <span id="line382">382. 1, 0, 0, 0, 15, 1, 150, 240, 5, 3, ARM_SUIT, MITHRIL, HI_METAL),</span> | ||
+ | <span id="line383">383. ARMOR("chain mail", (char *)0,</span> | ||
+ | <span id="line384">384. 1, 0, 0, 0, 72, 5, 300, 75, 5, 1, ARM_SUIT, IRON, HI_METAL),</span> | ||
+ | <span id="line385">385. ARMOR("orcish chain mail", "crude chain mail",</span> | ||
+ | <span id="line386">386. 0, 0, 0, 0, 20, 5, 300, 75, 6, 1, ARM_SUIT, IRON, CLR_BLACK),</span> | ||
+ | <span id="line387">387. ARMOR("scale mail", (char *)0,</span> | ||
+ | <span id="line388">388. 1, 0, 0, 0, 72, 5, 250, 45, 6, 0, ARM_SUIT, IRON, HI_METAL),</span> | ||
+ | <span id="line389">389. ARMOR("studded leather armor", (char *)0,</span> | ||
+ | <span id="line390">390. 1, 0, 0, 0, 72, 3, 200, 15, 7, 1, ARM_SUIT, LEATHER, HI_LEATHER),</span> | ||
+ | <span id="line391">391. ARMOR("ring mail", (char *)0,</span> | ||
+ | <span id="line392">392. 1, 0, 0, 0, 72, 5, 250, 100, 7, 0, ARM_SUIT, IRON, HI_METAL),</span> | ||
+ | <span id="line393">393. ARMOR("orcish ring mail", "crude ring mail",</span> | ||
+ | <span id="line394">394. 0, 0, 0, 0, 20, 5, 250, 80, 8, 1, ARM_SUIT, IRON, CLR_BLACK),</span> | ||
+ | <span id="line395">395. ARMOR("leather armor", (char *)0,</span> | ||
+ | <span id="line396">396. 1, 0, 0, 0, 82, 3, 150, 5, 8, 0, ARM_SUIT, LEATHER, HI_LEATHER),</span> | ||
+ | <span id="line397">397. ARMOR("leather jacket", (char *)0,</span> | ||
+ | <span id="line398">398. 1, 0, 0, 0, 12, 0, 30, 10, 9, 0, ARM_SUIT, LEATHER, CLR_BLACK),</span> | ||
+ | <span id="line399">399. </span> | ||
+ | <span id="line400">400. #ifdef TOURIST</span> | ||
+ | <span id="line401">401. /* shirts */</span> | ||
+ | <span id="line402">402. ARMOR("Hawaiian shirt", (char *)0,</span> | ||
+ | <span id="line403">403. 1, 0, 0, 0, 8, 0, 5, 3, 10, 0, ARM_SHIRT, CLOTH, CLR_MAGENTA),</span> | ||
+ | <span id="line404">404. ARMOR("T-shirt", (char *)0,</span> | ||
+ | <span id="line405">405. 1, 0, 0, 0, 2, 0, 5, 2, 10, 0, ARM_SHIRT, CLOTH, CLR_WHITE),</span> | ||
+ | <span id="line406">406. #endif</span> | ||
+ | <span id="line407">407. </span> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==== Cloaks ==== | ==== Cloaks ==== | ||
− | <span id=" | + | <span id="line408">408. /* cloaks */</span> |
− | <span id=" | + | <span id="line409">409. /* 'cope' is not a spelling mistake... leave it be */</span> |
− | <span id=" | + | <span id="line410">410. CLOAK("mummy wrapping", (char *)0,</span> |
− | <span id=" | + | <span id="line411">411. 1, 0, 0, 0, 0, 3, 2, 10, 1, CLOTH, CLR_GRAY),</span> |
− | <span id=" | + | <span id="line412">412. CLOAK("elven cloak", "faded pall",</span> |
− | <span id=" | + | <span id="line413">413. 0, 1, STEALTH, 8, 0, 10, 60, 9, 3, CLOTH, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line414">414. CLOAK("orcish cloak", "coarse mantelet",</span> |
− | <span id=" | + | <span id="line415">415. 0, 0, 0, 8, 0, 10, 40, 10, 2, CLOTH, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line416">416. CLOAK("dwarvish cloak", "hooded cloak",</span> |
− | <span id=" | + | <span id="line417">417. 0, 0, 0, 8, 0, 10, 50, 10, 2, CLOTH, HI_CLOTH),</span> |
− | <span id=" | + | <span id="line418">418. CLOAK("oilskin cloak", "slippery cloak",</span> |
− | <span id=" | + | <span id="line419">419. 0, 0, 0, 8, 0, 10, 50, 9, 3, CLOTH, HI_CLOTH),</span> |
− | <span id=" | + | <span id="line420">420. CLOAK("robe", (char *)0,</span> |
− | <span id=" | + | <span id="line421">421. 1, 1, 0, 3, 0, 15, 50, 8, 3, CLOTH, CLR_RED),</span> |
− | <span id=" | + | <span id="line422">422. CLOAK("alchemy smock", "apron",</span> |
− | <span id=" | + | <span id="line423">423. 0, 1, POISON_RES, 9, 0, 10, 50, 9, 1, CLOTH, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line424">424. CLOAK("leather cloak", (char *)0,</span> |
− | <span id=" | + | <span id="line425">425. 1, 0, 0, 8, 0, 15, 40, 9, 1, LEATHER, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line426">426. /* With shuffled appearances... */</span> |
− | <span id=" | + | <span id="line427">427. CLOAK("cloak of protection", "tattered cape",</span> |
− | <span id=" | + | <span id="line428">428. 0, 1, PROTECTION, 9, 0, 10, 50, 7, 3, CLOTH, HI_CLOTH),</span> |
− | <span id=" | + | <span id="line429">429. CLOAK("cloak of invisibility", "opera cloak",</span> |
− | <span id=" | + | <span id="line430">430. 0, 1, INVIS, 10, 0, 10, 60, 9, 2, CLOTH, CLR_BRIGHT_MAGENTA),</span> |
− | <span id=" | + | <span id="line431">431. CLOAK("cloak of magic resistance", "ornamental cope",</span> |
− | <span id=" | + | <span id="line432">432. 0, 1, ANTIMAGIC, 2, 0, 10, 60, 9, 3, CLOTH, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line433">433. CLOAK("cloak of displacement", "piece of cloth",</span> |
− | <span id=" | + | <span id="line434">434. 0, 1, DISPLACED, 10, 0, 10, 50, 9, 2, CLOTH, HI_CLOTH),</span> |
− | <span id=" | + | <span id="line435">435. </span> |
+ | |||
==== Shields ==== | ==== Shields ==== | ||
− | <span id=" | + | <span id="line436">436. /* shields */</span> |
− | <span id=" | + | <span id="line437">437. SHIELD("small shield", (char *)0,</span> |
− | <span id=" | + | <span id="line438">438. 1, 0, 0, 0, 6, 0, 30, 3, 9, 0, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line439">439. SHIELD("elven shield", "blue and green shield",</span> |
− | <span id=" | + | <span id="line440">440. 0, 0, 0, 0, 2, 0, 40, 7, 8, 0, WOOD, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line441">441. SHIELD("Uruk-hai shield", "white-handed shield",</span> |
− | <span id=" | + | <span id="line442">442. 0, 0, 0, 0, 2, 0, 50, 7, 9, 0, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line443">443. SHIELD("orcish shield", "red-eyed shield",</span> |
− | <span id=" | + | <span id="line444">444. 0, 0, 0, 0, 2, 0, 50, 7, 9, 0, IRON, CLR_RED),</span> |
− | <span id=" | + | <span id="line445">445. SHIELD("large shield", (char *)0,</span> |
− | <span id=" | + | <span id="line446">446. 1, 0, 1, 0, 7, 0,100, 10, 8, 0, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line447">447. SHIELD("dwarvish roundshield", "large round shield",</span> |
− | <span id=" | + | <span id="line448">448. 0, 0, 0, 0, 4, 0,100, 10, 8, 0, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line449">449. SHIELD("shield of reflection", "polished silver shield",</span> |
− | <span id=" | + | <span id="line450">450. 0, 1, 0, REFLECTING, 3, 0, 50, 50, 8, 0, SILVER, HI_SILVER),</span> |
− | <span id=" | + | <span id="line451">451. </span> |
+ | |||
==== Gloves ==== | ==== Gloves ==== | ||
− | <span id=" | + | <span id="line452">452. /* gloves */</span> |
− | <span id=" | + | <span id="line453">453. /* these have their color but not material shuffled, so the IRON must stay</span> |
− | <span id=" | + | <span id="line454">454. * CLR_BROWN (== HI_LEATHER)</span> |
− | <span id=" | + | <span id="line455">455. */</span> |
− | <span id=" | + | <span id="line456">456. GLOVES("leather gloves", "old gloves",</span> |
− | <span id=" | + | <span id="line457">457. 0, 0, 0, 16, 1, 10, 8, 9, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line458">458. GLOVES("gauntlets of fumbling", "padded gloves",</span> |
− | <span id=" | + | <span id="line459">459. 0, 1, FUMBLING, 8, 1, 10, 50, 9, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line460">460. GLOVES("gauntlets of power", "riding gloves",</span> |
− | <span id=" | + | <span id="line461">461. 0, 1, 0, 8, 1, 30, 50, 9, 0, IRON, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line462">462. GLOVES("gauntlets of dexterity", "fencing gloves",</span> |
− | <span id=" | + | <span id="line463">463. 0, 1, 0, 8, 1, 10, 50, 9, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line464">464. </span> |
+ | |||
==== Boots ==== | ==== Boots ==== | ||
− | <span id=" | + | <span id="line465">465. /* boots */</span> |
− | <span id=" | + | <span id="line466">466. BOOTS("low boots", "walking shoes",</span> |
− | <span id=" | + | <span id="line467">467. 0, 0, 0, 25, 2, 10, 8, 9, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line468">468. BOOTS("iron shoes", "hard shoes",</span> |
− | <span id=" | + | <span id="line469">469. 0, 0, 0, 7, 2, 50, 16, 8, 0, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line470">470. BOOTS("high boots", "jackboots",</span> |
− | <span id=" | + | <span id="line471">471. 0, 0, 0, 15, 2, 20, 12, 8, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line472">472. /* With shuffled appearances... */</span> |
− | <span id=" | + | <span id="line473">473. BOOTS("speed boots", "combat boots",</span> |
− | <span id=" | + | <span id="line474">474. 0, 1, FAST, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line475">475. BOOTS("water walking boots", "jungle boots",</span> |
− | <span id=" | + | <span id="line476">476. 0, 1, WWALKING, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line477">477. BOOTS("jumping boots", "hiking boots",</span> |
− | <span id=" | + | <span id="line478">478. 0, 1, JUMPING, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line479">479. BOOTS("elven boots", "mud boots",</span> |
− | <span id=" | + | <span id="line480">480. 0, 1, STEALTH, 12, 2, 15, 8, 9, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line481">481. BOOTS("kicking boots", "buckled boots",</span> |
− | <span id=" | + | <span id="line482">482. 0, 1, 0, 12, 2, 15, 8, 9, 0, IRON, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line483">483. BOOTS("fumble boots", "riding boots",</span> |
− | <span id=" | + | <span id="line484">484. 0, 1, FUMBLING, 12, 2, 20, 30, 9, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line485">485. BOOTS("levitation boots", "snow boots",</span> |
− | <span id=" | + | <span id="line486">486. 0, 1, LEVITATION,12, 2, 15, 30, 9, 0, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line487">487. #undef HELM</span> |
− | <span id=" | + | <span id="line488">488. #undef CLOAK</span> |
− | <span id=" | + | <span id="line489">489. #undef SHIELD</span> |
− | <span id=" | + | <span id="line490">490. #undef GLOVES</span> |
− | <span id=" | + | <span id="line491">491. #undef BOOTS</span> |
− | <span id=" | + | <span id="line492">492. #undef ARMOR</span> |
+ | <span id="line493">493. </span> | ||
=== Rings === | === Rings === | ||
− | <span id=" | + | <span id="line494">494. /* rings ... */</span> |
− | <span id=" | + | <span id="line495">495. #define RING(name,power,stone,cost,mgc,spec,mohs,metal,color) OBJECT( \</span> |
− | <span id=" | + | <span id="line496">496. OBJ(name,stone), \</span> |
− | <span id=" | + | <span id="line497">497. BITS(0,0,spec,0,mgc,spec,0,0,0,HARDGEM(mohs),0,P_NONE,metal), \</span> |
− | <span id=" | + | <span id="line498">498. power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color )</span> |
− | <span id=" | + | <span id="line499">499. RING("adornment", ADORNED, "wooden", 100, 1, 1, 2, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line500">500. RING("gain strength", 0, "granite", 150, 1, 1, 7, MINERAL, HI_MINERAL),</span> |
− | <span id=" | + | <span id="line501">501. RING("gain constitution", 0, "opal", 150, 1, 1, 7, MINERAL, HI_MINERAL),</span> |
− | <span id=" | + | <span id="line502">502. RING("increase accuracy", 0, "clay", 150, 1, 1, 4, MINERAL, CLR_RED),</span> |
− | <span id=" | + | <span id="line503">503. RING("increase damage", 0, "coral", 150, 1, 1, 4, MINERAL, CLR_ORANGE),</span> |
− | <span id=" | + | <span id="line504">504. RING("protection", PROTECTION, "black onyx",100, 1, 1, 7, MINERAL, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line505">505. RING("regeneration", REGENERATION, "moonstone",</span> |
− | <span id=" | + | <span id="line506">506. 200, 1, 0, 6, MINERAL, HI_MINERAL),</span> |
− | <span id=" | + | <span id="line507">507. RING("searching", SEARCHING, "tiger eye", 200, 1, 0, 6, GEMSTONE, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line508">508. RING("stealth", STEALTH, "jade", 100, 1, 0, 6, GEMSTONE, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line509">509. RING("sustain ability", FIXED_ABIL, "bronze",</span> |
− | <span id=" | + | <span id="line510">510. 100, 1, 0, 4, COPPER, HI_COPPER),</span> |
− | <span id=" | + | <span id="line511">511. RING("levitation", LEVITATION, "agate", 200, 1, 0, 7, GEMSTONE, CLR_RED),</span> |
− | <span id=" | + | <span id="line512">512. RING("hunger", HUNGER, "topaz", 100, 1, 0, 8, GEMSTONE, CLR_CYAN),</span> |
− | <span id=" | + | <span id="line513">513. RING("aggravate monster", AGGRAVATE_MONSTER, "sapphire",</span> |
− | <span id=" | + | <span id="line514">514. 150, 1, 0, 9, GEMSTONE, CLR_BLUE),</span> |
− | <span id=" | + | <span id="line515">515. RING("conflict", CONFLICT, "ruby", 300, 1, 0, 9, GEMSTONE, CLR_RED),</span> |
− | <span id=" | + | <span id="line516">516. RING("warning", WARNING, "diamond", 100, 1, 0,10, GEMSTONE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line517">517. RING("poison resistance", POISON_RES, "pearl",</span> |
− | <span id=" | + | <span id="line518">518. 150, 1, 0, 4, IRON, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line519">519. RING("fire resistance", FIRE_RES, "iron", 200, 1, 0, 5, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line520">520. RING("cold resistance", COLD_RES, "brass", 150, 1, 0, 4, COPPER, HI_COPPER),</span> |
− | <span id=" | + | <span id="line521">521. RING("shock resistance", SHOCK_RES, "copper",</span> |
− | <span id=" | + | <span id="line522">522. 150, 1, 0, 3, COPPER, HI_COPPER),</span> |
− | <span id=" | + | <span id="line523">523. RING("free action", FREE_ACTION, "twisted",</span> |
− | <span id=" | + | <span id="line524">524. 200, 1, 0, 6, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line525">525. RING("slow digestion", SLOW_DIGESTION, "steel",</span> |
− | <span id=" | + | <span id="line526">526. 200, 1, 0, 8, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line527">527. RING("teleportation", TELEPORT, "silver", 200, 1, 0, 3, SILVER, HI_SILVER),</span> |
− | <span id=" | + | <span id="line528">528. RING("teleport control", TELEPORT_CONTROL, "gold",</span> |
− | <span id=" | + | <span id="line529">529. 300, 1, 0, 3, GOLD, HI_GOLD),</span> |
− | <span id=" | + | <span id="line530">530. RING("polymorph", POLYMORPH, "ivory", 300, 1, 0, 4, BONE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line531">531. RING("polymorph control", POLYMORPH_CONTROL, "emerald",</span> |
− | <span id=" | + | <span id="line532">532. 300, 1, 0, 8, GEMSTONE, CLR_BRIGHT_GREEN),</span> |
− | <span id=" | + | <span id="line533">533. RING("invisibility", INVIS, "wire", 150, 1, 0, 5, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line534">534. RING("see invisible", SEE_INVIS, "engagement",</span> |
− | <span id=" | + | <span id="line535">535. 150, 1, 0, 5, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line536">536. RING("protection from shape changers", PROT_FROM_SHAPE_CHANGERS, "shiny",</span> |
− | <span id=" | + | <span id="line537">537. 100, 1, 0, 5, IRON, CLR_BRIGHT_CYAN),</span> |
− | <span id=" | + | <span id="line538">538. #undef RING</span> |
− | <span id=" | + | <span id="line539">539. </span> |
+ | |||
=== Amulets === | === Amulets === | ||
− | <span id=" | + | <span id="line540">540. /* amulets ... - THE Amulet comes last because it is special */</span> |
− | <span id=" | + | <span id="line541">541. #define AMULET(name,desc,power,prob) OBJECT( \</span> |
− | <span id=" | + | <span id="line542">542. OBJ(name,desc), BITS(0,0,0,0,1,0,0,0,0,0,0,P_NONE,IRON), power, \</span> |
− | <span id=" | + | <span id="line543">543. AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL )</span> |
− | <span id=" | + | <span id="line544">544. </span> |
− | <span id=" | + | <span id="line545">545. AMULET("amulet of ESP", "circular", TELEPAT, 175),</span> |
− | <span id=" | + | <span id="line546">546. AMULET("amulet of life saving", "spherical", LIFESAVED, 75),</span> |
− | <span id=" | + | <span id="line547">547. AMULET("amulet of strangulation", "oval", STRANGLED, 135),</span> |
− | <span id=" | + | <span id="line548">548. AMULET("amulet of restful sleep", "triangular", SLEEPING, 135),</span> |
− | <span id=" | + | <span id="line549">549. AMULET("amulet versus poison", "pyramidal", POISON_RES, 165),</span> |
− | <span id=" | + | <span id="line550">550. AMULET("amulet of change", "square", 0, 130),</span> |
− | <span id=" | + | <span id="line551">551. /* POLYMORPH */</span> |
− | <span id=" | + | <span id="line552">552. AMULET("amulet of unchanging", "concave", UNCHANGING, 45),</span> |
− | <span id=" | + | <span id="line553">553. AMULET("amulet of reflection", "hexagonal", REFLECTING, 75),</span> |
− | <span id=" | + | <span id="line554">554. AMULET("amulet of magical breathing", "octagonal", MAGICAL_BREATHING, 65),</span> |
− | <span id=" | + | <span id="line555">555. OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor",</span> |
− | <span id=" | + | <span id="line556">556. "Amulet of Yendor"), BITS(0,0,1,0,0,0,0,0,0,0,0,0,PLASTIC), 0,</span> |
− | <span id=" | + | <span id="line557">557. AMULET_CLASS, 0, 0, 20, 0, 0, 0, 0, 0, 1, HI_METAL),</span> |
− | <span id=" | + | <span id="line558">558. OBJECT(OBJ("Amulet of Yendor", /* note: description == name */</span> |
− | <span id=" | + | <span id="line559">559. "Amulet of Yendor"), BITS(0,0,1,0,1,0,1,1,0,0,0,0,MITHRIL), 0,</span> |
− | <span id=" | + | <span id="line560">560. AMULET_CLASS, 0, 0, 20, 30000, 0, 0, 0, 0, 20, HI_METAL),</span> |
− | <span id=" | + | <span id="line561">561. #undef AMULET</span> |
− | <span id=" | + | <span id="line562">562. </span> |
+ | |||
=== Tools === | === Tools === | ||
− | <span id=" | + | <span id="line563">563. /* tools ... */</span> |
− | <span id=" | + | <span id="line564">564. /* tools with weapon characteristics come last */</span> |
− | <span id=" | + | <span id="line565">565. #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \</span> |
− | <span id=" | + | <span id="line566">566. OBJECT( OBJ(name,desc), \</span> |
− | <span id=" | + | <span id="line567">567. BITS(kn,mrg,chg,0,mgc,chg,0,0,0,0,0,P_NONE,mat), \</span> |
− | <span id=" | + | <span id="line568">568. 0, TOOL_CLASS, prob, 0, \</span> |
− | <span id=" | + | <span id="line569">569. wt, cost, 0, 0, 0, 0, wt, color )</span> |
− | <span id=" | + | <span id="line570">570. #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \</span> |
− | <span id=" | + | <span id="line571">571. OBJECT( OBJ(name,desc), \</span> |
− | <span id=" | + | <span id="line572">572. BITS(kn,0,chg,1,mgc,chg,0,0,0,0,0,P_NONE,mat), \</span> |
− | <span id=" | + | <span id="line573">573. 0, TOOL_CLASS, prob, 0, \</span> |
− | <span id=" | + | <span id="line574">574. wt, cost, 0, 0, 0, 0, wt, color )</span> |
− | <span id=" | + | <span id="line575">575. #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr) \</span> |
− | <span id=" | + | <span id="line576">576. OBJECT( OBJ(name,desc), \</span> |
− | <span id=" | + | <span id="line577">577. BITS(kn,0,1,0,mgc,1,0,0,bi,0,hitbon,sub,mat), \</span> |
− | <span id=" | + | <span id="line578">578. 0, TOOL_CLASS, prob, 0, \</span> |
− | <span id=" | + | <span id="line579">579. wt, cost, sdam, ldam, hitbon, 0, wt, clr )</span> |
− | <span id=" | + | <span id="line580">580. /* containers */</span> |
− | <span id=" | + | <span id="line581">581. CONTAINER("large box", (char *)0, 1, 0, 0, 40,350, 8, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line582">582. CONTAINER("chest", (char *)0, 1, 0, 0, 35,600, 16, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line583">583. CONTAINER("ice box", (char *)0, 1, 0, 0, 5,900, 42, PLASTIC, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line584">584. CONTAINER("sack", "bag", 0, 0, 0, 35, 15, 2, CLOTH, HI_CLOTH),</span> |
− | <span id=" | + | <span id="line585">585. CONTAINER("oilskin sack", "bag", 0, 0, 0, 5, 15, 100, CLOTH, HI_CLOTH),</span> |
− | <span id=" | + | <span id="line586">586. CONTAINER("bag of holding", "bag", 0, 1, 0, 20, 15, 100, CLOTH, HI_CLOTH),</span> |
− | <span id=" | + | <span id="line587">587. CONTAINER("bag of tricks", "bag", 0, 1, 1, 20, 15, 100, CLOTH, HI_CLOTH),</span> |
− | <span id=" | + | <span id="line588">588. #undef CONTAINER</span> |
− | <span id=" | + | <span id="line589">589. </span> |
− | <span id=" | + | <span id="line590">590. /* lock opening tools */</span> |
− | <span id=" | + | <span id="line591">591. TOOL("skeleton key", "key", 0, 0, 0, 0, 80, 3, 10, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line592">592. #ifdef TOURIST</span> |
− | <span id=" | + | <span id="line593">593. TOOL("lock pick", (char *)0, 1, 0, 0, 0, 60, 4, 20, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line594">594. TOOL("credit card", (char *)0, 1, 0, 0, 0, 15, 1, 10, PLASTIC, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line595">595. #else</span> |
− | <span id=" | + | <span id="line596">596. TOOL("lock pick", (char *)0, 1, 0, 0, 0, 75, 4, 20, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line597">597. #endif</span> |
− | <span id=" | + | <span id="line598">598. /* light sources */</span> |
− | <span id=" | + | <span id="line599">599. TOOL("tallow candle", "candle", 0, 1, 0, 0, 20, 2, 10, WAX, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line600">600. TOOL("wax candle", "candle", 0, 1, 0, 0, 5, 2, 20, WAX, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line601">601. TOOL("brass lantern", (char *)0,1, 0, 0, 0, 30, 30, 12, COPPER, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line602">602. TOOL("oil lamp", "lamp", 0, 0, 0, 0, 45, 20, 10, COPPER, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line603">603. TOOL("magic lamp", "lamp", 0, 0, 1, 0, 15, 20, 50, COPPER, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line604">604. /* other tools */</span> |
− | <span id=" | + | <span id="line605">605. #ifdef TOURIST</span> |
− | <span id=" | + | <span id="line606">606. TOOL("expensive camera", (char *)0,</span> |
− | <span id=" | + | <span id="line607">607. 1, 0, 0, 1, 15, 12, 200, PLASTIC, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line608">608. TOOL("mirror", "looking glass", 0, 0, 0, 0, 45, 13, 10, GLASS, HI_SILVER),</span> |
− | <span id=" | + | <span id="line609">609. #else</span> |
− | <span id=" | + | <span id="line610">610. TOOL("mirror", "looking glass", 0, 0, 0, 0, 60, 13, 10, GLASS, HI_SILVER),</span> |
− | <span id=" | + | <span id="line611">611. #endif</span> |
− | <span id=" | + | <span id="line612">612. TOOL("crystal ball", "glass orb",</span> |
− | <span id=" | + | <span id="line613">613. 0, 0, 1, 1, 15,150, 60, GLASS, HI_GLASS),</span> |
− | <span id=" | + | <span id="line614">614. TOOL("lenses", (char *)0, 1, 0, 0, 0, 5, 3, 80, GLASS, HI_GLASS),</span> |
− | <span id=" | + | <span id="line615">615. TOOL("blindfold", (char *)0, 1, 0, 0, 0, 50, 2, 20, CLOTH, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line616">616. TOOL("towel", (char *)0, 1, 0, 0, 0, 50, 2, 50, CLOTH, CLR_MAGENTA),</span> |
− | <span id=" | + | <span id="line617">617. #ifdef STEED</span> |
− | <span id=" | + | <span id="line618">618. TOOL("saddle", (char *)0, 1, 0, 0, 0, 5,200, 150, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line619">619. TOOL("leash", (char *)0, 1, 0, 0, 0, 65, 12, 20, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line620">620. #else</span> |
− | <span id=" | + | <span id="line621">621. TOOL("leash", (char *)0, 1, 0, 0, 0, 70, 12, 20, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line622">622. #endif</span> |
− | <span id=" | + | <span id="line623">623. TOOL("stethoscope", (char *)0, 1, 0, 0, 0, 25, 4, 75, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line624">624. TOOL("tinning kit", (char *)0, 1, 0, 0, 1, 15,100, 30, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line625">625. TOOL("tin opener", (char *)0, 1, 0, 0, 0, 35, 4, 30, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line626">626. TOOL("can of grease", (char *)0,1, 0, 0, 1, 15, 15, 20, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line627">627. TOOL("figurine", (char *)0, 1, 0, 1, 0, 25, 50, 80, MINERAL, HI_MINERAL),</span> |
− | <span id=" | + | <span id="line628">628. TOOL("magic marker", (char *)0, 1, 0, 1, 1, 15, 2, 50, PLASTIC, CLR_RED),</span> |
− | <span id=" | + | <span id="line629">629. /* traps */</span> |
− | <span id=" | + | <span id="line630">630. TOOL("land mine",(char *)0, 1, 0, 0, 0, 0,300, 180, IRON, CLR_RED),</span> |
− | <span id=" | + | <span id="line631">631. TOOL("beartrap", (char *)0, 1, 0, 0, 0, 0,200, 60, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line632">632. /* instruments */</span> |
− | <span id=" | + | <span id="line633">633. TOOL("tin whistle", "whistle", 0, 0, 0, 0, 100, 3, 10, METAL, HI_METAL),</span> |
− | <span id=" | + | <span id="line634">634. TOOL("magic whistle", "whistle",0, 0, 1, 0, 30, 3, 10, METAL, HI_METAL),</span> |
− | <span id=" | + | <span id="line635">635. /* "If tin whistles are made out of tin, what do they make foghorns out of?" */</span> |
− | <span id=" | + | <span id="line636">636. TOOL("wooden flute", "flute", 0, 0, 0, 0, 4, 5, 12, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line637">637. TOOL("magic flute", "flute", 0, 0, 1, 1, 2, 5, 36, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line638">638. TOOL("tooled horn", "horn", 0, 0, 0, 0, 5, 18, 15, BONE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line639">639. TOOL("frost horn", "horn", 0, 0, 1, 1, 2, 18, 50, BONE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line640">640. TOOL("fire horn", "horn", 0, 0, 1, 1, 2, 18, 50, BONE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line641">641. TOOL("horn of plenty", "horn", 0, 0, 1, 1, 2, 18, 50, BONE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line642">642. TOOL("wooden harp", "harp", 0, 0, 0, 0, 4, 30, 50, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line643">643. TOOL("magic harp", "harp", 0, 0, 1, 1, 2, 30, 50, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line644">644. TOOL("bell", (char *)0, 1, 0, 0, 0, 2, 30, 50, COPPER, HI_COPPER),</span> |
− | <span id=" | + | <span id="line645">645. TOOL("bugle", (char *)0, 1, 0, 0, 0, 4, 10, 15, COPPER, HI_COPPER),</span> |
− | <span id=" | + | <span id="line646">646. TOOL("leather drum", "drum", 0, 0, 0, 0, 4, 25, 25, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line647">647. TOOL("drum of earthquake", "drum",</span> |
− | <span id=" | + | <span id="line648">648. 0, 0, 1, 1, 2, 25, 25, LEATHER, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line649">649. /* tools useful as weapons */</span> |
− | <span id=" | + | <span id="line650">650. WEPTOOL("pick-axe", (char *)0,</span> |
− | <span id=" | + | <span id="line651">651. 1, 0, 0, 20, 100, 50, 6, 3, WHACK, P_PICK_AXE, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line652">652. WEPTOOL("grappling hook", "iron hook",</span> |
− | <span id=" | + | <span id="line653">653. 0, 0, 0, 5, 30, 50, 2, 6, WHACK, P_FLAIL, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line654">654. /* 3.4.1: unicorn horn left classified as "magic" */</span> |
− | <span id=" | + | <span id="line655">655. WEPTOOL("unicorn horn", (char *)0,</span> |
− | <span id=" | + | <span id="line656">656. 1, 1, 1, 0, 20, 100, 12, 12, PIERCE, P_UNICORN_HORN, BONE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line657">657. </span> |
− | <span id=" | + | <span id="line658">658. /* two special unique artifact "tools" */</span> |
− | <span id=" | + | <span id="line659">659. OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"),</span> |
− | <span id=" | + | <span id="line660">660. BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,GOLD), 0,</span> |
− | <span id=" | + | <span id="line661">661. TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 200, HI_GOLD),</span> |
− | <span id=" | + | <span id="line662">662. OBJECT(OBJ("Bell of Opening", "silver bell"),</span> |
− | <span id=" | + | <span id="line663">663. BITS(0,0,1,0,1,1,1,1,0,0,0,P_NONE,SILVER), 0,</span> |
− | <span id=" | + | <span id="line664">664. TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 50, HI_SILVER),</span> |
− | <span id=" | + | <span id="line665">665. #undef TOOL</span> |
− | <span id=" | + | <span id="line666">666. #undef WEPTOOL</span> |
− | <span id=" | + | <span id="line667">667. </span> |
+ | |||
=== Comestibles === | === Comestibles === | ||
− | <span id=" | + | <span id="line668">668. /* Comestibles ... */</span> |
− | <span id=" | + | <span id="line669">669. #define FOOD(name,prob,delay,wt,unk,tin,nutrition,color) OBJECT( \</span> |
− | <span id=" | + | <span id="line670">670. OBJ(name,(char *)0), BITS(1,1,unk,0,0,0,0,0,0,0,0,P_NONE,tin), 0, \</span> |
− | <span id=" | + | <span id="line671">671. FOOD_CLASS, prob, delay, \</span> |
− | <span id=" | + | <span id="line672">672. wt, nutrition/20 + 5, 0, 0, 0, 0, nutrition, color )</span> |
− | <span id=" | + | <span id="line673">673. /* all types of food (except tins & corpses) must have a delay of at least 1. */</span> |
− | <span id=" | + | <span id="line674">674. /* delay on corpses is computed and is weight dependant */</span> |
− | <span id=" | + | <span id="line675">675. /* dog eats foods 0-4 but prefers tripe rations above all others */</span> |
− | <span id=" | + | <span id="line676">676. /* fortune cookies can be read */</span> |
− | <span id=" | + | <span id="line677">677. /* carrots improve your vision */</span> |
− | <span id=" | + | <span id="line678">678. /* +0 tins contain monster meat */</span> |
− | <span id=" | + | <span id="line679">679. /* +1 tins (of spinach) make you stronger (like Popeye) */</span> |
− | <span id=" | + | <span id="line680">680. /* food CORPSE is a cadaver of some type */</span> |
− | <span id=" | + | <span id="line681">681. /* meatballs/sticks/rings are only created from objects via stone to flesh */</span> |
− | <span id=" | + | <span id="line682">682. </span> |
− | <span id=" | + | <span id="line683">683. /* meat */</span> |
− | <span id=" | + | <span id="line684">684. FOOD("tripe ration", 140, 2, 10, 0, FLESH, 200, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line685">685. FOOD("corpse", 0, 1, 0, 0, FLESH, 0, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line686">686. FOOD("egg", 85, 1, 1, 1, FLESH, 80, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line687">687. FOOD("meatball", 0, 1, 1, 0, FLESH, 5, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line688">688. FOOD("meat stick", 0, 1, 1, 0, FLESH, 5, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line689">689. FOOD("huge chunk of meat", 0,20,400, 0, FLESH,2000, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line690">690. /* special case because it's not mergable */</span> |
− | <span id=" | + | <span id="line691">691. OBJECT(OBJ("meat ring", (char *)0),</span> |
− | <span id=" | + | <span id="line692">692. BITS(1,0,0,0,0,0,0,0,0,0,0,0,FLESH),</span> |
− | <span id=" | + | <span id="line693">693. 0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line694">694. </span> |
− | <span id=" | + | <span id="line695">695. /* fruits & veggies */</span> |
− | <span id=" | + | <span id="line696">696. FOOD("kelp frond", 0, 1, 1, 0, VEGGY, 30, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line697">697. FOOD("eucalyptus leaf", 3, 1, 1, 0, VEGGY, 30, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line698">698. FOOD("apple", 15, 1, 2, 0, VEGGY, 50, CLR_RED),</span> |
− | <span id=" | + | <span id="line699">699. FOOD("orange", 10, 1, 2, 0, VEGGY, 80, CLR_ORANGE),</span> |
− | <span id=" | + | <span id="line700">700. FOOD("pear", 10, 1, 2, 0, VEGGY, 50, CLR_BRIGHT_GREEN),</span> |
− | <span id=" | + | <span id="line701">701. FOOD("melon", 10, 1, 5, 0, VEGGY, 100, CLR_BRIGHT_GREEN),</span> |
− | <span id=" | + | <span id="line702">702. FOOD("banana", 10, 1, 2, 0, VEGGY, 80, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line703">703. FOOD("carrot", 15, 1, 2, 0, VEGGY, 50, CLR_ORANGE),</span> |
− | <span id=" | + | <span id="line704">704. FOOD("sprig of wolfsbane", 7, 1, 1, 0, VEGGY, 40, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line705">705. FOOD("clove of garlic", 7, 1, 1, 0, VEGGY, 40, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line706">706. FOOD("slime mold", 75, 1, 5, 0, VEGGY, 250, HI_ORGANIC),</span> |
− | <span id=" | + | <span id="line707">707. </span> |
− | <span id=" | + | <span id="line708">708. /* people food */</span> |
− | <span id=" | + | <span id="line709">709. FOOD("lump of royal jelly", 0, 1, 2, 0, VEGGY, 200, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line710">710. FOOD("cream pie", 25, 1, 10, 0, VEGGY, 100, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line711">711. FOOD("candy bar", 13, 1, 2, 0, VEGGY, 100, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line712">712. FOOD("fortune cookie", 55, 1, 1, 0, VEGGY, 40, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line713">713. FOOD("pancake", 25, 2, 2, 0, VEGGY, 200, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line714">714. FOOD("lembas wafer", 20, 2, 5, 0, VEGGY, 800, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line715">715. FOOD("cram ration", 20, 3, 15, 0, VEGGY, 600, HI_ORGANIC),</span> |
− | <span id=" | + | <span id="line716">716. FOOD("food ration", 380, 5, 20, 0, VEGGY, 800, HI_ORGANIC),</span> |
− | <span id=" | + | <span id="line717">717. FOOD("K-ration", 0, 1, 10, 0, VEGGY, 400, HI_ORGANIC),</span> |
− | <span id=" | + | <span id="line718">718. FOOD("C-ration", 0, 1, 10, 0, VEGGY, 300, HI_ORGANIC),</span> |
− | <span id=" | + | <span id="line719">719. FOOD("tin", 75, 0, 10, 1, METAL, 0, HI_METAL),</span> |
− | <span id=" | + | <span id="line720">720. #undef FOOD</span> |
− | <span id=" | + | <span id="line721">721. </span> |
+ | |||
=== Potions === | === Potions === | ||
− | <span id=" | + | <span id="line722">722. /* potions ... */</span> |
− | <span id=" | + | <span id="line723">723. #define POTION(name,desc,mgc,power,prob,cost,color) OBJECT( \</span> |
− | <span id=" | + | <span id="line724">724. OBJ(name,desc), BITS(0,1,0,0,mgc,0,0,0,0,0,0,P_NONE,GLASS), power, \</span> |
− | <span id=" | + | <span id="line725">725. POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color )</span> |
− | <span id=" | + | <span id="line726">726. POTION("gain ability", "ruby", 1, 0, 42, 300, CLR_RED),</span> |
− | <span id=" | + | <span id="line727">727. POTION("restore ability", "pink", 1, 0, 40, 100, CLR_BRIGHT_MAGENTA),</span> |
− | <span id=" | + | <span id="line728">728. POTION("confusion", "orange", 1, CONFUSION, 42, 100, CLR_ORANGE),</span> |
− | <span id=" | + | <span id="line729">729. POTION("blindness", "yellow", 1, BLINDED, 40, 150, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line730">730. POTION("paralysis", "emerald", 1, 0, 42, 300, CLR_BRIGHT_GREEN),</span> |
− | <span id=" | + | <span id="line731">731. POTION("speed", "dark green", 1, FAST, 42, 200, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line732">732. POTION("levitation", "cyan", 1, LEVITATION, 42, 200, CLR_CYAN),</span> |
− | <span id=" | + | <span id="line733">733. POTION("hallucination", "sky blue", 1, HALLUC, 40, 100, CLR_CYAN),</span> |
− | <span id=" | + | <span id="line734">734. POTION("invisibility", "brilliant blue",1, INVIS, 40, 150, CLR_BRIGHT_BLUE),</span> |
− | <span id=" | + | <span id="line735">735. POTION("see invisible", "magenta", 1, SEE_INVIS, 42, 50, CLR_MAGENTA),</span> |
− | <span id=" | + | <span id="line736">736. POTION("healing", "purple-red", 1, 0, 57, 100, CLR_MAGENTA),</span> |
− | <span id=" | + | <span id="line737">737. POTION("extra healing", "puce", 1, 0, 47, 100, CLR_RED),</span> |
− | <span id=" | + | <span id="line738">738. POTION("gain level", "milky", 1, 0, 20, 300, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line739">739. POTION("enlightenment", "swirly", 1, 0, 20, 200, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line740">740. POTION("monster detection", "bubbly", 1, 0, 40, 150, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line741">741. POTION("object detection", "smoky", 1, 0, 42, 150, CLR_GRAY),</span> |
− | <span id=" | + | <span id="line742">742. POTION("gain energy", "cloudy", 1, 0, 42, 150, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line743">743. POTION("sleeping", "effervescent", 1, 0, 42, 100, CLR_GRAY),</span> |
− | <span id=" | + | <span id="line744">744. POTION("full healing", "black", 1, 0, 10, 200, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line745">745. POTION("polymorph", "golden", 1, 0, 10, 200, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line746">746. POTION("booze", "brown", 0, 0, 42, 50, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line747">747. POTION("sickness", "fizzy", 0, 0, 42, 50, CLR_CYAN),</span> |
− | <span id=" | + | <span id="line748">748. POTION("fruit juice", "dark", 0, 0, 42, 50, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line749">749. POTION("acid", "white", 0, 0, 10, 250, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line750">750. POTION("oil", "murky", 0, 0, 30, 250, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line751">751. POTION("water", "clear", 0, 0, 92, 100, CLR_CYAN),</span> |
− | <span id=" | + | <span id="line752">752. #undef POTION</span> |
− | <span id=" | + | <span id="line753">753. </span> |
+ | |||
=== Scrolls === | === Scrolls === | ||
− | <span id=" | + | <span id="line754">754. /* scrolls ... */</span> |
− | <span id=" | + | <span id="line755">755. #define SCROLL(name,text,mgc,prob,cost) OBJECT( \</span> |
− | <span id=" | + | <span id="line756">756. OBJ(name,text), BITS(0,1,0,0,mgc,0,0,0,0,0,0,P_NONE,PAPER), 0, \</span> |
− | <span id=" | + | <span id="line757">757. SCROLL_CLASS, prob, 0, 5, cost, 0, 0, 0, 0, 6, HI_PAPER )</span> |
− | <span id=" | + | <span id="line758">758. SCROLL("enchant armor", "ZELGO MER", 1, 63, 80),</span> |
− | <span id=" | + | <span id="line759">759. SCROLL("destroy armor", "JUYED AWK YACC", 1, 45, 100),</span> |
− | <span id=" | + | <span id="line760">760. SCROLL("confuse monster", "NR 9", 1, 53, 100),</span> |
− | <span id=" | + | <span id="line761">761. SCROLL("scare monster", "XIXAXA XOXAXA XUXAXA", 1, 35, 100),</span> |
− | <span id=" | + | <span id="line762">762. SCROLL("remove curse", "PRATYAVAYAH", 1, 65, 80),</span> |
− | <span id=" | + | <span id="line763">763. SCROLL("enchant weapon", "DAIYEN FOOELS", 1, 80, 60),</span> |
− | <span id=" | + | <span id="line764">764. SCROLL("create monster", "LEP GEX VEN ZEA", 1, 45, 200),</span> |
− | <span id=" | + | <span id="line765">765. SCROLL("taming", "PRIRUTSENIE", 1, 15, 200),</span> |
− | <span id=" | + | <span id="line766">766. SCROLL("genocide", "ELBIB YLOH", 1, 15, 300),</span> |
− | <span id=" | + | <span id="line767">767. SCROLL("light", "VERR YED HORRE", 1, 90, 50),</span> |
− | <span id=" | + | <span id="line768">768. SCROLL("teleportation", "VENZAR BORGAVVE", 1, 55, 100),</span> |
− | <span id=" | + | <span id="line769">769. SCROLL("gold detection", "THARR", 1, 33, 100),</span> |
− | <span id=" | + | <span id="line770">770. SCROLL("food detection", "YUM YUM", 1, 25, 100),</span> |
− | <span id=" | + | <span id="line771">771. SCROLL("identify", "KERNOD WEL", 1, 180, 20),</span> |
− | <span id=" | + | <span id="line772">772. SCROLL("magic mapping", "ELAM EBOW", 1, 45, 100),</span> |
− | <span id=" | + | <span id="line773">773. SCROLL("amnesia", "DUAM XNAHT", 1, 35, 200),</span> |
− | <span id=" | + | <span id="line774">774. SCROLL("fire", "ANDOVA BEGARIN", 1, 30, 100),</span> |
− | <span id=" | + | <span id="line775">775. SCROLL("earth", "KIRJE", 1, 18, 200),</span> |
− | <span id=" | + | <span id="line776">776. SCROLL("punishment", "VE FORBRYDERNE", 1, 15, 300),</span> |
− | <span id=" | + | <span id="line777">777. SCROLL("charging", "HACKEM MUCHE", 1, 15, 300),</span> |
− | <span id=" | + | <span id="line778">778. SCROLL("stinking cloud", "VELOX NEB", 1, 15, 300),</span> |
− | <span id=" | + | <span id="line779">779. SCROLL((char *)0, "FOOBIE BLETCH", 1, 0, 100),</span> |
− | <span id=" | + | <span id="line780">780. SCROLL((char *)0, "TEMOV", 1, 0, 100),</span> |
− | <span id=" | + | <span id="line781">781. SCROLL((char *)0, "GARVEN DEH", 1, 0, 100),</span> |
− | <span id=" | + | <span id="line782">782. SCROLL((char *)0, "READ ME", 1, 0, 100),</span> |
− | <span id=" | + | <span id="line783">783. /* these must come last because they have special descriptions */</span> |
− | <span id=" | + | <span id="line784">784. #ifdef MAIL</span> |
− | <span id=" | + | <span id="line785">785. SCROLL("mail", "stamped", 0, 0, 0),</span> |
− | <span id=" | + | <span id="line786">786. #endif</span> |
− | <span id=" | + | <span id="line787">787. SCROLL("blank paper", "unlabeled", 0, 28, 60),</span> |
− | <span id=" | + | <span id="line788">788. #undef SCROLL</span> |
− | <span id=" | + | <span id="line789">789. </span> |
+ | |||
=== Spellbooks === | === Spellbooks === | ||
− | <span id=" | + | <span id="line790">790. /* spellbooks ... */</span> |
− | <span id=" | + | <span id="line791">791. #define SPELL(name,desc,sub,prob,delay,level,mgc,dir,color) OBJECT( \</span> |
− | <span id=" | + | <span id="line792">792. OBJ(name,desc), BITS(0,0,0,0,mgc,0,0,0,0,0,dir,sub,PAPER), 0, \</span> |
− | <span id=" | + | <span id="line793">793. SPBOOK_CLASS, prob, delay, \</span> |
− | <span id=" | + | <span id="line794">794. 50, level*100, 0, 0, 0, level, 20, color )</span> |
− | <span id=" | + | <span id="line795">795. SPELL("dig", "parchment", P_MATTER_SPELL, 20, 6, 5, 1, RAY, HI_PAPER),</span> |
− | <span id=" | + | <span id="line796">796. SPELL("magic missile", "vellum", P_ATTACK_SPELL, 45, 2, 2, 1, RAY, HI_PAPER),</span> |
− | <span id=" | + | <span id="line797">797. SPELL("fireball", "ragged", P_ATTACK_SPELL, 20, 4, 4, 1, RAY, HI_PAPER),</span> |
− | <span id=" | + | <span id="line798">798. SPELL("cone of cold", "dog eared", P_ATTACK_SPELL, 10, 7, 4, 1, RAY, HI_PAPER),</span> |
− | <span id=" | + | <span id="line799">799. SPELL("sleep", "mottled", P_ENCHANTMENT_SPELL, 50, 1, 1, 1, RAY, HI_PAPER),</span> |
− | <span id=" | + | <span id="line800">800. SPELL("finger of death", "stained", P_ATTACK_SPELL, 5, 10, 7, 1, RAY, HI_PAPER),</span> |
− | <span id=" | + | <span id="line801">801. SPELL("light", "cloth", P_DIVINATION_SPELL, 45, 1, 1, 1, NODIR, HI_CLOTH),</span> |
− | <span id=" | + | <span id="line802">802. SPELL("detect monsters", "leather", P_DIVINATION_SPELL, 43, 1, 1, 1, NODIR, HI_LEATHER),</span> |
− | <span id=" | + | <span id="line803">803. SPELL("healing", "white", P_HEALING_SPELL, 40, 2, 1, 1, IMMEDIATE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line804">804. SPELL("knock", "pink", P_MATTER_SPELL, 35, 1, 1, 1, IMMEDIATE, CLR_BRIGHT_MAGENTA),</span> |
− | <span id=" | + | <span id="line805">805. SPELL("force bolt", "red", P_ATTACK_SPELL, 35, 2, 1, 1, IMMEDIATE, CLR_RED),</span> |
− | <span id=" | + | <span id="line806">806. SPELL("confuse monster", "orange", P_ENCHANTMENT_SPELL, 30, 2, 2, 1, IMMEDIATE, CLR_ORANGE),</span> |
− | <span id=" | + | <span id="line807">807. SPELL("cure blindness", "yellow", P_HEALING_SPELL, 25, 2, 2, 1, IMMEDIATE, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line808">808. SPELL("drain life", "velvet", P_ATTACK_SPELL, 10, 2, 2, 1, IMMEDIATE, CLR_MAGENTA),</span> |
− | <span id=" | + | <span id="line809">809. SPELL("slow monster", "light green", P_ENCHANTMENT_SPELL, 30, 2, 2, 1, IMMEDIATE, CLR_BRIGHT_GREEN),</span> |
− | <span id=" | + | <span id="line810">810. SPELL("wizard lock", "dark green", P_MATTER_SPELL, 30, 3, 2, 1, IMMEDIATE, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line811">811. SPELL("create monster", "turquoise", P_CLERIC_SPELL, 35, 3, 2, 1, NODIR, CLR_BRIGHT_CYAN),</span> |
− | <span id=" | + | <span id="line812">812. SPELL("detect food", "cyan", P_DIVINATION_SPELL, 30, 3, 2, 1, NODIR, CLR_CYAN),</span> |
− | <span id=" | + | <span id="line813">813. SPELL("cause fear", "light blue", P_ENCHANTMENT_SPELL, 25, 3, 3, 1, NODIR, CLR_BRIGHT_BLUE),</span> |
− | <span id=" | + | <span id="line814">814. SPELL("clairvoyance", "dark blue", P_DIVINATION_SPELL, 15, 3, 3, 1, NODIR, CLR_BLUE),</span> |
− | <span id=" | + | <span id="line815">815. SPELL("cure sickness", "indigo", P_HEALING_SPELL, 32, 3, 3, 1, NODIR, CLR_BLUE),</span> |
− | <span id=" | + | <span id="line816">816. SPELL("charm monster", "magenta", P_ENCHANTMENT_SPELL, 20, 3, 3, 1, IMMEDIATE, CLR_MAGENTA),</span> |
− | <span id=" | + | <span id="line817">817. SPELL("haste self", "purple", P_ESCAPE_SPELL, 33, 4, 3, 1, NODIR, CLR_MAGENTA),</span> |
− | <span id=" | + | <span id="line818">818. SPELL("detect unseen", "violet", P_DIVINATION_SPELL, 20, 4, 3, 1, NODIR, CLR_MAGENTA),</span> |
− | <span id=" | + | <span id="line819">819. SPELL("levitation", "tan", P_ESCAPE_SPELL, 20, 4, 4, 1, NODIR, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line820">820. SPELL("extra healing", "plaid", P_HEALING_SPELL, 27, 5, 3, 1, IMMEDIATE, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line821">821. SPELL("restore ability", "light brown", P_HEALING_SPELL, 25, 5, 4, 1, NODIR, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line822">822. SPELL("invisibility", "dark brown", P_ESCAPE_SPELL, 25, 5, 4, 1, NODIR, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line823">823. SPELL("detect treasure", "gray", P_DIVINATION_SPELL, 20, 5, 4, 1, NODIR, CLR_GRAY),</span> |
− | <span id=" | + | <span id="line824">824. SPELL("remove curse", "wrinkled", P_CLERIC_SPELL, 25, 5, 3, 1, NODIR, HI_PAPER),</span> |
− | <span id=" | + | <span id="line825">825. SPELL("magic mapping", "dusty", P_DIVINATION_SPELL, 18, 7, 5, 1, NODIR, HI_PAPER),</span> |
− | <span id=" | + | <span id="line826">826. SPELL("identify", "bronze", P_DIVINATION_SPELL, 20, 6, 3, 1, NODIR, HI_COPPER),</span> |
− | <span id=" | + | <span id="line827">827. SPELL("turn undead", "copper", P_CLERIC_SPELL, 16, 8, 6, 1, IMMEDIATE, HI_COPPER),</span> |
− | <span id=" | + | <span id="line828">828. SPELL("polymorph", "silver", P_MATTER_SPELL, 10, 8, 6, 1, IMMEDIATE, HI_SILVER),</span> |
− | <span id=" | + | <span id="line829">829. SPELL("teleport away", "gold", P_ESCAPE_SPELL, 15, 6, 6, 1, IMMEDIATE, HI_GOLD),</span> |
− | <span id=" | + | <span id="line830">830. SPELL("create familiar", "glittering", P_CLERIC_SPELL, 10, 7, 6, 1, NODIR, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line831">831. SPELL("cancellation", "shining", P_MATTER_SPELL, 15, 8, 7, 1, IMMEDIATE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line832">832. SPELL("protection", "dull", P_CLERIC_SPELL, 18, 3, 1, 1, NODIR, HI_PAPER),</span> |
− | <span id=" | + | <span id="line833">833. SPELL("jumping", "thin", P_ESCAPE_SPELL, 20, 3, 1, 1, IMMEDIATE, HI_PAPER),</span> |
− | <span id=" | + | <span id="line834">834. SPELL("stone to flesh", "thick", P_HEALING_SPELL, 15, 1, 3, 1, IMMEDIATE, HI_PAPER),</span> |
− | <span id=" | + | <span id="line835">835. #if 0 /* DEFERRED */</span> |
− | <span id=" | + | <span id="line836">836. SPELL("flame sphere", "canvas", P_MATTER_SPELL, 20, 2, 1, 1, NODIR, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line837">837. SPELL("freeze sphere", "hardcover", P_MATTER_SPELL, 20, 2, 1, 1, NODIR, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line838">838. #endif</span> |
− | <span id=" | + | <span id="line839">839. /* blank spellbook must come last because it retains its description */</span> |
− | <span id=" | + | <span id="line840">840. SPELL("blank paper", "plain", P_NONE, 18, 0, 0, 0, 0, HI_PAPER),</span> |
− | <span id=" | + | <span id="line841">841. /* a special, one of a kind, spellbook */</span> |
− | <span id=" | + | <span id="line842">842. OBJECT(OBJ("Book of the Dead", "papyrus"), BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,PAPER), 0,</span> |
− | <span id=" | + | <span id="line843">843. SPBOOK_CLASS, 0, 0,20, 10000, 0, 0, 0, 7, 20, HI_PAPER),</span> |
− | <span id=" | + | <span id="line844">844. #undef SPELL</span> |
− | <span id=" | + | <span id="line845">845. </span> |
+ | |||
=== Wands === | === Wands === | ||
− | <span id=" | + | <span id="line846">846. /* wands ... */</span> |
− | <span id=" | + | <span id="line847">847. #define WAND(name,typ,prob,cost,mgc,dir,metal,color) OBJECT( \</span> |
− | <span id=" | + | <span id="line848">848. OBJ(name,typ), BITS(0,0,1,0,mgc,1,0,0,0,0,dir,P_NONE,metal), 0, \</span> |
− | <span id=" | + | <span id="line849">849. WAND_CLASS, prob, 0, 7, cost, 0, 0, 0, 0, 30, color )</span> |
− | <span id=" | + | <span id="line850">850. WAND("light", "glass", 95, 100, 1, NODIR, GLASS, HI_GLASS),</span> |
− | <span id=" | + | <span id="line851">851. WAND("secret door detection", "balsa",</span> |
− | <span id=" | + | <span id="line852">852. 50, 150, 1, NODIR, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line853">853. WAND("enlightenment", "crystal", 15, 150, 1, NODIR, GLASS, HI_GLASS),</span> |
− | <span id=" | + | <span id="line854">854. WAND("create monster", "maple", 45, 200, 1, NODIR, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line855">855. WAND("wishing", "pine", 5, 500, 1, NODIR, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line856">856. WAND("nothing", "oak", 25, 100, 0, IMMEDIATE, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line857">857. WAND("striking", "ebony", 75, 150, 1, IMMEDIATE, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line858">858. WAND("make invisible", "marble", 45, 150, 1, IMMEDIATE, MINERAL, HI_MINERAL),</span> |
− | <span id=" | + | <span id="line859">859. WAND("slow monster", "tin", 50, 150, 1, IMMEDIATE, METAL, HI_METAL),</span> |
− | <span id=" | + | <span id="line860">860. WAND("speed monster", "brass", 50, 150, 1, IMMEDIATE, COPPER, HI_COPPER),</span> |
− | <span id=" | + | <span id="line861">861. WAND("undead turning", "copper", 50, 150, 1, IMMEDIATE, COPPER, HI_COPPER),</span> |
− | <span id=" | + | <span id="line862">862. WAND("polymorph", "silver", 45, 200, 1, IMMEDIATE, SILVER, HI_SILVER),</span> |
− | <span id=" | + | <span id="line863">863. WAND("cancellation", "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line864">864. WAND("teleportation", "iridium", 45, 200, 1, IMMEDIATE, METAL, CLR_BRIGHT_CYAN),</span> |
− | <span id=" | + | <span id="line865">865. WAND("opening", "zinc", 25, 150, 1, IMMEDIATE, METAL, HI_METAL),</span> |
− | <span id=" | + | <span id="line866">866. WAND("locking", "aluminum", 25, 150, 1, IMMEDIATE, METAL, HI_METAL),</span> |
− | <span id=" | + | <span id="line867">867. WAND("probing", "uranium", 30, 150, 1, IMMEDIATE, METAL, HI_METAL),</span> |
− | <span id=" | + | <span id="line868">868. WAND("digging", "iron", 55, 150, 1, RAY, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line869">869. WAND("magic missile", "steel", 50, 150, 1, RAY, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line870">870. WAND("fire", "hexagonal",40, 175, 1, RAY, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line871">871. WAND("cold", "short", 40, 175, 1, RAY, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line872">872. WAND("sleep", "runed", 50, 175, 1, RAY, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line873">873. WAND("death", "long", 5, 500, 1, RAY, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line874">874. WAND("lightning", "curved", 40, 175, 1, RAY, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line875">875. WAND((char *)0, "forked", 0, 150, 1, 0, WOOD, HI_WOOD),</span> |
− | <span id=" | + | <span id="line876">876. WAND((char *)0, "spiked", 0, 150, 1, 0, IRON, HI_METAL),</span> |
− | <span id=" | + | <span id="line877">877. WAND((char *)0, "jeweled", 0, 150, 1, 0, IRON, HI_MINERAL),</span> |
− | <span id=" | + | <span id="line878">878. #undef WAND</span> |
− | <span id=" | + | <span id="line879">879. </span> |
+ | |||
=== Coins === | === Coins === | ||
− | <span id=" | + | <span id="line880">880. /* coins ... - so far, gold is all there is */</span> |
− | <span id=" | + | <span id="line881">881. #define COIN(name,prob,metal,worth) OBJECT( \</span> |
− | <span id=" | + | <span id="line882">882. OBJ(name,(char *)0), BITS(0,1,0,0,0,0,0,0,0,0,0,P_NONE,metal), 0, \</span> |
− | <span id=" | + | <span id="line883">883. COIN_CLASS, prob, 0, 1, worth, 0, 0, 0, 0, 0, HI_GOLD )</span> |
− | <span id=" | + | <span id="line884">884. COIN("gold piece", 1000, GOLD,1),</span> |
− | <span id=" | + | <span id="line885">885. #undef COIN</span> |
− | <span id=" | + | <span id="line886">886. </span> |
+ | |||
=== Gems === | === Gems === | ||
− | <span id=" | + | <span id="line887">887. /* gems ... - includes stones and rocks but not boulders */</span> |
− | <span id=" | + | <span id="line888">888. #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \</span> |
− | <span id=" | + | <span id="line889">889. OBJ(name,desc), \</span> |
− | <span id=" | + | <span id="line890">890. BITS(0,1,0,0,0,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \</span> |
− | <span id=" | + | <span id="line891">891. GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, 0, nutr, color )</span> |
− | <span id=" | + | <span id="line892">892. #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) OBJECT( \</span> |
− | <span id=" | + | <span id="line893">893. OBJ(name,desc), \</span> |
− | <span id=" | + | <span id="line894">894. BITS(kn,1,0,0,mgc,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \</span> |
− | <span id=" | + | <span id="line895">895. GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, 0, nutr, color )</span> |
− | <span id=" | + | <span id="line896">896. GEM("dilithium crystal", "white", 2, 1, 4500, 15, 5, GEMSTONE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line897">897. GEM("diamond", "white", 3, 1, 4000, 15, 10, GEMSTONE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line898">898. GEM("ruby", "red", 4, 1, 3500, 15, 9, GEMSTONE, CLR_RED),</span> |
− | <span id=" | + | <span id="line899">899. GEM("jacinth", "orange", 3, 1, 3250, 15, 9, GEMSTONE, CLR_ORANGE),</span> |
− | <span id=" | + | <span id="line900">900. GEM("sapphire", "blue", 4, 1, 3000, 15, 9, GEMSTONE, CLR_BLUE),</span> |
− | <span id=" | + | <span id="line901">901. GEM("black opal", "black", 3, 1, 2500, 15, 8, GEMSTONE, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line902">902. GEM("emerald", "green", 5, 1, 2500, 15, 8, GEMSTONE, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line903">903. GEM("turquoise", "green", 6, 1, 2000, 15, 6, GEMSTONE, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line904">904. GEM("citrine", "yellow", 4, 1, 1500, 15, 6, GEMSTONE, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line905">905. GEM("aquamarine", "green", 6, 1, 1500, 15, 8, GEMSTONE, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line906">906. GEM("amber", "yellowish brown", 8, 1, 1000, 15, 2, GEMSTONE, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line907">907. GEM("topaz", "yellowish brown", 10, 1, 900, 15, 8, GEMSTONE, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line908">908. GEM("jet", "black", 6, 1, 850, 15, 7, GEMSTONE, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line909">909. GEM("opal", "white", 12, 1, 800, 15, 6, GEMSTONE, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line910">910. GEM("chrysoberyl", "yellow", 8, 1, 700, 15, 5, GEMSTONE, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line911">911. GEM("garnet", "red", 12, 1, 700, 15, 7, GEMSTONE, CLR_RED),</span> |
− | <span id=" | + | <span id="line912">912. GEM("amethyst", "violet", 14, 1, 600, 15, 7, GEMSTONE, CLR_MAGENTA),</span> |
− | <span id=" | + | <span id="line913">913. GEM("jasper", "red", 15, 1, 500, 15, 7, GEMSTONE, CLR_RED),</span> |
− | <span id=" | + | <span id="line914">914. GEM("fluorite", "violet", 15, 1, 400, 15, 4, GEMSTONE, CLR_MAGENTA),</span> |
− | <span id=" | + | <span id="line915">915. GEM("obsidian", "black", 9, 1, 200, 15, 6, GEMSTONE, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line916">916. GEM("agate", "orange", 12, 1, 200, 15, 6, GEMSTONE, CLR_ORANGE),</span> |
− | <span id=" | + | <span id="line917">917. GEM("jade", "green", 10, 1, 300, 15, 6, GEMSTONE, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line918">918. GEM("worthless piece of white glass", "white", 77, 1, 0, 6, 5, GLASS, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line919">919. GEM("worthless piece of blue glass", "blue", 77, 1, 0, 6, 5, GLASS, CLR_BLUE),</span> |
− | <span id=" | + | <span id="line920">920. GEM("worthless piece of red glass", "red", 77, 1, 0, 6, 5, GLASS, CLR_RED),</span> |
− | <span id=" | + | <span id="line921">921. GEM("worthless piece of yellowish brown glass", "yellowish brown",</span> |
− | <span id=" | + | <span id="line922">922. 77, 1, 0, 6, 5, GLASS, CLR_BROWN),</span> |
− | <span id=" | + | <span id="line923">923. GEM("worthless piece of orange glass", "orange", 76, 1, 0, 6, 5, GLASS, CLR_ORANGE),</span> |
− | <span id=" | + | <span id="line924">924. GEM("worthless piece of yellow glass", "yellow", 77, 1, 0, 6, 5, GLASS, CLR_YELLOW),</span> |
− | <span id=" | + | <span id="line925">925. GEM("worthless piece of black glass", "black", 76, 1, 0, 6, 5, GLASS, CLR_BLACK),</span> |
− | <span id=" | + | <span id="line926">926. GEM("worthless piece of green glass", "green", 77, 1, 0, 6, 5, GLASS, CLR_GREEN),</span> |
− | <span id=" | + | <span id="line927">927. GEM("worthless piece of violet glass", "violet", 77, 1, 0, 6, 5, GLASS, CLR_MAGENTA),</span> |
− | <span id=" | + | <span id="line928">928. </span> |
− | <span id=" | + | <span id="line929">929. /* Placement note: there is a wishable subrange for</span> |
− | <span id=" | + | <span id="line930">930. * "gray stones" in the o_ranges[] array in objnam.c</span> |
− | <span id=" | + | <span id="line931">931. * that is currently everything between luckstones and flint (inclusive).</span> |
− | <span id=" | + | <span id="line932">932. */</span> |
− | <span id=" | + | <span id="line933">933. ROCK("luckstone", "gray", 0, 10, 10, 60, 3, 3, 1, 10, 7, MINERAL, CLR_GRAY),</span> |
− | <span id=" | + | <span id="line934">934. ROCK("loadstone", "gray", 0, 10, 500, 1, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),</span> |
− | <span id=" | + | <span id="line935">935. ROCK("touchstone", "gray", 0, 8, 10, 45, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY),</span> |
− | <span id=" | + | <span id="line936">936. ROCK("flint", "gray", 0, 10, 10, 1, 6, 6, 0, 10, 7, MINERAL, CLR_GRAY),</span> |
− | <span id=" | + | <span id="line937">937. ROCK("rock", (char *)0, 1,100, 10, 0, 3, 3, 0, 10, 7, MINERAL, CLR_GRAY),</span> |
− | <span id=" | + | <span id="line938">938. #undef GEM</span> |
− | <span id=" | + | <span id="line939">939. #undef ROCK</span> |
− | <span id=" | + | <span id="line940">940. </span> |
+ | |||
=== Miscellaneous === | === Miscellaneous === | ||
− | <span id=" | + | <span id="line941">941. /* miscellaneous ... */</span> |
− | <span id=" | + | <span id="line942">942. /* Note: boulders and rocks are not normally created at random; the</span> |
− | <span id=" | + | <span id="line943">943. * probabilities only come into effect when you try to polymorph them.</span> |
− | <span id=" | + | <span id="line944">944. * Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take</span> |
− | <span id=" | + | <span id="line945">945. * on a specific type and may act as containers (both affect weight).</span> |
− | <span id=" | + | <span id="line946">946. */</span> |
− | <span id=" | + | <span id="line947">947. OBJECT(OBJ("boulder",(char *)0), BITS(1,0,0,0,0,0,0,0,1,0,0,P_NONE,MINERAL), 0,</span> |
− | <span id=" | + | <span id="line948">948. ROCK_CLASS, 100, 0, 6000, 0, 20, 20, 0, 0, 2000, HI_MINERAL),</span> |
− | <span id=" | + | <span id="line949">949. OBJECT(OBJ("statue", (char *)0), BITS(1,0,0,1,0,0,0,0,0,0,0,P_NONE,MINERAL), 0,</span> |
− | <span id=" | + | <span id="line950">950. ROCK_CLASS, 900, 0, 2500, 0, 20, 20, 0, 0, 2500, CLR_WHITE),</span> |
− | <span id=" | + | <span id="line951">951. </span> |
− | <span id=" | + | <span id="line952">952. OBJECT(OBJ("heavy iron ball", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0,</span> |
− | <span id=" | + | <span id="line953">953. BALL_CLASS, 1000, 0, 480, 10, 25, 25, 0, 0, 200, HI_METAL),</span> |
− | <span id=" | + | <span id="line954">954. /* +d4 when "very heavy" */</span> |
− | <span id=" | + | <span id="line955">955. OBJECT(OBJ("iron chain", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0,</span> |
− | <span id=" | + | <span id="line956">956. CHAIN_CLASS, 1000, 0, 120, 0, 4, 4, 0, 0, 200, HI_METAL),</span> |
− | <span id=" | + | <span id="line957">957. /* +1 both l & s */</span> |
− | <span id=" | + | <span id="line958">958. </span> |
− | <span id=" | + | <span id="line959">959. OBJECT(OBJ("blinding venom", "splash of venom"),</span> |
− | <span id=" | + | <span id="line960">960. BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,</span> |
− | <span id=" | + | <span id="line961">961. VENOM_CLASS, 500, 0, 1, 0, 0, 0, 0, 0, 0, HI_ORGANIC),</span> |
− | <span id=" | + | <span id="line962">962. OBJECT(OBJ("acid venom", "splash of venom"),</span> |
− | <span id=" | + | <span id="line963">963. BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0,</span> |
− | <span id=" | + | <span id="line964">964. VENOM_CLASS, 500, 0, 1, 0, 6, 6, 0, 0, 0, HI_ORGANIC),</span> |
− | <span id=" | + | <span id="line965">965. /* +d6 small or large */</span> |
− | <span id=" | + | <span id="line966">966. </span> |
− | <span id=" | + | <span id="line967">967. /* fencepost, the deadly Array Terminator -- name [1st arg] *must* be NULL */</span> |
− | <span id=" | + | <span id="line968">968. OBJECT(OBJ((char *)0,(char *)0), BITS(0,0,0,0,0,0,0,0,0,0,0,P_NONE,0), 0,</span> |
− | <span id=" | + | <span id="line969">969. ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)</span> |
− | <span id=" | + | <span id="line970">970. }; /* objects[] */</span> |
− | <span id=" | + | <span id="line971">971. </span> |
− | <span id=" | + | <span id="line972">972. #ifndef OBJECTS_PASS_2_</span> |
− | <span id=" | + | <span id="line973">973. </span> |
− | <span id=" | + | <span id="line974">974. /* perform recursive compilation for second structure */</span> |
− | <span id=" | + | <span id="line975">975. # undef OBJ</span> |
− | <span id=" | + | <span id="line976">976. # undef OBJECT</span> |
− | <span id=" | + | <span id="line977">977. # define OBJECTS_PASS_2_</span> |
− | <span id=" | + | <span id="line978">978. #include "objects.c"</span> |
− | <span id=" | + | <span id="line979">979. </span> |
− | <span id=" | + | <span id="line980">980. void NDECL(objects_init);</span> |
− | <span id=" | + | <span id="line981">981. </span> |
− | <span id=" | + | <span id="line982">982. /* dummy routine used to force linkage */</span> |
− | <span id=" | + | <span id="line983">983. void</span> |
− | <span id=" | + | <span id="line984">984. objects_init()</span> |
− | <span id=" | + | <span id="line985">985. {</span> |
− | <span id=" | + | <span id="line986">986. return;</span> |
− | <span id=" | + | <span id="line987">987. }</span> |
− | <span id=" | + | <span id="line988">988. </span> |
− | <span id=" | + | <span id="line989">989. #endif /* !OBJECTS_PASS_2_ */</span> |
− | <span id=" | + | <span id="line990">990. </span> |
− | <span id=" | + | <span id="line991">991. /*objects.c*/</span> |
[[Category:Source code]] | [[Category:Source code]] |
Revision as of 15:59, 15 August 2006
Below is the full text to src/objects.c from NetHack 3.4.3. To link to a particular line, write [[objects.c#line123|objects.c#line123]], for example.
Contents
Top of file
1. /* SCCS Id: @(#)objects.c 3.4 2002/07/31 */ 2. /* Copyright (c) Mike Threepoint, 1989. */ 3. /* NetHack may be freely redistributed. See license for details. */ 4.
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.
5. #ifndef OBJECTS_PASS_2_ 6. /* first pass */ 7. struct monst { struct monst *dummy; }; /* lint: struct obj's union */ 8. #include "config.h" 9. #include "obj.h" 10. #include "objclass.h" 11. #include "prop.h" 12. #include "skills.h" 13. 14. #else /* !OBJECTS_PASS_2_ */ 15. /* second pass */ 16. #include "color.h" 17. # define COLOR_FIELD(X) X, 18. #endif /* !OBJECTS_PASS_2_ */ 19. 20. 21. /* objects have symbols: ) [ = " ( % ! ? + / $ * ` 0 _ . */ 22. 23. /* 24. * Note: OBJ() and BITS() macros are used to avoid exceeding argument 25. * limits imposed by some compilers. The ctnr field of BITS currently 26. * does not map into struct objclass, and is ignored in the expansion. 27. * The 0 in the expansion corresponds to oc_pre_discovered, which is 28. * set at run-time during role-specific character initialization. 29. */ 30.
Object macros
31. #ifndef OBJECTS_PASS_2_ 32. /* first pass -- object descriptive text */ 33. # define OBJ(name,desc) name,desc
Object name and description. The description field can be (char *)0, in which case there is no description, and only the object name is used.
34. # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \ 35. {obj} 36.
The OBJECT macro.
- obj is the OBJ macro from above.
- bits are special bitfields, see BITS macro below.
- prp is special property of the object it grants, eg. REFLECTING or LIFESAVED.
- sym is the object symbol, one of the _CLASS definitions, eg. GEM_CLASS.
- prob is the object relative random generation probability. For each object class (eg. scrolls or potions), the total of this must be 1000.
- dly is delay (in turns) it takes to use the object, eg. to wear or to take off.
- wt is object weight.
- cost is object base cost, in zorkmids.
- sdam means how much object deals damage to small monsters.
- ldam means how much object deals damage to large monsters.
- oc1 TODO
- oc2 TODO
- nut is nutrition gained when the object is eaten.
- color is the object color, as used in the TTY windowport.
37. NEARDATA struct objdescr obj_descr[] = { 38. #else 39. /* second pass -- object definitions */ 40. 41. # define BITS(nmkn,mrg,uskn,ctnr,mgc,chrg,uniq,nwsh,big,tuf,dir,sub,mtrl) \ 42. nmkn,mrg,uskn,0,mgc,chrg,uniq,nwsh,big,tuf,dir,mtrl,sub /* SCO ODT 1.1 cpp fodder */
The BITS macro. Each value is either 1 or 0.
- nmkn tells whether to use the object description or the object real name by default. (See the OBJ macro, above)
- mrg tells whether the object can be merged with similar objects or not.
- uskn "uses known"
- ctnr tells if the object is pre-discovered, ie. known at the start of the game.
- mgc tells whether the object is inherently magical or not.
- chrg tells whether the object has charges.
- uniq tells if the object is unique.
- nwsh tells whether player can wish for the object or not.
- big tells whether weapon or tool is bimanual, or whether armor is bulky.
- tuf whether gems are hard or soft.
- dir takes either NODIR, IMMEDIATE or RAY, and defines how wands behave when zapped.
- sub armor subtype (as defined in objclass.h) or skills of weapons, spellbooks, tools or gems.
- mtrl takes one of the material definitions, eg. LEATHER or IRON, as defined in objclass.h
43. # define OBJECT(obj,bits,prp,sym,prob,dly,wt,cost,sdam,ldam,oc1,oc2,nut,color) \ 44. {0, 0, (char *)0, bits, prp, sym, dly, COLOR_FIELD(color) \ 45. prob, wt, cost, sdam, ldam, oc1, oc2, nut} 46. # ifndef lint 47. # define HARDGEM(n) (n >= 8) 48. # else 49. # define HARDGEM(n) (0) 50. # endif 51. 52. NEARDATA struct objclass objects[] = { 53. #endif 54. /* dummy object[0] -- description [2nd arg] *must* be NULL */ 55. OBJECT(OBJ("strange object",(char *)0), BITS(1,0,0,0,0,0,0,0,0,0,0,P_NONE,0), 56. 0, ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), 57.
Weapons
Weapon macros
58. /* weapons ... */ 59. #define WEAPON(name,app,kn,mg,bi,prob,wt,cost,sdam,ldam,hitbon,typ,sub,metal,color) \ 60. OBJECT( \ 61. OBJ(name,app), BITS(kn,mg,1,0,0,1,0,0,bi,0,typ,sub,metal), 0, \ 62. WEAPON_CLASS, prob, 0, \ 63. wt, cost, sdam, ldam, hitbon, 0, wt, color ) 64. #define PROJECTILE(name,app,kn,prob,wt,cost,sdam,ldam,hitbon,metal,sub,color) \ 65. OBJECT( \ 66. OBJ(name,app), \ 67. BITS(kn,1,1,0,0,1,0,0,0,0,PIERCE,sub,metal), 0, \ 68. WEAPON_CLASS, prob, 0, \ 69. wt, cost, sdam, ldam, hitbon, 0, wt, color ) 70. #define BOW(name,app,kn,prob,wt,cost,hitbon,metal,sub,color) \ 71. OBJECT( \ 72. OBJ(name,app), BITS(kn,0,1,0,0,1,0,0,0,0,0,sub,metal), 0, \ 73. WEAPON_CLASS, prob, 0, \ 74. wt, cost, 2, 2, hitbon, 0, wt, color ) 75. 76. /* Note: for weapons that don't do an even die of damage (ex. 2-7 or 3-18) 77. * the extra damage is added on in weapon.c, not here! */ 78. 79. #define P PIERCE 80. #define S SLASH 81. #define B WHACK 82.
Projectiles
83. /* missiles */ 84. PROJECTILE("arrow", (char *)0, 85. 1, 55, 1, 2, 6, 6, 0, IRON, -P_BOW, HI_METAL), 86. PROJECTILE("elven arrow", "runed arrow", 87. 0, 20, 1, 2, 7, 6, 0, WOOD, -P_BOW, HI_WOOD), 88. PROJECTILE("orcish arrow", "crude arrow", 89. 0, 20, 1, 2, 5, 6, 0, IRON, -P_BOW, CLR_BLACK), 90. PROJECTILE("silver arrow", (char *)0, 91. 1, 12, 1, 5, 6, 6, 0, SILVER, -P_BOW, HI_SILVER), 92. PROJECTILE("ya", "bamboo arrow", 93. 0, 15, 1, 4, 7, 7, 1, METAL, -P_BOW, HI_METAL), 94. PROJECTILE("crossbow bolt", (char *)0, 95. 1, 55, 1, 2, 4, 6, 0, IRON, -P_CROSSBOW, HI_METAL), 96. 97. WEAPON("dart", (char *)0, 98. 1, 1, 0, 60, 1, 2, 3, 2, 0, P, -P_DART, IRON, HI_METAL), 99. WEAPON("shuriken", "throwing star", 100. 0, 1, 0, 35, 1, 5, 8, 6, 2, P, -P_SHURIKEN, IRON, HI_METAL), 101. WEAPON("boomerang", (char *)0, 102. 1, 1, 0, 15, 5, 20, 9, 9, 0, 0, -P_BOOMERANG, WOOD, HI_WOOD), 103.
Spears
104. /* spears */ 105. WEAPON("spear", (char *)0, 106. 1, 1, 0, 50, 30, 3, 6, 8, 0, P, P_SPEAR, IRON, HI_METAL), 107. WEAPON("elven spear", "runed spear", 108. 0, 1, 0, 10, 30, 3, 7, 8, 0, P, P_SPEAR, WOOD, HI_WOOD), 109. WEAPON("orcish spear", "crude spear", 110. 0, 1, 0, 13, 30, 3, 5, 8, 0, P, P_SPEAR, IRON, CLR_BLACK), 111. WEAPON("dwarvish spear", "stout spear", 112. 0, 1, 0, 12, 35, 3, 8, 8, 0, P, P_SPEAR, IRON, HI_METAL), 113. WEAPON("silver spear", (char *)0, 114. 1, 1, 0, 2, 36, 40, 6, 8, 0, P, P_SPEAR, SILVER, HI_SILVER), 115. WEAPON("javelin", "throwing spear", 116. 0, 1, 0, 10, 20, 3, 6, 6, 0, P, P_JAVELIN, IRON, HI_METAL), 117. 118. WEAPON("trident", (char *)0, 119. 1, 0, 0, 8, 25, 5, 6, 4, 0, P, P_TRIDENT, IRON, HI_METAL), 120. /* +1 small, +2d4 large */ 121.
Blades
122. /* blades */ 123. WEAPON("dagger", (char *)0, 124. 1, 1, 0, 30, 10, 4, 4, 3, 2, P, P_DAGGER, IRON, HI_METAL), 125. WEAPON("elven dagger", "runed dagger", 126. 0, 1, 0, 10, 10, 4, 5, 3, 2, P, P_DAGGER, WOOD, HI_WOOD), 127. WEAPON("orcish dagger", "crude dagger", 128. 0, 1, 0, 12, 10, 4, 3, 3, 2, P, P_DAGGER, IRON, CLR_BLACK), 129. WEAPON("silver dagger", (char *)0, 130. 1, 1, 0, 3, 12, 40, 4, 3, 2, P, P_DAGGER, SILVER, HI_SILVER), 131. WEAPON("athame", (char *)0, 132. 1, 1, 0, 0, 10, 4, 4, 3, 2, S, P_DAGGER, IRON, HI_METAL), 133. WEAPON("scalpel", (char *)0, 134. 1, 1, 0, 0, 5, 6, 3, 3, 2, S, P_KNIFE, METAL, HI_METAL), 135. WEAPON("knife", (char *)0, 136. 1, 1, 0, 20, 5, 4, 3, 2, 0, P|S, P_KNIFE, IRON, HI_METAL), 137. WEAPON("stiletto", (char *)0, 138. 1, 1, 0, 5, 5, 4, 3, 2, 0, P|S, P_KNIFE, IRON, HI_METAL), 139. WEAPON("worm tooth", (char *)0, 140. 1, 0, 0, 0, 20, 2, 2, 2, 0, 0, P_KNIFE, 0, CLR_WHITE), 141. WEAPON("crysknife", (char *)0, 142. 1, 0, 0, 0, 20,100, 10, 10, 3, P, P_KNIFE, MINERAL, CLR_WHITE), 143. 144. WEAPON("axe", (char *)0, 145. 1, 0, 0, 40, 60, 8, 6, 4, 0, S, P_AXE, IRON, HI_METAL), 146. WEAPON("battle-axe", "double-headed axe", 147. 0, 0, 1, 10,120, 40, 8, 6, 0, S, P_AXE, IRON, HI_METAL), 148. /* "double-bitted" ? */ 149.
Swords
150. /* swords */ 151. WEAPON("short sword", (char *)0, 152. 1, 0, 0, 8, 30, 10, 6, 8, 0, P, P_SHORT_SWORD, IRON, HI_METAL), 153. WEAPON("elven short sword", "runed short sword", 154. 0, 0, 0, 2, 30, 10, 8, 8, 0, P, P_SHORT_SWORD, WOOD, HI_WOOD), 155. WEAPON("orcish short sword", "crude short sword", 156. 0, 0, 0, 3, 30, 10, 5, 8, 0, P, P_SHORT_SWORD, IRON, CLR_BLACK), 157. WEAPON("dwarvish short sword", "broad short sword", 158. 0, 0, 0, 2, 30, 10, 7, 8, 0, P, P_SHORT_SWORD, IRON, HI_METAL), 159. WEAPON("scimitar", "curved sword", 160. 0, 0, 0, 15, 40, 15, 8, 8, 0, S, P_SCIMITAR, IRON, HI_METAL), 161. WEAPON("silver saber", (char *)0, 162. 1, 0, 0, 6, 40, 75, 8, 8, 0, S, P_SABER, SILVER, HI_SILVER), 163. WEAPON("broadsword", (char *)0, 164. 1, 0, 0, 8, 70, 10, 4, 6, 0, S, P_BROAD_SWORD, IRON, HI_METAL), 165. /* +d4 small, +1 large */ 166. WEAPON("elven broadsword", "runed broadsword", 167. 0, 0, 0, 4, 70, 10, 6, 6, 0, S, P_BROAD_SWORD, WOOD, HI_WOOD), 168. /* +d4 small, +1 large */ 169. WEAPON("long sword", (char *)0, 170. 1, 0, 0, 50, 40, 15, 8, 12, 0, S, P_LONG_SWORD, IRON, HI_METAL), 171. WEAPON("two-handed sword", (char *)0, 172. 1, 0, 1, 22,150, 50, 12, 6, 0, S, P_TWO_HANDED_SWORD, IRON, HI_METAL), 173. /* +2d6 large */ 174. WEAPON("katana", "samurai sword", 175. 0, 0, 0, 4, 40, 80, 10, 12, 1, S, P_LONG_SWORD, IRON, HI_METAL), 176. /* special swords set up for artifacts */ 177. WEAPON("tsurugi", "long samurai sword", 178. 0, 0, 1, 0, 60,500, 16, 8, 2, S, P_TWO_HANDED_SWORD, METAL, HI_METAL), 179. /* +2d6 large */ 180. WEAPON("runesword", "runed broadsword", 181. 0, 0, 0, 0, 40,300, 4, 6, 0, S, P_BROAD_SWORD, IRON, CLR_BLACK), 182. /* +d4 small, +1 large */ 183. /* +5d2 +d8 from level drain */ 184.
Polearms
185. /* polearms */ 186. /* spear-type */ 187. WEAPON("partisan", "vulgar polearm", 188. 0, 0, 1, 5, 80, 10, 6, 6, 0, P, P_POLEARMS, IRON, HI_METAL), 189. /* +1 large */ 190. WEAPON("ranseur", "hilted polearm", 191. 0, 0, 1, 5, 50, 6, 4, 4, 0, P, P_POLEARMS, IRON, HI_METAL), 192. /* +d4 both */ 193. WEAPON("spetum", "forked polearm", 194. 0, 0, 1, 5, 50, 5, 6, 6, 0, P, P_POLEARMS, IRON, HI_METAL), 195. /* +1 small, +d6 large */ 196. WEAPON("glaive", "single-edged polearm", 197. 0, 0, 1, 8, 75, 6, 6, 10, 0, S, P_POLEARMS, IRON, HI_METAL), 198. WEAPON("lance", (char *)0, 199. 1, 0, 0, 4,180, 10, 6, 8, 0, P, P_LANCE, IRON, HI_METAL), 200. /* axe-type */ 201. WEAPON("halberd", "angled poleaxe", 202. 0, 0, 1, 8,150, 10, 10, 6, 0, P|S, P_POLEARMS, IRON, HI_METAL), 203. /* +1d6 large */ 204. WEAPON("bardiche", "long poleaxe", 205. 0, 0, 1, 4,120, 7, 4, 4, 0, S, P_POLEARMS, IRON, HI_METAL), 206. /* +1d4 small, +2d4 large */ 207. WEAPON("voulge", "pole cleaver", 208. 0, 0, 1, 4,125, 5, 4, 4, 0, S, P_POLEARMS, IRON, HI_METAL), 209. /* +d4 both */ 210. WEAPON("dwarvish mattock", "broad pick", 211. 0, 0, 1, 13,120, 50, 12, 8,-1, B, P_PICK_AXE, IRON, HI_METAL), 212. 213. /* curved/hooked */ 214. WEAPON("fauchard", "pole sickle", 215. 0, 0, 1, 6, 60, 5, 6, 8, 0, P|S, P_POLEARMS, IRON, HI_METAL), 216. WEAPON("guisarme", "pruning hook", 217. 0, 0, 1, 6, 80, 5, 4, 8, 0, S, P_POLEARMS, IRON, HI_METAL), 218. /* +1d4 small */ 219. WEAPON("bill-guisarme", "hooked polearm", 220. 0, 0, 1, 4,120, 7, 4, 10, 0, P|S, P_POLEARMS, IRON, HI_METAL), 221. /* +1d4 small */ 222. /* other */ 223. WEAPON("lucern hammer", "pronged polearm", 224. 0, 0, 1, 5,150, 7, 4, 6, 0, B|P, P_POLEARMS, IRON, HI_METAL), 225. /* +1d4 small */ 226. WEAPON("bec de corbin", "beaked polearm", 227. 0, 0, 1, 4,100, 8, 8, 6, 0, B|P, P_POLEARMS, IRON, HI_METAL), 228.
Bludgeoning weapons
229. /* bludgeons */ 230. WEAPON("mace", (char *)0, 231. 1, 0, 0, 40, 30, 5, 6, 6, 0, B, P_MACE, IRON, HI_METAL), 232. /* +1 small */ 233. WEAPON("morning star", (char *)0, 234. 1, 0, 0, 12,120, 10, 4, 6, 0, B, P_MORNING_STAR, IRON, HI_METAL), 235. /* +d4 small, +1 large */ 236. WEAPON("war hammer", (char *)0, 237. 1, 0, 0, 15, 50, 5, 4, 4, 0, B, P_HAMMER, IRON, HI_METAL), 238. /* +1 small */ 239. WEAPON("club", (char *)0, 240. 1, 0, 0, 12, 30, 3, 6, 3, 0, B, P_CLUB, WOOD, HI_WOOD), 241. #ifdef KOPS 242. WEAPON("rubber hose", (char *)0, 243. 1, 0, 0, 0, 20, 3, 4, 3, 0, B, P_WHIP, PLASTIC, CLR_BROWN), 244. #endif 245. WEAPON("quarterstaff", "staff", 246. 0, 0, 1, 11, 40, 5, 6, 6, 0, B, P_QUARTERSTAFF, WOOD, HI_WOOD), 247. /* two-piece */ 248. WEAPON("aklys", "thonged club", 249. 0, 0, 0, 8, 15, 4, 6, 3, 0, B, P_CLUB, IRON, HI_METAL), 250. WEAPON("flail", (char *)0, 251. 1, 0, 0, 40, 15, 4, 6, 4, 0, B, P_FLAIL, IRON, HI_METAL), 252. /* +1 small, +1d4 large */
Miscellaneous weaponry
253. /* misc */ 254. WEAPON("bullwhip", (char *)0, 255. 1, 0, 0, 2, 20, 4, 2, 1, 0, 0, P_WHIP, LEATHER, CLR_BROWN), 256. 257. /* bows */ 258. BOW("bow", (char *)0, 1, 24, 30, 60, 0, WOOD, P_BOW, HI_WOOD), 259. BOW("elven bow", "runed bow", 0, 12, 30, 60, 0, WOOD, P_BOW, HI_WOOD), 260. BOW("orcish bow", "crude bow", 0, 12, 30, 60, 0, WOOD, P_BOW, CLR_BLACK), 261. BOW("yumi", "long bow", 0, 0, 30, 60, 0, WOOD, P_BOW, HI_WOOD), 262. BOW("sling", (char *)0, 1, 40, 3, 20, 0, LEATHER, P_SLING, HI_LEATHER), 263. BOW("crossbow", (char *)0, 1, 45, 50, 40, 0, WOOD, P_CROSSBOW, HI_WOOD), 264. 265. #undef P 266. #undef S 267. #undef B 268. 269. #undef WEAPON 270. #undef PROJECTILE 271. #undef BOW 272.
Armor
Armor macros
273. /* armor ... */ 274. /* IRON denotes ferrous metals, including steel. 275. * Only IRON weapons and armor can rust. 276. * Only COPPER (including brass) corrodes. 277. * Some creatures are vulnerable to SILVER. 278. */ 279. #define ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,sub,metal,c) \ 280. OBJECT( \ 281. OBJ(name,desc), BITS(kn,0,1,0,mgc,1,0,0,blk,0,0,sub,metal), power, \ 282. ARMOR_CLASS, prob, delay, wt, cost, \ 283. 0, 0, 10 - ac, can, wt, c ) 284. #define HELM(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \ 285. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_HELM,metal,c) 286. #define CLOAK(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \ 287. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_CLOAK,metal,c) 288. #define SHIELD(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,metal,c) \ 289. ARMOR(name,desc,kn,mgc,blk,power,prob,delay,wt,cost,ac,can,ARM_SHIELD,metal,c) 290. #define GLOVES(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \ 291. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_GLOVES,metal,c) 292. #define BOOTS(name,desc,kn,mgc,power,prob,delay,wt,cost,ac,can,metal,c) \ 293. ARMOR(name,desc,kn,mgc,0,power,prob,delay,wt,cost,ac,can,ARM_BOOTS,metal,c) 294.
Helmets
295. /* helmets */ 296. HELM("elven leather helm", "leather hat", 297. 0, 0, 0, 6, 1, 3, 8, 9, 0, LEATHER, HI_LEATHER), 298. HELM("orcish helm", "iron skull cap", 299. 0, 0, 0, 6, 1, 30, 10, 9, 0, IRON, CLR_BLACK), 300. HELM("dwarvish iron helm", "hard hat", 301. 0, 0, 0, 6, 1, 40, 20, 8, 0, IRON, HI_METAL), 302. HELM("fedora", (char *)0, 303. 1, 0, 0, 0, 0, 3, 1,10, 0, CLOTH, CLR_BROWN), 304. HELM("cornuthaum", "conical hat", 305. 0, 1, CLAIRVOYANT, 306. 3, 1, 4, 80,10, 2, CLOTH, CLR_BLUE), 307. HELM("dunce cap", "conical hat", 308. 0, 1, 0, 3, 1, 4, 1,10, 0, CLOTH, CLR_BLUE), 309. HELM("dented pot", (char *)0, 310. 1, 0, 0, 2, 0, 10, 8, 9, 0, IRON, CLR_BLACK), 311. /* With shuffled appearances... */ 312. HELM("helmet", "plumed helmet", 313. 0, 0, 0, 10, 1, 30, 10, 9, 0, IRON, HI_METAL), 314. HELM("helm of brilliance", "etched helmet", 315. 0, 1, 0, 6, 1, 50, 50, 9, 0, IRON, CLR_GREEN), 316. HELM("helm of opposite alignment", "crested helmet", 317. 0, 1, 0, 6, 1, 50, 50, 9, 0, IRON, HI_METAL), 318. HELM("helm of telepathy", "visored helmet", 319. 0, 1, TELEPAT, 2, 1, 50, 50, 9, 0, IRON, HI_METAL), 320.
Body armor
321. /* suits of armor */ 322. /* 323. * There is code in polyself.c that assumes (1) and (2). 324. * There is code in obj.h, objnam.c, mon.c, read.c that assumes (2). 325. * 326. * (1) The dragon scale mails and the dragon scales are together. 327. * (2) That the order of the dragon scale mail and dragon scales is the 328. * the same defined in monst.c. 329. */ 330. #define DRGN_ARMR(name,mgc,power,cost,ac,color) \ 331. ARMOR(name,(char *)0,1,mgc,1,power,0,5,40,cost,ac,0,ARM_SUIT,DRAGON_HIDE,color) 332. /* 3.4.1: dragon scale mail reclassified as "magic" since magic is 333. needed to create them */ 334. DRGN_ARMR("gray dragon scale mail", 1, ANTIMAGIC, 1200, 1, CLR_GRAY), 335. DRGN_ARMR("silver dragon scale mail", 1, REFLECTING, 1200, 1, DRAGON_SILVER), 336. #if 0 /* DEFERRED */ 337. DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN), 338. #endif 339. DRGN_ARMR("red dragon scale mail", 1, FIRE_RES, 900, 1, CLR_RED), 340. DRGN_ARMR("white dragon scale mail", 1, COLD_RES, 900, 1, CLR_WHITE), 341. DRGN_ARMR("orange dragon scale mail", 1, SLEEP_RES, 900, 1, CLR_ORANGE), 342. DRGN_ARMR("black dragon scale mail", 1, DISINT_RES, 1200, 1, CLR_BLACK), 343. DRGN_ARMR("blue dragon scale mail", 1, SHOCK_RES, 900, 1, CLR_BLUE), 344. DRGN_ARMR("green dragon scale mail", 1, POISON_RES, 900, 1, CLR_GREEN), 345. DRGN_ARMR("yellow dragon scale mail", 1, ACID_RES, 900, 1, CLR_YELLOW), 346. 347. /* For now, only dragons leave these. */ 348. /* 3.4.1: dragon scales left classified as "non-magic"; they confer 349. magical properties but are produced "naturally" */ 350. DRGN_ARMR("gray dragon scales", 0, ANTIMAGIC, 700, 7, CLR_GRAY), 351. DRGN_ARMR("silver dragon scales", 0, REFLECTING, 700, 7, DRAGON_SILVER), 352. #if 0 /* DEFERRED */ 353. DRGN_ARMR("shimmering dragon scales", 0, DISPLACED, 700, 7, CLR_CYAN), 354. #endif 355. DRGN_ARMR("red dragon scales", 0, FIRE_RES, 500, 7, CLR_RED), 356. DRGN_ARMR("white dragon scales", 0, COLD_RES, 500, 7, CLR_WHITE), 357. DRGN_ARMR("orange dragon scales", 0, SLEEP_RES, 500, 7, CLR_ORANGE), 358. DRGN_ARMR("black dragon scales", 0, DISINT_RES, 700, 7, CLR_BLACK), 359. DRGN_ARMR("blue dragon scales", 0, SHOCK_RES, 500, 7, CLR_BLUE), 360. DRGN_ARMR("green dragon scales", 0, POISON_RES, 500, 7, CLR_GREEN), 361. DRGN_ARMR("yellow dragon scales", 0, ACID_RES, 500, 7, CLR_YELLOW), 362. #undef DRGN_ARMR 363. 364. ARMOR("plate mail", (char *)0, 365. 1, 0, 1, 0, 44, 5, 450, 600, 3, 2, ARM_SUIT, IRON, HI_METAL), 366. ARMOR("crystal plate mail", (char *)0, 367. 1, 0, 1, 0, 10, 5, 450, 820, 3, 2, ARM_SUIT, GLASS, CLR_WHITE), 368. #ifdef TOURIST 369. ARMOR("bronze plate mail", (char *)0, 370. 1, 0, 1, 0, 25, 5, 450, 400, 4, 0, ARM_SUIT, COPPER, HI_COPPER), 371. #else 372. ARMOR("bronze plate mail", (char *)0, 373. 1, 0, 1, 0, 35, 5, 450, 400, 4, 0, ARM_SUIT, COPPER, HI_COPPER), 374. #endif 375. ARMOR("splint mail", (char *)0, 376. 1, 0, 1, 0, 62, 5, 400, 80, 4, 1, ARM_SUIT, IRON, HI_METAL), 377. ARMOR("banded mail", (char *)0, 378. 1, 0, 1, 0, 72, 5, 350, 90, 4, 0, ARM_SUIT, IRON, HI_METAL), 379. ARMOR("dwarvish mithril-coat", (char *)0, 380. 1, 0, 0, 0, 10, 1, 150, 240, 4, 3, ARM_SUIT, MITHRIL, HI_METAL), 381. ARMOR("elven mithril-coat", (char *)0, 382. 1, 0, 0, 0, 15, 1, 150, 240, 5, 3, ARM_SUIT, MITHRIL, HI_METAL), 383. ARMOR("chain mail", (char *)0, 384. 1, 0, 0, 0, 72, 5, 300, 75, 5, 1, ARM_SUIT, IRON, HI_METAL), 385. ARMOR("orcish chain mail", "crude chain mail", 386. 0, 0, 0, 0, 20, 5, 300, 75, 6, 1, ARM_SUIT, IRON, CLR_BLACK), 387. ARMOR("scale mail", (char *)0, 388. 1, 0, 0, 0, 72, 5, 250, 45, 6, 0, ARM_SUIT, IRON, HI_METAL), 389. ARMOR("studded leather armor", (char *)0, 390. 1, 0, 0, 0, 72, 3, 200, 15, 7, 1, ARM_SUIT, LEATHER, HI_LEATHER), 391. ARMOR("ring mail", (char *)0, 392. 1, 0, 0, 0, 72, 5, 250, 100, 7, 0, ARM_SUIT, IRON, HI_METAL), 393. ARMOR("orcish ring mail", "crude ring mail", 394. 0, 0, 0, 0, 20, 5, 250, 80, 8, 1, ARM_SUIT, IRON, CLR_BLACK), 395. ARMOR("leather armor", (char *)0, 396. 1, 0, 0, 0, 82, 3, 150, 5, 8, 0, ARM_SUIT, LEATHER, HI_LEATHER), 397. ARMOR("leather jacket", (char *)0, 398. 1, 0, 0, 0, 12, 0, 30, 10, 9, 0, ARM_SUIT, LEATHER, CLR_BLACK), 399. 400. #ifdef TOURIST 401. /* shirts */ 402. ARMOR("Hawaiian shirt", (char *)0, 403. 1, 0, 0, 0, 8, 0, 5, 3, 10, 0, ARM_SHIRT, CLOTH, CLR_MAGENTA), 404. ARMOR("T-shirt", (char *)0, 405. 1, 0, 0, 0, 2, 0, 5, 2, 10, 0, ARM_SHIRT, CLOTH, CLR_WHITE), 406. #endif 407.
Cloaks
408. /* cloaks */ 409. /* 'cope' is not a spelling mistake... leave it be */ 410. CLOAK("mummy wrapping", (char *)0, 411. 1, 0, 0, 0, 0, 3, 2, 10, 1, CLOTH, CLR_GRAY), 412. CLOAK("elven cloak", "faded pall", 413. 0, 1, STEALTH, 8, 0, 10, 60, 9, 3, CLOTH, CLR_BLACK), 414. CLOAK("orcish cloak", "coarse mantelet", 415. 0, 0, 0, 8, 0, 10, 40, 10, 2, CLOTH, CLR_BLACK), 416. CLOAK("dwarvish cloak", "hooded cloak", 417. 0, 0, 0, 8, 0, 10, 50, 10, 2, CLOTH, HI_CLOTH), 418. CLOAK("oilskin cloak", "slippery cloak", 419. 0, 0, 0, 8, 0, 10, 50, 9, 3, CLOTH, HI_CLOTH), 420. CLOAK("robe", (char *)0, 421. 1, 1, 0, 3, 0, 15, 50, 8, 3, CLOTH, CLR_RED), 422. CLOAK("alchemy smock", "apron", 423. 0, 1, POISON_RES, 9, 0, 10, 50, 9, 1, CLOTH, CLR_WHITE), 424. CLOAK("leather cloak", (char *)0, 425. 1, 0, 0, 8, 0, 15, 40, 9, 1, LEATHER, CLR_BROWN), 426. /* With shuffled appearances... */ 427. CLOAK("cloak of protection", "tattered cape", 428. 0, 1, PROTECTION, 9, 0, 10, 50, 7, 3, CLOTH, HI_CLOTH), 429. CLOAK("cloak of invisibility", "opera cloak", 430. 0, 1, INVIS, 10, 0, 10, 60, 9, 2, CLOTH, CLR_BRIGHT_MAGENTA), 431. CLOAK("cloak of magic resistance", "ornamental cope", 432. 0, 1, ANTIMAGIC, 2, 0, 10, 60, 9, 3, CLOTH, CLR_WHITE), 433. CLOAK("cloak of displacement", "piece of cloth", 434. 0, 1, DISPLACED, 10, 0, 10, 50, 9, 2, CLOTH, HI_CLOTH), 435.
Shields
436. /* shields */ 437. SHIELD("small shield", (char *)0, 438. 1, 0, 0, 0, 6, 0, 30, 3, 9, 0, WOOD, HI_WOOD), 439. SHIELD("elven shield", "blue and green shield", 440. 0, 0, 0, 0, 2, 0, 40, 7, 8, 0, WOOD, CLR_GREEN), 441. SHIELD("Uruk-hai shield", "white-handed shield", 442. 0, 0, 0, 0, 2, 0, 50, 7, 9, 0, IRON, HI_METAL), 443. SHIELD("orcish shield", "red-eyed shield", 444. 0, 0, 0, 0, 2, 0, 50, 7, 9, 0, IRON, CLR_RED), 445. SHIELD("large shield", (char *)0, 446. 1, 0, 1, 0, 7, 0,100, 10, 8, 0, IRON, HI_METAL), 447. SHIELD("dwarvish roundshield", "large round shield", 448. 0, 0, 0, 0, 4, 0,100, 10, 8, 0, IRON, HI_METAL), 449. SHIELD("shield of reflection", "polished silver shield", 450. 0, 1, 0, REFLECTING, 3, 0, 50, 50, 8, 0, SILVER, HI_SILVER), 451.
Gloves
452. /* gloves */ 453. /* these have their color but not material shuffled, so the IRON must stay 454. * CLR_BROWN (== HI_LEATHER) 455. */ 456. GLOVES("leather gloves", "old gloves", 457. 0, 0, 0, 16, 1, 10, 8, 9, 0, LEATHER, HI_LEATHER), 458. GLOVES("gauntlets of fumbling", "padded gloves", 459. 0, 1, FUMBLING, 8, 1, 10, 50, 9, 0, LEATHER, HI_LEATHER), 460. GLOVES("gauntlets of power", "riding gloves", 461. 0, 1, 0, 8, 1, 30, 50, 9, 0, IRON, CLR_BROWN), 462. GLOVES("gauntlets of dexterity", "fencing gloves", 463. 0, 1, 0, 8, 1, 10, 50, 9, 0, LEATHER, HI_LEATHER), 464.
Boots
465. /* boots */ 466. BOOTS("low boots", "walking shoes", 467. 0, 0, 0, 25, 2, 10, 8, 9, 0, LEATHER, HI_LEATHER), 468. BOOTS("iron shoes", "hard shoes", 469. 0, 0, 0, 7, 2, 50, 16, 8, 0, IRON, HI_METAL), 470. BOOTS("high boots", "jackboots", 471. 0, 0, 0, 15, 2, 20, 12, 8, 0, LEATHER, HI_LEATHER), 472. /* With shuffled appearances... */ 473. BOOTS("speed boots", "combat boots", 474. 0, 1, FAST, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER), 475. BOOTS("water walking boots", "jungle boots", 476. 0, 1, WWALKING, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER), 477. BOOTS("jumping boots", "hiking boots", 478. 0, 1, JUMPING, 12, 2, 20, 50, 9, 0, LEATHER, HI_LEATHER), 479. BOOTS("elven boots", "mud boots", 480. 0, 1, STEALTH, 12, 2, 15, 8, 9, 0, LEATHER, HI_LEATHER), 481. BOOTS("kicking boots", "buckled boots", 482. 0, 1, 0, 12, 2, 15, 8, 9, 0, IRON, CLR_BROWN), 483. BOOTS("fumble boots", "riding boots", 484. 0, 1, FUMBLING, 12, 2, 20, 30, 9, 0, LEATHER, HI_LEATHER), 485. BOOTS("levitation boots", "snow boots", 486. 0, 1, LEVITATION,12, 2, 15, 30, 9, 0, LEATHER, HI_LEATHER), 487. #undef HELM 488. #undef CLOAK 489. #undef SHIELD 490. #undef GLOVES 491. #undef BOOTS 492. #undef ARMOR 493.
Rings
494. /* rings ... */ 495. #define RING(name,power,stone,cost,mgc,spec,mohs,metal,color) OBJECT( \ 496. OBJ(name,stone), \ 497. BITS(0,0,spec,0,mgc,spec,0,0,0,HARDGEM(mohs),0,P_NONE,metal), \ 498. power, RING_CLASS, 0, 0, 3, cost, 0, 0, 0, 0, 15, color ) 499. RING("adornment", ADORNED, "wooden", 100, 1, 1, 2, WOOD, HI_WOOD), 500. RING("gain strength", 0, "granite", 150, 1, 1, 7, MINERAL, HI_MINERAL), 501. RING("gain constitution", 0, "opal", 150, 1, 1, 7, MINERAL, HI_MINERAL), 502. RING("increase accuracy", 0, "clay", 150, 1, 1, 4, MINERAL, CLR_RED), 503. RING("increase damage", 0, "coral", 150, 1, 1, 4, MINERAL, CLR_ORANGE), 504. RING("protection", PROTECTION, "black onyx",100, 1, 1, 7, MINERAL, CLR_BLACK), 505. RING("regeneration", REGENERATION, "moonstone", 506. 200, 1, 0, 6, MINERAL, HI_MINERAL), 507. RING("searching", SEARCHING, "tiger eye", 200, 1, 0, 6, GEMSTONE, CLR_BROWN), 508. RING("stealth", STEALTH, "jade", 100, 1, 0, 6, GEMSTONE, CLR_GREEN), 509. RING("sustain ability", FIXED_ABIL, "bronze", 510. 100, 1, 0, 4, COPPER, HI_COPPER), 511. RING("levitation", LEVITATION, "agate", 200, 1, 0, 7, GEMSTONE, CLR_RED), 512. RING("hunger", HUNGER, "topaz", 100, 1, 0, 8, GEMSTONE, CLR_CYAN), 513. RING("aggravate monster", AGGRAVATE_MONSTER, "sapphire", 514. 150, 1, 0, 9, GEMSTONE, CLR_BLUE), 515. RING("conflict", CONFLICT, "ruby", 300, 1, 0, 9, GEMSTONE, CLR_RED), 516. RING("warning", WARNING, "diamond", 100, 1, 0,10, GEMSTONE, CLR_WHITE), 517. RING("poison resistance", POISON_RES, "pearl", 518. 150, 1, 0, 4, IRON, CLR_WHITE), 519. RING("fire resistance", FIRE_RES, "iron", 200, 1, 0, 5, IRON, HI_METAL), 520. RING("cold resistance", COLD_RES, "brass", 150, 1, 0, 4, COPPER, HI_COPPER), 521. RING("shock resistance", SHOCK_RES, "copper", 522. 150, 1, 0, 3, COPPER, HI_COPPER), 523. RING("free action", FREE_ACTION, "twisted", 524. 200, 1, 0, 6, IRON, HI_METAL), 525. RING("slow digestion", SLOW_DIGESTION, "steel", 526. 200, 1, 0, 8, IRON, HI_METAL), 527. RING("teleportation", TELEPORT, "silver", 200, 1, 0, 3, SILVER, HI_SILVER), 528. RING("teleport control", TELEPORT_CONTROL, "gold", 529. 300, 1, 0, 3, GOLD, HI_GOLD), 530. RING("polymorph", POLYMORPH, "ivory", 300, 1, 0, 4, BONE, CLR_WHITE), 531. RING("polymorph control", POLYMORPH_CONTROL, "emerald", 532. 300, 1, 0, 8, GEMSTONE, CLR_BRIGHT_GREEN), 533. RING("invisibility", INVIS, "wire", 150, 1, 0, 5, IRON, HI_METAL), 534. RING("see invisible", SEE_INVIS, "engagement", 535. 150, 1, 0, 5, IRON, HI_METAL), 536. RING("protection from shape changers", PROT_FROM_SHAPE_CHANGERS, "shiny", 537. 100, 1, 0, 5, IRON, CLR_BRIGHT_CYAN), 538. #undef RING 539.
Amulets
540. /* amulets ... - THE Amulet comes last because it is special */ 541. #define AMULET(name,desc,power,prob) OBJECT( \ 542. OBJ(name,desc), BITS(0,0,0,0,1,0,0,0,0,0,0,P_NONE,IRON), power, \ 543. AMULET_CLASS, prob, 0, 20, 150, 0, 0, 0, 0, 20, HI_METAL ) 544. 545. AMULET("amulet of ESP", "circular", TELEPAT, 175), 546. AMULET("amulet of life saving", "spherical", LIFESAVED, 75), 547. AMULET("amulet of strangulation", "oval", STRANGLED, 135), 548. AMULET("amulet of restful sleep", "triangular", SLEEPING, 135), 549. AMULET("amulet versus poison", "pyramidal", POISON_RES, 165), 550. AMULET("amulet of change", "square", 0, 130), 551. /* POLYMORPH */ 552. AMULET("amulet of unchanging", "concave", UNCHANGING, 45), 553. AMULET("amulet of reflection", "hexagonal", REFLECTING, 75), 554. AMULET("amulet of magical breathing", "octagonal", MAGICAL_BREATHING, 65), 555. OBJECT(OBJ("cheap plastic imitation of the Amulet of Yendor", 556. "Amulet of Yendor"), BITS(0,0,1,0,0,0,0,0,0,0,0,0,PLASTIC), 0, 557. AMULET_CLASS, 0, 0, 20, 0, 0, 0, 0, 0, 1, HI_METAL), 558. OBJECT(OBJ("Amulet of Yendor", /* note: description == name */ 559. "Amulet of Yendor"), BITS(0,0,1,0,1,0,1,1,0,0,0,0,MITHRIL), 0, 560. AMULET_CLASS, 0, 0, 20, 30000, 0, 0, 0, 0, 20, HI_METAL), 561. #undef AMULET 562.
Tools
563. /* tools ... */ 564. /* tools with weapon characteristics come last */ 565. #define TOOL(name,desc,kn,mrg,mgc,chg,prob,wt,cost,mat,color) \ 566. OBJECT( OBJ(name,desc), \ 567. BITS(kn,mrg,chg,0,mgc,chg,0,0,0,0,0,P_NONE,mat), \ 568. 0, TOOL_CLASS, prob, 0, \ 569. wt, cost, 0, 0, 0, 0, wt, color ) 570. #define CONTAINER(name,desc,kn,mgc,chg,prob,wt,cost,mat,color) \ 571. OBJECT( OBJ(name,desc), \ 572. BITS(kn,0,chg,1,mgc,chg,0,0,0,0,0,P_NONE,mat), \ 573. 0, TOOL_CLASS, prob, 0, \ 574. wt, cost, 0, 0, 0, 0, wt, color ) 575. #define WEPTOOL(name,desc,kn,mgc,bi,prob,wt,cost,sdam,ldam,hitbon,sub,mat,clr) \ 576. OBJECT( OBJ(name,desc), \ 577. BITS(kn,0,1,0,mgc,1,0,0,bi,0,hitbon,sub,mat), \ 578. 0, TOOL_CLASS, prob, 0, \ 579. wt, cost, sdam, ldam, hitbon, 0, wt, clr ) 580. /* containers */ 581. CONTAINER("large box", (char *)0, 1, 0, 0, 40,350, 8, WOOD, HI_WOOD), 582. CONTAINER("chest", (char *)0, 1, 0, 0, 35,600, 16, WOOD, HI_WOOD), 583. CONTAINER("ice box", (char *)0, 1, 0, 0, 5,900, 42, PLASTIC, CLR_WHITE), 584. CONTAINER("sack", "bag", 0, 0, 0, 35, 15, 2, CLOTH, HI_CLOTH), 585. CONTAINER("oilskin sack", "bag", 0, 0, 0, 5, 15, 100, CLOTH, HI_CLOTH), 586. CONTAINER("bag of holding", "bag", 0, 1, 0, 20, 15, 100, CLOTH, HI_CLOTH), 587. CONTAINER("bag of tricks", "bag", 0, 1, 1, 20, 15, 100, CLOTH, HI_CLOTH), 588. #undef CONTAINER 589. 590. /* lock opening tools */ 591. TOOL("skeleton key", "key", 0, 0, 0, 0, 80, 3, 10, IRON, HI_METAL), 592. #ifdef TOURIST 593. TOOL("lock pick", (char *)0, 1, 0, 0, 0, 60, 4, 20, IRON, HI_METAL), 594. TOOL("credit card", (char *)0, 1, 0, 0, 0, 15, 1, 10, PLASTIC, CLR_WHITE), 595. #else 596. TOOL("lock pick", (char *)0, 1, 0, 0, 0, 75, 4, 20, IRON, HI_METAL), 597. #endif 598. /* light sources */ 599. TOOL("tallow candle", "candle", 0, 1, 0, 0, 20, 2, 10, WAX, CLR_WHITE), 600. TOOL("wax candle", "candle", 0, 1, 0, 0, 5, 2, 20, WAX, CLR_WHITE), 601. TOOL("brass lantern", (char *)0,1, 0, 0, 0, 30, 30, 12, COPPER, CLR_YELLOW), 602. TOOL("oil lamp", "lamp", 0, 0, 0, 0, 45, 20, 10, COPPER, CLR_YELLOW), 603. TOOL("magic lamp", "lamp", 0, 0, 1, 0, 15, 20, 50, COPPER, CLR_YELLOW), 604. /* other tools */ 605. #ifdef TOURIST 606. TOOL("expensive camera", (char *)0, 607. 1, 0, 0, 1, 15, 12, 200, PLASTIC, CLR_BLACK), 608. TOOL("mirror", "looking glass", 0, 0, 0, 0, 45, 13, 10, GLASS, HI_SILVER), 609. #else 610. TOOL("mirror", "looking glass", 0, 0, 0, 0, 60, 13, 10, GLASS, HI_SILVER), 611. #endif 612. TOOL("crystal ball", "glass orb", 613. 0, 0, 1, 1, 15,150, 60, GLASS, HI_GLASS), 614. TOOL("lenses", (char *)0, 1, 0, 0, 0, 5, 3, 80, GLASS, HI_GLASS), 615. TOOL("blindfold", (char *)0, 1, 0, 0, 0, 50, 2, 20, CLOTH, CLR_BLACK), 616. TOOL("towel", (char *)0, 1, 0, 0, 0, 50, 2, 50, CLOTH, CLR_MAGENTA), 617. #ifdef STEED 618. TOOL("saddle", (char *)0, 1, 0, 0, 0, 5,200, 150, LEATHER, HI_LEATHER), 619. TOOL("leash", (char *)0, 1, 0, 0, 0, 65, 12, 20, LEATHER, HI_LEATHER), 620. #else 621. TOOL("leash", (char *)0, 1, 0, 0, 0, 70, 12, 20, LEATHER, HI_LEATHER), 622. #endif 623. TOOL("stethoscope", (char *)0, 1, 0, 0, 0, 25, 4, 75, IRON, HI_METAL), 624. TOOL("tinning kit", (char *)0, 1, 0, 0, 1, 15,100, 30, IRON, HI_METAL), 625. TOOL("tin opener", (char *)0, 1, 0, 0, 0, 35, 4, 30, IRON, HI_METAL), 626. TOOL("can of grease", (char *)0,1, 0, 0, 1, 15, 15, 20, IRON, HI_METAL), 627. TOOL("figurine", (char *)0, 1, 0, 1, 0, 25, 50, 80, MINERAL, HI_MINERAL), 628. TOOL("magic marker", (char *)0, 1, 0, 1, 1, 15, 2, 50, PLASTIC, CLR_RED), 629. /* traps */ 630. TOOL("land mine",(char *)0, 1, 0, 0, 0, 0,300, 180, IRON, CLR_RED), 631. TOOL("beartrap", (char *)0, 1, 0, 0, 0, 0,200, 60, IRON, HI_METAL), 632. /* instruments */ 633. TOOL("tin whistle", "whistle", 0, 0, 0, 0, 100, 3, 10, METAL, HI_METAL), 634. TOOL("magic whistle", "whistle",0, 0, 1, 0, 30, 3, 10, METAL, HI_METAL), 635. /* "If tin whistles are made out of tin, what do they make foghorns out of?" */ 636. TOOL("wooden flute", "flute", 0, 0, 0, 0, 4, 5, 12, WOOD, HI_WOOD), 637. TOOL("magic flute", "flute", 0, 0, 1, 1, 2, 5, 36, WOOD, HI_WOOD), 638. TOOL("tooled horn", "horn", 0, 0, 0, 0, 5, 18, 15, BONE, CLR_WHITE), 639. TOOL("frost horn", "horn", 0, 0, 1, 1, 2, 18, 50, BONE, CLR_WHITE), 640. TOOL("fire horn", "horn", 0, 0, 1, 1, 2, 18, 50, BONE, CLR_WHITE), 641. TOOL("horn of plenty", "horn", 0, 0, 1, 1, 2, 18, 50, BONE, CLR_WHITE), 642. TOOL("wooden harp", "harp", 0, 0, 0, 0, 4, 30, 50, WOOD, HI_WOOD), 643. TOOL("magic harp", "harp", 0, 0, 1, 1, 2, 30, 50, WOOD, HI_WOOD), 644. TOOL("bell", (char *)0, 1, 0, 0, 0, 2, 30, 50, COPPER, HI_COPPER), 645. TOOL("bugle", (char *)0, 1, 0, 0, 0, 4, 10, 15, COPPER, HI_COPPER), 646. TOOL("leather drum", "drum", 0, 0, 0, 0, 4, 25, 25, LEATHER, HI_LEATHER), 647. TOOL("drum of earthquake", "drum", 648. 0, 0, 1, 1, 2, 25, 25, LEATHER, HI_LEATHER), 649. /* tools useful as weapons */ 650. WEPTOOL("pick-axe", (char *)0, 651. 1, 0, 0, 20, 100, 50, 6, 3, WHACK, P_PICK_AXE, IRON, HI_METAL), 652. WEPTOOL("grappling hook", "iron hook", 653. 0, 0, 0, 5, 30, 50, 2, 6, WHACK, P_FLAIL, IRON, HI_METAL), 654. /* 3.4.1: unicorn horn left classified as "magic" */ 655. WEPTOOL("unicorn horn", (char *)0, 656. 1, 1, 1, 0, 20, 100, 12, 12, PIERCE, P_UNICORN_HORN, BONE, CLR_WHITE), 657. 658. /* two special unique artifact "tools" */ 659. OBJECT(OBJ("Candelabrum of Invocation", "candelabrum"), 660. BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,GOLD), 0, 661. TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 200, HI_GOLD), 662. OBJECT(OBJ("Bell of Opening", "silver bell"), 663. BITS(0,0,1,0,1,1,1,1,0,0,0,P_NONE,SILVER), 0, 664. TOOL_CLASS, 0, 0,10, 5000, 0, 0, 0, 0, 50, HI_SILVER), 665. #undef TOOL 666. #undef WEPTOOL 667.
Comestibles
668. /* Comestibles ... */ 669. #define FOOD(name,prob,delay,wt,unk,tin,nutrition,color) OBJECT( \ 670. OBJ(name,(char *)0), BITS(1,1,unk,0,0,0,0,0,0,0,0,P_NONE,tin), 0, \ 671. FOOD_CLASS, prob, delay, \ 672. wt, nutrition/20 + 5, 0, 0, 0, 0, nutrition, color ) 673. /* all types of food (except tins & corpses) must have a delay of at least 1. */ 674. /* delay on corpses is computed and is weight dependant */ 675. /* dog eats foods 0-4 but prefers tripe rations above all others */ 676. /* fortune cookies can be read */ 677. /* carrots improve your vision */ 678. /* +0 tins contain monster meat */ 679. /* +1 tins (of spinach) make you stronger (like Popeye) */ 680. /* food CORPSE is a cadaver of some type */ 681. /* meatballs/sticks/rings are only created from objects via stone to flesh */ 682. 683. /* meat */ 684. FOOD("tripe ration", 140, 2, 10, 0, FLESH, 200, CLR_BROWN), 685. FOOD("corpse", 0, 1, 0, 0, FLESH, 0, CLR_BROWN), 686. FOOD("egg", 85, 1, 1, 1, FLESH, 80, CLR_WHITE), 687. FOOD("meatball", 0, 1, 1, 0, FLESH, 5, CLR_BROWN), 688. FOOD("meat stick", 0, 1, 1, 0, FLESH, 5, CLR_BROWN), 689. FOOD("huge chunk of meat", 0,20,400, 0, FLESH,2000, CLR_BROWN), 690. /* special case because it's not mergable */ 691. OBJECT(OBJ("meat ring", (char *)0), 692. BITS(1,0,0,0,0,0,0,0,0,0,0,0,FLESH), 693. 0, FOOD_CLASS, 0, 1, 5, 1, 0, 0, 0, 0, 5, CLR_BROWN), 694. 695. /* fruits & veggies */ 696. FOOD("kelp frond", 0, 1, 1, 0, VEGGY, 30, CLR_GREEN), 697. FOOD("eucalyptus leaf", 3, 1, 1, 0, VEGGY, 30, CLR_GREEN), 698. FOOD("apple", 15, 1, 2, 0, VEGGY, 50, CLR_RED), 699. FOOD("orange", 10, 1, 2, 0, VEGGY, 80, CLR_ORANGE), 700. FOOD("pear", 10, 1, 2, 0, VEGGY, 50, CLR_BRIGHT_GREEN), 701. FOOD("melon", 10, 1, 5, 0, VEGGY, 100, CLR_BRIGHT_GREEN), 702. FOOD("banana", 10, 1, 2, 0, VEGGY, 80, CLR_YELLOW), 703. FOOD("carrot", 15, 1, 2, 0, VEGGY, 50, CLR_ORANGE), 704. FOOD("sprig of wolfsbane", 7, 1, 1, 0, VEGGY, 40, CLR_GREEN), 705. FOOD("clove of garlic", 7, 1, 1, 0, VEGGY, 40, CLR_WHITE), 706. FOOD("slime mold", 75, 1, 5, 0, VEGGY, 250, HI_ORGANIC), 707. 708. /* people food */ 709. FOOD("lump of royal jelly", 0, 1, 2, 0, VEGGY, 200, CLR_YELLOW), 710. FOOD("cream pie", 25, 1, 10, 0, VEGGY, 100, CLR_WHITE), 711. FOOD("candy bar", 13, 1, 2, 0, VEGGY, 100, CLR_BROWN), 712. FOOD("fortune cookie", 55, 1, 1, 0, VEGGY, 40, CLR_YELLOW), 713. FOOD("pancake", 25, 2, 2, 0, VEGGY, 200, CLR_YELLOW), 714. FOOD("lembas wafer", 20, 2, 5, 0, VEGGY, 800, CLR_WHITE), 715. FOOD("cram ration", 20, 3, 15, 0, VEGGY, 600, HI_ORGANIC), 716. FOOD("food ration", 380, 5, 20, 0, VEGGY, 800, HI_ORGANIC), 717. FOOD("K-ration", 0, 1, 10, 0, VEGGY, 400, HI_ORGANIC), 718. FOOD("C-ration", 0, 1, 10, 0, VEGGY, 300, HI_ORGANIC), 719. FOOD("tin", 75, 0, 10, 1, METAL, 0, HI_METAL), 720. #undef FOOD 721.
Potions
722. /* potions ... */ 723. #define POTION(name,desc,mgc,power,prob,cost,color) OBJECT( \ 724. OBJ(name,desc), BITS(0,1,0,0,mgc,0,0,0,0,0,0,P_NONE,GLASS), power, \ 725. POTION_CLASS, prob, 0, 20, cost, 0, 0, 0, 0, 10, color ) 726. POTION("gain ability", "ruby", 1, 0, 42, 300, CLR_RED), 727. POTION("restore ability", "pink", 1, 0, 40, 100, CLR_BRIGHT_MAGENTA), 728. POTION("confusion", "orange", 1, CONFUSION, 42, 100, CLR_ORANGE), 729. POTION("blindness", "yellow", 1, BLINDED, 40, 150, CLR_YELLOW), 730. POTION("paralysis", "emerald", 1, 0, 42, 300, CLR_BRIGHT_GREEN), 731. POTION("speed", "dark green", 1, FAST, 42, 200, CLR_GREEN), 732. POTION("levitation", "cyan", 1, LEVITATION, 42, 200, CLR_CYAN), 733. POTION("hallucination", "sky blue", 1, HALLUC, 40, 100, CLR_CYAN), 734. POTION("invisibility", "brilliant blue",1, INVIS, 40, 150, CLR_BRIGHT_BLUE), 735. POTION("see invisible", "magenta", 1, SEE_INVIS, 42, 50, CLR_MAGENTA), 736. POTION("healing", "purple-red", 1, 0, 57, 100, CLR_MAGENTA), 737. POTION("extra healing", "puce", 1, 0, 47, 100, CLR_RED), 738. POTION("gain level", "milky", 1, 0, 20, 300, CLR_WHITE), 739. POTION("enlightenment", "swirly", 1, 0, 20, 200, CLR_BROWN), 740. POTION("monster detection", "bubbly", 1, 0, 40, 150, CLR_WHITE), 741. POTION("object detection", "smoky", 1, 0, 42, 150, CLR_GRAY), 742. POTION("gain energy", "cloudy", 1, 0, 42, 150, CLR_WHITE), 743. POTION("sleeping", "effervescent", 1, 0, 42, 100, CLR_GRAY), 744. POTION("full healing", "black", 1, 0, 10, 200, CLR_BLACK), 745. POTION("polymorph", "golden", 1, 0, 10, 200, CLR_YELLOW), 746. POTION("booze", "brown", 0, 0, 42, 50, CLR_BROWN), 747. POTION("sickness", "fizzy", 0, 0, 42, 50, CLR_CYAN), 748. POTION("fruit juice", "dark", 0, 0, 42, 50, CLR_BLACK), 749. POTION("acid", "white", 0, 0, 10, 250, CLR_WHITE), 750. POTION("oil", "murky", 0, 0, 30, 250, CLR_BROWN), 751. POTION("water", "clear", 0, 0, 92, 100, CLR_CYAN), 752. #undef POTION 753.
Scrolls
754. /* scrolls ... */ 755. #define SCROLL(name,text,mgc,prob,cost) OBJECT( \ 756. OBJ(name,text), BITS(0,1,0,0,mgc,0,0,0,0,0,0,P_NONE,PAPER), 0, \ 757. SCROLL_CLASS, prob, 0, 5, cost, 0, 0, 0, 0, 6, HI_PAPER ) 758. SCROLL("enchant armor", "ZELGO MER", 1, 63, 80), 759. SCROLL("destroy armor", "JUYED AWK YACC", 1, 45, 100), 760. SCROLL("confuse monster", "NR 9", 1, 53, 100), 761. SCROLL("scare monster", "XIXAXA XOXAXA XUXAXA", 1, 35, 100), 762. SCROLL("remove curse", "PRATYAVAYAH", 1, 65, 80), 763. SCROLL("enchant weapon", "DAIYEN FOOELS", 1, 80, 60), 764. SCROLL("create monster", "LEP GEX VEN ZEA", 1, 45, 200), 765. SCROLL("taming", "PRIRUTSENIE", 1, 15, 200), 766. SCROLL("genocide", "ELBIB YLOH", 1, 15, 300), 767. SCROLL("light", "VERR YED HORRE", 1, 90, 50), 768. SCROLL("teleportation", "VENZAR BORGAVVE", 1, 55, 100), 769. SCROLL("gold detection", "THARR", 1, 33, 100), 770. SCROLL("food detection", "YUM YUM", 1, 25, 100), 771. SCROLL("identify", "KERNOD WEL", 1, 180, 20), 772. SCROLL("magic mapping", "ELAM EBOW", 1, 45, 100), 773. SCROLL("amnesia", "DUAM XNAHT", 1, 35, 200), 774. SCROLL("fire", "ANDOVA BEGARIN", 1, 30, 100), 775. SCROLL("earth", "KIRJE", 1, 18, 200), 776. SCROLL("punishment", "VE FORBRYDERNE", 1, 15, 300), 777. SCROLL("charging", "HACKEM MUCHE", 1, 15, 300), 778. SCROLL("stinking cloud", "VELOX NEB", 1, 15, 300), 779. SCROLL((char *)0, "FOOBIE BLETCH", 1, 0, 100), 780. SCROLL((char *)0, "TEMOV", 1, 0, 100), 781. SCROLL((char *)0, "GARVEN DEH", 1, 0, 100), 782. SCROLL((char *)0, "READ ME", 1, 0, 100), 783. /* these must come last because they have special descriptions */ 784. #ifdef MAIL 785. SCROLL("mail", "stamped", 0, 0, 0), 786. #endif 787. SCROLL("blank paper", "unlabeled", 0, 28, 60), 788. #undef SCROLL 789.
Spellbooks
790. /* spellbooks ... */ 791. #define SPELL(name,desc,sub,prob,delay,level,mgc,dir,color) OBJECT( \ 792. OBJ(name,desc), BITS(0,0,0,0,mgc,0,0,0,0,0,dir,sub,PAPER), 0, \ 793. SPBOOK_CLASS, prob, delay, \ 794. 50, level*100, 0, 0, 0, level, 20, color ) 795. SPELL("dig", "parchment", P_MATTER_SPELL, 20, 6, 5, 1, RAY, HI_PAPER), 796. SPELL("magic missile", "vellum", P_ATTACK_SPELL, 45, 2, 2, 1, RAY, HI_PAPER), 797. SPELL("fireball", "ragged", P_ATTACK_SPELL, 20, 4, 4, 1, RAY, HI_PAPER), 798. SPELL("cone of cold", "dog eared", P_ATTACK_SPELL, 10, 7, 4, 1, RAY, HI_PAPER), 799. SPELL("sleep", "mottled", P_ENCHANTMENT_SPELL, 50, 1, 1, 1, RAY, HI_PAPER), 800. SPELL("finger of death", "stained", P_ATTACK_SPELL, 5, 10, 7, 1, RAY, HI_PAPER), 801. SPELL("light", "cloth", P_DIVINATION_SPELL, 45, 1, 1, 1, NODIR, HI_CLOTH), 802. SPELL("detect monsters", "leather", P_DIVINATION_SPELL, 43, 1, 1, 1, NODIR, HI_LEATHER), 803. SPELL("healing", "white", P_HEALING_SPELL, 40, 2, 1, 1, IMMEDIATE, CLR_WHITE), 804. SPELL("knock", "pink", P_MATTER_SPELL, 35, 1, 1, 1, IMMEDIATE, CLR_BRIGHT_MAGENTA), 805. SPELL("force bolt", "red", P_ATTACK_SPELL, 35, 2, 1, 1, IMMEDIATE, CLR_RED), 806. SPELL("confuse monster", "orange", P_ENCHANTMENT_SPELL, 30, 2, 2, 1, IMMEDIATE, CLR_ORANGE), 807. SPELL("cure blindness", "yellow", P_HEALING_SPELL, 25, 2, 2, 1, IMMEDIATE, CLR_YELLOW), 808. SPELL("drain life", "velvet", P_ATTACK_SPELL, 10, 2, 2, 1, IMMEDIATE, CLR_MAGENTA), 809. SPELL("slow monster", "light green", P_ENCHANTMENT_SPELL, 30, 2, 2, 1, IMMEDIATE, CLR_BRIGHT_GREEN), 810. SPELL("wizard lock", "dark green", P_MATTER_SPELL, 30, 3, 2, 1, IMMEDIATE, CLR_GREEN), 811. SPELL("create monster", "turquoise", P_CLERIC_SPELL, 35, 3, 2, 1, NODIR, CLR_BRIGHT_CYAN), 812. SPELL("detect food", "cyan", P_DIVINATION_SPELL, 30, 3, 2, 1, NODIR, CLR_CYAN), 813. SPELL("cause fear", "light blue", P_ENCHANTMENT_SPELL, 25, 3, 3, 1, NODIR, CLR_BRIGHT_BLUE), 814. SPELL("clairvoyance", "dark blue", P_DIVINATION_SPELL, 15, 3, 3, 1, NODIR, CLR_BLUE), 815. SPELL("cure sickness", "indigo", P_HEALING_SPELL, 32, 3, 3, 1, NODIR, CLR_BLUE), 816. SPELL("charm monster", "magenta", P_ENCHANTMENT_SPELL, 20, 3, 3, 1, IMMEDIATE, CLR_MAGENTA), 817. SPELL("haste self", "purple", P_ESCAPE_SPELL, 33, 4, 3, 1, NODIR, CLR_MAGENTA), 818. SPELL("detect unseen", "violet", P_DIVINATION_SPELL, 20, 4, 3, 1, NODIR, CLR_MAGENTA), 819. SPELL("levitation", "tan", P_ESCAPE_SPELL, 20, 4, 4, 1, NODIR, CLR_BROWN), 820. SPELL("extra healing", "plaid", P_HEALING_SPELL, 27, 5, 3, 1, IMMEDIATE, CLR_GREEN), 821. SPELL("restore ability", "light brown", P_HEALING_SPELL, 25, 5, 4, 1, NODIR, CLR_BROWN), 822. SPELL("invisibility", "dark brown", P_ESCAPE_SPELL, 25, 5, 4, 1, NODIR, CLR_BROWN), 823. SPELL("detect treasure", "gray", P_DIVINATION_SPELL, 20, 5, 4, 1, NODIR, CLR_GRAY), 824. SPELL("remove curse", "wrinkled", P_CLERIC_SPELL, 25, 5, 3, 1, NODIR, HI_PAPER), 825. SPELL("magic mapping", "dusty", P_DIVINATION_SPELL, 18, 7, 5, 1, NODIR, HI_PAPER), 826. SPELL("identify", "bronze", P_DIVINATION_SPELL, 20, 6, 3, 1, NODIR, HI_COPPER), 827. SPELL("turn undead", "copper", P_CLERIC_SPELL, 16, 8, 6, 1, IMMEDIATE, HI_COPPER), 828. SPELL("polymorph", "silver", P_MATTER_SPELL, 10, 8, 6, 1, IMMEDIATE, HI_SILVER), 829. SPELL("teleport away", "gold", P_ESCAPE_SPELL, 15, 6, 6, 1, IMMEDIATE, HI_GOLD), 830. SPELL("create familiar", "glittering", P_CLERIC_SPELL, 10, 7, 6, 1, NODIR, CLR_WHITE), 831. SPELL("cancellation", "shining", P_MATTER_SPELL, 15, 8, 7, 1, IMMEDIATE, CLR_WHITE), 832. SPELL("protection", "dull", P_CLERIC_SPELL, 18, 3, 1, 1, NODIR, HI_PAPER), 833. SPELL("jumping", "thin", P_ESCAPE_SPELL, 20, 3, 1, 1, IMMEDIATE, HI_PAPER), 834. SPELL("stone to flesh", "thick", P_HEALING_SPELL, 15, 1, 3, 1, IMMEDIATE, HI_PAPER), 835. #if 0 /* DEFERRED */ 836. SPELL("flame sphere", "canvas", P_MATTER_SPELL, 20, 2, 1, 1, NODIR, CLR_BROWN), 837. SPELL("freeze sphere", "hardcover", P_MATTER_SPELL, 20, 2, 1, 1, NODIR, CLR_BROWN), 838. #endif 839. /* blank spellbook must come last because it retains its description */ 840. SPELL("blank paper", "plain", P_NONE, 18, 0, 0, 0, 0, HI_PAPER), 841. /* a special, one of a kind, spellbook */ 842. OBJECT(OBJ("Book of the Dead", "papyrus"), BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,PAPER), 0, 843. SPBOOK_CLASS, 0, 0,20, 10000, 0, 0, 0, 7, 20, HI_PAPER), 844. #undef SPELL 845.
Wands
846. /* wands ... */ 847. #define WAND(name,typ,prob,cost,mgc,dir,metal,color) OBJECT( \ 848. OBJ(name,typ), BITS(0,0,1,0,mgc,1,0,0,0,0,dir,P_NONE,metal), 0, \ 849. WAND_CLASS, prob, 0, 7, cost, 0, 0, 0, 0, 30, color ) 850. WAND("light", "glass", 95, 100, 1, NODIR, GLASS, HI_GLASS), 851. WAND("secret door detection", "balsa", 852. 50, 150, 1, NODIR, WOOD, HI_WOOD), 853. WAND("enlightenment", "crystal", 15, 150, 1, NODIR, GLASS, HI_GLASS), 854. WAND("create monster", "maple", 45, 200, 1, NODIR, WOOD, HI_WOOD), 855. WAND("wishing", "pine", 5, 500, 1, NODIR, WOOD, HI_WOOD), 856. WAND("nothing", "oak", 25, 100, 0, IMMEDIATE, WOOD, HI_WOOD), 857. WAND("striking", "ebony", 75, 150, 1, IMMEDIATE, WOOD, HI_WOOD), 858. WAND("make invisible", "marble", 45, 150, 1, IMMEDIATE, MINERAL, HI_MINERAL), 859. WAND("slow monster", "tin", 50, 150, 1, IMMEDIATE, METAL, HI_METAL), 860. WAND("speed monster", "brass", 50, 150, 1, IMMEDIATE, COPPER, HI_COPPER), 861. WAND("undead turning", "copper", 50, 150, 1, IMMEDIATE, COPPER, HI_COPPER), 862. WAND("polymorph", "silver", 45, 200, 1, IMMEDIATE, SILVER, HI_SILVER), 863. WAND("cancellation", "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE), 864. WAND("teleportation", "iridium", 45, 200, 1, IMMEDIATE, METAL, CLR_BRIGHT_CYAN), 865. WAND("opening", "zinc", 25, 150, 1, IMMEDIATE, METAL, HI_METAL), 866. WAND("locking", "aluminum", 25, 150, 1, IMMEDIATE, METAL, HI_METAL), 867. WAND("probing", "uranium", 30, 150, 1, IMMEDIATE, METAL, HI_METAL), 868. WAND("digging", "iron", 55, 150, 1, RAY, IRON, HI_METAL), 869. WAND("magic missile", "steel", 50, 150, 1, RAY, IRON, HI_METAL), 870. WAND("fire", "hexagonal",40, 175, 1, RAY, IRON, HI_METAL), 871. WAND("cold", "short", 40, 175, 1, RAY, IRON, HI_METAL), 872. WAND("sleep", "runed", 50, 175, 1, RAY, IRON, HI_METAL), 873. WAND("death", "long", 5, 500, 1, RAY, IRON, HI_METAL), 874. WAND("lightning", "curved", 40, 175, 1, RAY, IRON, HI_METAL), 875. WAND((char *)0, "forked", 0, 150, 1, 0, WOOD, HI_WOOD), 876. WAND((char *)0, "spiked", 0, 150, 1, 0, IRON, HI_METAL), 877. WAND((char *)0, "jeweled", 0, 150, 1, 0, IRON, HI_MINERAL), 878. #undef WAND 879.
Coins
880. /* coins ... - so far, gold is all there is */ 881. #define COIN(name,prob,metal,worth) OBJECT( \ 882. OBJ(name,(char *)0), BITS(0,1,0,0,0,0,0,0,0,0,0,P_NONE,metal), 0, \ 883. COIN_CLASS, prob, 0, 1, worth, 0, 0, 0, 0, 0, HI_GOLD ) 884. COIN("gold piece", 1000, GOLD,1), 885. #undef COIN 886.
Gems
887. /* gems ... - includes stones and rocks but not boulders */ 888. #define GEM(name,desc,prob,wt,gval,nutr,mohs,glass,color) OBJECT( \ 889. OBJ(name,desc), \ 890. BITS(0,1,0,0,0,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \ 891. GEM_CLASS, prob, 0, 1, gval, 3, 3, 0, 0, nutr, color ) 892. #define ROCK(name,desc,kn,prob,wt,gval,sdam,ldam,mgc,nutr,mohs,glass,color) OBJECT( \ 893. OBJ(name,desc), \ 894. BITS(kn,1,0,0,mgc,0,0,0,0,HARDGEM(mohs),0,-P_SLING,glass), 0, \ 895. GEM_CLASS, prob, 0, wt, gval, sdam, ldam, 0, 0, nutr, color ) 896. GEM("dilithium crystal", "white", 2, 1, 4500, 15, 5, GEMSTONE, CLR_WHITE), 897. GEM("diamond", "white", 3, 1, 4000, 15, 10, GEMSTONE, CLR_WHITE), 898. GEM("ruby", "red", 4, 1, 3500, 15, 9, GEMSTONE, CLR_RED), 899. GEM("jacinth", "orange", 3, 1, 3250, 15, 9, GEMSTONE, CLR_ORANGE), 900. GEM("sapphire", "blue", 4, 1, 3000, 15, 9, GEMSTONE, CLR_BLUE), 901. GEM("black opal", "black", 3, 1, 2500, 15, 8, GEMSTONE, CLR_BLACK), 902. GEM("emerald", "green", 5, 1, 2500, 15, 8, GEMSTONE, CLR_GREEN), 903. GEM("turquoise", "green", 6, 1, 2000, 15, 6, GEMSTONE, CLR_GREEN), 904. GEM("citrine", "yellow", 4, 1, 1500, 15, 6, GEMSTONE, CLR_YELLOW), 905. GEM("aquamarine", "green", 6, 1, 1500, 15, 8, GEMSTONE, CLR_GREEN), 906. GEM("amber", "yellowish brown", 8, 1, 1000, 15, 2, GEMSTONE, CLR_BROWN), 907. GEM("topaz", "yellowish brown", 10, 1, 900, 15, 8, GEMSTONE, CLR_BROWN), 908. GEM("jet", "black", 6, 1, 850, 15, 7, GEMSTONE, CLR_BLACK), 909. GEM("opal", "white", 12, 1, 800, 15, 6, GEMSTONE, CLR_WHITE), 910. GEM("chrysoberyl", "yellow", 8, 1, 700, 15, 5, GEMSTONE, CLR_YELLOW), 911. GEM("garnet", "red", 12, 1, 700, 15, 7, GEMSTONE, CLR_RED), 912. GEM("amethyst", "violet", 14, 1, 600, 15, 7, GEMSTONE, CLR_MAGENTA), 913. GEM("jasper", "red", 15, 1, 500, 15, 7, GEMSTONE, CLR_RED), 914. GEM("fluorite", "violet", 15, 1, 400, 15, 4, GEMSTONE, CLR_MAGENTA), 915. GEM("obsidian", "black", 9, 1, 200, 15, 6, GEMSTONE, CLR_BLACK), 916. GEM("agate", "orange", 12, 1, 200, 15, 6, GEMSTONE, CLR_ORANGE), 917. GEM("jade", "green", 10, 1, 300, 15, 6, GEMSTONE, CLR_GREEN), 918. GEM("worthless piece of white glass", "white", 77, 1, 0, 6, 5, GLASS, CLR_WHITE), 919. GEM("worthless piece of blue glass", "blue", 77, 1, 0, 6, 5, GLASS, CLR_BLUE), 920. GEM("worthless piece of red glass", "red", 77, 1, 0, 6, 5, GLASS, CLR_RED), 921. GEM("worthless piece of yellowish brown glass", "yellowish brown", 922. 77, 1, 0, 6, 5, GLASS, CLR_BROWN), 923. GEM("worthless piece of orange glass", "orange", 76, 1, 0, 6, 5, GLASS, CLR_ORANGE), 924. GEM("worthless piece of yellow glass", "yellow", 77, 1, 0, 6, 5, GLASS, CLR_YELLOW), 925. GEM("worthless piece of black glass", "black", 76, 1, 0, 6, 5, GLASS, CLR_BLACK), 926. GEM("worthless piece of green glass", "green", 77, 1, 0, 6, 5, GLASS, CLR_GREEN), 927. GEM("worthless piece of violet glass", "violet", 77, 1, 0, 6, 5, GLASS, CLR_MAGENTA), 928. 929. /* Placement note: there is a wishable subrange for 930. * "gray stones" in the o_ranges[] array in objnam.c 931. * that is currently everything between luckstones and flint (inclusive). 932. */ 933. ROCK("luckstone", "gray", 0, 10, 10, 60, 3, 3, 1, 10, 7, MINERAL, CLR_GRAY), 934. ROCK("loadstone", "gray", 0, 10, 500, 1, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY), 935. ROCK("touchstone", "gray", 0, 8, 10, 45, 3, 3, 1, 10, 6, MINERAL, CLR_GRAY), 936. ROCK("flint", "gray", 0, 10, 10, 1, 6, 6, 0, 10, 7, MINERAL, CLR_GRAY), 937. ROCK("rock", (char *)0, 1,100, 10, 0, 3, 3, 0, 10, 7, MINERAL, CLR_GRAY), 938. #undef GEM 939. #undef ROCK 940.
Miscellaneous
941. /* miscellaneous ... */ 942. /* Note: boulders and rocks are not normally created at random; the 943. * probabilities only come into effect when you try to polymorph them. 944. * Boulders weigh more than MAX_CARR_CAP; statues use corpsenm to take 945. * on a specific type and may act as containers (both affect weight). 946. */ 947. OBJECT(OBJ("boulder",(char *)0), BITS(1,0,0,0,0,0,0,0,1,0,0,P_NONE,MINERAL), 0, 948. ROCK_CLASS, 100, 0, 6000, 0, 20, 20, 0, 0, 2000, HI_MINERAL), 949. OBJECT(OBJ("statue", (char *)0), BITS(1,0,0,1,0,0,0,0,0,0,0,P_NONE,MINERAL), 0, 950. ROCK_CLASS, 900, 0, 2500, 0, 20, 20, 0, 0, 2500, CLR_WHITE), 951. 952. OBJECT(OBJ("heavy iron ball", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0, 953. BALL_CLASS, 1000, 0, 480, 10, 25, 25, 0, 0, 200, HI_METAL), 954. /* +d4 when "very heavy" */ 955. OBJECT(OBJ("iron chain", (char *)0), BITS(1,0,0,0,0,0,0,0,0,0,WHACK,P_NONE,IRON), 0, 956. CHAIN_CLASS, 1000, 0, 120, 0, 4, 4, 0, 0, 200, HI_METAL), 957. /* +1 both l & s */ 958. 959. OBJECT(OBJ("blinding venom", "splash of venom"), 960. BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0, 961. VENOM_CLASS, 500, 0, 1, 0, 0, 0, 0, 0, 0, HI_ORGANIC), 962. OBJECT(OBJ("acid venom", "splash of venom"), 963. BITS(0,1,0,0,0,0,0,1,0,0,0,P_NONE,LIQUID), 0, 964. VENOM_CLASS, 500, 0, 1, 0, 6, 6, 0, 0, 0, HI_ORGANIC), 965. /* +d6 small or large */ 966. 967. /* fencepost, the deadly Array Terminator -- name [1st arg] *must* be NULL */ 968. OBJECT(OBJ((char *)0,(char *)0), BITS(0,0,0,0,0,0,0,0,0,0,0,P_NONE,0), 0, 969. ILLOBJ_CLASS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 970. }; /* objects[] */ 971. 972. #ifndef OBJECTS_PASS_2_ 973. 974. /* perform recursive compilation for second structure */ 975. # undef OBJ 976. # undef OBJECT 977. # define OBJECTS_PASS_2_ 978. #include "objects.c" 979. 980. void NDECL(objects_init); 981. 982. /* dummy routine used to force linkage */ 983. void 984. objects_init() 985. { 986. return; 987. } 988. 989. #endif /* !OBJECTS_PASS_2_ */ 990. 991. /*objects.c*/