phantglobs.c 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /* $NetBSD: phantglobs.c,v 1.5 1999/09/08 21:17:54 jsm Exp $ */
  2. /*
  3. * phantglobs.c - globals for Phantasia
  4. */
  5. #include "include.h"
  6. double Circle; /* which circle player is in */
  7. double Shield; /* force field thrown up in monster battle */
  8. bool Beyond; /* set if player is beyond point of no return */
  9. bool Marsh; /* set if player is in dead marshes */
  10. bool Throne; /* set if player is on throne */
  11. bool Changed; /* set if important player stats have changed */
  12. bool Wizard; /* set if player is the 'wizard' of the game */
  13. bool Timeout; /* set if short timeout waiting for input */
  14. bool Windows; /* set if we are set up for curses stuff */
  15. bool Luckout; /* set if we have tried to luck out in fight */
  16. bool Foestrikes; /* set if foe gets a chance to hit in battleplayer() */
  17. bool Echo; /* set if echo input to terminal */
  18. int Users; /* number of users currently playing */
  19. int Whichmonster; /* which monster we are fighting */
  20. int Lines; /* line on screen counter for fight routines */
  21. jmp_buf Fightenv; /* used to jump into fight routine */
  22. jmp_buf Timeoenv; /* used for timing out waiting for input */
  23. long Fileloc; /* location in file of player statistics */
  24. const char *Login; /* pointer to login of player */
  25. const char *Enemyname; /* pointer name of monster/player we are battling*/
  26. struct player Player; /* stats for player */
  27. struct player Other; /* stats for another player */
  28. struct monster Curmonster;/* stats for current monster */
  29. struct energyvoid Enrgyvoid;/* energy void buffer */
  30. const struct charstats *Statptr;/* pointer into Stattable[] */
  31. /* lookup table for character type dependent statistics */
  32. const struct charstats Stattable[7] = {
  33. /* MAGIC USER */
  34. {
  35. 15.0, 200.0, 18.0, 175.0, 10,
  36. {30, 6, 0.0}, {10, 6, 2.0}, {50, 51, 75.0},
  37. {30, 16, 20.0}, {60, 26, 6.0}, {5, 5, 2.75}
  38. },
  39. /* FIGHTER */
  40. {
  41. 10.0, 110.0, 15.0, 220.0, 20,
  42. {30, 6, 0.0}, {40, 16, 3.0}, {30, 21, 40.0},
  43. {45, 26, 30.0}, {25, 21, 3.0}, {3, 4, 1.5}
  44. },
  45. /* ELF */
  46. {
  47. 12.0, 150.0, 17.0, 190.0, 13,
  48. {32, 7, 0.0}, {35, 11, 2.5}, {45, 46, 65.0},
  49. {30, 21, 25.0}, {40, 26, 4.0}, {4, 4, 2.0}
  50. },
  51. /* DWARF */
  52. { 7.0, 80.0, 13.0, 255.0, 25,
  53. {25, 6, 0.0}, {50, 21, 5.0}, {25, 21, 30.0},
  54. {60, 41, 35.0}, {20, 21, 2.5}, {2, 4, 1.0}
  55. },
  56. /* HALFLING */
  57. {
  58. 11.0, 80.0, 10.0, 125.0, 40,
  59. {34, 0, 0.0}, {20, 6, 2.0}, {25, 21, 30.0},
  60. {55, 36, 30.0}, {40, 36, 4.5}, {1, 4, 1.0}
  61. },
  62. /* EXPERIMENTO */
  63. { 9.0, 90.0, 16.0, 160.0, 20,
  64. {27, 0, 0.0}, {25, 0, 0.0}, {100, 0, 0.0},
  65. {35, 0, 0.0}, {25, 0, 0.0}, {2, 0, 0.0}
  66. },
  67. /* SUPER */
  68. {
  69. 15.0, 200.0, 10.0, 225.0, 40,
  70. {38, 0, 0.0}, {65, 0, 5.0}, {100, 0, 75.0},
  71. {80, 0, 35.0}, {85, 0, 6.0}, {9, 0, 2.75}
  72. }
  73. };
  74. /* menu of items for purchase */
  75. const struct menuitem Menu[] = {
  76. {"Mana", 1},
  77. {"Shield", 5},
  78. {"Book", 200},
  79. {"Sword", 500},
  80. {"Charm", 1000},
  81. {"Quicksilver", 2500},
  82. {"Blessing", 1000},
  83. };
  84. FILE *Playersfp; /* pointer to open player file */
  85. FILE *Monstfp; /* pointer to open monster file */
  86. FILE *Messagefp; /* pointer to open message file */
  87. FILE *Energyvoidfp; /* pointer to open energy void file */
  88. char Databuf[SZ_DATABUF]; /* a place to read data into */
  89. /* some canned strings for messages */
  90. const char Illcmd[] = "Illegal command.\n";
  91. const char Illmove[] = "Too far.\n";
  92. const char Illspell[] = "Illegal spell.\n";
  93. const char Nomana[] = "Not enought mana for that spell.\n";
  94. const char Somebetter[] = "But you already have something better.\n";
  95. const char Nobetter[] = "That's no better than what you already have.\n";