summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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() {