diff --git a/WorldOfTheThreeKingdoms/GameObjects/Routeway.cs b/WorldOfTheThreeKingdoms/GameObjects/Routeway.cs index e934e1590..188e9bff9 100644 --- a/WorldOfTheThreeKingdoms/GameObjects/Routeway.cs +++ b/WorldOfTheThreeKingdoms/GameObjects/Routeway.cs @@ -59,6 +59,9 @@ public void Init() [DataMember] public int BelongedFactionString { get; set; } + [DataMember] + public Boolean Developing { get; private set; } + public Architecture StartArchitecture; private void AddRoutePointArea(RoutePoint routePoint) @@ -245,6 +248,7 @@ public bool EndedInArchitectureRoutewayStartArea(Architecture des) private void ExpandActiveRouteway(LinkedListNode node) { + this.Developing = false; Troop troopByPositionNoCheck; int routewayWorkForce = this.BelongedFaction.RoutewayWorkForce; if (node == null) @@ -257,6 +261,7 @@ private void ExpandActiveRouteway(LinkedListNode node) return; } this.StartArchitecture.DecreaseFund(node.Value.BuildFundCost); + this.Developing = true; this.LastActivePointIndex++; this.AddRoutePointArea(node.Value); routewayWorkForce -= node.Value.BuildWorkCost; @@ -277,6 +282,7 @@ private void ExpandActiveRouteway(LinkedListNode node) break; } this.StartArchitecture.DecreaseFund(decrement); + this.Developing = true; this.LastActivePointIndex++; this.AddRoutePointArea(node.Next.Value); routewayWorkForce -= node.Next.Value.BuildWorkCost; diff --git a/WorldOfTheThreeKingdoms/GameObjects/Troop.cs b/WorldOfTheThreeKingdoms/GameObjects/Troop.cs index b92c42f94..4e9b7e9fc 100644 --- a/WorldOfTheThreeKingdoms/GameObjects/Troop.cs +++ b/WorldOfTheThreeKingdoms/GameObjects/Troop.cs @@ -1387,6 +1387,23 @@ private bool AIResetDestination() }*/ this.OffenceOnlyBeforeMoveFlag = false; + if (this.BelongedLegion != null && this.BelongedLegion.PreferredRouteway != null && + !this.BelongedLegion.PreferredRouteway.Developing && this.BelongedLegion.PreferredRouteway.LastPoint != null + && this.BelongedLegion.PreferredRouteway.LastPoint.Index < this.BelongedLegion.PreferredRouteway.RoutePoints.Count - 1) + { + if (this.CurrentCombatMethod == null) + { + this.AttackDefaultKind = TroopAttackDefaultKind.防最弱; + this.AttackTargetKind = TroopAttackTargetKind.目标默认; + } + if (this.CurrentStratagem == null) + { + this.CastTargetKind = TroopCastTargetKind.特定默认; + } + this.RealDestination = this.BelongedLegion.PreferredRouteway.LastPoint.Position; + return true; + } + Dictionary positionCredits = new Dictionary(); foreach (Point point in dayArea.Area) {