Skip to content

Commit

Permalink
Blessed food detection can also detect killer food
Browse files Browse the repository at this point in the history
Suggested by Umbire. Being skilled in divination also has this effect.
  • Loading branch information
elunna committed Sep 23, 2023
1 parent 6a5e858 commit 2dea472
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -2254,10 +2254,16 @@ struct obj *sobj; /* sobj - scroll or fake spellbook for spell */
break;
}
case SCR_FOOD_DETECTION:
case SPE_DETECT_FOOD:
if (food_detect(sobj))
sobj = 0; /* nothing detected: strange_feeling -> useup */
case SPE_DETECT_FOOD: {
boolean failure;
failure = (food_detect(sobj) != 0);
if (!failure && sobj && sobj->blessed && monster_detect(sobj, S_BAD_FOOD))
failure = FALSE;
if (failure) {
sobj = 0; /* failure: strange_feeling() -> useup() */
}
break;
}
case SCR_KNOWLEDGE: {
useup(sobj);
sobj = 0; /* it's gone */
Expand Down

0 comments on commit 2dea472

Please sign in to comment.