Page 1 of 1
Kutna Hora logic
Posted: Sun Jul 03, 2022 6:29 am
by rbodleyscott
locustmustdie wrote:In Kutna_Hora.BSF there’s a sentence:If(ownPercentRemaining<=60) ,whatif reverse side? Any function or existing variety for that?
Hi.
I have looked at the code, and that condition will always apply, because ownPercentRemaining is a local variable which will have been initialised to 0, and has not been assigned a value since.
So it's an error in the code logic, but I think it will very rarely (if ever) have any effect on the game.
Paul, I am not sure what that condition was intended to achieve?
Re: Kutna Hora logic
Posted: Mon Jul 04, 2022 7:25 am
by rbodleyscott
As previously stated, that condition does not have the intended effect, because no value has been assigned to ownPercentRemaining.
If the condition was actually needed, you would need to call the PercentRemaining(side) function for whichever side was intended.
Fortunately the condition is redundant anyway, as the SpecialScenarioVictoryConditions() function is only called if neither side has already lost due to rout %.
Re: Kutna Hora logic
Posted: Tue Jul 05, 2022 7:14 am
by locustmustdie
thanks,Richard