A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
GDD 0.3: artillery moves 2 points on infantry terrain costs (Q12; Fixes #1708) (#2142)
Beri1a64681d718c
diff --git a/changelog.d/1708-artillery-movement.md b/changelog.d/1708-artillery-movement.mdnew file mode 100644index 000000000..8ad82c4ec--- /dev/null+++ b/changelog.d/1708-artillery-movement.md@@ -0,0 +1,3 @@+### Changed+- Under the GDD 0.3 rules, artillery moves again: 2 movement points a turn on the infantry terrain costs, and a shot+ spends the points it has left, as on the current rules (owner's answer Q12, #1708).diff --git a/docs/gdd03-catalogue.md b/docs/gdd03-catalogue.mdindex 8d5de5a6d..d8288323d 100644--- a/docs/gdd03-catalogue.md+++ b/docs/gdd03-catalogue.md@@ -2,7 +2,7 @@`content/gdd03-balance.yaml` records the design data for the separate `gdd-0.3` ruleset (#1687). It does not select that ruleset or change the live legacy/gdd-0.1 simulation. Existing content sets without this file still load; an authored file is validated and included in the content hash. #1708 consumes only the existing movement/defence subset under exact identity `gdd-0.3`: `military.move_infantry`, `military.move_armoured`, `military.move_road`, `military.move_rail`, `military.stack_limit`, `military.fort_bonus`, `military.fortify_turns`, `military.fortify_bonus`, the six land biomes' `movement` and `defence_percent` parts, and the `lake`/`sea` impassability expressions. Consumed values must have the specified integral shape and Agreed/Default basis; absent, Deferred or malformed values are rejected. This does not promote Default data to Agreed or adopt the remainder of the catalogue.-Artillery allowance and terrain costs remain Deferred, with no number introduced. Its movement consumer is blocked; its existing firing contract and shot accounting remain unchanged. Adding symbolic artillery catalogue entries requires a separately approved 0.3-only overlay/load design so older identities' raw content hashes remain unchanged; no shared catalogue edit is made here. Permanent forts derive from existing `kind: fort` location records after overrides (currently Latrun and Iraq Suwaydan; roster subject to Amir), without new state/save data. Legacy/gdd-0.1 use their original runtime paths and hash inputs.+Artillery reads its type's `movement_points` (no catalogue key) and pays the infantry column of the land rows' `movement` pair, per the owner's Q12 answer. A shot spends the points left. Adding symbolic artillery catalogue entries requires a separately approved 0.3-only overlay/load design so older identities' raw content hashes remain unchanged; no shared catalogue edit is made here. Permanent forts derive from existing `kind: fort` location records after overrides (currently Latrun and Iraq Suwaydan; roster subject to Amir), without new state/save data. Legacy/gdd-0.1 use their original runtime paths and hash inputs.The pinned source is [#1668's balance.md at 605277df](https://github.com/eyalgolan/statecraft-israel/blob/605277df/docs/gdd/balance.md). Every backticked key in its Key tables has a literal catalogue key. Project keys (`maabara` through `rail_segment`) and existing biome ids also keep their names. This gives 142 keys; a test fixes that inventory independently of the loader. Tables that share one row across several keys are split into individual entries. Multi-tier values remain ordered as in the source, with the order and units in the note.diff --git a/docs/rules/mvp.md b/docs/rules/mvp.mdindex 3ba1f8629..44f103a92 100644--- a/docs/rules/mvp.md+++ b/docs/rules/mvp.md@@ -274,7 +274,7 @@ R-COR-003: A corridor is complete when every one of its segments is built, in anPhase 5 PR 5 (#744). The numbers are design values this PR proposed (Q-MOVE-1, Q-MOVE-3; owner, 15 October 2026, #375: "Take all recommendations") and the owner accepted them on 19 October 2026 (https://github.com/eyalgolan/statecraft-israel/pull/1073#issuecomment-6259021508).-R-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. Under exact identity `gdd-0.3` (#1708), `Movement.Allowance` reads `gdd03-balance.yaml` `military.move_infantry` (2) or `military.move_armoured` (3), by type class for either army. The six land rows' `movement` pairs are infantry/armour: coastal plain, lowland and valley 1/1; hills and desert 2/2; mountains 2/3. These are existing Default catalogue values sourced to #1668 balance.md at 605277df. Reachability, path, route ETA, immediate execution, enemy movement, points-left, needs-orders and the UI denominator share this contract, including the full-points exception. Artillery movement parameters remain Deferred: movement and go-to are blocked, without guessing a number or borrowing a terrain column; existing artillery fire accounting remains unchanged (R-COMBAT-007). No shared content bytes or older identity allowances change.+R-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. Under exact identity `gdd-0.3` (#1708), `Movement.Allowance` reads `gdd03-balance.yaml` `military.move_infantry` (2) or `military.move_armoured` (3), by type class for either army. The six land rows' `movement` pairs are infantry/armour: coastal plain, lowland and valley 1/1; hills and desert 2/2; mountains 2/3. These are existing Default catalogue values sourced to #1668 balance.md at 605277df. Reachability, path, route ETA, immediate execution, enemy movement, points-left, needs-orders and the UI denominator share this contract, including the full-points exception. Artillery keeps main's value, its type's `movement_points` (2), and pays the infantry column of those rows (the owner, 1 November 2026, Q12 on #1668: https://github.com/eyalgolan/statecraft-israel/pull/1668#issuecomment-6553884547); its fire spends the points it has left like any attack (R-COMBAT-001, R-COMBAT-007). No shared content bytes or older identity allowances change.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). Under `gdd-0.3`, the same ordering and search consume R-MOVE-001's role costs and effective allowance; player actions still take effect at command time (owner ruling on #1708, 26 October 2026).diff --git a/sim/Statecraft.Sim.Tests/Gdd03MovementFortTests.cs b/sim/Statecraft.Sim.Tests/Gdd03MovementFortTests.csindex 38bfe392d..41146a03e 100644--- a/sim/Statecraft.Sim.Tests/Gdd03MovementFortTests.cs+++ b/sim/Statecraft.Sim.Tests/Gdd03MovementFortTests.cs@@ -148,26 +148,30 @@ public class Gdd03MovementFortTestsAssert.NotNull(Movement.Full(c, s, s.Units[1], 3, 1));}- // R-MOVE-001: no artillery movement number or infantry-column fallback is introduced.+ // R-MOVE-001, R-MOVE-008, R-MOVE-010, R-COMBAT-001, R-COMBAT-007: Q12 (owner, 1 November 2026) gives artillery main's 2+ // points on the infantry terrain column. Mountains are made infantry 1 / armour 3 here so the two columns differ.[Fact]- public void DeferredArtilleryCannotMoveButItsExistingFireContractRemains()+ public void ArtilleryMovesTwoPointsOnInfantryTerrainCostsAndFiringSpendsThem(){- var c = Load(); var s = With(c, Of("gun"), Of("enemy", 2, 4, side: "egypt"));- Assert.Contains(1, Movement.NeedsOrders(c,s,new Dictionary<int,int>()));- Assert.Empty(Movement.Reachable(c, s, 1));- Assert.Equal(Movement.MissingArtilleryMovement, Movement.GiveGoTo(c, s, 1, 3, 1, new Dictionary<int, int>(), new List<Cause>()));- s.Arms = 0;- Assert.Null(Combat.Check(c, s, 1, 4, 1, spent: new Dictionary<int, int>())); // R-COMBAT-007- var spent = new Dictionary<int,int>(); var why = new List<Cause>();- var before = s.Hash();- Assert.Equal(Movement.MissingArtilleryMovement, Movement.Move(c,s,1,3,1,spent,why));- Assert.Equal(before,s.Hash()); Assert.Empty(why); Assert.Empty(spent);- Assert.True(Movement.ActionsLeft(c,s,1,spent) > 0);- Assert.Null(Combat.Strike(c,s,1,4,1,spent,new Dictionary<int,(int Q,int R)>(),why));- Assert.Equal(0,s.Arms); Assert.DoesNotContain(1,Movement.NeedsOrders(c,s,spent));- Assert.Equal(0,Movement.ActionsLeft(c,s,1,spent));- Assert.NotNull(Combat.Check(c,s,1,4,1,spent:spent));-+ var c = Load(biome: "mountains"); c.Gdd03Balance!.Values["mountains"].Parts["movement"].Values[0] = 1;+ c.Gdd03Balance!.Values["military.move_infantry"].Values[0] = 3; // pins that artillery reads its type's 2, not the infantry scalar+ var s = With(c, Of("gun"), Of("enemy", 2, 5, side: "egypt"));+ Assert.Equal(2, Movement.Allowance(c, s.Units[1]));+ Assert.Contains(1, Movement.NeedsOrders(c, s, new Dictionary<int, int>()));+ Assert.Equal(1, Movement.Reachable(c, s, 1)[(3, 1)]);+ Assert.Equal(2, Movement.Reachable(c, s, 1)[(4, 1)]); // armour's 3 would leave no point for the next hex+ var spent = new Dictionary<int, int>(); var why = new List<Cause>();+ Assert.Null(Movement.Move(c, s, 1, 3, 1, spent, why));+ Assert.Equal((3, 1), (s.Units[1].Q, s.Units[1].R));+ Assert.Equal(1, Movement.PointsLeft(c, s, 1, spent));+ Assert.Null(Combat.Strike(c, s, 1, 5, 1, spent, new Dictionary<int, (int Q, int R)>(), why)); // range 2, shared budget+ Assert.Equal(0, Movement.PointsLeft(c, s, 1, spent));+ Assert.Equal("That unit has no movement points left this turn", Combat.Check(c, s, 1, 5, 1, spent: spent));+ Assert.Empty(Movement.Reachable(c, s, 1, spent));+ var go = With(c, Of("gun", q: 0)); var goSpent = new Dictionary<int, int>();+ Assert.Equal(new[] { 1, 1, 2, 2 }, Movement.Route(c, go, 1, 4, 1, goSpent).Select(h => h.Turn));+ Assert.Null(Movement.GiveGoTo(c, go, 1, 4, 1, goSpent, new List<Cause>()));+ Assert.Equal(2, go.Units[1].Q);}// R-COMBAT-010, R-COMBAT-002, R-ORDER-002, R-ORDER-003: additive, either army, no Hold or unsettled bonus.diff --git a/sim/Statecraft.Sim/Combat.cs b/sim/Statecraft.Sim/Combat.csindex de2c026eb..209114677 100644--- a/sim/Statecraft.Sim/Combat.cs+++ b/sim/Statecraft.Sim/Combat.cs@@ -111,10 +111,7 @@ namespace Statecraft.Simif (enemy && u.Order == Attack && u.OrderTarget == target) return Orders.RefusedAlready;if (!InReach(c, u, q.Value, r.Value)) return Guns(c, u) ? RefusedOutOfRange : RefusedNotAdjacent;if (Defenders(s, u, q.Value, r.Value).Count == 0) return RefusedNoEnemy;- if (!enemy && spent != null && (Gdd03Military.Applies(c) && Guns(c, u)- ? Movement.AttackPoints(c, u) <= (spent.TryGetValue(unitId, out var used) ? used : 0)- : Movement.PointsLeft(c, s, unitId, spent) == 0))- return RefusedNoPoints;+ if (!enemy && spent != null && Movement.PointsLeft(c, s, unitId, spent) == 0) return RefusedNoPoints;if (enemy || !SpendsArms(c)) return null; // before Need, so gdd-0.3 never reads a pricevar mvp = c.RulesAt(s.Date).Mvp!;var need = Need(c, mvp, u);@@ -150,7 +147,7 @@ namespace Statecraft.Simif (u.Order == Orders.Fortify)why.Add(UnitLines.Line(WhyKeys.FortifyLost,$"Unit {unitId} left hex {u.OrderTarget} and is no longer fortified", new[] { u }, u.OrderTarget));- spent[unitId] = Movement.AttackPoints(c, attacker);+ spent[unitId] = Movement.Points(c, attacker);attacked[unitId] = (q!.Value, r!.Value);Engage(c, s, mvp, new List<Unit> { attacker }, Defenders(s, attacker, q.Value, r.Value), q.Value, r.Value, why);return null;diff --git a/sim/Statecraft.Sim/Gdd03Military.cs b/sim/Statecraft.Sim/Gdd03Military.csindex cba9b535a..8679f8350 100644--- a/sim/Statecraft.Sim/Gdd03Military.cs+++ b/sim/Statecraft.Sim/Gdd03Military.cs@@ -44,7 +44,7 @@ namespace Statecraft.Siminternal static int Terrain(Content c, string biome, string role){- int index = role == "infantry" ? 0 : role == "armour" ? 1 : -1;+ int index = role == "infantry" || role == Combat.ArtilleryClass ? 0 : role == "armour" ? 1 : -1; // Q12: artillery pays infantry costsif (index < 0) throw Invalid(biome + ".parts.movement", "no approved movement column for role " + role);return Number(Part(c, biome, "movement"), biome + ".parts.movement (" + role + ")", 2, index, true);}diff --git a/sim/Statecraft.Sim/Movement.cs b/sim/Statecraft.Sim/Movement.csindex 34aa898eb..99d75c111 100644--- a/sim/Statecraft.Sim/Movement.cs+++ b/sim/Statecraft.Sim/Movement.cs@@ -27,8 +27,8 @@ namespace Statecraft.Simstatic bool IsEnemy(Unit u) => u.Side != "" && u.Side != PlayerSide;- /// <summary>R-MOVE-001: effective movement allowance, shared by simulation and presentation.- /// Artillery movement in 0.3 is blocked until its Deferred allowance and terrain column are approved.</summary>+ /// <summary>R-MOVE-001: effective movement allowance, shared by simulation and presentation. Under 0.3 artillery keeps+ /// its authored points (main's 2) and pays the infantry terrain costs (Q12, owner, 1 November 2026).</summary>public static int Allowance(Content c, Unit u){var type = c.UnitTypes.FirstOrDefault(t => t.Id == u.Type);@@ -36,22 +36,15 @@ namespace Statecraft.Simif (!Gdd03Military.Applies(c) || type.Side == "") return type.MovementPoints;if (type.Class == "infantry") return Gdd03Military.Scalar(c, "military.move_infantry");if (type.Class == "armour") return Gdd03Military.Scalar(c, "military.move_armoured");+ if (type.Class == Combat.ArtilleryClass) return type.MovementPoints;return 0; // no fallback to an older identity's number for Deferred/unknown roles}- public const string MissingArtilleryMovement = "Artillery cannot move: the gdd-0.3 artillery movement allowance is not specified.";- public static bool MovementDeferred(Content c, Unit u) => Gdd03Military.Applies(c)- && c.UnitTypes.FirstOrDefault(t => t.Id == u.Type)?.Class == Combat.ArtilleryClass;/// <summary>Existing action budget, including artillery fire; not a new movement allowance.</summary>public static int ActionsLeft(Content c, GameState s, int id, IReadOnlyDictionary<int, int> spent) =>- s.Units.TryGetValue(id, out var u) ? Math.Max(0, AttackPoints(c, u) - (spent.TryGetValue(id, out var used) ? used : 0)) : 0;+ s.Units.TryGetValue(id, out var u) ? Math.Max(0, Points(c, u) - (spent.TryGetValue(id, out var used) ? used : 0)) : 0;internal static int Points(Content c, Unit u) => Allowance(c, u);- // #1708 does not adopt an artillery allowance or redesign #1706's existing fire/shot accounting.- internal static int AttackPoints(Content c, Unit u) => Gdd03Military.Applies(c)- && c.UnitTypes.FirstOrDefault(t => t.Id == u.Type)?.Class == Combat.ArtilleryClass- ? c.UnitTypes.First(t => t.Id == u.Type).MovementPoints : Points(c, u);-/// <summary>The hexes unit <paramref name="unitId"/> can move to this turn, each with its path's cost, in (q, r) order:/// what Move accepts on a turn the unit has not moved yet (R-MOVE-001 to R-MOVE-005). Empty for an unknown unit, an/// enemy unit or one that cannot move.</summary>@@ -141,7 +134,6 @@ namespace Statecraft.Simif (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 (MovementDeferred(c, u)) return MissingArtilleryMovement;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";@@ -204,7 +196,7 @@ namespace Statecraft.Sim/// attacked this turn (nothing in <paramref name="spent"/>) and have no order (fortify, fortifying, hold and go-to are/// orders). End turn waits for them (spec 2026-10-23 section 7); Skip is the UI's and not in the sim.</summary>public static IReadOnlyList<int> NeedsOrders(Content c, GameState s, IReadOnlyDictionary<int, int> spent) =>- s.Units.Values.Where(u => u.Side == PlayerSide && AttackPoints(c, u) > 0 && u.Order == ""+ s.Units.Values.Where(u => u.Side == PlayerSide && Points(c, u) > 0 && u.Order == ""&& !(spent.TryGetValue(u.Id, out var used) && used > 0)).Select(u => u.Id).ToList();@@ -217,7 +209,6 @@ namespace Statecraft.Sim{if (!s.Units.TryGetValue(unitId, out var u)) return "There is no such unit";if (IsEnemy(u) != enemy) return "That unit is not yours";- if (MovementDeferred(c, u)) return MissingArtilleryMovement;var points = Points(c, u);if (points == 0) return "That unit cannot move";if (u.Q == q && u.R == r) return "That unit is already there";diff --git a/unity/Assets/Scripts/UI/InfoPanelPresenter.cs b/unity/Assets/Scripts/UI/InfoPanelPresenter.csindex 62e251327..700d39311 100644--- a/unity/Assets/Scripts/UI/InfoPanelPresenter.cs+++ b/unity/Assets/Scripts/UI/InfoPanelPresenter.cs@@ -870,8 +870,6 @@ namespace Statecraft.Game.UIvar points = shownUnit is int pu && s.Units.TryGetValue(pu, out var military) && military.Side == Movement.PlayerSide&& Movement.Allowance(c, military) > 0? text.Format("unit.points", Movement.PointsLeft(c, s, pu, bridge.Spent), Movement.Allowance(c, military)) : "";- if (shownUnit is int gunId && s.Units.TryGetValue(gunId, out var gun) && Movement.MovementDeferred(c, gun))- points = text["unit.artillery_move_missing"] + "\n" + text[Movement.ActionsLeft(c, s, gunId, bridge.Spent) > 0 ? "unit.fire_ready" : "unit.fire_spent"];var routeLine = shownUnit is int routeUnit ? GoToLine(routeUnit) : "";var lines = new[] { card.Body, points, order, routeLine, standing, reinforceQueued ? text["unit.reinforce_queued"] : "" }.Where(x => x != "");title.text = card.Title; subtitle.text = card.Subtitle; settlements.text = string.Join("\n", lines);diff --git a/unity/Assets/Scripts/UI/SimBridge.cs b/unity/Assets/Scripts/UI/SimBridge.csindex 4d050e77b..9c6968870 100644--- a/unity/Assets/Scripts/UI/SimBridge.cs+++ b/unity/Assets/Scripts/UI/SimBridge.cs@@ -218,13 +218,11 @@ namespace Statecraft.Game.UI}}- /// <summary>The sim's English refusals that have a UI string: Movement's artillery refusal, Orders.Check's (#2045) and- /// the Arms purchase refused at the debt ceiling (#2198).+ /// <summary>The sim's English refusals that have a UI string: Orders.Check's (#2045) and the Arms purchase refused at the debt ceiling (#2198)./// Keyed on the English, so the same words from another check (Movement, Combat, Training, Demobilization give "That/// unit is not yours", "There is no such unit" too) read in the UI's language as well.</summary>static readonly Dictionary<string, string> ReasonKeys = new Dictionary<string, string>{- [Movement.MissingArtilleryMovement] = "unit.artillery_move_missing",// #813 (R-MONEY-004): the dollar conversion's refusals.[EconomySystem.RefusedDollarsMinimum] = "dollars.refused_minimum",[EconomySystem.RefusedDollarsNotAtWar] = "dollars.refused_not_at_war",diff --git a/unity/Assets/Tests/EditMode/InfoPanelLayoutTests.cs b/unity/Assets/Tests/EditMode/InfoPanelLayoutTests.csindex ca38ff93d..ed1332ed9 100644--- a/unity/Assets/Tests/EditMode/InfoPanelLayoutTests.cs+++ b/unity/Assets/Tests/EditMode/InfoPanelLayoutTests.cs@@ -889,7 +889,8 @@ public class InfoPanelLayoutTests},text:text,hebrew:hebrew,unit:()=>f.token,settled:root=>UiTestKit.Press(root.Q<Button>("info-attack")));}- // R-MOVE-010/#1749: a gun retains its action prompt/fire, but move explicitly refuses without a guessed allowance.+ // R-MOVE-001/R-MOVE-010/R-COMBAT-001/#1749: Q12 (owner, 1 November 2026) gives the gun main's 2 points. It needs orders,+ // moves, and its shot spends the points it has left, as any attack does.[UnityTest]public IEnumerator Gdd03GunPromptsBeforeFireAndStopsAfterShot([Values(false,true)] bool hebrew){@@ -897,29 +898,29 @@ public class InfoPanelLayoutTestsg.State.Units[9000]=new Unit(9000,c.UnitTypes.First(t=>t.Side!=""&&t.Side!=Movement.PlayerSide&&t.Class=="infantry").Id,2,1,side:"egypt",strength:6);var text=UiText.Parse(AssetDatabase.LoadAssetAtPath<TextAsset>(hebrew?UiPaths.StringsHebrew:UiPaths.Strings).text);var bridge=new SimBridge(g,text);CollectionAssert.Contains(bridge.NeedsOrders,f.id);- Assert.Greater(Movement.ActionsLeft(c,bridge.State,f.id,bridge.Spent),0);- Assert.AreEqual(text["unit.artillery_move_missing"],bridge.Queue(new Move(f.id,1,1)));+ Assert.AreEqual(2,Movement.Allowance(c,bridge.State.Units[f.id]));+ Assert.IsNull(bridge.Queue(new Move(f.id,1,1)));+ Assert.AreEqual((1, 1), (bridge.State.Units[f.id].Q, bridge.State.Units[f.id].R), "the committed Move put the gun on (1,1)");var odds = Combat.Preview(c, bridge.State, f.id, 2, 1)!.Value.RatioPercent;InfoPanelPresenter? shown = null;- // The card's own Fire control: shown and pressed, its pick shows the sim's odds while the movement refusal stays on- // the card, and the lit target fires through the same pick a map click uses.+ // The card's own Fire control: shown and pressed with the point the Move left, its pick shows the sim's odds, and the+ // lit target fires through the same pick a map click uses.yield return Rendered(1512,982,g,(root,info)=>{ info.ShowUnit(); shown = info; },root=> {var card = root.Q<Label>("info-settlements").text;- Assert.IsTrue(Shown(root.Q<Button>("info-attack")), "the gun's attack control stays visible while movement is blocked");- Assert.IsFalse(Shown(root.Q<Button>("info-move")), "no Move is offered for the gun");- StringAssert.Contains(text["unit.fire_ready"], card);- StringAssert.Contains(text["unit.artillery_move_missing"], card);+ Assert.IsTrue(Shown(root.Q<Button>("info-attack")), "the gun's attack control is offered");+ Assert.IsTrue(Shown(root.Q<Button>("info-move")), "the gun's Move is offered with a point left");+ StringAssert.Contains(text.Format("unit.points", 1, 2), card);StringAssert.Contains(text.Format("unit.attack_odds", "2,1", odds), card);Assert.IsTrue(shown!.PickTarget(2, 1), "the lit enemy hex takes the shot");},text:text,hebrew:hebrew,unit:()=>f.token,settled:root=>UiTestKit.Press(root.Q<Button>("info-attack")));var after = new SimBridge(g, text);CollectionAssert.DoesNotContain(after.NeedsOrders,f.id);- Assert.AreEqual(0,Movement.ActionsLeft(c,after.State,f.id,after.Spent));Assert.AreEqual(0,after.State.Arms);+ Assert.AreEqual(0,Movement.PointsLeft(c,after.State,f.id,after.Spent));Assert.AreEqual(0,after.State.Arms);yield return Rendered(1512,982,g,(root,info)=>info.ShowUnit(),root=> {var card = root.Q<Label>("info-settlements").text;- StringAssert.Contains(text["unit.fire_spent"], card);- StringAssert.Contains(text["unit.artillery_move_missing"], card);+ StringAssert.Contains(text.Format("unit.points", 0, 2), card);Assert.IsFalse(Shown(root.Q<Button>("info-attack")), "no second shot is offered");+ Assert.IsFalse(Shown(root.Q<Button>("info-move")), "the shot spent the gun's points");},text:text,hebrew:hebrew,unit:()=>f.token);}diff --git a/unity/Assets/UI/strings.en.yaml b/unity/Assets/UI/strings.en.yamlindex 7653862e8..d6f0bc737 100644--- a/unity/Assets/UI/strings.en.yaml+++ b/unity/Assets/UI/strings.en.yaml@@ -981,11 +981,6 @@ arms.refused_debt_ceiling: "Buying that many Arms would take the debt past its creport.stock_line: "{0}: {1}"report.stock_change: "{0}: {1} ({2})"-# #1708 artillery action status. Hebrew: native review pending (#564).-unit.artillery_move_missing: "Artillery cannot move yet: its movement points have not been set"-unit.fire_ready: "Fire available"-unit.fire_spent: "Fired this turn"-# #2045 standing-order refusals (Orders.Check), shown on the unit card.unit.order_refused.unknown_order: "That order is not known"unit.order_refused.no_unit: "There is no such unit"diff --git a/unity/Assets/UI/strings.he.yaml b/unity/Assets/UI/strings.he.yamlindex 4ea247b79..f4e8e067b 100644--- a/unity/Assets/UI/strings.he.yaml+++ b/unity/Assets/UI/strings.he.yaml@@ -1095,11 +1095,6 @@ report.stock_line: "{0} במלאי: {1}"# native-review-pendingreport.stock_change: "{0} במלאי: {1} (שינוי של {2})"-# #1708 artillery action status. Hebrew: native review pending (#564).-unit.artillery_move_missing: "לא ניתן להזיז ארטילריה עדיין: נקודות התנועה שלה טרם נקבעו"-unit.fire_ready: "ניתן לירות"-unit.fire_spent: "הירי בוצע בתור הזה"-# #2045 standing-order refusals (Orders.Check), shown on the unit card.# For the native reviewer (#564).unit.order_refused.unknown_order: "הפקודה אינה מוכרת"