Auto-translated
So, when a hero is killed, both tasks are marked as true, everything is completed, and the scenario automatically ends. It's unclear what the desired outcome is and what actually happens. If the goal is: the player kills a hero, final cutscenes are shown, and the scenario ends, then this can be implemented differently: we manually detect the hero kill event, show the cutscenes, and call the Win() function. The quest to kill the hero is then transformed into something else (the description can remain the same, but the task type is changed to manual).