1 | /* |
1 | /* |
2 | * static char *rcsid_treasure_h = |
2 | * static char *rcsid_treasure_h = |
3 | * "$Id: treasure.h,v 1.2 2006/08/29 08:01:36 root Exp $"; |
3 | * "$Id: treasure.h,v 1.3 2006/08/31 17:54:14 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
69 | * arch parser over this clone, using the treasure list as script until an END comes. |
69 | * arch parser over this clone, using the treasure list as script until an END comes. |
70 | * This will allow ANY changes which is possible and we use ony one parser. |
70 | * This will allow ANY changes which is possible and we use ony one parser. |
71 | */ |
71 | */ |
72 | |
72 | |
73 | typedef struct _change_arch { |
73 | typedef struct _change_arch { |
74 | const char *name; /* is != NULL, copy this over the original arch name */ |
74 | shstr name; /* is != NULL, copy this over the original arch name */ |
75 | const char *title; /* is != NULL, copy this over the original arch name */ |
75 | shstr title; /* is != NULL, copy this over the original arch name */ |
76 | const char *slaying; /* is != NULL, copy this over the original arch name */ |
76 | shstr slaying; /* is != NULL, copy this over the original arch name */ |
77 | } _change_arch; |
77 | } _change_arch; |
78 | |
78 | |
79 | |
79 | |
80 | /* |
80 | /* |
81 | * treasure is one element in a linked list, which together consist of a |
81 | * treasure is one element in a linked list, which together consist of a |
… | |
… | |
84 | * is generated (from a generator) |
84 | * is generated (from a generator) |
85 | */ |
85 | */ |
86 | |
86 | |
87 | typedef struct treasurestruct { |
87 | typedef struct treasurestruct { |
88 | struct archt *item; /* Which item this link can be */ |
88 | struct archt *item; /* Which item this link can be */ |
89 | const char *name; /* If non null, name of list to use |
89 | shstr name; /* If non null, name of list to use |
90 | instead */ |
90 | instead */ |
91 | struct treasurestruct *next; /* Next treasure-item in a linked list */ |
91 | struct treasurestruct *next; /* Next treasure-item in a linked list */ |
92 | struct treasurestruct *next_yes; /* If this item was generated, use */ |
92 | struct treasurestruct *next_yes; /* If this item was generated, use */ |
93 | /* this link instead of ->next */ |
93 | /* this link instead of ->next */ |
94 | struct treasurestruct *next_no; /* If this item was not generated, */ |
94 | struct treasurestruct *next_no; /* If this item was not generated, */ |
… | |
… | |
103 | uint16 nrof; /* random 1 to nrof items are generated */ |
103 | uint16 nrof; /* random 1 to nrof items are generated */ |
104 | } treasure; |
104 | } treasure; |
105 | |
105 | |
106 | |
106 | |
107 | typedef struct treasureliststruct { |
107 | typedef struct treasureliststruct { |
108 | const char *name; /* Usually monster-name/combination */ |
108 | shstr name; /* Usually monster-name/combination */ |
109 | sint16 total_chance; /* If non-zero, only 1 item on this |
109 | sint16 total_chance; /* If non-zero, only 1 item on this |
110 | * list should be generated. The |
110 | * list should be generated. The |
111 | * total_chance contains the sum of |
111 | * total_chance contains the sum of |
112 | * the chance for this list. |
112 | * the chance for this list. |
113 | */ |
113 | */ |
114 | struct treasureliststruct *next; /* Next treasure-item in linked list */ |
114 | struct treasureliststruct *next; /* Next treasure-item in linked list */ |
115 | struct treasurestruct *items; /* Items in this list, linked */ |
115 | struct treasurestruct *items; /* Items in this list, linked */ |
116 | } treasurelist; |
116 | } treasurelist; |
117 | |
117 | |
118 | |
|
|
119 | |
|
|
120 | #endif |
118 | #endif |