phantdefs.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /* $NetBSD: phantdefs.h,v 1.4 2001/09/16 16:34:25 wiz Exp $ */
  2. /*
  3. * phantdefs.h - important constants for Phantasia
  4. */
  5. /* ring constants */
  6. #define R_NONE 0 /* no ring */
  7. #define R_NAZREG 1 /* regular Nazgul ring (expires) */
  8. #define R_DLREG 2 /* regular Dark Lord ring (does not expire) */
  9. #define R_BAD 3 /* bad ring */
  10. #define R_SPOILED 4 /* ring which has gone bad */
  11. /* status constants */
  12. /* We must #undef these first since setup.c includes headers that reserve S_* */
  13. #undef S_NOTUSED
  14. #undef S_OFF
  15. #undef S_PLAYING
  16. #undef S_CLOAKED
  17. #undef S_INBATTLE
  18. #undef S_MONSTER
  19. #undef S_TRADING
  20. #undef S_HUNGUP
  21. #define S_NOTUSED 0 /* record not in use */
  22. #define S_OFF 1 /* not playing */
  23. #define S_PLAYING 2 /* playing - nothing else */
  24. #define S_CLOAKED 3 /* playing - cloaked */
  25. #define S_INBATTLE 4 /* playing - in battle */
  26. #define S_MONSTER 5 /* playing - fighting monster */
  27. #define S_TRADING 6 /* playing - at a trading post */
  28. #define S_HUNGUP 7 /* error occurred with character */
  29. /* tampered constants */
  30. #define T_OFF 0 /* nothing */
  31. #define T_NRGVOID 1 /* hit an energy void */
  32. #define T_GRAIL 2 /* landed on the holy grail */
  33. #define T_TRANSPORT 3 /* transported by king */
  34. #define T_BESTOW 4 /* gold bestowed by king */
  35. #define T_CURSED 5 /* cursed by king */
  36. #define T_MONSTER 6 /* monster lobbed by valar */
  37. #define T_BLESSED 7 /* blessed by valar */
  38. #define T_RELOCATE 8 /* moved by valar */
  39. #define T_HEAL 9 /* healed by valar */
  40. #define T_VAPORIZED 10 /* vaporized by wizard */
  41. #define T_EXVALAR 11 /* no longer valar */
  42. /* inter-terminal battle status constants */
  43. #define I_OFF 0 /* nothing */
  44. #define I_RAN 1 /* ran away */
  45. #define I_STUCK 2 /* tried to run unsuccessfully */
  46. #define I_BLEWIT 3 /* tried to luckout unsuccessfully */
  47. #define I_KILLED 4 /* killed foe */
  48. /* constants for altering coordinates */
  49. #define A_SPECIFIC 0 /* coordinates specified */
  50. #define A_FORCED 1 /* coordinates specified, ignore Beyond */
  51. #define A_NEAR 2 /* coordinates not specified, move near */
  52. #define A_FAR 3 /* coordinates not specified, move far */
  53. /* constants for character types */
  54. #define C_MAGIC 0 /* magic user */
  55. #define C_FIGHTER 1 /* fighter */
  56. #define C_ELF 2 /* elf */
  57. #define C_DWARF 3 /* dwarf */
  58. #define C_HALFLING 4 /* halfling */
  59. #define C_EXPER 5 /* experimento */
  60. #define C_SUPER 6 /* super being */
  61. /* constants for special character types */
  62. #define SC_NONE 0 /* not a special character */
  63. #define SC_KING 1 /* king */
  64. #define SC_COUNCIL 2 /* council of the wise */
  65. #define SC_VALAR 3 /* valar */
  66. #define SC_EXVALAR 4 /* ex-valar */
  67. /* special monster constants */
  68. #define SM_NONE 0 /* nothing special */
  69. #define SM_UNICORN 1 /* unicorn */
  70. #define SM_MODNAR 2 /* Modnar */
  71. #define SM_MIMIC 3 /* mimic */
  72. #define SM_DARKLORD 4 /* Dark Lord */
  73. #define SM_LEANAN 5 /* Leanan-Sidhe */
  74. #define SM_SARUMAN 6 /* Saruman */
  75. #define SM_THAUMATURG 7 /* thaumaturgist */
  76. #define SM_BALROG 8 /* balrog */
  77. #define SM_VORTEX 9 /* vortex */
  78. #define SM_NAZGUL 10 /* nazgul */
  79. #define SM_TIAMAT 11 /* Tiamat */
  80. #define SM_KOBOLD 12 /* kobold */
  81. #define SM_SHELOB 13 /* Shelob */
  82. #define SM_FAERIES 14 /* assorted faeries */
  83. #define SM_LAMPREY 15 /* lamprey */
  84. #define SM_SHRIEKER 16 /* shrieker */
  85. #define SM_BONNACON 17 /* bonnacon */
  86. #define SM_SMEAGOL 18 /* Smeagol */
  87. #define SM_SUCCUBUS 19 /* succubus */
  88. #define SM_CERBERUS 20 /* Cerberus */
  89. #define SM_UNGOLIANT 21 /* Ungoliant */
  90. #define SM_JABBERWOCK 22 /* jabberwock */
  91. #define SM_MORGOTH 23 /* Morgoth */
  92. #define SM_TROLL 24 /* troll */
  93. #define SM_WRAITH 25 /* wraith */
  94. /* constants for spells */
  95. #define ML_ALLORNOTHING 0.0 /* magic level for 'all or nothing' */
  96. #define MM_ALLORNOTHING 1.0 /* mana used for 'all or nothing' */
  97. #define ML_MAGICBOLT 5.0 /* magic level for 'magic bolt' */
  98. #define ML_FORCEFIELD 15.0 /* magic level for 'force field' */
  99. #define MM_FORCEFIELD 30.0 /* mana used for 'force field' */
  100. #define ML_XFORM 25.0 /* magic level for 'transform' */
  101. #define MM_XFORM 50.0 /* mana used for 'transform' */
  102. #define ML_INCRMIGHT 35.0 /* magic level for 'increase might' */
  103. #define MM_INCRMIGHT 75.0 /* mana used for 'increase might' */
  104. #define ML_INVISIBLE 45.0 /* magic level for 'invisibility' */
  105. #define MM_INVISIBLE 90.0 /* mana used for 'invisibility' */
  106. #define ML_XPORT 60.0 /* magic level for 'transport' */
  107. #define MM_XPORT 125.0 /* mana used for 'transport' */
  108. #define ML_PARALYZE 75.0 /* magic level for 'paralyze' */
  109. #define MM_PARALYZE 150.0 /* mana used for 'paralyze' */
  110. #define MM_SPECIFY 1000.0 /* mana used for 'specify' */
  111. #define ML_CLOAK 20.0 /* magic level for 'cloak' */
  112. #define MEL_CLOAK 7.0 /* experience level for 'cloak' */
  113. #define MM_CLOAK 35.0 /* mana used for 'cloak' */
  114. #define ML_TELEPORT 40.0 /* magic level for 'teleport' */
  115. #define MEL_TELEPORT 12.0 /* experience level for 'teleport' */
  116. #define MM_INTERVENE 1000.0 /* mana used to 'intervene' */
  117. /* some miscellaneous constants */
  118. #define SZ_DATABUF 100 /* size of input buffer */
  119. #define SZ_PLAYERSTRUCT sizeof(struct player) /* size of player structure */
  120. #define SZ_VOIDSTRUCT sizeof(struct energyvoid) /* size of energy void struct */
  121. #define SZ_SCORESTRUCT sizeof(struct scoreboard) /* size of score board entry */
  122. #define SZ_MONSTERSTRUCT sizeof(struct monster) /* size of monster structure */
  123. #define SZ_NAME 21 /* size of player name (incl. trailing nul) */
  124. #define SZ_PASSWORD 9 /* size of password (incl. trailing nul) */
  125. #define SZ_LOGIN 9 /* size of login (incl. trailing nul) */
  126. #define N_DAYSOLD 21 /* number of days old for purge */
  127. #define N_AGE 500 /* age to degenerate ratio */
  128. #define N_GEMVALUE (1000.0) /* number of gold pieces to gem ratio */
  129. #define N_TAXAMOUNT (7.0) /* tax percent */
  130. #define D_BEYOND (1.1e6) /* distance to beyond point of no return */
  131. #define D_EXPER (2000.0) /* distance experimentos are allowed */
  132. #define CH_MARKDELETE '\001' /* used to alter name of deleted players */
  133. #define CH_KILL '\030' /* kill character (ctrl-X) */
  134. #define CH_ERASE '\010' /* erase character (ctrl-H) */
  135. #define CH_NEWLINE '\n' /* newline */
  136. #define CH_REDRAW '\014' /* redraw screen character (ctrl-L) */