diff --git a/src/board/OasisRegionPanel.svelte b/src/board/OasisRegionPanel.svelte index d4bd4cb..4eefeed 100644 --- a/src/board/OasisRegionPanel.svelte +++ b/src/board/OasisRegionPanel.svelte @@ -26,6 +26,12 @@ } + function clear() { + if (!region) return; + moves.clear(region.id, numberOfUnits); + } + + function toggleMissionRepeat() { if (!region) return; moves.toggleMissionRepeat(region.id); @@ -49,14 +55,34 @@ + { #if region.state.cleared } +

Region cleared

+ { :else } +

Defensive strength: { region.strength }

+ { /if } { #if region.state.mission }

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

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

+ { #if region.state.mission.type === 'pillage' } + { /if } +
+ { :else if !region.state.cleared } +
+ + { numberOfUnits } + +
{ :else }
diff --git a/src/board/Worldmap.svelte b/src/board/Worldmap.svelte index 1eddf67..5597257 100644 --- a/src/board/Worldmap.svelte +++ b/src/board/Worldmap.svelte @@ -16,6 +16,7 @@ class:empty={ region.type === WORLDMAP_TYPES.EMPTY } class:bourgade={ region.type === WORLDMAP_TYPES.BOURGADE } class:oasis={ region.type === WORLDMAP_TYPES.OASIS } + class:cleared={ region.type === WORLDMAP_TYPES.OASIS && region.state.cleared } > { #if region.type === WORLDMAP_TYPES.BOURGADE }