home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / d / d-linux.zip / dm-dist / spells.h < prev    next >
C/C++ Source or Header  |  1991-03-01  |  7KB  |  166 lines

  1. /* ************************************************************************
  2. *  file: spells.h , Implementation of magic spells.       Part of DIKUMUD *
  3. *  Usage : Spells                                                         *
  4. ************************************************************************* */
  5.  
  6. #define MAX_BUF_LENGTH              240
  7.  
  8. #define TYPE_UNDEFINED               -1
  9. #define SPELL_RESERVED_DBC            0  /* SKILL NUMBER ZERO */
  10. #define SPELL_ARMOR                   1 /* Reserved Skill[] DO NOT CHANGE */
  11. #define SPELL_TELEPORT                2 /* Reserved Skill[] DO NOT CHANGE */
  12. #define SPELL_BLESS                   3 /* Reserved Skill[] DO NOT CHANGE */
  13. #define SPELL_BLINDNESS               4 /* Reserved Skill[] DO NOT CHANGE */
  14. #define SPELL_BURNING_HANDS           5 /* Reserved Skill[] DO NOT CHANGE */
  15. #define SPELL_CALL_LIGHTNING          6 /* Reserved Skill[] DO NOT CHANGE */
  16. #define SPELL_CHARM_PERSON            7 /* Reserved Skill[] DO NOT CHANGE */
  17. #define SPELL_CHILL_TOUCH             8 /* Reserved Skill[] DO NOT CHANGE */
  18. #define SPELL_CLONE                   9 /* Reserved Skill[] DO NOT CHANGE */
  19. #define SPELL_COLOUR_SPRAY           10 /* Reserved Skill[] DO NOT CHANGE */
  20. #define SPELL_CONTROL_WEATHER        11 /* Reserved Skill[] DO NOT CHANGE */
  21. #define SPELL_CREATE_FOOD            12 /* Reserved Skill[] DO NOT CHANGE */
  22. #define SPELL_CREATE_WATER           13 /* Reserved Skill[] DO NOT CHANGE */
  23. #define SPELL_CURE_BLIND             14 /* Reserved Skill[] DO NOT CHANGE */
  24. #define SPELL_CURE_CRITIC            15 /* Reserved Skill[] DO NOT CHANGE */
  25. #define SPELL_CURE_LIGHT             16 /* Reserved Skill[] DO NOT CHANGE */
  26. #define SPELL_CURSE                  17 /* Reserved Skill[] DO NOT CHANGE */
  27. #define SPELL_DETECT_EVIL            18 /* Reserved Skill[] DO NOT CHANGE */
  28. #define SPELL_DETECT_INVISIBLE       19 /* Reserved Skill[] DO NOT CHANGE */
  29. #define SPELL_DETECT_MAGIC           20 /* Reserved Skill[] DO NOT CHANGE */
  30. #define SPELL_DETECT_POISON          21 /* Reserved Skill[] DO NOT CHANGE */
  31. #define SPELL_DISPEL_EVIL            22 /* Reserved Skill[] DO NOT CHANGE */
  32. #define SPELL_EARTHQUAKE             23 /* Reserved Skill[] DO NOT CHANGE */
  33. #define SPELL_ENCHANT_WEAPON         24 /* Reserved Skill[] DO NOT CHANGE */
  34. #define SPELL_ENERGY_DRAIN           25 /* Reserved Skill[] DO NOT CHANGE */
  35. #define SPELL_FIREBALL               26 /* Reserved Skill[] DO NOT CHANGE */
  36. #define SPELL_HARM                   27 /* Reserved Skill[] DO NOT CHANGE */
  37. #define SPELL_HEAL                   28 /* Reserved Skill[] DO NOT CHANGE */
  38. #define SPELL_INVISIBLE              29 /* Reserved Skill[] DO NOT CHANGE */
  39. #define SPELL_LIGHTNING_BOLT         30 /* Reserved Skill[] DO NOT CHANGE */
  40. #define SPELL_LOCATE_OBJECT          31 /* Reserved Skill[] DO NOT CHANGE */
  41. #define SPELL_MAGIC_MISSILE          32 /* Reserved Skill[] DO NOT CHANGE */
  42. #define SPELL_POISON                 33 /* Reserved Skill[] DO NOT CHANGE */
  43. #define SPELL_PROTECT_FROM_EVIL      34 /* Reserved Skill[] DO NOT CHANGE */
  44. #define SPELL_REMOVE_CURSE           35 /* Reserved Skill[] DO NOT CHANGE */
  45. #define SPELL_SANCTUARY              36 /* Reserved Skill[] DO NOT CHANGE */
  46. #define SPELL_SHOCKING_GRASP         37 /* Reserved Skill[] DO NOT CHANGE */
  47. #define SPELL_SLEEP                  38 /* Reserved Skill[] DO NOT CHANGE */
  48. #define SPELL_STRENGTH               39 /* Reserved Skill[] DO NOT CHANGE */
  49. #define SPELL_SUMMON                 40 /* Reserved Skill[] DO NOT CHANGE */
  50. #define SPELL_VENTRILOQUATE          41 /* Reserved Skill[] DO NOT CHANGE */
  51. #define SPELL_WORD_OF_RECALL         42 /* Reserved Skill[] DO NOT CHANGE */
  52. #define SPELL_REMOVE_POISON          43 /* Reserved Skill[] DO NOT CHANGE */
  53. #define SPELL_SENSE_LIFE             44 /* Reserved Skill[] DO NOT CHANGE */
  54.  
  55. /* types of attacks and skills must NOT use same numbers as spells! */
  56.  
  57. #define SKILL_SNEAK                  45 /* Reserved Skill[] DO NOT CHANGE */
  58. #define SKILL_HIDE                   46 /* Reserved Skill[] DO NOT CHANGE */
  59. #define SKILL_STEAL                  47 /* Reserved Skill[] DO NOT CHANGE */
  60. #define SKILL_BACKSTAB               48 /* Reserved Skill[] DO NOT CHANGE */
  61. #define SKILL_PICK_LOCK              49 /* Reserved Skill[] DO NOT CHANGE */
  62.  
  63. #define SKILL_KICK                   50 /* Reserved Skill[] DO NOT CHANGE */
  64. #define SKILL_BASH                   51 /* Reserved Skill[] DO NOT CHANGE */
  65. #define SKILL_RESCUE                 52 /* MAXIMUM SKILL NUMBER  */
  66.  
  67. /* END OF SKILL RESERVED "NO TOUCH" NUMBERS */
  68.  
  69.  
  70. /* NEW SPELLS are to be inserted here */
  71. #define SPELL_IDENTIFY               53
  72. #define SPELL_ANIMATE_DEAD           54 /* EXAMPLE */
  73. #define SPELL_FEAR                   55 /* EXAMPLE */
  74. #define SPELL_FIRE_BREATH            56
  75. #define SPELL_GAS_BREATH             57
  76. #define SPELL_FROST_BREATH           58
  77. #define SPELL_ACID_BREATH            59
  78. #define SPELL_LIGHTNING_BREATH       60
  79.  
  80.  
  81. #define TYPE_HIT                     100
  82. #define TYPE_BLUDGEON                101
  83. #define TYPE_PIERCE                  102
  84. #define TYPE_SLASH                   103
  85. #define TYPE_WHIP                    104 /* EXAMPLE */
  86. #define TYPE_CLAW                    105  /* NO MESSAGES WRITTEN YET! */
  87. #define TYPE_BITE                    106  /* NO MESSAGES WRITTEN YET! */
  88. #define TYPE_STING                   107  /* NO MESSAGES WRITTEN YET! */
  89. #define TYPE_CRUSH                   108  /* NO MESSAGES WRITTEN YET! */
  90.  
  91.  
  92.  
  93. #define TYPE_SUFFERING               200
  94. /* More anything but spells and weapontypes can be insterted here! */
  95.  
  96.  
  97.  
  98.  
  99.  
  100. #define MAX_TYPES 70
  101.  
  102. #define SAVING_PARA   0
  103. #define SAVING_ROD    1
  104. #define SAVING_PETRI  2
  105. #define SAVING_BREATH 3
  106. #define SAVING_SPELL  4
  107.  
  108.  
  109. #define MAX_SPL_LIST    127
  110.  
  111.  
  112. #define TAR_IGNORE        1
  113. #define TAR_CHAR_ROOM     2
  114. #define TAR_CHAR_WORLD    4
  115. #define TAR_FIGHT_SELF    8
  116. #define TAR_FIGHT_VICT   16
  117. #define TAR_SELF_ONLY    32 /* Only a check, use with ei. TAR_CHAR_ROOM */
  118. #define TAR_SELF_NONO    64 /* Only a check, use with ei. TAR_CHAR_ROOM */
  119. #define TAR_OBJ_INV     128
  120. #define TAR_OBJ_ROOM    256
  121. #define TAR_OBJ_WORLD   512
  122. #define TAR_OBJ_EQUIP  1024
  123.  
  124. struct spell_info_type
  125. {
  126.     void (*spell_pointer) (byte level, struct char_data *ch, char *arg, int type,
  127.                            struct char_data *tar_ch, struct obj_data *tar_obj);
  128.     byte minimum_position;  /* Position for caster                          */
  129.     ubyte min_usesmana;     /* Amount of mana used by a spell     */
  130.     byte beats;             /* Heartbeats until ready for next */
  131.  
  132.     byte min_level_cleric;  /* Level required for cleric       */
  133.     byte min_level_magic;   /* Level required for magic user   */
  134.     sh_int targets;         /* See below for use with TAR_XXX  */
  135. };
  136.  
  137. /* Possible Targets:
  138.  
  139.    bit 0 : IGNORE TARGET
  140.    bit 1 : PC/NPC in room
  141.    bit 2 : PC/NPC in world
  142.    bit 3 : Object held
  143.    bit 4 : Object in inventory
  144.    bit 5 : Object in room
  145.    bit 6 : Object in world
  146.    bit 7 : If fighting, and no argument, select tar_char as self
  147.    bit 8 : If fighting, and no argument, select tar_char as victim (fighting)
  148.    bit 9 : If no argument, select self, if argument check that it IS self.
  149.  
  150. */
  151.  
  152. #define SPELL_TYPE_SPELL   0
  153. #define SPELL_TYPE_POTION  1
  154. #define SPELL_TYPE_WAND    2
  155. #define SPELL_TYPE_STAFF   3
  156. #define SPELL_TYPE_SCROLL  4
  157.  
  158.  
  159. /* Attacktypes with grammar */
  160.  
  161. struct attack_hit_type {
  162.   char *singular;
  163.   char *plural;
  164. };
  165.  
  166.