Fixed klingon count to avoid winning the game before all the klingons
authorStas Sergeev <stsp@aknet.ru>
Tue, 24 May 2005 17:51:35 +0000 (17:51 +0000)
committerStas Sergeev <stsp@aknet.ru>
Tue, 24 May 2005 17:51:35 +0000 (17:51 +0000)
are destroyed.

setup.c

diff --git a/setup.c b/setup.c
index 6ea71b53166729ef5c50e9d40767a06909a24de5..40e610bcc87bbc25915699275a2cebe7908db54f 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -479,11 +479,11 @@ int choose(int needprompt)
     game.state.nscrem = (skill > SKILL_FAIR ? 1 : 0);
     game.state.remtime = 7.0 * length;
     intime = game.state.remtime;
-    game.state.remkl = 2.0*intime*((skill+1 - 2*Rand())*skill*0.1+.15);
-    inkling = game.state.remkl;
+    inkling = 2.0*intime*((skill+1 - 2*Rand())*skill*0.1+.15);
     incom = skill + 0.0625*inkling*Rand();
     game.state.remcom= min(10, incom);
     incom = game.state.remcom;
+    game.state.remkl = inkling + incom + game.state.nscrem;
     game.state.remres = (inkling+4*incom)*intime;
     inresor = game.state.remres;
     if (inkling > 50) {