k21971 / EvilHack

A variant of NetHack that is designed to be a much more challenging experience than the original, drawing inspiration and content from various existing variants along with adding unique and never-before-seen custom content.
Other
53 stars 22 forks source link

Fix: pets inherited the hero's ability to zombify #176

Closed entrez closed 5 months ago

entrez commented 5 months ago

Since pets can grant the hero XP by going through mon_xkilled -> xkilled, which assessed possible zombification of the killed monster based on youmonst, etc, a pet dog could end up creating zombies if its owner was in a state to create zombies herself (due to polymorph, race, etc). Add a bit to xkill_flags to prevent this and assess zombification based on the value of the 'zombify' global set in mhitm.c, as happens with non-pet mon vs mon control flow that goes through monkilled().

entrez commented 5 months ago

Beyond the original scope of the PR, but I also added that additional commit re: mon_xkilled->xkilled breaking pacifist -- I assume that wasn't deliberate (and that I am understanding the code right, that it would break pacifist, because I didn't actually test it). Commenting to highlight it just to make sure about those assumptions.

k21971 commented 5 months ago

Beyond the original scope of the PR, but I also added that additional commit re: mon_xkilled->xkilled breaking pacifist -- I assume that wasn't deliberate (and that I am understanding the code right, that it would break pacifist, because I didn't actually test it). Commenting to highlight it just to make sure about those assumptions.

You assume correctly. Good catch.

entrez commented 5 months ago

I'm closing this after IRC discussion because there were some assumptions made here that were wrong (e.g. that mon_xkilled applied to more than just summoned spheres), and I think it'd be better to reapproach it from scratch rather than try to rebase and force-push this. Consequence of shooting first and asking questions later, which seems to surprisingly be a bad dev practice!