Multiply the expected value by 1-luck and 1+luck to determine these values
Are you sure Richard? Because for 100% luck, the number of kills could be anywhere from zero to the number of armies.
@Nike:
The way I prefer to explain "luck" is as follows.
Warlight calculates two things for each attack:
- "Certainty": The expected number of kills (armies * kill rate)
- "Luck": Flip a (weighted) coin for each army, to determine whether it will kill an opposing army
These two numbers are then combined into "the result" based on the luck setting.
The outcome of the "Certainty" calculation is multiplied by 1-luck (default 1-0.75=0.25), the outcome of the "Luck" calculation is multiplied by luck (default 0.75) and those two numbers added.
Example:
8 armies attack, 60% kill rate:
"Certainty" "Luck"
8 * 0.60 = 4.8 Army 1: 0
Army 2: 1
Army 3: 1
Army 4: 0
Army 5: 1
Army 6: 1
Army 7: 1
Army 8: 1
--+
6
4.8 * 0.25 + 6 * 0.75 = 5.7
Note that (in extreme cases) the "Luck" part could be anywhere from 0 to 8. On 100% luck that would mean the result of the battle could be from 0 to 8. However, on 75% luck, you gain a little certainty:
- 4.8 * 0.25 + 0 * 0.75 = 1.2
- 4.8 * 0.25 + 8 * 0.75 = 6.75
- You'll kill between 1 and 7.
On low luck settings (let's use 16% for this example), uncertainty is almost entirely removed:
- 4.8 * 0.84 + 0 * 0.16 = 4.032
- 4.8 * 0.84 + 8 * 0.16 = 5.312
- You'll kill between 4 and 6.