From a88f4cd6fd7e7014a50e8d862c6c55f54a2a85e7 Mon Sep 17 00:00:00 2001 From: teisuru <31881306+teisuru@users.noreply.github.com> Date: Mon, 4 Sep 2023 13:01:44 +0200 Subject: forage adjacent die roll --- rules.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rules.js b/rules.js index 2356081..98b8df2 100644 --- a/rules.js +++ b/rules.js @@ -3503,6 +3503,17 @@ function can_action_forage() { function goto_forage() { push_undo() let here = get_lord_locale(game.command) + for (let next of data.locales[here].adjacent) + if (has_enemy_lord(next)) { + let die = roll_die() + if (die <= 4) { + add_lord_assets(game.command, PROV, 1) + log(`${HIT[die]}, Successful Forage`) + } + else { + log(`${MISS[die]}, Forage Failure`) + } + } log(`Foraged at %${here}`) add_lord_assets(game.command, PROV, 1) deplete_locale(here) -- cgit v1.2.3