tainted meat did not invoke cannibalism
This commit is contained in:
@@ -101,6 +101,7 @@ attempting to drop a subset of a stack of multiple cursed loadstones could
|
|||||||
corrupt inventory or cause a crash
|
corrupt inventory or cause a crash
|
||||||
"miss" message was missing for thrown or kicked gold not caught by a monster
|
"miss" message was missing for thrown or kicked gold not caught by a monster
|
||||||
prevent recursive impossible() and panic() calls from leading to a stack overflow
|
prevent recursive impossible() and panic() calls from leading to a stack overflow
|
||||||
|
tainted meat didn't invoke cannibalism
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
@@ -37,12 +37,12 @@ STATIC_DCL void FDECL(accessory_has_effect, (struct obj *));
|
|||||||
STATIC_DCL void FDECL(fpostfx, (struct obj *));
|
STATIC_DCL void FDECL(fpostfx, (struct obj *));
|
||||||
STATIC_DCL int NDECL(bite);
|
STATIC_DCL int NDECL(bite);
|
||||||
STATIC_DCL int FDECL(edibility_prompts, (struct obj *));
|
STATIC_DCL int FDECL(edibility_prompts, (struct obj *));
|
||||||
|
|
||||||
STATIC_DCL int FDECL(rottenfood, (struct obj *));
|
STATIC_DCL int FDECL(rottenfood, (struct obj *));
|
||||||
STATIC_DCL void NDECL(eatspecial);
|
STATIC_DCL void NDECL(eatspecial);
|
||||||
STATIC_DCL void FDECL(eataccessory, (struct obj *));
|
STATIC_DCL void FDECL(eataccessory, (struct obj *));
|
||||||
STATIC_DCL const char *FDECL(foodword, (struct obj *));
|
STATIC_DCL const char *FDECL(foodword, (struct obj *));
|
||||||
STATIC_DCL int FDECL(tin_variety, (struct obj *));
|
STATIC_DCL int FDECL(tin_variety, (struct obj *));
|
||||||
|
STATIC_DCL boolean FDECL(maybe_cannibal, (int,BOOLEAN_P));
|
||||||
|
|
||||||
char msgbuf[BUFSZ];
|
char msgbuf[BUFSZ];
|
||||||
|
|
||||||
@@ -411,18 +411,29 @@ boolean message;
|
|||||||
context.victual.fullwarn = context.victual.eating = context.victual.doreset = FALSE;
|
context.victual.fullwarn = context.victual.eating = context.victual.doreset = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATIC_OVL boolean
|
||||||
|
maybe_cannibal(pm, allowmsg)
|
||||||
|
int pm;
|
||||||
|
boolean allowmsg;
|
||||||
|
{
|
||||||
|
if (!CANNIBAL_ALLOWED() && your_race(&mons[pm])) {
|
||||||
|
if (allowmsg) {
|
||||||
|
if (Upolyd)
|
||||||
|
You("have a bad feeling deep inside.");
|
||||||
|
You("cannibal! You will regret this!");
|
||||||
|
}
|
||||||
|
HAggravate_monster |= FROMOUTSIDE;
|
||||||
|
change_luck(-rn1(4,2)); /* -5..-2 */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
STATIC_OVL void
|
STATIC_OVL void
|
||||||
cprefx(pm)
|
cprefx(pm)
|
||||||
register int pm;
|
register int pm;
|
||||||
{
|
{
|
||||||
if (!CANNIBAL_ALLOWED() && your_race(&mons[pm])) {
|
(void) maybe_cannibal(pm,TRUE);
|
||||||
if (Upolyd)
|
|
||||||
You("have a bad feeling deep inside.");
|
|
||||||
You("cannibal! You will regret this!");
|
|
||||||
HAggravate_monster |= FROMOUTSIDE;
|
|
||||||
change_luck(-rn1(4,2)); /* -5..-2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
if (touch_petrifies(&mons[pm]) || pm == PM_MEDUSA) {
|
if (touch_petrifies(&mons[pm]) || pm == PM_MEDUSA) {
|
||||||
if (!Stone_resistance &&
|
if (!Stone_resistance &&
|
||||||
!(poly_when_stoned(youmonst.data) && polymon(PM_STONE_GOLEM))) {
|
!(poly_when_stoned(youmonst.data) && polymon(PM_STONE_GOLEM))) {
|
||||||
@@ -1288,9 +1299,11 @@ eatcorpse(otmp) /* called when a corpse is selected as food */
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mnum != PM_ACID_BLOB && !stoneable && rotted > 5L) {
|
if (mnum != PM_ACID_BLOB && !stoneable && rotted > 5L) {
|
||||||
pline("Ulch - that %s was tainted!",
|
boolean cannibal = maybe_cannibal(mnum, FALSE);
|
||||||
|
pline("Ulch - that %s was tainted%s!",
|
||||||
mons[mnum].mlet == S_FUNGUS ? "fungoid vegetation" :
|
mons[mnum].mlet == S_FUNGUS ? "fungoid vegetation" :
|
||||||
!vegetarian(&mons[mnum]) ? "meat" : "protoplasm");
|
!vegetarian(&mons[mnum]) ? "meat" : "protoplasm",
|
||||||
|
cannibal ? " cannibal" : "");
|
||||||
if (Sick_resistance) {
|
if (Sick_resistance) {
|
||||||
pline("It doesn't seem at all sickening, though...");
|
pline("It doesn't seem at all sickening, though...");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user