home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d190 / nethack.lha / NetHack / een.zoo / you.h < prev   
C/C++ Source or Header  |  1988-07-26  |  4KB  |  130 lines

  1. /*    SCCS Id: @(#)you.h      2.3     87/12/12
  2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  3.  
  4. #ifndef YOU_H
  5. #define YOU_H
  6.  
  7. #include "config.h"
  8. #include "onames.h"
  9. #include "permonst.h"
  10.  
  11. struct prop {
  12.  
  13. #define TIMEOUT     007777    /* mask */
  14. #define LEFT_RING    W_RINGL /* 010000L */
  15. #define RIGHT_RING    W_RINGR /* 020000L */
  16. #define INTRINSIC    040000L
  17. #define LEFT_SIDE    LEFT_RING
  18. #define RIGHT_SIDE    RIGHT_RING
  19. #define BOTH_SIDES    (LEFT_SIDE | RIGHT_SIDE)
  20.  
  21.     long p_flgs;
  22.     int (*p_tofn)();        /* called after timeout */
  23. };
  24.  
  25. struct you {
  26.     xchar ux, uy;
  27.     schar dx, dy, dz;    /* direction of move (or zap or ... ) */
  28.     schar di;        /* direction of FF */
  29.     xchar ux0, uy0;     /* initial position FF */
  30.     xchar udisx, udisy;    /* last display pos */
  31.     char usym;        /* usually '@' */
  32.     schar uluck;
  33. #define LUCKMAX     10    /* on moonlit nights 11 */
  34. #define LUCKMIN     (-10)
  35.     int last_str_turn;    /* 0: none, 1: half turn, 2: full turn */
  36.                 /* +: turn right, -: turn left */
  37.     unsigned udispl;    /* @ on display */
  38.     unsigned ulevel;    /* 1 - 14 */
  39. #ifdef QUEST
  40.     unsigned uhorizon;
  41. #endif
  42.     unsigned utrap;     /* trap timeout */
  43.     unsigned utraptype;    /* defined if utrap nonzero */
  44. #define TT_BEARTRAP    0
  45. #define TT_PIT        1
  46. #ifdef SPIDERS
  47. #define TT_WEB        2
  48. #endif
  49.     unsigned uinshop;    /* used only in shk.c - (roomno+1) of shop */
  50.  
  51. /* perhaps these #define's should also be generated by makedefs */
  52. #define TELEPAT     LAST_RING        /* not a ring */
  53. #define HTelepat    u.uprops[TELEPAT].p_flgs
  54. #define Telepat     ((HTelepat) || (u.usym == 'E'))
  55. #define FAST        (LAST_RING+1)           /* not a ring */
  56. #define Fast        u.uprops[FAST].p_flgs
  57. #define CONFUSION    (LAST_RING+2)           /* not a ring */
  58. #define HConfusion    u.uprops[CONFUSION].p_flgs
  59. #define Confusion    ((HConfusion) || index("BIy", u.usym))
  60. #define INVIS        (LAST_RING+3)           /* not a ring */
  61. #define HInvis        u.uprops[INVIS].p_flgs
  62. #define Invis        ((HInvis) || u.usym == 'I')
  63. #define Invisible    (Invis && !See_invisible)
  64. #define GLIB        (LAST_RING+4)           /* not a ring */
  65. #define Glib        u.uprops[GLIB].p_flgs
  66. #define PUNISHED    (LAST_RING+5)           /* not a ring */
  67. #define Punished    u.uprops[PUNISHED].p_flgs
  68. #define SICK        (LAST_RING+6)           /* not a ring */
  69. #define Sick        u.uprops[SICK].p_flgs
  70. #define BLINDED     (LAST_RING+7)           /* not a ring */
  71. #define Blinded     u.uprops[BLINDED].p_flgs
  72. #define WOUNDED_LEGS    (LAST_RING+8)           /* not a ring */
  73. #define Wounded_legs    u.uprops[WOUNDED_LEGS].p_flgs
  74. #define STONED        (LAST_RING+9)           /* not a ring */
  75. #define Stoned        u.uprops[STONED].p_flgs
  76. #define HALLUCINATION    (LAST_RING+10)          /* not a ring */
  77. #define Hallucination    u.uprops[HALLUCINATION].p_flgs
  78. #define BLINDFOLDED    (LAST_RING+11)          /* not a ring */
  79. #define Blindfolded    u.uprops[BLINDFOLDED].p_flgs
  80. #define Blind        (Blinded || Blindfolded)
  81. #define BADGED        (LAST_RING+12)          /* not a ring */
  82. #define Badged        u.uprops[BADGED].p_flgs
  83. #define LAST_PROP    (BADGED)                /* the last property */
  84. #define PROP(x) (x-RIN_ADORNMENT)       /* convert ring to index in uprops */
  85.     struct prop uprops[LAST_PROP+1];
  86.  
  87.     unsigned umconf;
  88.     char *usick_cause;
  89.     int mh, mhmax, mtimedone, umonnum;    /* for polymorph-self */
  90.     schar mstr, mstrmax;            /* for saving ustr/ustrmax */
  91. /* #if defined(KOPS) && defined(KAA) */
  92. #ifdef KOPS
  93. # ifdef KAA
  94.     unsigned ucreamed;
  95. # endif
  96. #endif
  97.     unsigned uswallow;        /* set if swallowed by a monster */
  98.     unsigned uswldtim;        /* time you have been swallowed */
  99.     unsigned uhs;            /* hunger state - see hack.eat.c */
  100. #ifdef HARD
  101.     unsigned udemigod;        /* once you kill the wiz */
  102.     unsigned udg_cnt;        /* how long you have been demigod */
  103. #endif
  104. #ifdef RPH
  105.     int medusa_level;        /* level of wiz and medusa */
  106.     int wiz_level;
  107. #endif
  108. #ifdef STOOGES
  109.     int stooge_level;
  110. #endif
  111.     schar ustr,ustrmax;
  112.     schar udaminc;
  113.     schar uac;
  114.     int uhp,uhpmax;
  115. #ifdef SPELLS
  116.     int uen,uenmax;         /* magical energy - M. Stephenson */
  117. #endif
  118. #ifdef PRAYERS
  119.     int ugangr;            /* if the gods are angry at you */
  120.     int ublessed,ublesscnt;     /* blessing/duration from #pray */
  121. #endif
  122.     long int ugold,ugold0,uexp,urexp;
  123.     int uhunger;            /* refd only in eat.c and shk.c */
  124.     int uinvault;
  125.     struct monst *ustuck;
  126.     int nr_killed[CMNUM+2];     /* used for experience bookkeeping */
  127. };
  128.  
  129. #endif /* YOU_H /**/
  130.