I've reproduced the issue on my end and I see the root cause. The current behavior is...for a reason I can't recall...intentional. There's specific waiting for the next player move to show the NPC's death.
Relevant code:
case ScriptFlag::Die:
//Stop script execution whether visible or not.
bProcessNextCommand = false;
if (bExecuteNoMoveCommands)
return; //wait until first move to display death
this->wCurrentCommandIndex = this->commands.size();
if (this->bVisible)
{
//NPC dies.
if (!bExecuteNoMoveCommands)
CueEvents.Add(CID_MonsterDiedFromStab, this);
CCueEvents Ignored;
SetKillInfo(NO_ORIENTATION); //center stab effect
room.KillMonster(this, Ignored, true);
}
break;
I'm trying to recall why it would be this way. Maybe so other scripts could detect the NPC's defeat on the next turn? No, that's not currently supported, actually. I think the comment about "
wait until first move..."
is in relation to move 0 (entering the room). That is, any NPCs that have scripted to die on room entrance wait until the player makes a move (otherwise, they simply wouldn't show up in the new room being transitioned to at all, like in regular DROD). That would make sense.
I'm going to try changing this so "
Imperative Die"
is only blocked on turn 0 and will put up a PR if this seems to work.
____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
[Last edited by mrimer at 10-31-2020 04:05 AM]