diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-07-12 16:45:05 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-07-12 16:45:05 +0200 |
commit | b8d750a17e753c206a178d45980e7f55680efe69 (patch) | |
tree | 0a2473f0d579efb6a22e99927bc70d35074c2995 | |
parent | 46a4aae0b5c761fa9080d9dbe63e988e191693ba (diff) | |
download | time-of-crisis-b8d750a17e753c206a178d45980e7f55680efe69.tar.gz |
Cniva hits on 3+.
-rw-r--r-- | rules.js | 27 |
1 files changed, 21 insertions, 6 deletions
@@ -4005,14 +4005,29 @@ function roll_rival_emperor_dice() { } function roll_barbarian_dice(tribe) { - log(BARBARIAN_NAME[tribe]) let prov = is_province(game.where) + let hits = 0 let n = 0 - for (let id = first_barbarian[tribe]; id <= last_barbarian[tribe]; ++id) - if (get_barbarian_location(id) === game.where) - if (prov || is_barbarian_active(id)) - n += is_barbarian_leader(id) ? 2 : 1 - return roll_dice(n, 4) + for (let id = first_barbarian[tribe]; id <= last_barbarian[tribe]; ++id) { + if (get_barbarian_location(id) === game.where) { + if (prov || is_barbarian_active(id)) { + if (id === CNIVA) { + log(barbarian_name(id)) + hits += roll_dice(2, 3) + } else if (id === ARDASHIR || id == SHAPUR) { + log(barbarian_name(id)) + hits += roll_dice(2, 4) + } else { + n += 1 + } + } + } + } + if (n > 0) { + log(BARBARIAN_NAME[tribe]) + hits += roll_dice(n, 4) + } + return hits } function roll_spiculum_dice() { |