… | |
… | |
1387 | insert_ob_in_ob (tmp, newscroll); |
1387 | insert_ob_in_ob (tmp, newscroll); |
1388 | |
1388 | |
1389 | /* Same code as from treasure.c - so they can better merge. |
1389 | /* Same code as from treasure.c - so they can better merge. |
1390 | * if players want to sell them, so be it. |
1390 | * if players want to sell them, so be it. |
1391 | */ |
1391 | */ |
1392 | newscroll->value = newscroll->arch->clone.value * newscroll->inv->value * (newscroll->level + 50) / (newscroll->inv->level + 50); |
1392 | newscroll->value = newscroll->arch->value * newscroll->inv->value * (newscroll->level + 50) / (newscroll->inv->level + 50); |
1393 | newscroll->stats.exp = newscroll->value / 5; |
1393 | newscroll->stats.exp = newscroll->value / 5; |
1394 | |
1394 | |
1395 | /* wait until finished manipulating the scroll before inserting it */ |
1395 | /* wait until finished manipulating the scroll before inserting it */ |
1396 | if (newscroll == scroll) |
1396 | if (newscroll == scroll) |
1397 | { |
1397 | { |
… | |
… | |
1454 | } |
1454 | } |
1455 | |
1455 | |
1456 | skat = get_archetype_by_type_subtype (SKILL, SK_LITERACY); |
1456 | skat = get_archetype_by_type_subtype (SKILL, SK_LITERACY); |
1457 | |
1457 | |
1458 | /* Need to be able to read before we can write! */ |
1458 | /* Need to be able to read before we can write! */ |
1459 | if (!find_skill_by_name (pl, skat->clone.skill)) |
1459 | if (!find_skill_by_name (pl, skat->skill)) |
1460 | { |
1460 | { |
1461 | new_draw_info (NDI_UNIQUE, 0, pl, "You must learn to read before you can write!"); |
1461 | new_draw_info (NDI_UNIQUE, 0, pl, "You must learn to read before you can write!"); |
1462 | return 0; |
1462 | return 0; |
1463 | } |
1463 | } |
1464 | |
1464 | |