summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-07-12 16:45:05 +0200
committerTor Andersson <tor@ccxvii.net>2023-07-12 16:45:05 +0200
commitb8d750a17e753c206a178d45980e7f55680efe69 (patch)
tree0a2473f0d579efb6a22e99927bc70d35074c2995
parent46a4aae0b5c761fa9080d9dbe63e988e191693ba (diff)
downloadtime-of-crisis-b8d750a17e753c206a178d45980e7f55680efe69.tar.gz
Cniva hits on 3+.
-rw-r--r--rules.js27
1 files changed, 21 insertions, 6 deletions
diff --git a/rules.js b/rules.js
index 2abe4b9..6621b0f 100644
--- a/rules.js
+++ b/rules.js
@@ -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() {