I was playing with the debugger again and there's one line in shot calculation that is a bit unclear to me.
Here a sebillian shot a civilian few tiles away and missed:
Code:
[6288] >>> Begin calc. projectile trajectory <<<
[6288] Target tile = (19, 30)
[6288] Unmodified accuracy calculation:
[6288] range penalty (1.000000) = 1 - ( max(0, dist. to target (2.828427) - weapon range (30)) / weapon range (30) )
[6288] shoot accuracy from props: 0.450000
[6288] shoot accuracy (0.450000) = shoot accuracy (0.450000) - max(0, weapon recoil (0) / 100 - strength (0.600000) )
[6288] weaponAccuracy (26.000000) = weaponAccuracy (35.000000) * accuracyModifier (0.750000)
[6288] unmodified accuracy (11.700000) = shoot accuracy (0.450000) * range penalty (1.000000) * weapon accuracy (26.000000)
[6288] Damage for unit:
[6288] damage mul. (0.800000) = ( weapon range (30) / max(weapon range (30), dist. to target (2.828427)) ) * difficult mul. (0.800000) * ai race damage bonus (1.000000)
[6288] normal damage (55) = weapon damage (65) * random bonus/penalty (1.070000) * damage mul. (0.800000)
[6288] stun damage (0) = weapon stun damage (0) * random bonus/penalty (0.560000) * damage mul. (0.800000)
[6288] emp damage (0) = weapon emp damage (0) * random bonus/penalty (1.040000) * damage mul. (0.800000)
[6288] Terrain bullet score:
[6288] terrain bullet score = 1.000000
[6288] short range hit bonus (38.059) = (5 - dist. to target (2.828) + 1) * short range hit bonus per tile (12)
[6288] chanceToHitTargetTile (49.759) = (unitAccuracy (11.700) + shortRangeHitBonus (38.059)) * terrainAccuracy (1.000)
[6288] Random number (89) is > chanceToHitTargetTile (49.759) => miss shot
What is [6288] shoot accuracy from props: 0.450000? What halves sebillian's accuracy?
EDIT: ah, of course. It's the units accuracy stat. Stupid me.