From 5930049b0c0e239ee6e160276735c963ec99fb42 Mon Sep 17 00:00:00 2001
From: Tor Andersson <tor@ccxvii.net>
Date: Sun, 18 Dec 2022 01:25:14 +0100
Subject: Don't recompute supply if out of actions.

---
 rules.js | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'rules.js')

diff --git a/rules.js b/rules.js
index 10145f0..7375a35 100644
--- a/rules.js
+++ b/rules.js
@@ -3225,6 +3225,11 @@ function goto_sally() {
 function update_supply() {
 	// TODO: Lodya - select boat OR ship (we count both here...)
 
+	if (game.actions < 1) {
+		game.supply = 0
+		return
+	}
+
 	let season = current_season()
 	let here = get_lord_locale(game.command)
 	let boats = 0
-- 
cgit v1.2.3