… | |
… | |
63 | {KW_body_foot , "You can put it on your foot" , "It goes on a human's foot"}, |
63 | {KW_body_foot , "You can put it on your foot" , "It goes on a human's foot"}, |
64 | {KW_body_hand , "You can put it on your hand" , "It goes on a human's hand"}, |
64 | {KW_body_hand , "You can put it on your hand" , "It goes on a human's hand"}, |
65 | {KW_body_wrist , "You can wear it around your wrist" , "It goes around a human's wrist"}, |
65 | {KW_body_wrist , "You can wear it around your wrist" , "It goes around a human's wrist"}, |
66 | {KW_body_waist , "You can wear it around your waist" , "It goes around a human's waist"}, |
66 | {KW_body_waist , "You can wear it around your waist" , "It goes around a human's waist"}, |
67 | /*{"body_dragon_torso", "your body", "a dragon's body"} */ |
67 | /*{"body_dragon_torso", "your body", "a dragon's body"} */ |
68 | }; |
|
|
69 | |
|
|
70 | static char numbers[21][20] = { |
|
|
71 | "no", "", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", |
|
|
72 | "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", |
|
|
73 | "eighteen", "nineteen", "twenty" |
|
|
74 | }; |
68 | }; |
75 | |
69 | |
76 | static char numbers_10[10][20] = { |
70 | static char numbers_10[10][20] = { |
77 | "zero", "ten", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy", |
71 | "zero", "ten", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy", |
78 | "eighty", "ninety" |
72 | "eighty", "ninety" |
… | |
… | |
207 | {BUILDER, "item builder", "item builders", 0, 0}, |
201 | {BUILDER, "item builder", "item builders", 0, 0}, |
208 | {MATERIAL, "building material", "building materials", 0, 0}, |
202 | {MATERIAL, "building material", "building materials", 0, 0}, |
209 | {ITEM_TRANSFORMER, "item_transformer", "item_transformers", 0, 0}, |
203 | {ITEM_TRANSFORMER, "item_transformer", "item_transformers", 0, 0}, |
210 | }; |
204 | }; |
211 | |
205 | |
212 | const int item_types_size = sizeof (item_types) / sizeof (*item_types); |
206 | static const int item_types_size = sizeof (item_types) / sizeof (*item_types); |
213 | |
207 | |
214 | materialtype_t *materialt; |
208 | materialtype_t *materialt; |
215 | |
209 | |
216 | /* |
210 | /* |
217 | materialtype material[NROFMATERIALS] = { |
211 | materialtype material[NROFMATERIALS] = { |
… | |
… | |
441 | strcat (buf, levelnumbers[i % 10]); |
435 | strcat (buf, levelnumbers[i % 10]); |
442 | return buf; |
436 | return buf; |
443 | } |
437 | } |
444 | |
438 | |
445 | /* |
439 | /* |
446 | * get_number(integer) returns the text-representation of the given number |
|
|
447 | * in a static buffer. The buffer might be overwritten at the next |
|
|
448 | * call to get_number(). |
|
|
449 | * It is currently only used by the query_name() function. |
|
|
450 | */ |
|
|
451 | const char * |
|
|
452 | get_number (int i) |
|
|
453 | { |
|
|
454 | if (i <= 20) |
|
|
455 | return numbers[i]; |
|
|
456 | else |
|
|
457 | { |
|
|
458 | static char buf[MAX_BUF]; |
|
|
459 | |
|
|
460 | sprintf (buf, "%d", i); |
|
|
461 | return buf; |
|
|
462 | } |
|
|
463 | } |
|
|
464 | |
|
|
465 | /* |
|
|
466 | * Returns pointer to static buffer containing ring's or amulet's |
440 | * Returns pointer to static buffer containing ring's or amulet's |
467 | * abilities |
441 | * abilities |
468 | * These are taken from old query_name(), but it would work better |
442 | * These are taken from old query_name(), but it would work better |
469 | * if describle_item() would be called to get this information and |
443 | * if describle_item() would be called to get this information and |
470 | * caller would handle FULL_RING_DESCRIPTION definition. |
444 | * caller would handle FULL_RING_DESCRIPTION definition. |
… | |
… | |
473 | */ |
447 | */ |
474 | |
448 | |
475 | /* Aug 95 modified this slightly so that Skill tools don't have magic bonus |
449 | /* Aug 95 modified this slightly so that Skill tools don't have magic bonus |
476 | * from stats.sp - b.t. |
450 | * from stats.sp - b.t. |
477 | */ |
451 | */ |
478 | const char * |
452 | static const char * |
479 | ring_desc (const object *op) |
453 | ring_desc (const object *op) |
480 | { |
454 | { |
481 | static dynbuf_text buf; buf.clear (); |
455 | static dynbuf_text buf; buf.clear (); |
482 | int attr, val, len; |
456 | int attr, val, len; |
483 | |
457 | |
… | |
… | |
814 | /* Note that the resolution this provides for players really isn't |
788 | /* Note that the resolution this provides for players really isn't |
815 | * very good. Any player with a speed greater than .67 will |
789 | * very good. Any player with a speed greater than .67 will |
816 | * fall into the 'lightning fast movement' category. |
790 | * fall into the 'lightning fast movement' category. |
817 | */ |
791 | */ |
818 | if (op->has_active_speed ()) |
792 | if (op->has_active_speed ()) |
819 | switch ((int) ((FABS (op->speed)) * 15)) |
793 | switch ((int)((fabs (op->speed)) * 15.)) |
820 | { |
794 | { |
821 | case 0: |
795 | case 0: |
822 | buf << "(very slow movement)"; |
796 | buf << "(very slow movement)"; |
823 | break; |
797 | break; |
824 | case 1: |
798 | case 1: |