Vegetarians shouldn't drink flasks of chicken soup / beef strogonoff.

This commit is contained in:
Rob Pearce 2016-07-23 11:36:25 +10:00
parent 6a7175a8d3
commit e5dfd28216
3 changed files with 9 additions and 0 deletions

2
data.c
View File

@ -3858,6 +3858,7 @@ void initobjects(void) {
addot(OT_POT_SOUPCHICKEN, "flask of chicken soup", "A watery soup which cures diseases and heals you.", MT_GLASS, 1, OC_POTION, SZ_TINY);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
killflagsofid(lastot->flags, F_HASHIDDENNAME);
addflag(lastot->flags, F_ISMEAT, B_TRUE, 80, NA, "");
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_VALUE, 20, NA, NA, NULL);
@ -3876,6 +3877,7 @@ void initobjects(void) {
addot(OT_POT_STROGONOFF, "flask of beef strogonoff", "A beef and mushroom stew which temporarily boosts your Fitness, and heals you a little.", MT_GLASS, 1, OC_POTION, SZ_TINY);
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
killflagsofid(lastot->flags, F_HASHIDDENNAME);
addflag(lastot->flags, F_ISMEAT, B_TRUE, 80, NA, "");
addflag(lastot->flags, F_RARITY, H_ALL, 100, RR_UNCOMMON, NULL);
addflag(lastot->flags, F_VALUE, 25, NA, NA, NULL);

3
io.c
View File

@ -3245,6 +3245,9 @@ void cantdrink(enum ERROR reason) {
case E_UNDEAD:
msg("You are undead and don't need to drink.");
break;
case E_VEGETARIAN:
msg("The thought of consuming meat disgusts you.");
break;
case E_FACECOVERED:
oo = facecovered(player);
assert(oo);

4
lf.c
View File

@ -939,6 +939,10 @@ int candrink(lifeform_t *lf, object_t *o) {
reason = E_FACECOVERED;
return B_FALSE;
}
if (lfhasflag(lf, F_VEGETARIAN) && hasflag(o->flags, F_ISMEAT)) {
reason = E_VEGETARIAN;
return B_FALSE;
}
reason = E_OK;
return B_TRUE;
}