equal
deleted
inserted
replaced
44 function CheckForWin: boolean; |
44 function CheckForWin: boolean; |
45 var AliveClan: PClan; |
45 var AliveClan: PClan; |
46 s: shortstring; |
46 s: shortstring; |
47 t, AliveCount, i, j: LongInt; |
47 t, AliveCount, i, j: LongInt; |
48 begin |
48 begin |
|
49 CheckForWin:= false; |
49 AliveCount:= 0; |
50 AliveCount:= 0; |
50 for t:= 0 to Pred(ClansCount) do |
51 for t:= 0 to Pred(ClansCount) do |
51 if ClansArray[t]^.ClanHealth > 0 then |
52 if ClansArray[t]^.ClanHealth > 0 then |
52 begin |
53 begin |
53 inc(AliveCount); |
54 inc(AliveCount); |
54 AliveClan:= ClansArray[t] |
55 AliveClan:= ClansArray[t] |
55 end; |
56 end; |
56 |
57 |
57 if (AliveCount > 1) |
58 if (AliveCount > 1) or ((AliveCount = 1) and ((GameFlags and gfOneClanMode) <> 0)) then |
58 or ((AliveCount = 1) and ((GameFlags and gfOneClanMode) <> 0)) then |
59 exit; |
59 exit(false); |
|
60 CheckForWin:= true; |
60 CheckForWin:= true; |
61 |
61 |
62 TurnTimeLeft:= 0; |
62 TurnTimeLeft:= 0; |
63 ReadyTimeLeft:= 0; |
63 ReadyTimeLeft:= 0; |
64 if not GameOver then |
64 if not GameOver then |