… | |
… | |
511 | |
511 | |
512 | if (rndm (0, 2)) |
512 | if (rndm (0, 2)) |
513 | { /* slag created */ |
513 | { /* slag created */ |
514 | object *tmp = cauldron->inv; |
514 | object *tmp = cauldron->inv; |
515 | int weight = 0; |
515 | int weight = 0; |
516 | uint16 material = M_STONE; |
|
|
517 | |
516 | |
518 | while (tmp) |
|
|
519 | { /* slag has coadded ingredient properties */ |
|
|
520 | weight += tmp->weight; |
|
|
521 | if (!(material & tmp->material)) |
|
|
522 | material |= tmp->material; |
|
|
523 | tmp = tmp->below; |
|
|
524 | } |
|
|
525 | tmp = get_archetype ("rock"); |
517 | tmp = get_archetype ("rock"); |
526 | tmp->weight = weight; |
518 | tmp->weight = weight; |
527 | tmp->value = 0; |
519 | tmp->value = 0; |
528 | tmp->material = material; |
|
|
529 | tmp->materialname = "stone"; |
520 | tmp->materialname = "stone"; |
530 | tmp->name = "slag"; |
521 | tmp->name = "slag"; |
531 | tmp->name_pl = "slags"; |
522 | tmp->name_pl = "slags"; |
532 | item = insert_ob_in_ob (tmp, cauldron); |
523 | item = insert_ob_in_ob (tmp, cauldron); |
533 | CLEAR_FLAG (tmp, FLAG_CAN_ROLL); |
524 | CLEAR_FLAG (tmp, FLAG_CAN_ROLL); |
534 | CLEAR_FLAG (tmp, FLAG_NO_PICK); |
525 | CLEAR_FLAG (tmp, FLAG_NO_PICK); |
535 | tmp->move_block = 0; |
526 | tmp->move_block = 0; |
536 | } |
527 | } |
|
|
528 | |
537 | remove_contents (cauldron->inv, item); |
529 | remove_contents (cauldron->inv, item); |
538 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s %s.", &cauldron->name, cauldron_sound ()); |
530 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s %s.", &cauldron->name, cauldron_sound ()); |
539 | return; |
531 | return; |
540 | } |
532 | } |
541 | else if (level < 40) |
533 | else if (level < 40) |