… | |
… | |
96 | #define POISON 7 |
96 | #define POISON 7 |
97 | #define BOOK 8 |
97 | #define BOOK 8 |
98 | #define CLOCK 9 |
98 | #define CLOCK 9 |
99 | #define VEIN 10 // deliantra: mineral/ore/whatever vein |
99 | #define VEIN 10 // deliantra: mineral/ore/whatever vein |
100 | #define RANGED 11 // deliantra: other range item (skill based) |
100 | #define RANGED 11 // deliantra: other range item (skill based) |
101 | //12 |
101 | #define SKILLSCROLL 12 /* can add a skill to player's inventory -bt. */ |
102 | #define ARROW 13 |
102 | #define ARROW 13 |
103 | #define BOW 14 |
103 | #define BOW 14 |
104 | #define WEAPON 15 |
104 | #define WEAPON 15 |
105 | #define ARMOUR 16 |
105 | #define ARMOUR 16 |
106 | #define PEDESTAL 17 |
106 | #define PEDESTAL 17 |
… | |
… | |
128 | #define AMULET 39 |
128 | #define AMULET 39 |
129 | #define PLAYERMOVER 40 |
129 | #define PLAYERMOVER 40 |
130 | #define TELEPORTER 41 |
130 | #define TELEPORTER 41 |
131 | #define CREATOR 42 |
131 | #define CREATOR 42 |
132 | #define SKILL 43 /* also see SKILL_TOOL (74) below */ |
132 | #define SKILL 43 /* also see SKILL_TOOL (74) below */ |
133 | //44 |
133 | #define IDENTIFY_ALTAR 44 |
134 | #define EARTHWALL 45 |
134 | #define EARTHWALL 45 |
135 | #define GOLEM 46 |
135 | #define GOLEM 46 |
136 | //47 |
136 | #define DEEP_SWAMP 47 |
137 | #define THROWN_OBJ 48 |
137 | #define THROWN_OBJ 48 |
138 | #define BLINDNESS 49 |
138 | #define BLINDNESS 49 |
139 | #define GOD 50 |
139 | #define GOD 50 |
140 | #define DETECTOR 51 /* peterm: detector is an object |
140 | #define DETECTOR 51 /* peterm: detector is an object |
141 | * which notices the presense of |
141 | * which notices the presense of |
… | |
… | |
156 | |
156 | |
157 | #define PEACEMAKER 59 /* Object owned by a player which can convert |
157 | #define PEACEMAKER 59 /* Object owned by a player which can convert |
158 | * a monster into a peaceful being incapable of attack. |
158 | * a monster into a peaceful being incapable of attack. |
159 | */ |
159 | */ |
160 | #define GEM 60 |
160 | #define GEM 60 |
161 | //61 |
161 | #define MENU 61 /* Mark Wedel (mark@pyramid.com) Shop inventories */ |
162 | #define FIREWALL 62 |
162 | #define FIREWALL 62 |
163 | #define ANVIL 63 |
163 | #define ANVIL 63 |
164 | #define CHECK_INV 64 /* by b.t. thomas@nomad.astro.psu.edu */ |
164 | #define CHECK_INV 64 /* by b.t. thomas@nomad.astro.psu.edu */ |
165 | #define MOOD_FLOOR 65 /* |
165 | #define MOOD_FLOOR 65 /* |
166 | * values of last_sp set how to change: |
166 | * values of last_sp set how to change: |
… | |
… | |
175 | #define EXIT 66 |
175 | #define EXIT 66 |
176 | #define ENCOUNTER 67 |
176 | #define ENCOUNTER 67 |
177 | #define SHOP_FLOOR 68 |
177 | #define SHOP_FLOOR 68 |
178 | #define SHOP_MAT 69 |
178 | #define SHOP_MAT 69 |
179 | #define RING 70 |
179 | #define RING 70 |
180 | #define FLOOR 71 /* this is a floor tile -> native layer 0 */ |
180 | //#define FLOOR 71 /* this is a floor tile -> native layer 0 */ // UNUSED??? |
181 | #define FLESH 72 /* animal 'body parts' -b.t. */ |
181 | #define FLESH 72 /* animal 'body parts' -b.t. */ |
182 | #define INORGANIC 73 /* metals and minerals */ |
182 | #define INORGANIC 73 /* metals and minerals */ |
183 | #define SKILL_TOOL 74 /* Allows the use of a skill */ |
183 | #define SKILL_TOOL 74 /* Allows the use of a skill */ |
184 | #define LIGHTER 75 |
184 | #define LIGHTER 75 |
185 | //76 |
185 | //76 |
… | |
… | |
196 | #define DUPLICATOR 83 /* duplicator/multiplier object */ |
196 | #define DUPLICATOR 83 /* duplicator/multiplier object */ |
197 | //84 |
197 | //84 |
198 | #define SPELLBOOK 85 |
198 | #define SPELLBOOK 85 |
199 | //86 |
199 | //86 |
200 | #define CLOAK 87 |
200 | #define CLOAK 87 |
201 | //88 |
201 | #define MAPSCRIPT 88 /* A perl-scripted connectable */ |
202 | //89 |
202 | #define SAFE_GROUND 89 /* This is a safe ground, means that neither bombs, |
|
|
203 | potions, alchemy, or magic works here (elmex) */ |
203 | #define SPINNER 90 |
204 | #define SPINNER 90 |
204 | #define GATE 91 |
205 | #define GATE 91 |
205 | #define BUTTON 92 |
206 | #define BUTTON 92 |
206 | #define T_HANDLE 93 |
207 | #define T_HANDLE 93 |
207 | #define HOLE 94 |
208 | #define HOLE 94 |
208 | #define TRAPDOOR 95 |
209 | #define TRAPDOOR 95 |
209 | //96 |
210 | #define RUNE 96 |
210 | //97 |
211 | #define TRAP 97 |
211 | #define SIGN 98 |
212 | #define SIGN 98 |
212 | #define BOOTS 99 |
213 | #define BOOTS 99 |
213 | #define GLOVES 100 |
214 | #define GLOVES 100 |
214 | #define SPELL 101 |
215 | #define SPELL 101 |
215 | #define SPELL_EFFECT 102 |
216 | #define SPELL_EFFECT 102 |
216 | #define CONVERTER 103 |
217 | #define CONVERTER 103 |
217 | #define BRACERS 104 |
218 | #define BRACERS 104 |
218 | #define POISONING 105 |
219 | #define POISONING 105 |
219 | #define SAVEBED 106 |
220 | #define SAVEBED 106 |
220 | //107 |
221 | #define DISEASE 107 |
221 | //108 |
222 | #define SYMPTOM 108 |
222 | #define WAND 109 |
223 | #define WAND 109 |
223 | #define INSCRIBABLE 110 // inscribable things, st 0 book st 1 spell |
224 | #define INSCRIBABLE 110 // inscribable things, st 0 book st 1 spell |
224 | #define SCROLL 111 |
225 | #define SCROLL 111 |
225 | #define DIRECTOR 112 |
226 | #define DIRECTOR 112 |
226 | #define GIRDLE 113 |
227 | #define GIRDLE 113 |
227 | #define FORCE 114 |
228 | #define FORCE 114 |
228 | #define POTION_EFFECT 115 /* a force, holding the effect of a potion */ |
229 | #define POTION_EFFECT 115 /* a force, holding the effect of a potion */ |
229 | #define EVENT_CONNECTOR 116 /* Lauwenmark: an invisible object holding a plugin event hook */ |
230 | #define EVENT_CONNECTOR 116 /* Lauwenmark: an invisible object holding a plugin event hook */ |
230 | //117 |
231 | #define ITEM_TRANSFORMER 117 /* Transforming one item with another */ |
231 | //118 |
232 | #define POWER_CRYSTAL 118 |
232 | //119 |
233 | #define CORPSE 119 |
233 | //120 |
234 | //120 |
234 | #define CLOSE_CON 121 /* Eneq(@csd.uu.se): Id for close_container archetype. */ |
235 | #define CLOSE_CON 121 /* Eneq(@csd.uu.se): Id for close_container archetype. */ |
235 | #define CONTAINER 122 |
236 | #define CONTAINER 122 |
236 | #define ARMOUR_IMPROVER 123 |
237 | #define ARMOUR_IMPROVER 123 |
237 | #define WEAPON_IMPROVER 124 |
238 | #define WEAPON_IMPROVER 124 |
238 | //125 |
|
|
239 | //126 |
|
|
240 | //127 |
|
|
241 | //128 |
|
|
242 | //129 |
|
|
243 | #define SKILLSCROLL 130 /* can add a skill to player's inventory -bt. */ |
|
|
244 | //131 |
|
|
245 | //132 |
|
|
246 | //133 |
|
|
247 | //134 |
|
|
248 | //135 |
|
|
249 | //136 |
|
|
250 | //137 |
|
|
251 | #define DEEP_SWAMP 138 |
|
|
252 | #define IDENTIFY_ALTAR 139 |
|
|
253 | //140 |
|
|
254 | //141 |
|
|
255 | //142 |
|
|
256 | //143 |
|
|
257 | //144 |
|
|
258 | //145 |
|
|
259 | //146 |
|
|
260 | //147 |
|
|
261 | //148 |
|
|
262 | //149 |
|
|
263 | #define MENU 150 /* Mark Wedel (mark@pyramid.com) Shop inventories */ |
|
|
264 | //151 |
|
|
265 | //152 |
|
|
266 | //153 |
|
|
267 | #define RUNE 154 |
|
|
268 | #define TRAP 155 |
|
|
269 | #define POWER_CRYSTAL 156 |
|
|
270 | #define CORPSE 157 |
|
|
271 | #define DISEASE 158 |
|
|
272 | #define SYMPTOM 159 |
|
|
273 | #define BUILDER 160 /* Generic item builder, see subtypes */ |
239 | #define BUILDER 125 /* Generic item builder, see subtypes */ |
274 | #define MATERIAL 161 /* Material for building */ |
240 | #define MATERIAL 126 /* Material for building */ |
275 | //162 |
|
|
276 | #define ITEM_TRANSFORMER 163 /* Transforming one item with another */ |
|
|
277 | #define MAPSCRIPT 164 /* A perl-scripted connectable */ |
|
|
278 | #define SAFE_GROUND 165 /* This is a safe ground, means that neither bombs, |
|
|
279 | potions, alchemy, or magic works here (elmex) */ |
|
|
280 | |
241 | |
281 | #define NUM_TYPES 166 // must be max(type) + 1 |
242 | #define NUM_TYPES 127 // must be max(type) + 1 |
282 | |
243 | |
283 | /* END TYPE DEFINE */ |
244 | /* END TYPE DEFINE */ |
|
|
245 | |
|
|
246 | typedef std::bitset<NUM_TYPES> typeset; |
|
|
247 | |
|
|
248 | /* These are the items that currently can change digestion, regeneration, |
|
|
249 | * spell point recovery and mana point recovery. Seems sort of an arbitary |
|
|
250 | * list, but other items store other info into stats array. |
|
|
251 | * As a special exception, bows use stats.sp for their own purposes. |
|
|
252 | */ |
|
|
253 | static const struct digest_types : typeset |
|
|
254 | { |
|
|
255 | digest_types () |
|
|
256 | { |
|
|
257 | set (WEAPON); |
|
|
258 | set (BOW); |
|
|
259 | set (ARMOUR); |
|
|
260 | set (HELMET); |
|
|
261 | set (SHIELD); |
|
|
262 | set (RING); |
|
|
263 | set (BOOTS); |
|
|
264 | set (GLOVES); |
|
|
265 | set (AMULET); |
|
|
266 | set (GIRDLE); |
|
|
267 | set (BRACERS); |
|
|
268 | set (CLOAK); |
|
|
269 | set (DISEASE); |
|
|
270 | set (FORCE); |
|
|
271 | set (SKILL); |
|
|
272 | } |
|
|
273 | } digest_types; |
284 | |
274 | |
285 | // maximum supported subtype number + 1, can be increased to 256 |
275 | // maximum supported subtype number + 1, can be increased to 256 |
286 | // currently (2007-09) in use: 50 |
276 | // currently (2007-09) in use: 50 |
287 | #define NUM_SUBTYPES 64 |
277 | #define NUM_SUBTYPES 64 |
288 | |
278 | |
… | |
… | |
741 | #define CAN_APPLY_UNAPPLY_MULT 0x20 |
731 | #define CAN_APPLY_UNAPPLY_MULT 0x20 |
742 | #define CAN_APPLY_UNAPPLY_CHOICE 0x40 |
732 | #define CAN_APPLY_UNAPPLY_CHOICE 0x40 |
743 | |
733 | |
744 | // Cut off point of when an object is put on the active list or not |
734 | // Cut off point of when an object is put on the active list or not |
745 | // we use 2**-n because that can be represented exactly |
735 | // we use 2**-n because that can be represented exactly |
746 | // also make sure that this is a float, not double, constant |
736 | // also make sure that this is a float, not double, constant. |
|
|
737 | // some areas in the server divide by this value, so |
|
|
738 | // to avoid integer overflows it should not be much lower. |
747 | #define MIN_ACTIVE_SPEED (1.f / 65536.f) |
739 | #define MIN_ACTIVE_SPEED (1.f / 65536.f) |
748 | |
740 | |
749 | /* have mercy on players and guarantee a somewhat higher speed */ |
741 | /* have mercy on players and guarantee a somewhat higher speed */ |
750 | #define MIN_PLAYER_SPEED 0.04f |
742 | #define MIN_PLAYER_SPEED 0.04f |
751 | |
743 | |