Issue569

Title Indicate if Game is Unwinnable
Priority feature Status resolved
Assigned To Keywords
Linked issues Watchers

Submitted on 2012-01-27 23h52 by salimiles, last changed by matthiaskrgr.

Messages
Author: salimiles Date: 2012-01-27   23h52
Currently the player can take actions (such as killing Spencer) which would
render the game unable to be won.

The game should warn the player if such a state occurs.
Author: ahuillet Date: 2012-01-28   06h37
I think that the best course of action is to make the game be always finishable.
Author: salimiles Date: 2012-01-28   20h11
Certainly that would be the best course of action.

But until we do so (which might take some time) I think we ought to indicate
that the game cannot be won.

Of the top of my head we ought consider the death of the following bots/dialogs
as making the game un-winnable:
HF-EntranceBot
Kevin
KevinGuard
Spencer
WillGapes
Author: ahuillet Date: 2012-01-28   20h16
This is not correct - the death of e.g. KevinGuard is not a problem after it has
opened the door for you.
Same for Spencer once he gave you the last quest, and so on.

I object to a patch that claims "the game is now unwinnable" when it's not true.
Author: salimiles Date: 2012-05-29   21h15
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.
Author: salimiles Date: 2012-05-29   23h46
Patch at http://rb.freedroid.org/r/1818/

Actually, never-mind about that -- apparently there is already support for lua
code executing on the death of an NPC, it just had never been used.

It probably should be made so it isn't so level-specific, but, that isn't
required for this use case.
Author: matthiaskrgr Date: 2012-09-28   21h08
Committed in c97558ad078398c36d7f5b102bc445d4eb8c480c. Thanks :)
History
Date User Action Args
2012-09-28 21:08:39matthiaskrgrsetstatus: open -> resolved
messages: + msg2357
2012-07-17 00:17:13Faulkmanlinkissue604 linked
2012-05-29 23:46:52salimilessetmessages: + msg2293
2012-05-29 21:15:46salimilessetmessages: + msg2290
2012-01-28 20:16:25ahuilletsetmessages: + msg2152
2012-01-28 20:11:31salimilessetmessages: + msg2151
2012-01-28 06:37:32ahuilletsetmessages: + msg2150
2012-01-27 23:52:39salimilescreate