summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteisuru <31881306+teisuru@users.noreply.github.com>2023-09-04 13:01:44 +0200
committerTor Andersson <tor@ccxvii.net>2023-12-10 18:16:55 +0100
commita88f4cd6fd7e7014a50e8d862c6c55f54a2a85e7 (patch)
tree5a86960d6385bd12fea182edbdc4f314f83a31da
parent338ec04282c5a125448fdb9db39fdb437ab6a216 (diff)
downloadplantagenet-a88f4cd6fd7e7014a50e8d862c6c55f54a2a85e7.tar.gz
forage adjacent die roll
-rw-r--r--rules.js11
1 files changed, 11 insertions, 0 deletions
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)