--- src/cmd7.c.orig 2005-12-17 00:09:18.000000000 -0500 +++ src/cmd7.c 2005-12-17 00:17:52.000000000 -0500 @@ -1963,6 +1963,11 @@ char out_val[160]; char choice = 0; bool lockpval = FALSE; + int lockpval_which = -1; + int lockpval_reason = 0; + static char *lockpval_reasons[2] = { + "don't know how", "aren't skilled enough" + }; int pval; int oldpval; energy_use = 100; @@ -2020,7 +2025,14 @@ /* If this item has an ability that depends on pval which the player * cannot set, don't allow them to change the pval either. */ if ( a_select_flags[i].pval && flags_select[i]) + { lockpval = TRUE; + if (lockpval_which < 0) + { + lockpval_which = i; + lockpval_reason = 0; + } + } /* Set the color and set-ablitity of this flag */ if ( flags_select[i] ) @@ -2034,8 +2046,15 @@ /* If the alchemist has not passed the skill level for this flag, Set this flag as unsettable. */ - if ( flags_select[i]) + if ( a_select_flags[i].pval && flags_select[i]) + { lockpval = TRUE; + if (lockpval_which < 0) + { + lockpval_which = i; + lockpval_reason = 1; + } + } else flags_select[i] = -4; } @@ -2144,7 +2163,9 @@ { if ( lockpval ) { - msg_print("You cannot do that - you don't know how!"); + msg_format("You %s to increase '%s'", + lockpval_reasons[lockpval_reason], + al_name + a_select_flags[lockpval_which].desc); continue; } if (q_ptr->exp - exp < 0) @@ -2159,7 +2180,9 @@ { if ( lockpval ) { - msg_print("You cannot do that - you don't know how!"); + msg_format("You %s to decrease '%s'", + lockpval_reasons[lockpval_reason], + al_name + a_select_flags[lockpval_which].desc); continue; } pval--;