Hi.
I would like to know more about partisan appearance. Does the number of partisans depend on the conquered city size? What other variables are involved (appart from the requirements of Guerrilla Warfare and Democracy/Communism)?
What is the GitHub source file that codes this effect?
Thanks!
Partisan question
Re: Partisan question
https://github.com/freeciv/freeciv/blob ... efault.lua:
Code: Select all
local partisans = random(0, 1 + (city.size + 1) / 2) + 1
if partisans > 8 then
partisans = 8
end
Re: Partisan question
Thank you, Ignatus.
Two more questions regarding this.
- Is the division by 2 a "floor division", meaning it yields the "nearest lower integer"? That is, "7 / 2" would be "3".
- Is "city.size" computed before or after the city is conquered? Because conquering a city reduces the population by one.
Thanks.
Two more questions regarding this.
- Is the division by 2 a "floor division", meaning it yields the "nearest lower integer"? That is, "7 / 2" would be "3".
- Is "city.size" computed before or after the city is conquered? Because conquering a city reduces the population by one.
Thanks.
Re: Partisan question
- Lua always uses real numbers, rounds down only at pass to random(,) functionMikeDuk wrote: - Is the division by 2 a "floor division", meaning it yields the "nearest lower integer"? That is, "7 / 2" would be "3".
- Is "city.size" computed before or after the city is conquered? Because conquering a city reduces the population by one.
- The city size is reduced at the callback.