Closed entrez closed 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.
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.
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!
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().