… | |
… | |
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" |
… | |
… | |
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 | static 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. |
… | |
… | |
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: |