A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
Civ movement S4: the go-to route and order, and the route step (Refs #1398) (#1452)
Eyal Golan351f4f837979
diff --git a/changelog.d/1398-s4.md b/changelog.d/1398-s4.mdnew file mode 100644index 000000000..2f8cd1683--- /dev/null+++ b/changelog.d/1398-s4.md@@ -0,0 +1,4 @@+- Sim: a go-to order (`UnitOrder(unit, go_to, q, r)`) moves a unit at once as far as its points reach and then on at+ the start of each turn until it arrives, along `Movement.Route`, whose hexes carry the turn they are reached on. A+ route stops, and the unit needs orders, when no route reaches its hex or the hex is full on arrival (R-MOVE-008,+ R-MOVE-009, #1398). Not on screen yet.diff --git a/docs/rules/mvp.md b/docs/rules/mvp.mdindex 29025fb04..cafde4b89 100644--- a/docs/rules/mvp.md+++ b/docs/rules/mvp.md@@ -194,7 +194,7 @@ Phase 5 PR 5 (#744). The numbers are design values this PR proposed (Q-MOVE-1, QR-MOVE-001: Each unit type that moves has an integer `movement_points` a turn (`unit_types.yaml`; required, at least 1, on a military type; refused on a population type), and each land biome of `map/hexes.json` an integer cost to enter (`rules.yaml` `mvp.move_cost`, at least 1; the loader refuses a land biome with no cost and a cost for a water biome, so lake and sea are impassable). A path's cost is the sum of the costs of the hexes it enters. A unit's Moves in one turn share its points: a second Move has what the first left, and the next turn has them all again. The points left are the type's points less those the unit spent this turn (`Movement.PointsLeft`). A unit needs the full cost of the next hex, with one exception: a unit that has not moved this turn may enter one neighbouring land hex whatever it costs, and that move spends all its points (the owner, 23 October 2026, OQ-3: "No, strict like Civ VI", "with full points it can always move one hex"). A type with no movement points (the halutz types) cannot move. Real values: recruit 3 (owner, 19 October 2026, https://github.com/eyalgolan/statecraft-israel/pull/1130#issuecomment-6269103829), veteran soldier 3, artillery 2, armoured car 5; coastal plain, valley and lowland 1, hills and desert 2, mountains 3.-R-MOVE-002: `Move(unit, q, r)` takes the cheapest path, at command time (spec §2.3). Hexes leave the search in (cost, q, r) ordinal order, neighbours are tried in `tools/hexgrid.py`'s `NEIGHBOURS` order, and a hex reached again at the same cost keeps the hex it was first entered from, so of two equal paths the one through the hex first in that order wins, and the path is the same every run. `Movement.Reachable(c, s, unit, spent)` and `Movement.Path(c, s, unit, q, r, spent)` search with the points left; without `spent`, with all of them. `Movement.Reachable` lists the hexes a Move can end on this turn with their costs, and `Movement.Path` the hexes a path enters; both come from the same search Move uses (spec §2.6).+R-MOVE-002: `Move(unit, q, r)` takes the cheapest path, at command time (spec §2.3). Hexes leave the search in (cost, q, r) ordinal order, neighbours are tried in `tools/hexgrid.py`'s `NEIGHBOURS` order, and a hex reached again at the same cost keeps the hex it was first entered from, so of two equal paths the one through the hex first in that order wins, and the path is the same every run. `Movement.Reachable(c, s, unit, spent)` and `Movement.Path(c, s, unit, q, r, spent)` search with the points left; without `spent`, with all of them. `Movement.Reachable` lists the hexes a Move can end on this turn with their costs, and `Movement.Path` the hexes a path enters; both come from the same search Move uses (spec §2.6). `Movement.Route(c, s, unit, q, r, spent)` is the cheapest path with no points limit, each hex numbered with the turn it is reached on: turn 1 spends the points left, later turns all of them, a step that does not fit what is left of a turn starts the next, and a step costing more than the full points is a turn of its own (R-MOVE-001).R-MOVE-003: A hex holds at most `mvp.stack_limit` units of one side (Q-MOVE-3; real value 3). The limit counts the moving unit's side only and applies where a move ends; a path may pass through a full hex. A hex never holds both sides' units: entering an enemy unit's hex is an attack (Phase 5 PR 8), so Move refuses it.@@ -206,13 +206,17 @@ R-MOVE-006: `Move` is refused with the state unchanged and a reason when the uniR-MOVE-007: Roads and rail are cheaper (D-G2; Phase 5 PR 6, #745). A step into a hex from a hex of the same built corridor segment (`corridors.yaml`, R-COR-002) costs the kind's `mvp.road_move_cost` or `mvp.rail_move_cost` (at least 1; the loader requires both in the GDD loop) when that is lower than the terrain's cost; otherwise it costs the terrain's. Only the corridors Phase 4 builds count, not the 1948 roads of `map/routes_1948.yaml` (Q-MOVE-2, owner, 15 October 2026, #375: option (a)). A segment not started or still being built costs the terrain, and a step from one segment onto another costs the terrain unless both hexes lie on one built segment. Real values: road 1, rail 1, design values Phase 5 PR 6 proposes; the owner may override them. A cost of 1 saves nothing on the coastal plain, valley or lowland, which already cost 1.+R-MOVE-008: `UnitOrder(unit, go_to, q, r)` gives a standing go-to order and moves the unit at once as far as its points left reach along `Movement.Route`. It is refused with the state unchanged and a reason for an unknown or enemy unit, one that cannot move or is already there, water or off the board, a hex holding an enemy unit, a closed locality (R-MOVE-005), or a hex no route reaches. Otherwise it replaces the unit's order, including fortify. On arrival the order is cleared. A route may pass through a full friendly hex; at each turn's stop the unit uses the last hex with room. If the destination is full on arrival, the route stops and the order is cleared.++R-MOVE-009: At the start of each player turn, before that turn's committed and waiting orders, every player's unit with a go-to order advances in ascending unit id along a freshly computed route. It spends movement points normally, including the full-points exception (R-MOVE-001). If no route reaches its target, or the target is full on arrival, it stops, clears the order and needs orders. An adjacent enemy does not stop it (Q-MOVE-4: no zone of control). If no hex it can reach this turn has room, it waits where it is and keeps the order.+R-MOVE-010: A unit needs orders when it is one of the player's military units, its type has movement points, it has neither moved nor attacked this turn, and it has no order (`fortify`, `fortifying`, `hold` and `go_to` are orders) (`Movement.NeedsOrders`, ascending id). End turn waits until no unit needs orders, apart from those the player skips this turn (the owner, 23 October 2026: "Block like Civ"; spec 2026-10-23 section 7). Skipping is not an order and changes nothing in the game.## Standing ordersPhase 5 PR 7 (#746). Q-HOLD-1, "(a) 1 turn, free, lost on move", and Q-HOLD-2, "(a) Own hex, no interception" (owner, 15 October 2026, #375). The two percents are design values this PR proposes from avlco's option 1 on #746; the owner may override them.-R-ORDER-001: `UnitOrder(unit, order)` gives one of the player's military units the standing order `fortify` or `hold`, replacing the one it had. The unit keeps its order, turn after turn, until the player gives another; moving clears fortify (Q-HOLD-1): in the resolver after combat (step 2), in id order, a unit no longer on the hex its fortify names (`OrderTarget`, "q,r") loses the order. The order is refused with the state unchanged and a reason for an unknown order or unit, a unit with no side (a halutz), a unit of another side, a hold for artillery (R-COMBAT-007), or the order the unit already has (fortify on the hex it fortifies). It costs `attention_cost.unit_order` (0, D-A6) and is refused in the legacy loop.+R-ORDER-001: `UnitOrder(unit, order)` gives one of the player's military units the standing order `fortify` or `hold`, replacing the one it had. A new order replaces a go-to too. The unit keeps its order, turn after turn, until the player gives another; moving clears fortify (Q-HOLD-1): in the resolver after combat (step 2), in id order, a unit no longer on the hex its fortify names (`OrderTarget`, "q,r") loses the order. The order is refused with the state unchanged and a reason for an unknown order or unit, a unit with no side (a halutz), a unit of another side, a hold for artillery (R-COMBAT-007), or the order the unit already has (fortify on the hex it fortifies). It costs `attention_cost.unit_order` (0, D-A6) and is refused in the legacy loop.R-ORDER-002: Fortify takes one turn to set and costs no Arms or Money (Q-HOLD-1). Given, it reads `fortifying` and names the unit's hex; in the same resolver step it becomes `fortify`, so the combat of the turn it is given sees no bonus. A fortified unit on its hex defends at `mvp.fortify_defence_percent` of its strength (`Orders.DefencePercent`; real value 125), and from the moment it leaves the hex at 100.diff --git a/sim/Statecraft.Sim.Tests/GoToTests.cs b/sim/Statecraft.Sim.Tests/GoToTests.csnew file mode 100644index 000000000..5258f4f67--- /dev/null+++ b/sim/Statecraft.Sim.Tests/GoToTests.cs@@ -0,0 +1,124 @@+using System.Collections.Generic;+using System.Linq;+using Statecraft.Sim;+using Xunit;++/// <summary>R-MOVE-002, R-MOVE-008, R-MOVE-009 (owner, 23 October 2026: multi-turn go-to "Now"; spec 2026-10-23 section 6).</summary>+public class GoToTests+{+ static Content Board(params (int Q, int R, string Biome)[] biomes) => ContentLoader.Load(Fixture.Write(Fixture.Gdd(new Dictionary<string, string>+ {+ ["unit_types.yaml"] = Fixture.GddUnitTypes+ + " - { id: soldier, kind: unit, side: israel, class: infantry, movement_points: 3 }\n"+ + " - { id: gun, kind: unit, side: israel, class: infantry, movement_points: 2 }\n"+ + " - { id: enemy, kind: unit, side: egypt, class: infantry, movement_points: 3 }\n",+ ["map/hexes.json"] = MovementTests.Board(biomes), ["corridors.yaml"] = "corridors: []\n"+ })));++ static readonly IReadOnlyDictionary<int, int> None = new Dictionary<int, int>();++ static Unit Soldier(int id, int q, int r) => new Unit(id, "soldier", q, r, side: "israel", strength: 3);++ // R-MOVE-002: the route's hexes carry the turn they are reached on: turn 1 spends the points left, later turns all.+ [Fact]+ public void TheRouteNumbersItsTurns()+ {+ var c = Board();+ var s = CombatTests.With(c, new Unit(1, "soldier", 0, 1, side: "israel", strength: 3));+ var route = Movement.Route(c, s, 1, 5, 1, new Dictionary<int, int> { [1] = 1 });+ Assert.Equal(new[] { (1, 1, 1), (2, 1, 1), (3, 1, 2), (4, 1, 2), (5, 1, 2) }, route.Select(h => (h.Q, h.R, h.Turn)));+ }++ // R-MOVE-001, R-MOVE-002 (OQ-3): a step that costs more than the unit's full points is a turn of its own.+ [Fact]+ public void AStepCostingMoreThanFullPointsTakesATurn()+ {+ var c = Board((0, 0, "desert"), (0, 2, "desert"), (1, 0, "desert"), (1, 2, "desert"), (2, 0, "desert"), (2, 1, "desert"), (2, 2, "desert"));+ var s = CombatTests.With(c, new Unit(1, "gun", 0, 1, side: "israel", strength: 3));+ // 1,1 costs 1 on turn 1; 2,1 (desert, 3 > the gun's 2) cannot follow on turn 1 and takes all of turn 2; 3,1 is turn 3.+ Assert.Equal(new[] { (1, 1, 1), (2, 1, 2), (3, 1, 3) }, Movement.Route(c, s, 1, 3, 1, None).Select(h => (h.Q, h.R, h.Turn)));+ }++ // R-MOVE-002: Route searches the same land as Move: no water, no enemy unit's hex.+ [Fact]+ public void NoRouteToWaterOrAnEnemysHex()+ {+ var c = Board((5, 1, "sea"));+ var s = CombatTests.With(c, new Unit(1, "soldier", 0, 1, side: "israel", strength: 3), new Unit(2, "enemy", 4, 1, side: "egypt", strength: 1));+ Assert.Empty(Movement.Route(c, s, 1, 5, 1, None));+ Assert.Empty(Movement.Route(c, s, 1, 4, 1, None));+ }++ // R-MOVE-008: a go-to moves the unit at once as far as its points reach and keeps the order.+ [Fact]+ public void AGoToMovesAtOnceAndStands()+ {+ var c = Board();+ var s = CombatTests.With(c, Soldier(1, 0, 1));+ var now = Simulation.Preview(c, s, new Command[] { new UnitOrder(1, Movement.GoTo, 5, 1) });+ Assert.Empty(now.Rejected);+ Assert.Equal((3, 1), (now.State.Units[1].Q, now.State.Units[1].R));+ Assert.Equal((Movement.GoTo, "5,1"), (now.State.Units[1].Order, now.State.Units[1].OrderTarget));+ }++ // R-MOVE-009: the route step moves it on at the next turn's start, and it arrives on the turn the route showed.+ [Fact]+ public void ARouteArrivesOnTheTurnItShowed()+ {+ var c = Board();+ var s = CombatTests.With(c, Soldier(1, 0, 1));+ var shown = Movement.Route(c, s, 1, 5, 1, new Dictionary<int, int>()).Last().Turn;+ Assert.Equal(2, shown); // three hexes on turn 1, two on turn 2, on the fixture's one-point plain+ var endOfTurn1 = Simulation.Step(c, s, new Command[] { new UnitOrder(1, Movement.GoTo, 5, 1) }).State;+ Assert.Equal((3, 1), (endOfTurn1.Units[1].Q, endOfTurn1.Units[1].R));+ var startOfTurn2 = Simulation.Preview(c, endOfTurn1, new Command[0]).State; // the route step has run+ Assert.Equal((5, 1), (startOfTurn2.Units[1].Q, startOfTurn2.Units[1].R));+ Assert.Equal("", startOfTurn2.Units[1].Order);+ }++ // R-MOVE-009, R-MOVE-004 (Q-MOVE-4, no zone of control): a route does not stop because an enemy unit is next to it.+ [Fact]+ public void ARouteGoesOnPastAnEnemy()+ {+ var c = Board();+ var s = CombatTests.With(c, new Unit(1, "soldier", 2, 1, side: "israel", strength: 3, order: Movement.GoTo, orderTarget: "5,1"),+ new Unit(2, "enemy", 3, 0, side: "egypt", strength: 1));+ var now = Simulation.Preview(c, s, new Command[0]);+ Assert.Equal((5, 1), (now.State.Units[1].Q, now.State.Units[1].R));+ Assert.Equal("", now.State.Units[1].Order); // arrived+ }++ // R-MOVE-009: an enemy unit on the destination leaves no route; the unit stops and needs orders (Review Focus 5).+ [Fact]+ public void ARouteToAHexAnEnemyTookStops()+ {+ var c = Board();+ var s = CombatTests.With(c, new Unit(1, "soldier", 0, 1, side: "israel", strength: 3, order: Movement.GoTo, orderTarget: "5,1"),+ new Unit(2, "enemy", 5, 1, side: "egypt", strength: 1));+ var now = Simulation.Preview(c, s, new Command[0]);+ Assert.Equal("", now.State.Units[1].Order);+ Assert.Contains(now.Why, w => w.Key == WhyKeys.StoppedNoRoute);+ Assert.Contains(1, Movement.NeedsOrders(c, now.State, now.Spent)); // it needs orders (Review Focus 5)+ }++ // R-MOVE-008: a destination full on arrival stops the route where the unit stands.+ [Fact]+ public void ARouteWhoseHexIsFullStopsOnArrival()+ {+ var c = Board(); // the fixture's stack limit is 2 a side (MovementTests' summary)+ var s = CombatTests.With(c, new Unit(1, "soldier", 4, 1, side: "israel", strength: 3, order: Movement.GoTo, orderTarget: "5,1"),+ Soldier(2, 5, 1), Soldier(3, 5, 1));+ var now = Simulation.Preview(c, s, new Command[0]);+ Assert.Equal("", now.State.Units[1].Order);+ Assert.Equal((4, 1), (now.State.Units[1].Q, now.State.Units[1].R));+ }++ // R-SAVE-003: a go-to is a committed unit order with its hex.+ [Fact]+ public void AGoToIsSavedAsAUnitOrderWithAHex()+ {+ var save = new SaveGame(new string('a', 64), 1, Mode.Historical, SaveGame.GddRuleset, new string('b', 64));+ save.SetOpen(new Command[] { new UnitOrder(1, Movement.GoTo, 5, 1) });+ Assert.Contains("order 1 go_to 5 1", save.Write());+ }+}diff --git a/sim/Statecraft.Sim/Movement.cs b/sim/Statecraft.Sim/Movement.csindex 571a8c82d..8a8edeb37 100644--- a/sim/Statecraft.Sim/Movement.cs+++ b/sim/Statecraft.Sim/Movement.cs@@ -12,6 +12,9 @@ namespace Statecraft.Sim{public const string Kind = "move";+ /// <summary>The go-to order (R-MOVE-008): <see cref="Unit.Order"/> while a unit is on its way, with the hex "q,r".</summary>+ public const string GoTo = "go_to";+/// <summary>The player's side (units_1948.yaml's id). A unit of any other side is the enemy's; a halutz has no side and/// is the player's.</summary>public const string PlayerSide = "israel";@@ -66,6 +69,105 @@ namespace Statecraft.Simreturn path;}+ /// <summary>R-MOVE-002, R-MOVE-008: the cheapest path to (q, r) with no points limit, each hex with the turn it is+ /// reached on (turn 1 spends the points left after <paramref name="spent"/>, later turns all of them; a step that costs+ /// more than the full points takes a whole turn, R-MOVE-001). Empty for an unknown or enemy unit, one that cannot+ /// move, its own hex, or a hex no path reaches.</summary>+ public static IReadOnlyList<(int Q, int R, int Turn)> Route(Content c, GameState s, int unitId, int q, int r, IReadOnlyDictionary<int, int> spent)+ {+ var result = new List<(int Q, int R, int Turn)>();+ if (!s.Units.TryGetValue(unitId, out var u) || IsEnemy(u) || (u.Q, u.R) == (q, r)) return result;+ var full = Points(c, u);+ if (full == 0) return result;+ var (dist, prev) = Search(c, s, u, int.MaxValue);+ if (!dist.ContainsKey((q, r))) return result;+ var hexes = new List<(int Q, int R)>();+ for (var h = (q, r); h != (u.Q, u.R); h = prev[h]) hexes.Add(h);+ hexes.Reverse();+ spent.TryGetValue(unitId, out var used);+ int left = full - used, turn = 1, before = 0;+ foreach (var h in hexes)+ {+ var step = dist[h] - before; before = dist[h];+ if (step > left && !(left == full && step > full)) { turn++; left = full; }+ left = step > left ? 0 : left - step;+ result.Add((h.Q, h.R, turn));+ }+ return result;+ }++ static string HexText(int q, int r) => string.Format(CultureInfo.InvariantCulture, "{0},{1}", q, r);++ static (int Q, int R) Target(Unit u)+ {+ var parts = u.OrderTarget.Split(',');+ return (int.Parse(parts[0], CultureInfo.InvariantCulture), int.Parse(parts[1], CultureInfo.InvariantCulture));+ }++ static void Stop(GameState s, Unit u, string key, string line, string hex, List<Cause> why)+ {+ s.Units[u.Id] = new Unit(u.Id, u.Type, u.Q, u.R, u.Service, u.Side, u.Strength, "", "", u.HomeCity);+ why.Add(UnitLines.Line(key, line, new[] { u }, hex));+ }++ /// <summary>R-MOVE-008: gives the player's unit the go-to order and moves it at once as far as its points left reach.+ /// Refused, the state untouched, for no hex, an unknown or enemy unit, one that cannot move or is there, water or off+ /// the board, an enemy unit's hex, a closed locality (R-MOVE-005) or a hex no route reaches.</summary>+ internal static string? GiveGoTo(Content c, GameState s, int unitId, int? q, int? r, Dictionary<int, int> spent, List<Cause> why)+ {+ if (q == null || r == null) return "A route names a hex";+ if (!s.Units.TryGetValue(unitId, out var u)) return "There is no such unit";+ if (IsEnemy(u)) return "That unit is not yours";+ if (Points(c, u) == 0) return "That unit cannot move";+ if (u.Q == q && u.R == r) return "That unit is already there";+ if (!(c.HexAt(q.Value, r.Value) is MapHex hex) || !hex.Land) return "Units cannot enter water or leave the map";+ if (s.Units.Values.Any(x => x.Q == q && x.R == r && IsEnemy(x))) return "An enemy unit holds that hex";+ if (Closed(c, s, false).Contains((q.Value, r.Value))) return "Units may not enter an enemy-held locality before its capture is possible";+ if (Route(c, s, unitId, q.Value, r.Value, spent).Count == 0) return "No route reaches that hex";+ var target = HexText(q.Value, r.Value);+ var given = new Unit(u.Id, u.Type, u.Q, u.R, u.Service, u.Side, u.Strength, GoTo, target, u.HomeCity);+ s.Units[unitId] = given;+ why.Add(UnitLines.Line(WhyKeys.OnItsWay, $"Unit {unitId} is on its way to hex {target}", new[] { given }, target));+ if (u.Order == "fortify")+ why.Add(UnitLines.Line(WhyKeys.FortifyLost, $"Unit {unitId} left hex {u.OrderTarget} and is no longer fortified", new[] { u }, u.OrderTarget));+ Advance(c, s, given, q.Value, r.Value, spent, why);+ return null;+ }++ /// <summary>R-MOVE-009, the route step: at the start of the player's turn, in ascending id, each unit with a go-to moves+ /// on (<see cref="Advance"/>). An enemy unit next to it does not stop it (Q-MOVE-4: no zone of control).</summary>+ internal static void ContinueRoutes(Content c, GameState s, Dictionary<int, int> spent, List<Cause> why)+ {+ foreach (var id in s.Units.Keys.OrderBy(x => x).ToList())+ {+ if (!s.Units.TryGetValue(id, out var u) || u.Order != GoTo) continue;+ var (q, r) = Target(u);+ Advance(c, s, u, q, r, spent, why);+ }+ }++ /// <summary>R-MOVE-008, R-MOVE-009: moves the unit along a fresh route to (q, r) as far as this turn's points reach,+ /// stopping short of a full hex; stops it (order cleared) when no route reaches the hex or the hex is full on arrival,+ /// and clears the order on arrival. With no hex of this turn free, it waits, keeping the order.</summary>+ static void Advance(Content c, GameState s, Unit u, int q, int r, Dictionary<int, int> spent, List<Cause> why)+ {+ var route = Route(c, s, u.Id, q, r, spent);+ if (route.Count == 0) { Stop(s, u, WhyKeys.StoppedNoRoute, $"Unit {u.Id} stopped: no route reaches hex {HexText(q, r)}", HexText(q, r), why); return; }+ var today = route.TakeWhile(h => h.Turn == 1).ToList();+ for (int i = today.Count - 1; i >= 0; i--)+ {+ var h = today[i];+ if (Full(c, s, u, h.Q, h.R) != null)+ {+ if ((h.Q, h.R) == (q, r)) { Stop(s, u, WhyKeys.StoppedFull, $"Unit {u.Id} stopped: hex {HexText(q, r)} is full", HexText(q, r), why); return; }+ continue;+ }+ if (Move(c, s, u.Id, h.Q, h.R, spent, why) is string refused) { Stop(s, u, WhyKeys.StoppedNoRoute, $"Unit {u.Id} stopped: {refused}", HexText(q, r), why); return; }+ if ((h.Q, h.R) == (q, r)) Stop(s, s.Units[u.Id], WhyKeys.Arrived, $"Unit {u.Id} arrived at hex {HexText(q, r)}", HexText(q, r), why);+ return;+ }+ }+/// <summary>R-MOVE-001: the movement points unit <paramref name="unitId"/> has left this turn; 0 for an unknown unit.</summary>public static int PointsLeft(Content c, GameState s, int unitId, IReadOnlyDictionary<int, int> spent){diff --git a/sim/Statecraft.Sim/Simulation.cs b/sim/Statecraft.Sim/Simulation.csindex 90fc1a93f..9c9d3e1a7 100644--- a/sim/Statecraft.Sim/Simulation.cs+++ b/sim/Statecraft.Sim/Simulation.cs@@ -121,6 +121,7 @@ namespace Statecraft.Simstatic void RunOrders(Content c, GameState s, IReadOnlyList<Command> commands, Dictionary<int, int> spent,List<Cause> why, List<Rejection> rejected){+ if (c.IsGdd) Movement.ContinueRoutes(c, s, spent, why); // R-MOVE-009: the route step, before the turn's ordersvar priceRung = s.Rung; // every command this turn is priced at the rung the turn started atforeach (var cmd in commands){@@ -199,6 +200,7 @@ namespace Statecraft.Simcase StopWork w:return Projects.Stop(c, s, w.Unit, why);case UnitOrder o:+ if (o.Order == Movement.GoTo) return Movement.GiveGoTo(c, s, o.Unit, o.Q, o.R, spent, why);if (o.Order == Combat.Attack) return Combat.Give(c, s, o.Unit, o.Q, o.R, why);if (o.Q != null || o.R != null) return "That order names no hex";return o.Order == Demobilization.SendHome