… | |
… | |
223 | |
223 | |
224 | transmute_materialname (item, art->item); |
224 | transmute_materialname (item, art->item); |
225 | give_artifact_abilities (item, art->item); |
225 | give_artifact_abilities (item, art->item); |
226 | } |
226 | } |
227 | |
227 | |
228 | if (QUERY_FLAG (cauldron, FLAG_CURSED)) |
228 | if (cauldron->flag [FLAG_CURSED]) |
229 | SET_FLAG (item, FLAG_CURSED); |
229 | item->set_flag (FLAG_CURSED); |
230 | if (QUERY_FLAG (cauldron, FLAG_DAMNED)) |
230 | if (cauldron->flag [FLAG_DAMNED]) |
231 | SET_FLAG (item, FLAG_DAMNED); |
231 | item->set_flag (FLAG_DAMNED); |
232 | |
232 | |
233 | return item; |
233 | return item; |
234 | } |
234 | } |
235 | |
235 | |
236 | /* |
236 | /* |
… | |
… | |
396 | tmp->value = 0; |
396 | tmp->value = 0; |
397 | tmp->material = name_to_material (shstr_stone); |
397 | tmp->material = name_to_material (shstr_stone); |
398 | tmp->name = shstr_slag; |
398 | tmp->name = shstr_slag; |
399 | tmp->name_pl = shstr_slags; |
399 | tmp->name_pl = shstr_slags; |
400 | item = insert_ob_in_ob (tmp, cauldron); |
400 | item = insert_ob_in_ob (tmp, cauldron); |
401 | CLEAR_FLAG (tmp, FLAG_CAN_ROLL); |
401 | tmp->clr_flag (FLAG_CAN_ROLL); |
402 | SET_FLAG (tmp, FLAG_NO_DROP); |
402 | tmp->set_flag (FLAG_NO_DROP); |
403 | tmp->move_block = 0; |
403 | tmp->move_block = 0; |
404 | } |
404 | } |
405 | |
405 | |
406 | remove_contents (cauldron->inv, item); |
406 | remove_contents (cauldron->inv, item); |
407 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s %s.", &cauldron->name, cauldron_sound ()); |
407 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s %s.", &cauldron->name, cauldron_sound ()); |
… | |
… | |
415 | if ((rp = get_random_recipe ((recipelist *) NULL)) == NULL) |
415 | if ((rp = get_random_recipe ((recipelist *) NULL)) == NULL) |
416 | return; |
416 | return; |
417 | |
417 | |
418 | if ((tmp = attempt_recipe (op, cauldron, 1, rp, -1))) |
418 | if ((tmp = attempt_recipe (op, cauldron, 1, rp, -1))) |
419 | { |
419 | { |
420 | if (!QUERY_FLAG (tmp, FLAG_CURSED)) /* curse it */ |
420 | if (!tmp->flag [FLAG_CURSED]) /* curse it */ |
421 | SET_FLAG (tmp, FLAG_CURSED); |
421 | tmp->set_flag (FLAG_CURSED); |
422 | |
422 | |
423 | /* the apply code for potions already deals with cursed |
423 | /* the apply code for potions already deals with cursed |
424 | * potions, so any code here is basically ignored. |
424 | * potions, so any code here is basically ignored. |
425 | */ |
425 | */ |
426 | if (tmp->type == FOOD) |
426 | if (tmp->type == FOOD) |
… | |
… | |
498 | fb->destroy (); |
498 | fb->destroy (); |
499 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s erupts in flame!", &cauldron->name); |
499 | new_draw_info_format (NDI_UNIQUE, 0, op, "The %s erupts in flame!", &cauldron->name); |
500 | } |
500 | } |
501 | else if (level < 100) |
501 | else if (level < 100) |
502 | { /* WHAMMY the CAULDRON */ |
502 | { /* WHAMMY the CAULDRON */ |
503 | if (!QUERY_FLAG (cauldron, FLAG_CURSED)) |
503 | if (!cauldron->flag [FLAG_CURSED]) |
504 | SET_FLAG (cauldron, FLAG_CURSED); |
504 | cauldron->set_flag (FLAG_CURSED); |
505 | else |
505 | else |
506 | cauldron->magic--; |
506 | cauldron->magic--; |
507 | |
507 | |
508 | cauldron->magic -= random_roll (0, 4, op, PREFER_LOW); |
508 | cauldron->magic -= random_roll (0, 4, op, PREFER_LOW); |
509 | |
509 | |
… | |
… | |
614 | danger += 110; |
614 | danger += 110; |
615 | else |
615 | else |
616 | danger += rp->diff * 3; |
616 | danger += rp->diff * 3; |
617 | |
617 | |
618 | /* Using a bad device is *majorly* stupid */ |
618 | /* Using a bad device is *majorly* stupid */ |
619 | if (QUERY_FLAG (cauldron, FLAG_CURSED)) |
619 | if (cauldron->flag [FLAG_CURSED]) |
620 | danger += 80; |
620 | danger += 80; |
621 | if (QUERY_FLAG (cauldron, FLAG_DAMNED)) |
621 | if (cauldron->flag [FLAG_DAMNED]) |
622 | danger += 200; |
622 | danger += 200; |
623 | |
623 | |
624 | #ifdef ALCHEMY_DEBUG |
624 | #ifdef ALCHEMY_DEBUG |
625 | LOG (llevDebug, "calc_alch_danger() returned danger=%d\n", danger); |
625 | LOG (llevDebug, "calc_alch_danger() returned danger=%d\n", danger); |
626 | #endif |
626 | #endif |
… | |
… | |
853 | return; |
853 | return; |
854 | |
854 | |
855 | numb = numb_ob_inside (cauldron); |
855 | numb = numb_ob_inside (cauldron); |
856 | if ((fl = get_formulalist (numb))) |
856 | if ((fl = get_formulalist (numb))) |
857 | { |
857 | { |
858 | if (QUERY_FLAG (caster, FLAG_WIZ)) |
858 | if (caster->flag [FLAG_WIZ]) |
859 | { |
859 | { |
860 | rp = find_recipe (fl, formula, cauldron->inv); |
860 | rp = find_recipe (fl, formula, cauldron->inv); |
861 | if (rp != NULL) |
861 | if (rp != NULL) |
862 | { |
862 | { |
863 | #ifdef ALCHEMY_DEBUG |
863 | #ifdef ALCHEMY_DEBUG |