diff options
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) |