Skip to content

Commit

Permalink
github issue #1180 - humans and murder
Browse files Browse the repository at this point in the history
Issue reported by Umbire:  reviving a human corpse into a human
monster and then killing it entails murder penalty even when it is
hostile.

This is probably a non-issue.  Human monsters tend to not leave
human corpses, they leave shopkeeper corpses or sergeant corpses
and so forth.  Most human corpses created in normal play have
montraits attached and revive as a zombie, mummy, or vampire rather
than as a human.

This doesn't attempt to be clever, it just treats PM_HUMAN like
role monsters, not subject to 'murder'.

Closes #1180
  • Loading branch information
PatR committed Dec 31, 2023
1 parent b35d8d7 commit cd91d06
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/mon.c
Expand Up @@ -3339,10 +3339,18 @@ xkilled(
newsym(x, y);

cleanup:
/* punish bad behavior */
/*
* Punish bad behavior.
*/
if (is_human(mdat)
&& (!always_hostile(mdat) && mtmp->malign <= 0)
/* exclude role monsters */
&& (mndx < PM_ARCHEOLOGIST || mndx > PM_WIZARD)
/* exclude plain "human", which isn't flagged as always hostile;
it is rare and most likely to occur as the result of resurrecting
a corpse or animating a statue and usually will be hostile */
&& mndx != PM_HUMAN
/* only applicable if hero is lawful or neutral */
&& u.ualign.type != A_CHAOTIC) {
HTelepat &= ~INTRINSIC;
change_luck(-2);
Expand Down

1 comment on commit cd91d06

@Umbire
Copy link

@Umbire Umbire commented on cd91d06 Jan 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only gripe is that if you're neutral it's 50/50 on them being peaceful or hostile, at least as far as I can recall from source diving when studying this.

Otherwise, glad it's addressed.

Please sign in to comment.