Priests recognize B/U/C status on items in container menus
<email deleted> > Since Priests' knowledge of the buc-status of an object only > kicks in when the name is being looked at for the first time, > they get an "X" option when taking items out of a newly-looted > container, but B, U, and C thereafter; could their ability be > pre-applied to the container's contents when constructing the > menu, to avoid this anomaly? >
This commit is contained in:
@@ -54,6 +54,7 @@ don't credit player's wisdom when makelevel creates random Elbereth engravings
|
|||||||
reduce insect/monster creation from monster spells
|
reduce insect/monster creation from monster spells
|
||||||
avoid "couldn't place lregion type 5" warning when arriving at Plane of Fire
|
avoid "couldn't place lregion type 5" warning when arriving at Plane of Fire
|
||||||
avoid crash due to delayed poly or were change no longer being valid
|
avoid crash due to delayed poly or were change no longer being valid
|
||||||
|
ensure that Priest's ability to recognize B/U/C is considered in B/U/C menus
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
10
src/invent.c
10
src/invent.c
@@ -1763,20 +1763,22 @@ count_buc(list, type)
|
|||||||
while (list) {
|
while (list) {
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case BUC_BLESSED:
|
case BUC_BLESSED:
|
||||||
if (list->oclass != GOLD_CLASS && list->bknown && list->blessed)
|
if (list->oclass != GOLD_CLASS &&
|
||||||
|
(list->bknown || Role_if(PM_PRIEST)) && list->blessed)
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
case BUC_CURSED:
|
case BUC_CURSED:
|
||||||
if (list->oclass != GOLD_CLASS && list->bknown && list->cursed)
|
if (list->oclass != GOLD_CLASS &&
|
||||||
|
(list->bknown || Role_if(PM_PRIEST)) && list->cursed)
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
case BUC_UNCURSED:
|
case BUC_UNCURSED:
|
||||||
if (list->oclass != GOLD_CLASS &&
|
if (list->oclass != GOLD_CLASS &&
|
||||||
list->bknown && !list->blessed && !list->cursed)
|
(list->bknown || Role_if(PM_PRIEST)) && !list->blessed && !list->cursed)
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
case BUC_UNKNOWN:
|
case BUC_UNKNOWN:
|
||||||
if (list->oclass != GOLD_CLASS && !list->bknown)
|
if (list->oclass != GOLD_CLASS && !(list->bknown || Role_if(PM_PRIEST)))
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
11
src/pickup.c
11
src/pickup.c
@@ -316,16 +316,19 @@ struct obj *obj;
|
|||||||
(index(valid_menu_classes, obj->oclass) != (char *)0))
|
(index(valid_menu_classes, obj->oclass) != (char *)0))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else if (((index(valid_menu_classes,'U') != (char *)0) &&
|
else if (((index(valid_menu_classes,'U') != (char *)0) &&
|
||||||
(obj->oclass != GOLD_CLASS && obj->bknown && !obj->blessed && !obj->cursed)))
|
(obj->oclass != GOLD_CLASS && (obj->bknown || Role_if(PM_PRIEST)) &&
|
||||||
|
!obj->blessed && !obj->cursed)))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else if (((index(valid_menu_classes,'B') != (char *)0) &&
|
else if (((index(valid_menu_classes,'B') != (char *)0) &&
|
||||||
(obj->oclass != GOLD_CLASS && obj->bknown && obj->blessed)))
|
(obj->oclass != GOLD_CLASS &&
|
||||||
|
(obj->bknown || Role_if(PM_PRIEST)) && obj->blessed)))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else if (((index(valid_menu_classes,'C') != (char *)0) &&
|
else if (((index(valid_menu_classes,'C') != (char *)0) &&
|
||||||
(obj->oclass != GOLD_CLASS && obj->bknown && obj->cursed)))
|
(obj->oclass != GOLD_CLASS &&
|
||||||
|
(obj->bknown || Role_if(PM_PRIEST)) && obj->cursed)))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else if (((index(valid_menu_classes,'X') != (char *)0) &&
|
else if (((index(valid_menu_classes,'X') != (char *)0) &&
|
||||||
(obj->oclass != GOLD_CLASS && !obj->bknown)))
|
(obj->oclass != GOLD_CLASS && !(obj->bknown || Role_if(PM_PRIEST)))))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
Reference in New Issue
Block a user