Discovery: I was searching for clues as part of the "Hunt for the legendary Plumpkin!" quest. I had killed 3 Hallowed Ghosts for their clues, out of the 4 required. I entered the Gates of Morning and a Hallowed Ghost spawned. I couldn't immediately see it from the entrance, but I think it spawned near Melnela and started fighting her. After taking a few steps, I received the 4th clue, and advanced the quest. Therefore I assumed that some NPC had killed the ghost. But when I approached Melnela, I realized that the ghost was still alive and fighting her. I inspected the ghost, and saw that Temporal Warden was chosen as its random class, and it had Warden's Call. I realized that I had received a clue when a Warden's Call clone had died after attacking.
Cause: This kind of bug doesn't happen with enemies that have on_die behaviour, because on_die is cleared on cloning an actor (thanks to clone_nodes). But the Hallowed Ghosts don't use on_die, instead they have a value plumpkin_clue = 1 and the event code modifies mod.class.NPC.die to update the quest whenever an NPC with plumpkin_clue = 1 dies. And cloning the actor doesn't get rid of plumpkin_clue.
Possible ways to fix this bug:
- Give the Hallowed Ghosts an on_die function, instead of modifying mod.class.NPC.die. For comparison, the Stormtroopers from the May the 4th event are very similar to the Hallowed Ghosts, and they use an on_die function, so I'd expect that this would work here too.
- Add plumpkin_clue to clone_nodes.