--- src/cmd7.c.orig Mon Jul 21 21:43:45 2003 +++ src/cmd7.c Mon Jul 21 21:45:38 2003 @@ -1936,6 +1936,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; @@ -1993,7 +1998,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] ) @@ -2007,8 +2019,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; } @@ -2117,7 +2136,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; } pval++; @@ -2127,7 +2148,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--;