… | |
… | |
232 | shstr_cmp dragon_ability_force ("dragon_ability_force"); |
232 | shstr_cmp dragon_ability_force ("dragon_ability_force"); |
233 | shstr_cmp dragon_skin_force ("dragon_skin_force"); |
233 | shstr_cmp dragon_skin_force ("dragon_skin_force"); |
234 | |
234 | |
235 | for (tmp = ob->inv; tmp; tmp = tmp->below) |
235 | for (tmp = ob->inv; tmp; tmp = tmp->below) |
236 | if (tmp->type == FORCE) |
236 | if (tmp->type == FORCE) |
237 | if (tmp->arch->name == dragon_ability_force) |
237 | if (tmp->arch->archname == dragon_ability_force) |
238 | abil = tmp; |
238 | abil = tmp; |
239 | else if (tmp->arch->name == dragon_skin_force) |
239 | else if (tmp->arch->archname == dragon_skin_force) |
240 | skin = tmp; |
240 | skin = tmp; |
241 | |
241 | |
242 | set_dragon_name (ob, abil, skin); |
242 | set_dragon_name (ob, abil, skin); |
243 | } |
243 | } |
244 | |
244 | |
… | |
… | |
914 | if (*first_map_ext_path) |
914 | if (*first_map_ext_path) |
915 | { |
915 | { |
916 | object *tmp; |
916 | object *tmp; |
917 | char mapname[MAX_BUF]; |
917 | char mapname[MAX_BUF]; |
918 | |
918 | |
919 | snprintf (mapname, MAX_BUF - 1, "%s/%s", &first_map_ext_path, &ob->arch->name); |
919 | snprintf (mapname, MAX_BUF - 1, "%s/%s", &first_map_ext_path, &ob->arch->archname); |
920 | tmp = object::create (); |
920 | tmp = object::create (); |
921 | EXIT_PATH (tmp) = mapname; |
921 | EXIT_PATH (tmp) = mapname; |
922 | EXIT_X (tmp) = ob->x; |
922 | EXIT_X (tmp) = ob->x; |
923 | EXIT_Y (tmp) = ob->y; |
923 | EXIT_Y (tmp) = ob->y; |
924 | ob->enter_exit (tmp); /* we don't really care if it succeeded; |
924 | ob->enter_exit (tmp); /* we don't really care if it succeeded; |
… | |
… | |
1106 | if (tmp->name != NULL) |
1106 | if (tmp->name != NULL) |
1107 | sprintf (putstring, "item name: %s item type: %d weight/value: %d", |
1107 | sprintf (putstring, "item name: %s item type: %d weight/value: %d", |
1108 | &tmp->name, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1108 | &tmp->name, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1109 | else |
1109 | else |
1110 | sprintf (putstring, "item name: %s item type: %d weight/value: %d", |
1110 | sprintf (putstring, "item name: %s item type: %d weight/value: %d", |
1111 | &tmp->arch->name, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1111 | &tmp->arch->archname, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1112 | |
1112 | |
1113 | new_draw_info (NDI_UNIQUE, 0, op, putstring); |
1113 | new_draw_info (NDI_UNIQUE, 0, op, putstring); |
1114 | } |
1114 | } |
1115 | |
1115 | |
1116 | /* philosophy: |
1116 | /* philosophy: |
… | |
… | |
1309 | /* careful: chairs and tables are weapons! */ |
1309 | /* careful: chairs and tables are weapons! */ |
1310 | if (op->contr->mode & PU_ALLWEAPON) |
1310 | if (op->contr->mode & PU_ALLWEAPON) |
1311 | { |
1311 | { |
1312 | if (tmp->type == WEAPON && tmp->name != NULL) |
1312 | if (tmp->type == WEAPON && tmp->name != NULL) |
1313 | { |
1313 | { |
1314 | if (strstr (tmp->name, "table") == NULL && strstr (tmp->arch->name, "table") == NULL && |
1314 | if (strstr (tmp->name, "table") == NULL && strstr (tmp->arch->archname, "table") == NULL && |
1315 | strstr (tmp->name, "chair") && strstr (tmp->arch->name, "chair") == NULL) |
1315 | strstr (tmp->name, "chair") && strstr (tmp->arch->archname, "chair") == NULL) |
1316 | { |
1316 | { |
1317 | pick_up (op, tmp); |
1317 | pick_up (op, tmp); |
1318 | continue; |
1318 | continue; |
1319 | } |
1319 | } |
1320 | } |
1320 | } |
1321 | |
1321 | |
1322 | if (tmp->type == WEAPON && tmp->name == NULL) |
1322 | if (tmp->type == WEAPON && tmp->name == NULL) |
1323 | { |
1323 | { |
1324 | if (strstr (tmp->arch->name, "table") == NULL && strstr (tmp->arch->name, "chair") == NULL) |
1324 | if (strstr (tmp->arch->archname, "table") == NULL && strstr (tmp->arch->archname, "chair") == NULL) |
1325 | { |
1325 | { |
1326 | pick_up (op, tmp); |
1326 | pick_up (op, tmp); |
1327 | continue; |
1327 | continue; |
1328 | } |
1328 | } |
1329 | } |
1329 | } |
… | |
… | |
1354 | if (tmp->name != NULL) |
1354 | if (tmp->name != NULL) |
1355 | { |
1355 | { |
1356 | fprintf (stderr, "%s", tmp->name); |
1356 | fprintf (stderr, "%s", tmp->name); |
1357 | } |
1357 | } |
1358 | else |
1358 | else |
1359 | fprintf (stderr, "%s", tmp->arch->name); |
1359 | fprintf (stderr, "%s", tmp->arch->archname); |
1360 | fprintf (stderr, ",%d] = ", tmp->type); |
1360 | fprintf (stderr, ",%d] = ", tmp->type); |
1361 | fprintf (stderr, "%d\n", (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1361 | fprintf (stderr, "%d\n", (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1362 | #endif |
1362 | #endif |
1363 | continue; |
1363 | continue; |
1364 | } |
1364 | } |
… | |
… | |
3426 | /* forces in the treasurelist can alter the player's stats */ |
3426 | /* forces in the treasurelist can alter the player's stats */ |
3427 | object *skin; |
3427 | object *skin; |
3428 | |
3428 | |
3429 | /* first get the dragon skin force */ |
3429 | /* first get the dragon skin force */ |
3430 | shstr_cmp dragon_skin_force ("dragon_skin_force"); |
3430 | shstr_cmp dragon_skin_force ("dragon_skin_force"); |
3431 | for (skin = who->inv; skin && !(skin->arch->name == dragon_skin_force); skin = skin->below) |
3431 | for (skin = who->inv; skin && !(skin->arch->archname == dragon_skin_force); skin = skin->below) |
3432 | ; |
3432 | ; |
3433 | |
3433 | |
3434 | if (!skin) |
3434 | if (!skin) |
3435 | return; |
3435 | return; |
3436 | |
3436 | |