scroll.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /* =============================================================================
  2. * PROGRAM: ularn
  3. * FILENAME: scroll.h
  4. *
  5. * DESCRIPTION:
  6. * This module handles the processing for scrolls and books.
  7. *
  8. * =============================================================================
  9. * EXPORTED VARIABLES
  10. *
  11. * scrollname : The name of each scroll.
  12. *
  13. * =============================================================================
  14. * EXPORTED FUNCTIONS
  15. *
  16. * newscroll : Function to create a new scroll # with the correct probability
  17. * read_scroll : Function to process reading a scroll.
  18. * readbook : Function to process reading a book.
  19. *
  20. * =============================================================================
  21. */
  22. #ifndef __SCROLL_H
  23. #define __SCROLL_H
  24. #define MAXSCROLL 28 /* maximum number of scrolls that are possible */
  25. /*** Scrolls ***/
  26. #define SENCHANTARM 0
  27. #define SENCHANTWEAP 1
  28. #define SENLIGHTEN 2
  29. #define SBLANK 3
  30. #define SCREATEMONST 4
  31. #define SCREATEITEM 5
  32. #define SAGGMONST 6
  33. #define STIMEWARP 7
  34. #define STELEPORT 8
  35. #define SAWARENESS 9
  36. #define SHASTEMONST 10
  37. #define SMONSTHEAL 11
  38. #define SSPIRITPROT 12
  39. #define SUNDEADPROT 13
  40. #define SSTEALTH 14
  41. #define SMAGICMAP 15
  42. #define SHOLDMONST 16
  43. #define SGEMPERFECT 17
  44. #define SSPELLEXT 18
  45. #define SIDENTIFY 19
  46. #define SREMCURSE 20
  47. #define SANNIHILATE 21
  48. #define SPULVERIZE 22
  49. #define SLIFEPROT 23
  50. #define S_MAX 23 /* Greatest defined scroll number */
  51. /*
  52. * Names of all scrolls
  53. */
  54. extern char *scrollname[MAXSCROLL];
  55. /* =============================================================================
  56. * FUNCTION: newscroll
  57. *
  58. * DESCRIPTION:
  59. * Function to create scroll #s with the correct probability of occurence.
  60. *
  61. * PARAMETERS:
  62. *
  63. * None.
  64. *
  65. * RETURN VALUE:
  66. *
  67. * The scroll number as defined above.
  68. */
  69. int newscroll(void);
  70. /* =============================================================================
  71. * FUNCTION: read_scroll
  72. *
  73. * DESCRIPTION:
  74. * Function to perform the processing of the effect of reading a scroll.
  75. *
  76. * PARAMETERS:
  77. *
  78. * typ : The type of scroll to read.
  79. *
  80. * RETURN VALUE:
  81. *
  82. * None.
  83. */
  84. void read_scroll(int typ);
  85. /* =============================================================================
  86. * FUNCTION: readbook
  87. *
  88. * DESCRIPTION:
  89. * Function to read a book.
  90. *
  91. * PARAMETERS:
  92. *
  93. * arg : The dungeon level of the book (stored in itemarg for the book).
  94. *
  95. * RETURN VALUE:
  96. *
  97. * None.
  98. */
  99. void readbook(int arg);
  100. #endif