diff options
-rw-r--r-- | rules.js | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -4737,25 +4737,30 @@ function is_minefield_offensive_fire() { function roll_battle_fire(who, tc) { let fc = unit_class[who] let cv = unit_cv(who) + let n = 1 // Double dice during assault if (is_assault_battle()) - cv *= 2 + n *= 2 // Double dice for non-armor defenders in fortress! if (fc !== ARMOR && is_fortress_defensive_fire()) - cv *= 2 + n *= 2 let fp = FIREPOWER_MATRIX[fc][tc] let result = [] let total = 0 - for (let i = 0; i < cv; ++i) { - let roll = roll_die() - if (roll >= fp) { - result.push(die_face_hit[roll]) - ++total - } else { - result.push(die_face_miss[roll]) + for (let k = 0; k < n; ++k) { + if (k > 0) + result.push(" ") + for (let i = 0; i < cv; ++i) { + let roll = roll_die() + if (roll >= fp) { + result.push(die_face_hit[roll]) + ++total + } else { + result.push(die_face_miss[roll]) + } } } |