Certainly.
What is needed is a boolean (e.g. int essential_to_win) added to the npc struct
(src/struct.h), that has a default of FALSE (added to enemy_new() in
src/enemy.c), updated in dialog (src/lua.c, and dialogs), and checked on npc
death (func. kill_enemy() in src/enemy.c).
I might even write a patch to do it.*
* More complicated behavior, such as a dialog asking if the player wants to go
back to a previous (winnable) save can be added later.
|