--- src/cmd7.c.orig Sun Jul 20 17:10:16 2003 +++ src/cmd7.c Mon Jul 21 21:43:45 2003 @@ -3654,7 +3654,7 @@ while (TRUE) { - if (!get_com("[P]ower, [R]echarge or [L]eech an item, [E]xtract essences, or recipe [B]ook?", &ch)) + if (!get_com("[P]ower item, [R]echarge ([F]ully), [E]xtract ([A]ll) magic, or recipe [B]ook?", &ch)) { ext = 0; break; @@ -3679,7 +3679,10 @@ ext = 3; break; } - if (ch == 'L' || ch == 'l') + /* We'll be nice and catch 'l' here as well as 'a', for + * people who trained their muscle memory on the original + * '[L]eech' command. -dsb */ + if (ch == 'L' || ch == 'l' || ch == 'A' || ch == 'a') { ext = 2; repeat = 1; @@ -3690,6 +3693,12 @@ ext = 4; break; } + if (ch == 'F' || ch == 'f') + { + ext = 3; + repeat = 1; + break; + } } /**********Add a power*********/ @@ -4358,28 +4370,40 @@ /* Take a turn */ energy_use = 100; - /* Destroy the essences */ - (void)alchemist_items_check(o_ptr->tval, o_ptr->sval, 0, -1, TRUE); + do + { /* Repeat (for full-recharge command) */ - if ((o_ptr->tval == TV_STAFF) && (o_ptr->number > 1)) - { - /* Unstack staves */ - /* Get local object */ - q_ptr = &forge2; + if (!alchemist_items_check(o_ptr->tval, o_ptr->sval, 0, 0, TRUE)) + { + /* Out of essences; exit the loop. */ + repeat = 0; + break; + } - /* Obtain a local object */ - object_copy(q_ptr, o_ptr); + /* Destroy the essences */ + (void)alchemist_items_check(o_ptr->tval, o_ptr->sval, 0, -1, TRUE); - /* Modify quantity */ - q_ptr->number = 1; + if ((o_ptr->tval == TV_STAFF) && (o_ptr->number > 1)) + { + /* Unstack staves */ + /* Get local object */ + q_ptr = &forge2; - /* Unstack the used item */ - o_ptr->number--; + /* Obtain a local object */ + object_copy(q_ptr, o_ptr); - o_ptr = q_ptr; - carry_o_ptr = TRUE; + /* Modify quantity */ + q_ptr->number = 1; + + /* Unstack the used item */ + o_ptr->number--; + + o_ptr = q_ptr; + carry_o_ptr = TRUE; + } + o_ptr->pval++; } - o_ptr->pval++; + while (repeat == 1); } else if ( ext == 4) {