diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-06-21 17:58:55 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-07-07 18:39:37 +0200 |
commit | d8aa3a523ce28ec3e3e616ad2c090bd3f4f835fa (patch) | |
tree | d6cebfec85abd5914b26c1923e5b1bbc390150f6 /rules.js | |
parent | 6a6a356451aeb720a7e0cac4c1bb9eb1c99eef05 (diff) | |
download | time-of-crisis-d8aa3a523ce28ec3e3e616ad2c090bd3f4f835fa.tar.gz |
Castra.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -37,9 +37,9 @@ TODO [x] remove at start [x] remove when move/attack [ ] move militia to general at end of turn - [ ] take hits in battle + [ ] remove when retreat -[ ] support check +[x] support check [ ] gain legacy [ ] emperor @@ -2004,11 +2004,20 @@ states.battle = { game.misc.dhits = roll_attacker_dice() game.misc.dtaken = 0 + if (game.misc.type === "militia" && has_militia_castra(game.misc.where)) { + log("Castra reduces 1 hit") + if (game.misc.dhits > 0) + game.misc.dhits -= 1 + } + if (game.misc.type === "general" && has_general_castra(game.misc.target)) { + log("Castra reduces 1 hit") + if (game.misc.dhits > 0) + game.misc.dhits -= 1 + } + game.misc.ahits = roll_defender_dice() game.misc.ataken = 0 - // TODO: castra - if (game.misc.ahits > 0) game.state = "assign_hits_on_attacker" else if (game.misc.dhits > 0) |