Skip to content

Commit

Permalink
Treat food as fully identified when generating choking death messages…
Browse files Browse the repository at this point in the history
…, so "choked on a runed broadsword named Stormbringer" doesn't occur when eating the artifact (instead you always get "choked on Stormbringer" for the artifact, and "choked on a runed broadsword named Stormbringer" when eating a plain runesword named Stormbringer).
  • Loading branch information
sgrunt committed Apr 6, 2012
1 parent 18465ff commit df67d29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/eat.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ choke(food) /* To a full belly all food is bad. (It.) */
*/
if(food) {
int halbackup = HHallucination;
boolean knownbackup = food->known;
boolean dknownbackup = food->dknown;
food->known = food->dknown = 1;
HHallucination = 0;
You("choke over your %s.", foodword(food));
if (food->oclass == COIN_CLASS) {
Expand Down Expand Up @@ -301,6 +304,8 @@ choke(food) /* To a full belly all food is bad. (It.) */
}
}
HHallucination = halbackup;
food->known = knownbackup;
food->dknown = dknownbackup;
} else {
You("choke over it.");
killer = "quick snack";
Expand Down

0 comments on commit df67d29

Please sign in to comment.