… | |
… | |
66 | |
66 | |
67 | =item face <facename> |
67 | =item face <facename> |
68 | |
68 | |
69 | The graphical appearance of this object. |
69 | The graphical appearance of this object. |
70 | |
70 | |
|
|
71 | =item x <number> |
|
|
72 | |
|
|
73 | The x position of the object when it is on a map. |
|
|
74 | |
|
|
75 | =item y <number> |
|
|
76 | |
|
|
77 | The y position of the object when it is on a map. |
|
|
78 | |
|
|
79 | =item map (internal) |
|
|
80 | |
|
|
81 | The map the object is on. |
|
|
82 | |
71 | =item invisible <number> |
83 | =item invisible <number> |
72 | |
84 | |
73 | If the <number> is greater than 0 the object is invisible. |
85 | If the <number> is greater than 0 the object is invisible. |
74 | For players this field reflects the duration of the invisibility |
86 | For players this field reflects the duration of the invisibility |
75 | and is decreased every tick by 1. |
87 | and is decreased every tick by 1. |
76 | |
88 | |
77 | For non-player objects this field is not changed by server ticks. |
89 | For non-player objects this field is not changed by server ticks. |
78 | |
90 | |
79 | =item speed <numeric> |
91 | =item speed <number> |
80 | |
92 | |
81 | If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed |
93 | If this field is greater than MIN_ACTIVE_SPEED (~0.0001) the object is placed |
82 | on the active object list and will be processed each tick (see also speed_left!). |
94 | on the active object list and will be processed each tick (see also speed_left!). |
83 | |
95 | |
84 | If the speed field drops below the MIN_ACTIVE_SPEED the object is removed |
96 | If the speed field drops below the MIN_ACTIVE_SPEED the object is removed |
… | |
… | |
94 | |
106 | |
95 | If the object is on the active list and speed_left is lower or |
107 | If the object is on the active list and speed_left is lower or |
96 | equal to 0 the absolute value of the speed field is added to speed_left |
108 | equal to 0 the absolute value of the speed field is added to speed_left |
97 | on the end of the tick. |
109 | on the end of the tick. |
98 | |
110 | |
|
|
111 | This means: the lower the speed field is (but still above MIN_ACTIVE_SPEED) |
|
|
112 | the more seldom the object is processed. And the higher the speed field is |
|
|
113 | the more often the object is processed. |
|
|
114 | |
|
|
115 | =item connected <number> |
|
|
116 | |
|
|
117 | When this field is set the object will be linked to a connection with the |
|
|
118 | id <number>. What happens when the connection is 'activated' depends on the |
|
|
119 | type of the object. |
|
|
120 | |
|
|
121 | When FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE they will control |
|
|
122 | when to activate the object, see description of these below for further details. |
|
|
123 | |
99 | =item no_drop (0|1) |
124 | =item no_drop (0|1) |
100 | |
125 | |
101 | Sets the flag FLAG_NO_DROP. See the Flags section below. |
126 | Sets the flag FLAG_NO_DROP. |
|
|
127 | See Flags section below. |
102 | |
128 | |
103 | =item applied (0|1) |
129 | =item applied (0|1) |
104 | |
130 | |
105 | Sets the flag FLAG_APPLIED. See the Flags section below. |
131 | Sets the flag FLAG_APPLIED. |
|
|
132 | See Flags section below. |
106 | |
133 | |
107 | =item is_used_up (0|1) |
134 | =item is_used_up (0|1) |
108 | |
135 | |
109 | Sets the flag FLAG_IS_USED_UP. See Flags section below. |
136 | Sets the flag FLAG_IS_USED_UP. |
|
|
137 | See Flags section below. |
|
|
138 | |
|
|
139 | =item auto_apply (0|1) |
|
|
140 | |
|
|
141 | Sets the flag FLAG_AUTO_APPLY. |
|
|
142 | See Flags section below. |
|
|
143 | |
|
|
144 | =item no_steal (0|1) |
|
|
145 | |
|
|
146 | Sets the flag FLAG_NO_STEAL. |
|
|
147 | See Flags section below. |
|
|
148 | |
|
|
149 | =item reflecting (0|1) |
|
|
150 | |
|
|
151 | Sets the flag FLAG_REFLECTING. |
|
|
152 | See Flags section below. |
|
|
153 | |
|
|
154 | =item reflect_spell (0|1) |
|
|
155 | |
|
|
156 | Sets the flag FLAG_REFL_SPELL. |
|
|
157 | See Flags section below. |
|
|
158 | |
|
|
159 | =item no_skill_ident (0|1) |
|
|
160 | |
|
|
161 | Sets the flag FLAG_NO_SKILL_IDENT. |
|
|
162 | See Flags section below. |
|
|
163 | |
|
|
164 | =item activate_on_push (0|1) (default: 1) |
|
|
165 | |
|
|
166 | Sets the flag FLAG_ACTIVATE_ON_PUSH. |
|
|
167 | See Flags section below. |
|
|
168 | |
|
|
169 | =item activate_on_release (0|1) (default: 1) |
|
|
170 | |
|
|
171 | Sets the flag FLAG_ACTIVATE_ON_RELEASE. |
|
|
172 | See Flags section below. |
110 | |
173 | |
111 | =item editable (more than deprecated) |
174 | =item editable (more than deprecated) |
112 | |
175 | |
113 | This field had a special meaning for crossedit, which used parts |
176 | This field had a special meaning for crossedit, which used parts |
114 | of the server code for editing. Wherever you see this attribute being |
177 | of the server code for editing. Wherever you see this attribute being |
… | |
… | |
144 | |
207 | |
145 | If also the flag FLAG_APPLIED is set, the 'duration' field controls whether |
208 | If also the flag FLAG_APPLIED is set, the 'duration' field controls whether |
146 | this object is removed or not, see the Force type below for the meaning |
209 | this object is removed or not, see the Force type below for the meaning |
147 | of the duration field in this context. |
210 | of the duration field in this context. |
148 | |
211 | |
|
|
212 | If FLAG_APPLIED is not set the object is destroyed. |
|
|
213 | |
|
|
214 | =item FLAG_IS_A_TEMPLATE (internal use) |
|
|
215 | |
|
|
216 | This flag is set on the inventory of generators like CREATORs and CONVERTERs, |
|
|
217 | or other objects that have the flags FLAG_GENERATOR and FLAG_CONTENT_ON_GEN set. |
|
|
218 | |
|
|
219 | =item FLAG_AUTO_APPLY |
|
|
220 | |
|
|
221 | This flag has currently only meaning for the TREASURE type, see below. |
|
|
222 | |
|
|
223 | =item FLAG_ACTIVATE_ON_PUSH |
|
|
224 | |
|
|
225 | This flag has only meaning for objects that can be linked together |
|
|
226 | with the 'connected' field and controls wether the object should |
|
|
227 | be activated when the connection is 'pushed' or it is 'released'. |
|
|
228 | |
|
|
229 | What 'pushed' and 'released' means depends on the object that |
|
|
230 | activates the connection. |
|
|
231 | |
|
|
232 | This flag is by default on. |
|
|
233 | |
|
|
234 | =item FLAG_ACTIVATE_ON_RELEASE |
|
|
235 | |
|
|
236 | This flag has only meaning for objects that can be linked together |
|
|
237 | with the 'connected' field and controls wether the object should |
|
|
238 | be activated when the connection is 'pushed' or it is 'released'. |
|
|
239 | |
|
|
240 | What 'pushed' and 'released' means depends on the object that |
|
|
241 | activates the connection. |
|
|
242 | |
|
|
243 | This flag is by default on. |
|
|
244 | |
|
|
245 | =item FLAG_NO_STEAL |
|
|
246 | |
|
|
247 | When this flag is set this object can't be stolen. The flag will be |
|
|
248 | resetted once the object is placed on a map. |
|
|
249 | |
|
|
250 | When this flag is set on a monster it can defent attempts of stealing |
|
|
251 | (but in this context the flag is only used internally). |
|
|
252 | |
|
|
253 | =item FLAG_NO_SKILL_IDENT |
|
|
254 | |
|
|
255 | This flag is mostly used internal and prevents unidentified objects |
|
|
256 | (objects which don't have FLAG_IDENTIFIED set) being identified by |
|
|
257 | skills. |
|
|
258 | |
|
|
259 | This flag is used to mark objects to never being identified by a skill |
|
|
260 | once a player failed to identify an object. So that multiple tries |
|
|
261 | of identifying aren't more effective than one. |
|
|
262 | |
|
|
263 | =item FLAG_REFLECTING |
|
|
264 | |
|
|
265 | This flag is used by spell effects (eg. SP_BOLT), THROWN_OBJ and ARROW |
|
|
266 | to indicate whether this object reflects off walls. |
|
|
267 | |
|
|
268 | =item FLAG_REFL_SPELL |
|
|
269 | |
|
|
270 | This flag indicates whether something reflects spells, like spell reflecting |
|
|
271 | amuletts. |
|
|
272 | |
149 | =back |
273 | =back |
150 | |
274 | |
151 | =head2 Description of type specific attributes |
275 | =head2 Description of type specific attributes |
152 | |
276 | |
153 | The beginning of the headers of the following subsection |
277 | The beginning of the headers of the following subsection |
154 | are the server internal names for the objects types, see include/define.h. |
278 | are the server internal names for the objects types, see include/define.h. |
155 | The numeric values are maybe not 100% accurate, as the code is a changing |
279 | |
156 | target, please consult include/define.h in doubt :-) |
280 | =head3 TRANSPORT - type 2 - Player transports |
|
|
281 | |
|
|
282 | This type is implemented by the transport extension and has currently no special |
|
|
283 | attributes that affect it. |
|
|
284 | |
|
|
285 | =head3 ROD - type 3 - Rods that fire spells |
|
|
286 | |
|
|
287 | Rods contain spells and can be fired by a player. |
|
|
288 | |
|
|
289 | =over 4 |
|
|
290 | |
|
|
291 | =item level <number> |
|
|
292 | |
|
|
293 | This attribute is used for calculating the spell level that can be fired |
|
|
294 | with this rod, it's also the maximum level of the spell that can be fired. |
|
|
295 | The level of the spell that is being fired depends mostly on |
|
|
296 | the 'use magic item' skill level of the player and 1/10 of the level of the |
|
|
297 | rod is added as bonus. |
|
|
298 | |
|
|
299 | =item hp <number> |
|
|
300 | |
|
|
301 | The amount of spellpoints this rod has left. |
|
|
302 | |
|
|
303 | =item maxhp <number> |
|
|
304 | |
|
|
305 | The maximum amount of spellpoints this rod has. |
|
|
306 | |
|
|
307 | =item skill <skill name> |
|
|
308 | |
|
|
309 | This field determines which skill you need to apply this object. |
|
|
310 | |
|
|
311 | =back |
|
|
312 | |
|
|
313 | =head3 TREASURE - type 4 - Treasures |
|
|
314 | |
|
|
315 | This type of objects are for random treasure generation in maps. |
|
|
316 | If this object is applied by a player it will replace itself with it's |
|
|
317 | inventory. If it is automatically applied |
|
|
318 | generate a treasure and replace itself with the generated treasure. |
|
|
319 | |
|
|
320 | Chests are also of this type, their treasures are generated by |
|
|
321 | the auto apply code on map instantiation. |
|
|
322 | |
|
|
323 | =over 4 |
|
|
324 | |
|
|
325 | =item hp <number> |
|
|
326 | |
|
|
327 | The number of treasures to generate. |
|
|
328 | |
|
|
329 | =item exp <level> |
|
|
330 | |
|
|
331 | If FLAG_AUTO_APPLY is not set the exp field has no further meaning |
|
|
332 | and the difficulty for the treasurecode only depends on the maps difficulty, |
|
|
333 | otherwise the exp field has the following meaning: |
|
|
334 | |
|
|
335 | If this field is not 0 it is passed as the difficulty |
|
|
336 | to the treasure generation code to determine how good, how much |
|
|
337 | worth a treasure is or what bonuses it is given by the treasure code. |
|
|
338 | |
|
|
339 | If this field is not set or 0 the difficulty of the map is passed to the treasure |
|
|
340 | generation code. |
|
|
341 | |
|
|
342 | =item randomitems <treasurelist> |
|
|
343 | |
|
|
344 | The treasurelist to use to generate the treasure which is put in the |
|
|
345 | treasure objects inventory. |
|
|
346 | |
|
|
347 | =back |
|
|
348 | |
|
|
349 | =head3 POTION - type 5 - Potions for drinking and other nastynesses |
|
|
350 | |
|
|
351 | These objects contain a spell and will emit it on apply, which most |
|
|
352 | of the time has the meaning of 'drinking'. |
|
|
353 | |
|
|
354 | If no resistancy field, stat field or attacktype is set and no spell |
|
|
355 | is put in the potion by the sp field or the randomitems the |
|
|
356 | potion will become an artifact and the artifact code decides which kind |
|
|
357 | of potion will be generated. |
|
|
358 | |
|
|
359 | If the potion has FLAG_CURSED or FLAG_DAMNED set the usage of this potion |
|
|
360 | will yield an explosion and hurt the player. |
|
|
361 | |
|
|
362 | =over 4 |
|
|
363 | |
|
|
364 | =item Str, Dex, Con, Int, Wis, Cha, Pow <number> |
|
|
365 | |
|
|
366 | These stat fields determine how many stat points the player gets |
|
|
367 | when he applies this potion. |
|
|
368 | |
|
|
369 | If FLAG_CURSED or FLAG_DAMNED is set the player will loose that many stat points. |
|
|
370 | |
|
|
371 | =item sp <number> |
|
|
372 | |
|
|
373 | If this field is set and the randomitems field is not set |
|
|
374 | the field is interpreted as spell number, please look the right |
|
|
375 | number up in common/loader.C. |
|
|
376 | |
|
|
377 | If this field is set the randomitems field will be unset by the |
|
|
378 | map loading code. |
|
|
379 | |
|
|
380 | =item attacktype <attacktype> |
|
|
381 | |
|
|
382 | This field has some special meaning in potions, currently the |
|
|
383 | bits for AT_DEPLETE and AT_GODPOWER control whethere this is a |
|
|
384 | restoration potion or improvement potion. |
|
|
385 | See include/attackinc.h for the bits of these types. |
|
|
386 | |
|
|
387 | If AT_DEPLETE is set the player will be restored and the ARCH_DEPLETION |
|
|
388 | will be removed from him. If the potion has FLAG_CURSED or FLAG_DAMNED |
|
|
389 | set the player will be drained a random stat by inserting an ARCH_DEPLETION |
|
|
390 | into him. |
|
|
391 | |
|
|
392 | If AT_GODPOWER is enabled the player will gain +1 maxvalue in his hp, sp or grace stat. |
|
|
393 | When the potion has FLAG_CURSED or FLAG_DAMNED set he will loose one in one of these stats. |
|
|
394 | |
|
|
395 | =item resist_<resistancy> <number> |
|
|
396 | |
|
|
397 | If this stat is set and no spell is in the potion the potion |
|
|
398 | will create a force that give the player this specific resistancy. |
|
|
399 | The forces type will be changed to POTION_EFFECT (see POTION_EFFECT type below) |
|
|
400 | and the potion will last 10 times longer than the default force archetype |
|
|
401 | FORCE_NAME (at the moment of this writing spell/force.arc). |
|
|
402 | |
|
|
403 | =item randomitems <treasurelist> |
|
|
404 | |
|
|
405 | The inventory/spell of the potion will be created by calling the treasure code |
|
|
406 | with the treasurelist specified here. (I guess it's highly undefined what |
|
|
407 | happens if there is not a spell in the potions inventory). |
|
|
408 | |
|
|
409 | =item on_use_yield <archetype> |
|
|
410 | |
|
|
411 | When this object is applied an instance of <archetype> will be created. |
|
|
412 | |
|
|
413 | =item subtypes <potion subtype> |
|
|
414 | |
|
|
415 | see include/spells.h for possible potion subtypes, there are currently 4: |
|
|
416 | |
|
|
417 | =over 4 |
|
|
418 | |
|
|
419 | =item POT_SPELL |
|
|
420 | |
|
|
421 | Unused, default behaiour of a potion. |
|
|
422 | |
|
|
423 | =item POT_DUST |
|
|
424 | |
|
|
425 | This potion can be thrown to cast the spell that it has in it's inventory, |
|
|
426 | the behaviour is not defined if there is not a spell in the inventory and the |
|
|
427 | server will log an error. |
|
|
428 | |
|
|
429 | =item POT_FIGURINE |
|
|
430 | |
|
|
431 | Unused, default behaiour of a potion. |
|
|
432 | |
|
|
433 | =item POT_BALM |
|
|
434 | |
|
|
435 | Unused, default behaiour of a potion. |
|
|
436 | |
|
|
437 | =back |
|
|
438 | |
|
|
439 | =back |
|
|
440 | |
|
|
441 | =head3 FOOD - type 6 - Eatable stuff |
|
|
442 | |
|
|
443 | This is for objects that are representing general eatables like |
|
|
444 | beef or bread. |
|
|
445 | |
|
|
446 | The main difference between FOOD, FLESH and DRINK is that they |
|
|
447 | give different messages. |
|
|
448 | |
|
|
449 | The specialty of FLESH is that it inherits the resistancies of the |
|
|
450 | monsters it was generated in and will let dragons raise their resistancies |
|
|
451 | with that. If the monster has the POISON attacktype the FLESH |
|
|
452 | will change into POISON. |
|
|
453 | |
|
|
454 | If a player runs low on food he will grab for FOOD, DRINK and POISON |
|
|
455 | and if he doesn't find any of that he will start eating FLESH. |
|
|
456 | |
|
|
457 | =over 4 |
|
|
458 | |
|
|
459 | =item title <string> |
|
|
460 | |
|
|
461 | If the food has a title or is cursed it is considered 'special', which means that the |
|
|
462 | fields Str, Dex, Con, Int, Wis, Pow, resist_<resistancy>, hp and sp |
|
|
463 | are interpreted and have further effects on the player. |
|
|
464 | |
|
|
465 | The higher the food field is the longer the improvement of the player lasts |
|
|
466 | (except for hp and sp). |
|
|
467 | |
|
|
468 | =item food <number> |
|
|
469 | |
|
|
470 | This is the amount of food points the player gets when he eats this. |
|
|
471 | |
|
|
472 | =item on_use_yield <archetype> |
|
|
473 | |
|
|
474 | When this object is applied an instance of <archetype> will be created. |
|
|
475 | |
|
|
476 | =back |
|
|
477 | |
|
|
478 | =head3 POISON - type 7 - Poisonous stuff |
|
|
479 | |
|
|
480 | This type is for objects that can poison the player when drinking. |
|
|
481 | When applied it will hit the attacked with AT_POISON and will create |
|
|
482 | a POISONING object in the one who was hit. |
|
|
483 | |
|
|
484 | =over 4 |
|
|
485 | |
|
|
486 | =item level <number> |
|
|
487 | |
|
|
488 | This field affects the propability of poisoning. The higher the level difference |
|
|
489 | between the one who is hit and the poision the mose propable it is the attacked |
|
|
490 | one will be poisoned. |
|
|
491 | |
|
|
492 | =item slaying <race> |
|
|
493 | |
|
|
494 | On poison this field has the usual meaning of 'slaying', when the |
|
|
495 | ones race matches the slaying field the damage done by the poison |
|
|
496 | is multiplied by 3. |
|
|
497 | |
|
|
498 | =item hp <number> |
|
|
499 | |
|
|
500 | This is the amount of damage the player will receive from applying this. The |
|
|
501 | attacktype AT_POISON will be used to hit the player and the damage will |
|
|
502 | determine the strenght, duration and depletion of stats of the poisoning. The |
|
|
503 | created POISONING object which is being placed in the one who was attacked will |
|
|
504 | get the damage from this field (which is maybe adjusted by slaying or the |
|
|
505 | resistancies). |
|
|
506 | |
|
|
507 | =item food <number> |
|
|
508 | |
|
|
509 | 1/4 of <number> will be drained from the players food. |
|
|
510 | |
|
|
511 | =item on_use_yield <archetype> |
|
|
512 | |
|
|
513 | When this object is applied an instance of <archetype> will be created. |
|
|
514 | |
|
|
515 | =back |
|
|
516 | |
|
|
517 | =head3 BOOK - type 8 - Readable books |
|
|
518 | |
|
|
519 | This type is basically for representing text books in the game. |
|
|
520 | |
|
|
521 | Reading a book also identifys it (if FLAG_NO_SKILL_IDENT is not set). |
|
|
522 | |
|
|
523 | =over 4 |
|
|
524 | |
|
|
525 | =item msg <text> |
|
|
526 | |
|
|
527 | This is the contents of the book. When this field is unset |
|
|
528 | at treasure generation a random text will be inserted. |
|
|
529 | |
|
|
530 | =item skill <skill name> |
|
|
531 | |
|
|
532 | The skill required to read this book. (The most resonable |
|
|
533 | skill would be literacy). |
|
|
534 | |
|
|
535 | =item exp <number> |
|
|
536 | |
|
|
537 | The experience points the player get for reading this book. |
|
|
538 | |
|
|
539 | =item subtype <readable subtype> |
|
|
540 | |
|
|
541 | This field determines the type of the readable. |
|
|
542 | Please see common/readable.C in the readable_message_types table. |
|
|
543 | |
|
|
544 | =back |
|
|
545 | |
|
|
546 | =head3 CLOCK - type 9 - Clocks |
|
|
547 | |
|
|
548 | This type of objects just display the time when being applied. |
|
|
549 | |
|
|
550 | =head3 LIGHTNING - type 12 - Lightnings (DEPRECATED, see SPELL_EFFECT subtype SP_BOLT) |
|
|
551 | |
|
|
552 | This is a spell effect of a moving bolt. It moves straigt forward |
|
|
553 | through the map until something blocks it. |
|
|
554 | If FLAG_REFLECTING is set it even reflects on walls. |
|
|
555 | |
|
|
556 | FLAG_IS_TURNABLE should be set on these objects. |
|
|
557 | |
|
|
558 | =over 4 |
|
|
559 | |
|
|
560 | =item move_type <movetype> |
|
|
561 | |
|
|
562 | This field affects the move type with which the lightning moves through |
|
|
563 | the map and which map cells will reflect or block it. |
|
|
564 | |
|
|
565 | =item attacktype <attacktype> |
|
|
566 | |
|
|
567 | The attacktype with which it hits the objects on the map. |
|
|
568 | |
|
|
569 | =item dam <number> |
|
|
570 | |
|
|
571 | The damage this bolt inflicts when it hits objects on the map. |
|
|
572 | |
|
|
573 | =item Dex <number> |
|
|
574 | |
|
|
575 | This is the fork percentage, it is reduced by 10 per fork. |
|
|
576 | And the damage is halved on each fork. |
|
|
577 | |
|
|
578 | =item Con <number> |
|
|
579 | |
|
|
580 | This value is a percentage of which the forking lightning |
|
|
581 | is deflected to the left. This value should be mostly used internally. |
|
|
582 | |
|
|
583 | =item duration <number> |
|
|
584 | |
|
|
585 | The duration the bolt stays on a map cell. This field is decreased each time |
|
|
586 | the object is processed (see the meaning of speed and speed_left fields in |
|
|
587 | the object general description). |
|
|
588 | |
|
|
589 | =item range <number> |
|
|
590 | |
|
|
591 | This is the range of the bolt, each space it advances this field is decreased. |
|
|
592 | |
|
|
593 | =back |
|
|
594 | |
|
|
595 | =head3 ARROW - type 13 - Arrows |
|
|
596 | |
|
|
597 | This is the type for objects that represent projectiles like arrows. |
|
|
598 | The movement of THROWN_OBJs behave similar to this type. |
|
|
599 | |
|
|
600 | Flying arrows are stopped either when they hit something blocking |
|
|
601 | (move_block) or something which is alive. |
|
|
602 | If it hits something that is alive, which doesn't have FLAG_REFL_MISSILE |
|
|
603 | set, it will inflict damage. If FLAG_REFL_MISSILE is set it will inflict |
|
|
604 | damage with a small chance which is affected by the 'level' field of the arrow. |
|
|
605 | |
|
|
606 | If FLAG_REFLECTING is set on the arrow it will bounce off everything |
|
|
607 | that is not alive and blocks it's movement. |
|
|
608 | |
|
|
609 | When an arrow is being shot it's dam, wc, attacktype, slaying fields will |
|
|
610 | be saved in the sp, hp, grace and spellarg fields of the object, to restore them |
|
|
611 | once the arrow has been stopped. |
|
|
612 | |
|
|
613 | =over 4 |
|
|
614 | |
|
|
615 | =item dam <number> |
|
|
616 | |
|
|
617 | The amount of damage that is being done to the victim that gets hit. |
|
|
618 | This field is recomputed when the arrow is fired and will consist |
|
|
619 | of the sum of a damage bonus (see description of the BOW type), |
|
|
620 | the arrows 'dam' field, the bows 'dam' field, the bows 'magic' field |
|
|
621 | and the arrows magic field. |
|
|
622 | |
|
|
623 | =item wc <number> |
|
|
624 | |
|
|
625 | The weaponclass of the arrow, which has effect on the propability of hitting. |
|
|
626 | |
|
|
627 | It is recomputed when the arrow is being fired by this formula: |
|
|
628 | |
|
|
629 | wc = 20 - bow->magic - arrow->magic - (skill->level or shooter->level) |
|
|
630 | - dex_bonus - thaco_bonus - arrow->stats.wc - bow->stats.wc + wc_mod |
|
|
631 | |
|
|
632 | When the arrow is not being shot by an player dex_bonus and thaco_bonus and the |
|
|
633 | level is not added. |
|
|
634 | |
|
|
635 | The wc_mod is dependend on the fire mode of the bow. For a more detailed |
|
|
636 | explanation of dex_bonus, thaco_bonus and wc_mod please consult the code. |
|
|
637 | |
|
|
638 | =item magic <number> |
|
|
639 | |
|
|
640 | This field is added to the damage of the arrow when it is shot and |
|
|
641 | will also improve it's speed by 1/5 of it's value. |
|
|
642 | |
|
|
643 | =item attacktype <attacktype> |
|
|
644 | |
|
|
645 | Bitfield which decides the attacktype of the damage, see include/attackinc.h |
|
|
646 | On fireing the attacktype of the bow is added to the arrows attacktype. |
|
|
647 | |
|
|
648 | =item level <number> (interally used) |
|
|
649 | |
|
|
650 | The level of the arrow, this affects the propability of piercing FLAG_REFL_MISSILE, |
|
|
651 | see above in the ARROW description. |
|
|
652 | |
|
|
653 | The level is set when the arrow is fired to either the skill level or the |
|
|
654 | shooters level. |
|
|
655 | |
|
|
656 | =item speed <number> (internal) |
|
|
657 | |
|
|
658 | This field shouldn't be set directly in the archetype, the arrow will get it's |
|
|
659 | speed from the bow. This fields value has to be atleast 0.5 or otherwise the |
|
|
660 | arrow will be stopped immediatly. |
|
|
661 | |
|
|
662 | On fireing the speed of the arrow is computed of 1/5 of the |
|
|
663 | sum of the damage bonus (see BOW), bow magic and arrow magic. After that 1/7 |
|
|
664 | of the bows 'dam' field is added to the speed of the arrow. |
|
|
665 | |
|
|
666 | The minimum speed of an arrow is 1.0. |
|
|
667 | |
|
|
668 | While flying the arrows speed is decreased by 0.05 each time it's moved. |
|
|
669 | |
|
|
670 | If the speed is above 10.0 it goes straight through the creature it hits and |
|
|
671 | it's speed is reduced by 1. If the speed is lower or equal 10.0 the arrow is |
|
|
672 | stopped and either sticked into the victim (see weight field description) or |
|
|
673 | put on it's map square (if it didn't break, see description of the food field). |
|
|
674 | |
|
|
675 | =item weight <number> |
|
|
676 | |
|
|
677 | This field is the weight of the arrow, if the weight is below or equal 5000 (5 kg) |
|
|
678 | the arrow will stick in the victim it hits. Otherwise it will fall to the ground. |
|
|
679 | |
|
|
680 | =item food <number> |
|
|
681 | |
|
|
682 | The breaking percentage. 100% means: breaks on usage for sure. |
|
|
683 | |
|
|
684 | =item inventory (internal) |
|
|
685 | |
|
|
686 | If the flying/moving object has something in it's inventory and it stops, it |
|
|
687 | will be replaced with it's inventory. Otherwise it will be handled as usual, |
|
|
688 | which means: it will be calculated whether the arrow breaks and it will be |
|
|
689 | reset for reuse. |
|
|
690 | |
|
|
691 | =item slaying <string> |
|
|
692 | |
|
|
693 | When the bow that fires this arrow has it's slaying field set it is copied |
|
|
694 | to the arrows slaying field. Otherwise the arrows slaying field remains. |
|
|
695 | |
|
|
696 | =item move_type <movetype> (internally used) |
|
|
697 | |
|
|
698 | This field is set when the arrow is shot to MOVE_FLY_LOW. |
|
|
699 | |
|
|
700 | =item move_on <movetype> (internally used) |
|
|
701 | |
|
|
702 | This field is set when the arrow is shot to MOVE_FLY_LOW and MOVE_WALK. |
|
|
703 | |
|
|
704 | =item race <string> |
|
|
705 | |
|
|
706 | The race field is a unique key that assigns arrows, bows and quivers. When |
|
|
707 | shooting an arrow the bows race is used to search for arrows (which have the |
|
|
708 | same race as the bow) in the players inventory and will recursively search in |
|
|
709 | the containers (which are applied and have the same race as the bow and the arrow). |
|
|
710 | |
|
|
711 | =back |
|
|
712 | |
|
|
713 | =head3 BOW - type 14 - Bows, those that fire ARROWs |
|
|
714 | |
|
|
715 | TODO, but take into account ARROW description above |
157 | |
716 | |
158 | =head3 WEAPON - type 15 - Weapons |
717 | =head3 WEAPON - type 15 - Weapons |
159 | |
718 | |
160 | This type is for general hack and slash weapons like swords, maces |
719 | This type is for general hack and slash weapons like swords, maces |
161 | and daggers and and .... |
720 | and daggers and and .... |
… | |
… | |
280 | - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2 |
839 | - weapon speed (last_sp): weapon_speed is calculated by: (last_sp * 2 - magic) / 2 |
281 | (minium is 0) |
840 | (minium is 0) |
282 | |
841 | |
283 | =item ac <number> |
842 | =item ac <number> |
284 | |
843 | |
285 | the amount of ac points the player's ac is decreased |
844 | the amount of ac points the player's ac is decreased when applying this object. |
286 | |
845 | |
287 | =item wc <number> |
846 | =item wc <number> |
288 | |
847 | |
289 | the amount of wc points the player's ac is decreased |
848 | the amount of wc points the player's wc is decreased when applying this object. |
290 | |
849 | |
291 | =back |
850 | =back |
292 | |
851 | |
293 | =head4 Player inherits following flags from weapons: |
852 | =head4 Player inherits following flags from weapons: |
294 | |
853 | |
295 | FLAG_LIFESAVE, FLAG_REFL_SPELL, FLAG_REFL_MISSILE, FLAG_STEALTH, |
854 | FLAG_LIFESAVE |
296 | FLAG_XRAYS, FLAG_BLIND, FLAG_SEE_IN_DARK, FLAG_UNDEAD |
855 | FLAG_REFL_SPELL |
|
|
856 | FLAG_REFL_MISSILE |
|
|
857 | FLAG_STEALTH |
|
|
858 | FLAG_XRAYS |
|
|
859 | FLAG_BLIND |
|
|
860 | FLAG_SEE_IN_DARK |
|
|
861 | FLAG_UNDEAD |
|
|
862 | |
|
|
863 | =head3 GRIMREAPER - type 28 - Grimreapers |
|
|
864 | |
|
|
865 | These type are mostly used for monsters, they give the |
|
|
866 | monster the ability to dissapear after 10 hits with AT_DRAIN. |
|
|
867 | |
|
|
868 | =over 4 |
|
|
869 | |
|
|
870 | =item value <number> |
|
|
871 | |
|
|
872 | This field stores the hits the monster did yet. |
|
|
873 | |
|
|
874 | =back |
|
|
875 | |
|
|
876 | =head3 CREATOR - type 42 - Object creators |
|
|
877 | |
|
|
878 | Once a creator is activated by a connection it creates a number of objects |
|
|
879 | (cloned from it's inventory or a new archetype from the other_arch slot). |
|
|
880 | |
|
|
881 | If FLAG_LIVESAFE is set the number of uses is unlimited. |
|
|
882 | |
|
|
883 | =over 4 |
|
|
884 | |
|
|
885 | =item hp <number> |
|
|
886 | |
|
|
887 | If FLAG_LIVE_SAVE is not set it is the absolute number of times the creator can |
|
|
888 | be used. |
|
|
889 | |
|
|
890 | =item speed <number> |
|
|
891 | |
|
|
892 | If speed is set the creator will create an object periodically, |
|
|
893 | see speed and speed_left fields in general object attribute description |
|
|
894 | for more details on how this period works. |
|
|
895 | |
|
|
896 | =item slaying <string> |
|
|
897 | |
|
|
898 | If set the generated object's name and |
|
|
899 | title will be set to this. |
|
|
900 | |
|
|
901 | =item other_arch <string> |
|
|
902 | |
|
|
903 | If the inventory of the creator is empty objects of the |
|
|
904 | archetype <string> will be generated. |
|
|
905 | |
|
|
906 | =item connected <number> |
|
|
907 | |
|
|
908 | See generic object attribute section. |
|
|
909 | |
|
|
910 | =back |
|
|
911 | |
|
|
912 | =head3 DRINK - type 54 - Drinkable stuff |
|
|
913 | |
|
|
914 | See FOOD description. |
|
|
915 | |
|
|
916 | =head3 CHECK_INV - type 64 - Inventory checkers |
|
|
917 | |
|
|
918 | This object checks whether the player has a specific item in his |
|
|
919 | inventory when he moves above the inventory checker. If the player has |
|
|
920 | the item (or not, which can be controlled with a flag) a connection will be triggered. |
|
|
921 | |
|
|
922 | If you set move_block you can deny players and monsters to reach the space where |
|
|
923 | the inventory checker is on, see 'move_block' description below. |
|
|
924 | |
|
|
925 | The conditions specified by hp, slaying and race are concationated with OR. |
|
|
926 | So matching one of those conditions is enough. |
|
|
927 | |
|
|
928 | =over 4 |
|
|
929 | |
|
|
930 | =item move_block <move type bitmask> |
|
|
931 | |
|
|
932 | If you set this field to block a movetype the move code will block any moves |
|
|
933 | onto the space with the inventory checker, IF the moving object doesn't have |
|
|
934 | (or has - if last_sp = 0) the item that the checker is searching for. |
|
|
935 | |
|
|
936 | =item last_sp (0|1) |
|
|
937 | |
|
|
938 | If last_sp is 1 'having' the item that is being checked for will |
|
|
939 | activate the connection or make the space with the checker non-blocking. |
|
|
940 | If last_sp is 0 'not having' the item will activate the connection |
|
|
941 | or make the space with the checker non-blocking. |
|
|
942 | |
|
|
943 | =item last_heal (0|1) |
|
|
944 | |
|
|
945 | If last_heal is 1 the matching item will be removed if the inventory checker |
|
|
946 | activates a connection and finds the item in the inventory. |
|
|
947 | |
|
|
948 | (A inventory checker that blocks a space won't remove anything from inventories) |
|
|
949 | |
|
|
950 | =item hp <number> |
|
|
951 | |
|
|
952 | If this field is not 0 the inventory checker will search for an object |
|
|
953 | with the type id <number>. |
|
|
954 | |
|
|
955 | =item slaying <string> |
|
|
956 | |
|
|
957 | If this field is set the inventory checker will search for an object that |
|
|
958 | has the same string in the slaying field (for example a key string of a key). |
|
|
959 | |
|
|
960 | =item race <string> |
|
|
961 | |
|
|
962 | If this field is set the inventory checker will search for an object which |
|
|
963 | has the archetype name that matches <string>. |
|
|
964 | |
|
|
965 | =item connected <connection id> |
|
|
966 | |
|
|
967 | This is the connection that will be activated. The connection is |
|
|
968 | 'pushed' when someone enters the space with the inventory checker, |
|
|
969 | and it is 'released' when he leaves it. |
|
|
970 | |
|
|
971 | See also the description of the connected field in the generic object attribute |
|
|
972 | section. |
|
|
973 | |
|
|
974 | =back |
|
|
975 | |
|
|
976 | =head3 FLESH - type 72 - Organs and body parts |
|
|
977 | |
|
|
978 | See FOOD description. |
|
|
979 | |
|
|
980 | =head3 MISC_OBJECT - type 79 - Misc. objects |
|
|
981 | |
|
|
982 | A type for any object that has no special behaviour. |
|
|
983 | |
|
|
984 | =head3 DUPLICATOR - type 83 - Duplicators or: Multiplicators |
|
|
985 | |
|
|
986 | This type of objects multiplies objects that are above it when it is activated. |
|
|
987 | You can even multiply by 0, which will destroy the object. |
|
|
988 | |
|
|
989 | =over 4 |
|
|
990 | |
|
|
991 | =item level <number> |
|
|
992 | |
|
|
993 | The multiplicator, if set to 0 or lower it will destroy the objects above it. |
|
|
994 | |
|
|
995 | =item other_arch <string> |
|
|
996 | |
|
|
997 | The archetype name of the objects which will be multiplied. |
|
|
998 | |
|
|
999 | =item connected <number> |
|
|
1000 | |
|
|
1001 | See generic object attribute section. |
|
|
1002 | |
|
|
1003 | =back |
|
|
1004 | |
|
|
1005 | =head3 HOLE - type 94 - Holes |
|
|
1006 | |
|
|
1007 | Holes are holes in the ground where objects can fall through. When the hole |
|
|
1008 | opens and/or is completly open all objects above it fall through (more |
|
|
1009 | precisely: if their head is above the hole). |
|
|
1010 | |
|
|
1011 | When the HOLE is activated it's speed is set to 0.5. |
|
|
1012 | |
|
|
1013 | Trapdoors can only transfer the one who falls through to other coordinates |
|
|
1014 | on the B<same> map. |
|
|
1015 | |
|
|
1016 | =over 4 |
|
|
1017 | |
|
|
1018 | =item maxsp (0|1) |
|
|
1019 | |
|
|
1020 | This field negates the state of the connection: When maxsp is 1 the pit will |
|
|
1021 | open/close when the connection is deactivated. Otherwise it will open/close |
|
|
1022 | when the connection is activated. This field only has effect when the |
|
|
1023 | connection is triggered. So if you put a closed hole on a map, and the |
|
|
1024 | connection is deactivated, and maxsp is 1 the hole will remain closed until the |
|
|
1025 | connection was triggered once. |
|
|
1026 | |
|
|
1027 | =item connected <connection id> |
|
|
1028 | |
|
|
1029 | This is the connection id, which lets the hole opening or closing when |
|
|
1030 | activated. The flags FLAG_ACTIVATE_ON_PUSH and FLAG_ACTIVATE_ON_RELEASE control |
|
|
1031 | at which connection state the object is activated. |
|
|
1032 | |
|
|
1033 | For example: if FLAG_ACTIVATE_ON_RELEASE is set to 0 the hole won't react when |
|
|
1034 | the connection is released. |
|
|
1035 | |
|
|
1036 | =item wc <number> (internal) |
|
|
1037 | |
|
|
1038 | This is an internal flag. If it is greater than 0 it means that the hole is not |
|
|
1039 | yet fully open. More preciesly: this field is the animation-step and if it is |
|
|
1040 | set to the 'closed' step of the animation the hole is closed and if it is on |
|
|
1041 | the 'open' animation step (wc = 0), the hole is open. |
|
|
1042 | |
|
|
1043 | =item sp <number> |
|
|
1044 | |
|
|
1045 | The destination y coordinates on the same map. |
|
|
1046 | |
|
|
1047 | =item hp <number> |
|
|
1048 | |
|
|
1049 | The destination x coordinates on the same map. |
|
|
1050 | |
|
|
1051 | =back |
|
|
1052 | |
|
|
1053 | =head3 POISONING - type 105 - The poisoning of players and monsters |
|
|
1054 | |
|
|
1055 | This type is doing the actual damage to the ones who were attacked |
|
|
1056 | via AT_POISON (or drank POISON). |
|
|
1057 | |
|
|
1058 | The duration is handled via the FLAG_IS_USED_UP mechanism (please look |
|
|
1059 | there for details). |
|
|
1060 | |
|
|
1061 | =over 4 |
|
|
1062 | |
|
|
1063 | =item dam <number> |
|
|
1064 | |
|
|
1065 | Each time the poisoning is processed (which is determined by the speed and speed_left |
|
|
1066 | fields, see the general object attributes above) it hits the player with |
|
|
1067 | <number> damage and the AT_INTERNAL attacktype (means: it will simply |
|
|
1068 | hit the player with no strings attached). |
|
|
1069 | |
|
|
1070 | =item food <number> |
|
|
1071 | |
|
|
1072 | Just a note: The posion is removed when food == 1 and not when |
|
|
1073 | the whole duration is up, because the POISONING code has to remove |
|
|
1074 | the poison-effects from the player before the FLAG_IS_USED_UP mechanism |
|
|
1075 | deletes the POISONING object. |
|
|
1076 | |
|
|
1077 | =back |
297 | |
1078 | |
298 | =head3 FORCE - type 114 - Forces |
1079 | =head3 FORCE - type 114 - Forces |
299 | |
1080 | |
|
|
1081 | Forces are a very 'thin' type. They don't have much behaviour other than |
|
|
1082 | disappearing after a time and/or affecting the player if they are in his |
|
|
1083 | inventory. |
|
|
1084 | |
300 | Note: Forces only take effect on the player if they have set FLAG_APPLIED. |
1085 | Forces only take effect on the player if they have set FLAG_APPLIED. |
301 | |
1086 | |
302 | Whether the duration field is processed or not a tick is controlled via the |
1087 | Whether the duration field is processed or not a tick is controlled via the |
303 | speed and speed_left field. Look above at the generic description of these |
1088 | speed and speed_left field. Look above at the generic description of these |
304 | fields. |
1089 | fields. |
305 | |
1090 | |
|
|
1091 | NOTE: Setting FLAG_IS_USED_UP on an force will also consider the 'food' field |
|
|
1092 | like stated above in the FLAG_IS_USED_UP description. BUT: If the food field reaches |
|
|
1093 | 0 before duration and FLAG_APPLIED is set, the force will last for 'duration'. |
|
|
1094 | If the FLAG_APPLIED is not set the force is removed when food reaches 0. |
|
|
1095 | Generally this means: FLAG_IS_USED_UP doesn't have good semantics on forces. |
|
|
1096 | |
306 | =over 4 |
1097 | =over 4 |
307 | |
1098 | |
308 | =item duration |
1099 | =item duration |
309 | |
1100 | |
310 | While this field is greater than 0 the force is not removed. |
1101 | While this field is greater than 0 the force/object is not destroyed. It is |
311 | It is decreased each tick by 1. |
1102 | decreased each tick by 1. |
312 | |
1103 | |
|
|
1104 | If it reaches 0 the force/object is destroyed. |
|
|
1105 | |
|
|
1106 | This field can have this meaning for B<any> object if that object has |
|
|
1107 | FLAG_IS_USED_UP and FLAG_APPLIED set. See the description of FLAG_IS_USED_UP |
|
|
1108 | what happens then. |
|
|
1109 | |
313 | =back |
1110 | =back |
|
|
1111 | |
|
|
1112 | =head3 POTION_EFFECT - type 115 - Potion effects (resistancies) |
|
|
1113 | |
|
|
1114 | This object is generated by the POTION code when the potion is a resistance |
|
|
1115 | giving potion. It has mainly the same behaviour as a FORCE. |
|
|
1116 | |
|
|
1117 | The specialty of the potion effect is that the resistancy it gives is absolute, |
|
|
1118 | so if you drin a resistancy potion of fire+60 you will get 60% resistancy to |
|
|
1119 | fire. |
|
|
1120 | |
|
|
1121 | Multiple potion effects only give you the maximum of their resistancy. |