From 9161d8dab4ac318caf41f1f63879d59348d91554 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 22 Oct 2024 00:02:23 +0200 Subject: victory check --- play.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'play.js') diff --git a/play.js b/play.js index d8353a4..e012337 100644 --- a/play.js +++ b/play.js @@ -921,7 +921,18 @@ function layout_retro(s, pow) { } function layout_victory_pool(pow, max, x, y) { - let n = 0 + let n = view.vp[pow] + if (pow === P_PRUSSIA) { + if (view.flags & F_SILESIA_ANNEXED) ++n + } + if (pow === P_FRANCE) { + if (view.flags & F_ITALY_FRANCE) ++n + if (view.flags & F_EMPEROR_FRANCE) ++n + } + if (pow === P_AUSTRIA) { + if (view.flags & F_ITALY_AUSTRIA) ++n + if (view.flags & F_EMPEROR_AUSTRIA) ++n + } for (let i = 0; i < view.victory.length; i += 2) if (view.victory[i+1] === pow) ++n -- cgit v1.2.3