From 2dffb2dcac6285c2767f671450aa9b84177c7971 Mon Sep 17 00:00:00 2001 From: Adrian Gaudebert Date: Thu, 7 Nov 2024 14:20:34 +0100 Subject: [PATCH] Add an oasis pillaging move. --- src/board/OasisRegion.svelte | 45 ++++++++++++++++++++++++++++++++++-- src/hud/Units.svelte | 3 ++- src/missions.ts | 31 +++++++++++++++++++++++++ src/moves/index.ts | 2 ++ src/moves/pillage.ts | 24 +++++++++++++++++++ src/types.ts | 12 +++++++--- src/update.ts | 14 +++++++++++ src/utils.ts | 10 +++++++- src/village.ts | 6 +++-- 9 files changed, 138 insertions(+), 9 deletions(-) create mode 100644 src/missions.ts create mode 100644 src/moves/pillage.ts diff --git a/src/board/OasisRegion.svelte b/src/board/OasisRegion.svelte index 5c65b6f..f1bf970 100644 --- a/src/board/OasisRegion.svelte +++ b/src/board/OasisRegion.svelte @@ -1,7 +1,27 @@
@@ -10,10 +30,31 @@ Oasis (→ { region.distance }) + { #if region.state.mission }
- - +

{ region.state.mission.unitCount } soldiers are on a mission here.

+

Remaining: { Math.ceil(region.state.mission.remainingTime / 1000) }

+ { :else } +
+ + + + +
+ { /if }