OSDN Git Service

Rest and Shoot exp is reduced by accumulated damages. 9/10 per maxhp.
[hengband/hengband.git] / src / types.h
index 2db27e1..8e34eec 100644 (file)
@@ -52,7 +52,7 @@
  * Feature state structure
  *
  * - Action (FF_*)
- * - Result (FEAT_*)
+ * - Result (f_info ID)
  */
 typedef struct feature_state feature_state;
 
@@ -84,6 +84,7 @@ struct feature_type
 
        feature_state state[MAX_FEAT_STATES];
 
+       byte subtype;
        byte power;
 
        byte d_attr[F_LIT_MAX];   /* Default feature attribute */
@@ -106,6 +107,7 @@ struct object_kind
 {
        u32b name;                      /* Name (offset) */
        u32b text;                      /* Text (offset) */
+       u32b flavor_name;               /* Flavor name (offset) */
 
        byte tval;                      /* Object type */
        byte sval;                      /* Object sub type */
@@ -143,7 +145,7 @@ struct object_kind
        byte x_char;            /* Desired object character */
 
 
-       byte flavor;                    /* Special object flavor (or zero) */
+       s16b flavor;            /* Special object flavor (or zero) */
 
        bool easy_know;         /* This object is always known (if aware) */
 
@@ -151,6 +153,8 @@ struct object_kind
        bool aware;                     /* The player is "aware" of the item's effects */
 
        bool tried;                     /* The player has "tried" one of the items */
+
+       byte act_idx;           /* Activative ability index */
 };
 
 
@@ -198,6 +202,8 @@ struct artifact_type
        byte max_num;           /* Unused (should be "1") */
 
        s16b floor_id;          /* Leaved on this location last time */
+
+       byte act_idx;           /* Activative ability index */
 };
 
 
@@ -229,6 +235,8 @@ struct ego_item_type
        u32b flags[TR_FLAG_SIZE];       /* Ego-Item Flags */
 
        u32b gen_flags;         /* flags for generate */
+
+       byte act_idx;           /* Activative ability index */
 };
 
 
@@ -347,7 +355,8 @@ struct monster_race
        s16b r_sights;                  /* Count sightings of this monster */
        s16b r_deaths;                  /* Count deaths from this monster */
 
-       s16b r_pkills;                  /* Count monsters killed in this life */
+       s16b r_pkills;                  /* Count visible monsters killed in this life */
+       s16b r_akills;                  /* Count all monsters killed in this life */
        s16b r_tkills;                  /* Count monsters killed in all lives */
 
        byte r_wake;                    /* Number of times woken up (?) */
@@ -524,10 +533,10 @@ struct object_type
        byte name2;                     /* Ego-Item type, if any */
 
        byte xtra1;                     /* Extra info type (now unused) */
-       byte xtra2;                     /* Extra info index */
-       byte xtra3;                     /* Extra info */
-       s16b xtra4;                     /* Extra info */
-       s16b xtra5;                     /* Extra info */
+       byte xtra2;                     /* Extra info activation index */
+       byte xtra3;                     /* Extra info for weaponsmith */
+       s16b xtra4;                     /* Extra info fuel or captured monster's current HP */
+       s16b xtra5;                     /* Extra info captured monster's max HP */
 
        s16b to_h;                      /* Plusses to hit */
        s16b to_d;                      /* Plusses to damage */
@@ -582,19 +591,13 @@ struct monster_type
        s16b hp;                /* Current Hit points */
        s16b maxhp;             /* Max Hit points */
        s16b max_maxhp;         /* Max Max Hit points */
+       u32b dealt_damage;              /* Sum of damages dealt by player */
 
-       s16b csleep;            /* Inactive counter */
+       s16b mtimed[MAX_MTIMED];        /* Timed status counter */
 
        byte mspeed;            /* Monster "speed" */
        s16b energy_need;       /* Monster "energy" */
 
-       byte fast;              /* Monster is stunned */
-       byte slow;              /* Monster is stunned */
-       byte stunned;           /* Monster is stunned */
-       byte confused;          /* Monster is confused */
-       byte monfear;           /* Monster is afraid */
-       byte invulner;          /* Monster is temporarily invulnerable */
-
        byte cdis;              /* Current dis from player */
 
        byte mflag;             /* Extra monster flags */
@@ -1080,6 +1083,7 @@ struct player_type
        byte recall_dungeon;      /* Dungeon set to be recalled */
 
        s16b energy_need;         /* Energy needed for next move */
+       s16b enchant_energy_need;         /* Energy needed for next upkeep effect        */
 
        s16b food;                /* Current nutrition */
 
@@ -1106,6 +1110,8 @@ struct player_type
        s16b mane_dam[MAX_MANE];
        s16b mane_num;
 
+       s16b concent;      /* Sniper's concentration level */
+
        s16b player_hp[PY_MAX_LEVEL];
        char died_from[80];       /* What killed the player */
        cptr last_message;        /* Last message on death or retirement */
@@ -1514,7 +1520,7 @@ typedef struct tag_type tag_type;
 struct tag_type
 {
        int     tag;
-       void    *pointer;
+       int     index;
 };
 
 typedef bool (*monster_hook_type)(int r_idx);
@@ -1678,3 +1684,50 @@ typedef struct
        byte tval;  /* tval of prize (0 means no prize) */
        byte sval;  /* sval of prize */
 } arena_type;
+
+
+/*
+ * A structure type for doors
+ */
+typedef struct
+{
+       s16b open;
+       s16b broken;
+       s16b closed;
+       s16b locked[MAX_LJ_DOORS];
+       s16b num_locked;
+       s16b jammed[MAX_LJ_DOORS];
+       s16b num_jammed;
+} door_type;
+
+
+#ifdef TRAVEL
+/*
+ *  A structure type for travel command
+ */
+typedef struct {
+       int run; /* Remaining grid number */
+       int cost[MAX_HGT][MAX_WID];
+       int x; /* Target X */
+       int y; /* Target Y */
+       int dir; /* Running direction */
+} travel_type;
+#endif
+
+typedef struct {
+       cptr flag;
+       byte index;
+       byte level;
+       s32b value;
+       struct {
+               int constant;
+               int dice;
+       } timeout;
+       cptr desc;
+} activation_type;
+
+typedef struct {
+       int flag;
+       int type;
+       cptr name;
+} dragonbreath_type;