diff --git a/My project/Assets/Scripts/BTNodeCanvas/AICalculateAction.cs b/My project/Assets/Scripts/BTNodeCanvas/AICalculateAction.cs index 78ad2a3cf..8505186a6 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AICalculateAction.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AICalculateAction.cs @@ -6,6 +6,7 @@ */ +using System; using System.Collections.Generic; using Logic.AI; using NodeCanvas.Framework; @@ -15,6 +16,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AICalculateAction : ActionTask { public List CalculateTypes; diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIForeachCreate.cs b/My project/Assets/Scripts/BTNodeCanvas/AIForeachCreate.cs index 6fd3c6f9c..ba7bd6a54 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIForeachCreate.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIForeachCreate.cs @@ -6,6 +6,7 @@ */ +using System; using Logic.AI; using NodeCanvas.Framework; using ParadoxNotion.Design; @@ -14,6 +15,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIForeachCreate : ActionTask { public Strategy Strategy; diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIGeneratorAction.cs b/My project/Assets/Scripts/BTNodeCanvas/AIGeneratorAction.cs index 340b5cf38..6ab5b3d63 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIGeneratorAction.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIGeneratorAction.cs @@ -6,6 +6,7 @@ */ +using System; using System.Collections.Generic; using Logic.Action; using Logic.AI; @@ -16,6 +17,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIGeneratorAction : ActionTask { public List ActionTypes; diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIParamAroundNoUnitCity.cs b/My project/Assets/Scripts/BTNodeCanvas/AIParamAroundNoUnitCity.cs index 5f9ad381b..24f51094b 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIParamAroundNoUnitCity.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIParamAroundNoUnitCity.cs @@ -6,6 +6,7 @@ */ +using System; using System.Collections.Generic; using Logic.AI; using NodeCanvas.Framework; @@ -16,6 +17,7 @@ using RuntimeData; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIParamAroundNoUnitCity : ActionTask { public int Offset; diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIParamExplore.cs b/My project/Assets/Scripts/BTNodeCanvas/AIParamExplore.cs index 94f71b5a8..df146b726 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIParamExplore.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIParamExplore.cs @@ -6,6 +6,7 @@ */ +using System; using System.Collections.Generic; using Logic.AI; using NodeCanvas.Framework; @@ -16,9 +17,11 @@ using RuntimeData; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIParamExplore : ActionTask { - public int Offset = 1; + public int Offset = 3; + protected override string info { diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIParamHealth.cs b/My project/Assets/Scripts/BTNodeCanvas/AIParamHealth.cs index 04b499246..87761679d 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIParamHealth.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIParamHealth.cs @@ -6,6 +6,7 @@ */ +using System; using Logic.AI; using NodeCanvas.Framework; using ParadoxNotion.Design; @@ -14,6 +15,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIParamHealth : ActionTask { public bool GreaterThan = true; diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfCityCount.cs b/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfCityCount.cs index ed8ebde62..ca6051604 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfCityCount.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfCityCount.cs @@ -6,6 +6,7 @@ */ +using System; using System.Collections.Generic; using Logic.AI; using NodeCanvas.Framework; @@ -16,6 +17,7 @@ using RuntimeData; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIParamSelfCityCount : ActionTask { public bool Big; diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfTerritory.cs b/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfTerritory.cs index 4c07921fc..363055831 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfTerritory.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfTerritory.cs @@ -6,6 +6,7 @@ */ +using System; using Logic.AI; using NodeCanvas.Framework; using ParadoxNotion.Design; @@ -14,6 +15,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIParamSelfTerritory : ActionTask { public bool IsIn = true; diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfTerritoryResource.cs b/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfTerritoryResource.cs index 35c82af11..5308223e0 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfTerritoryResource.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIParamSelfTerritoryResource.cs @@ -6,6 +6,7 @@ */ +using System; using Logic.AI; using NodeCanvas.Framework; using ParadoxNotion.Design; @@ -14,6 +15,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIParamSelfTerritoryResource : ActionTask { public ResourceType Resource; diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIParamTargetCityHaveUnit.cs b/My project/Assets/Scripts/BTNodeCanvas/AIParamTargetCityHaveUnit.cs index 2ea708781..62975c561 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIParamTargetCityHaveUnit.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIParamTargetCityHaveUnit.cs @@ -6,6 +6,7 @@ */ +using System; using Logic.AI; using NodeCanvas.Framework; using ParadoxNotion.Design; @@ -14,6 +15,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIParamTargetCityHaveUnit : ActionTask { public bool CheckHaveUnit = true; diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIParamTargetCityInAttackRange.cs b/My project/Assets/Scripts/BTNodeCanvas/AIParamTargetCityInAttackRange.cs index fa50e43ad..1d5b6a1bf 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIParamTargetCityInAttackRange.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIParamTargetCityInAttackRange.cs @@ -6,6 +6,7 @@ */ +using System; using Logic.AI; using NodeCanvas.Framework; using ParadoxNotion.Design; @@ -14,6 +15,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIParamTargetCityInAttackRange : ActionTask { public bool CheckInAttackRange = true; diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIParamTechType.cs b/My project/Assets/Scripts/BTNodeCanvas/AIParamTechType.cs index 0aa515cde..b12fc679c 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIParamTechType.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIParamTechType.cs @@ -6,6 +6,7 @@ */ +using System; using Logic.AI; using NodeCanvas.Framework; using ParadoxNotion.Design; @@ -14,6 +15,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIParamTechType : ActionTask { public TechType TechType; diff --git a/My project/Assets/Scripts/BTNodeCanvas/AIParamTrainUnitType.cs b/My project/Assets/Scripts/BTNodeCanvas/AIParamTrainUnitType.cs index 3e2f51f87..1a53a20bf 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/AIParamTrainUnitType.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/AIParamTrainUnitType.cs @@ -6,6 +6,7 @@ */ +using System; using Logic.AI; using NodeCanvas.Framework; using ParadoxNotion.Design; @@ -14,6 +15,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class AIParamTrainUnitType : ActionTask { public UnitType UnitType; diff --git a/My project/Assets/Scripts/BTNodeCanvas/CountryStrategyCondition.cs b/My project/Assets/Scripts/BTNodeCanvas/CountryStrategyCondition.cs index df00295c9..5debb7032 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/CountryStrategyCondition.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/CountryStrategyCondition.cs @@ -6,6 +6,7 @@ */ +using System; using Logic.AI; using NodeCanvas.Framework; using ParadoxNotion.Design; @@ -14,6 +15,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AICondition")] + [Serializable] public class CountryStrategyCondition : ConditionTask { public Strategy CountryStrategy; diff --git a/My project/Assets/Scripts/BTNodeCanvas/MarkAction.cs b/My project/Assets/Scripts/BTNodeCanvas/MarkAction.cs index 4f197cb47..bfc0f4711 100644 --- a/My project/Assets/Scripts/BTNodeCanvas/MarkAction.cs +++ b/My project/Assets/Scripts/BTNodeCanvas/MarkAction.cs @@ -6,6 +6,7 @@ */ +using System; using Logic.AI; using NodeCanvas.Framework; using ParadoxNotion.Design; @@ -14,6 +15,7 @@ using ParadoxNotion.Design; namespace NodeCanvas.Tasks.Actions { [Category("AIAction")] + [Serializable] public class MarkAction : ActionTask { public string MarkStr; diff --git a/My project/Assets/Scripts/Logic/AI/AIActionBase.cs b/My project/Assets/Scripts/Logic/AI/AIActionBase.cs index b615618ba..75c3cdd0f 100644 --- a/My project/Assets/Scripts/Logic/AI/AIActionBase.cs +++ b/My project/Assets/Scripts/Logic/AI/AIActionBase.cs @@ -934,7 +934,7 @@ namespace Logic.AI if (!Map.GetUnitDataByGid(aroundGrid.Id, out var attacker)) continue; if (!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(attacker.UnitType, attacker.GiantType, out var attackInfo)) continue; - if (selfUnit.Contains(attacker)) score += attackInfo.Cost; + if (!selfUnit.Contains(attacker)) score += attackInfo.Cost; else score -= attackInfo.Cost; } if (score > 6)