… | |
… | |
49 | * Basically, for the use/nonuse, the code does something like: |
49 | * Basically, for the use/nonuse, the code does something like: |
50 | * "This item goes %s\n", with the use/nonuse values filling in the %s |
50 | * "This item goes %s\n", with the use/nonuse values filling in the %s |
51 | */ |
51 | */ |
52 | // see include/object.h |
52 | // see include/object.h |
53 | Body_Locations body_locations[NUM_BODY_LOCATIONS] = { |
53 | Body_Locations body_locations[NUM_BODY_LOCATIONS] = { |
54 | {KW_body_skill , "You can use it as your skill" , "It is used as a skill"}, |
54 | # define def(name, use, nonuse) { # name, KW_body_ ## name, use, nonuse }, |
55 | {KW_body_combat , "You can wield it as your weapon" , "It is used as a combat weapon"}, |
55 | # include "slotinc.h" |
56 | {KW_body_range , "You can use it as your range weapon" , "It is used as a range weapon"}, |
56 | # undef def |
57 | {KW_body_shield , "You can wield it as a shield" , "It is used as a shield"}, |
|
|
58 | {KW_body_arm , "You can put it on your arm" , "It goes on a human's arm"}, |
|
|
59 | {KW_body_torso , "You can wear it on your body" , "It goes on a human's torso"}, |
|
|
60 | {KW_body_head , "You can wear it on your head" , "It goes on a human's head"}, |
|
|
61 | {KW_body_neck , "You can wear it around your neck" , "It goes around a human's neck"}, |
|
|
62 | {KW_body_finger , "You can wear it on your finger" , "It goes on a human's finger"} , |
|
|
63 | {KW_body_shoulder, "You can wear it around your shoulders", "It goes around a human's shoulders"}, |
|
|
64 | {KW_body_foot , "You can put it on your foot" , "It goes on a human's foot"}, |
|
|
65 | {KW_body_hand , "You can put it on your hand" , "It goes on a human's hand"}, |
|
|
66 | {KW_body_wrist , "You can wear it around your wrist" , "It goes around a human's wrist"}, |
|
|
67 | {KW_body_waist , "You can wear it around your waist" , "It goes around a human's waist"}, |
|
|
68 | /*{"body_dragon_torso", "your body", "a dragon's body"} */ |
|
|
69 | }; |
57 | }; |
70 | |
58 | |
71 | static char numbers_10[10][20] = { |
59 | static char numbers_10[10][20] = { |
72 | "zero", "ten", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy", |
60 | "zero", "ten", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy", |
73 | "eighty", "ninety" |
61 | "eighty", "ninety" |
… | |
… | |
495 | { |
483 | { |
496 | for (attr = 0; attr < NUM_STATS; attr++) |
484 | for (attr = 0; attr < NUM_STATS; attr++) |
497 | if ((val = op->stats.stat (attr))) |
485 | if ((val = op->stats.stat (attr))) |
498 | buf.printf ("(%s%+d)", short_stat_name[attr], val); |
486 | buf.printf ("(%s%+d)", short_stat_name[attr], val); |
499 | |
487 | |
500 | if (op->stats.exp) buf.printf ("(speed %+lld)", (long long)op->stats.exp); |
488 | if (op->stats.exp) buf.printf ("(speed %+d)", (int)op->stats.exp); |
501 | if (op->stats.wc) buf.printf ("(wc%+d)", op->stats.wc); |
489 | if (op->stats.wc) buf.printf ("(wc%+d)", op->stats.wc); |
502 | if (op->stats.dam) buf.printf ("(dam%+d)", op->stats.dam); |
490 | if (op->stats.dam) buf.printf ("(dam%+d)", op->stats.dam); |
503 | if (op->stats.ac) buf.printf ("(ac%+d)", op->stats.ac); |
491 | if (op->stats.ac) buf.printf ("(ac%+d)", op->stats.ac); |
504 | |
492 | |
505 | buf << describe_resistance (op, 0); |
493 | buf << describe_resistance (op, 0); |
… | |
… | |
686 | |
674 | |
687 | if (op->flag [FLAG_APPLIED]) |
675 | if (op->flag [FLAG_APPLIED]) |
688 | { |
676 | { |
689 | switch (op->type) |
677 | switch (op->type) |
690 | { |
678 | { |
|
|
679 | case RANGED: |
691 | case BOW: |
680 | case BOW: |
692 | case WAND: |
681 | case WAND: |
693 | case ROD: |
682 | case ROD: |
694 | case HORN: |
683 | case HORN: |
695 | buf << " (applied)"; |
|
|
696 | break; |
|
|
697 | case WEAPON: |
684 | case WEAPON: |
698 | buf << " (applied)"; |
685 | buf << " (applied)"; |
699 | break; |
686 | break; |
700 | case ARMOUR: |
687 | case ARMOUR: |
701 | case HELMET: |
688 | case HELMET: |
… | |
… | |
991 | if (!identified) |
978 | if (!identified) |
992 | buf << "(unidentified)"; |
979 | buf << "(unidentified)"; |
993 | |
980 | |
994 | switch (op->type) |
981 | switch (op->type) |
995 | { |
982 | { |
|
|
983 | case RANGED: |
996 | case BOW: |
984 | case BOW: |
997 | case ARROW: |
985 | case ARROW: |
998 | case WAND: |
986 | case WAND: |
999 | case ROD: |
987 | case ROD: |
1000 | case HORN: |
988 | case HORN: |
… | |
… | |
1105 | /* Down here, we more further describe equipment type items. |
1093 | /* Down here, we more further describe equipment type items. |
1106 | * only describe them if they have been identified or the like. |
1094 | * only describe them if they have been identified or the like. |
1107 | */ |
1095 | */ |
1108 | if (identified || op->flag [FLAG_BEEN_APPLIED]) |
1096 | if (identified || op->flag [FLAG_BEEN_APPLIED]) |
1109 | { |
1097 | { |
1110 | int attr, val; |
|
|
1111 | |
|
|
1112 | for (attr = 0; attr < NUM_STATS; attr++) |
1098 | for (int attr = 0; attr < NUM_STATS; attr++) |
1113 | if ((val = op->stats.stat (attr))) |
1099 | if (int val = op->stats.stat (attr)) |
1114 | buf.printf ("(%s%+d)", short_stat_name[attr], val); |
1100 | buf.printf ("(%s%+d)", short_stat_name[attr], val); |
1115 | |
1101 | |
1116 | if (op->stats.exp) |
1102 | if (op->stats.exp) |
1117 | buf.printf ("(speed %+lld)", (long long) op->stats.exp); |
1103 | buf.printf ("(speed %+lld)", (long long) op->stats.exp); |
1118 | |
1104 | |
1119 | switch (op->type) |
1105 | switch (op->type) |
1120 | { |
1106 | { |
|
|
1107 | case RANGED: |
1121 | case BOW: |
1108 | case BOW: |
1122 | case ARROW: |
1109 | case ARROW: |
1123 | case GIRDLE: |
1110 | case GIRDLE: |
1124 | case HELMET: |
1111 | case HELMET: |
1125 | case SHIELD: |
1112 | case SHIELD: |
… | |
… | |
1168 | { |
1155 | { |
1169 | int more_info = 0; |
1156 | int more_info = 0; |
1170 | |
1157 | |
1171 | switch (op->type) |
1158 | switch (op->type) |
1172 | { |
1159 | { |
|
|
1160 | case RANGED: |
1173 | case ROD: /* These use stats.sp for spell selection and stats.food */ |
1161 | case ROD: /* These use stats.sp for spell selection and stats.food */ |
1174 | case HORN: /* and stats.hp for spell-point regeneration... */ |
1162 | case HORN: /* and stats.hp for spell-point regeneration... */ |
1175 | case BOW: |
1163 | case BOW: |
1176 | case ARROW: |
1164 | case ARROW: |
1177 | case WAND: |
1165 | case WAND: |