diff --git a/DependentAssemblies/KanColleWrapper.dll b/DependentAssemblies/KanColleWrapper.dll
index 1500786..dfab74c 100644
Binary files a/DependentAssemblies/KanColleWrapper.dll and b/DependentAssemblies/KanColleWrapper.dll differ
diff --git a/LandBasedAirCorpsPlugin/Models/AirRegiment.cs b/LandBasedAirCorpsPlugin/Models/AirRegiment.cs
index 8635ca4..e9f1336 100644
--- a/LandBasedAirCorpsPlugin/Models/AirRegiment.cs
+++ b/LandBasedAirCorpsPlugin/Models/AirRegiment.cs
@@ -85,17 +85,12 @@ public double AirSuperiority
{
get
{
- if (this.Behavior == AirRegimentBehavior.Defense)
- {
- var bonus = this.Squadrons
- .Where(x => x.State == SquadronState.Deployed)
- .MaxByViewRange()
- .GetSurveillanceBonus();
-
- return Math.Floor(this.Squadrons.Select(x => x.AirSuperiorityAtDefense).Sum() * bonus);
- }
-
- return this.Squadrons.Select(x => x.AirSuperiorityAtSortie).Sum();
+ var bonus = this.Squadrons
+ .Where(x => x.State == SquadronState.Deployed)
+ .MaxByViewRange()
+ .GetSurveillanceBonus(this.Behavior);
+
+ return Math.Floor(this.Squadrons.Select(x => x.GetAirSuperiority(this.Behavior)).Sum() * bonus);
}
}
diff --git a/LandBasedAirCorpsPlugin/Models/AirRegimentBehavior.cs b/LandBasedAirCorpsPlugin/Models/AirRegimentBehavior.cs
index 85cfd2d..87b991e 100644
--- a/LandBasedAirCorpsPlugin/Models/AirRegimentBehavior.cs
+++ b/LandBasedAirCorpsPlugin/Models/AirRegimentBehavior.cs
@@ -8,10 +8,25 @@ namespace LandBasedAirCorpsPlugin.Models
{
public enum AirRegimentBehavior
{
+ ///
+ /// 待機。
+ ///
Standby,
+ ///
+ /// 出撃。
+ ///
Sortie,
+ ///
+ /// 防空。
+ ///
Defense,
+ ///
+ /// 退避。
+ ///
Retreat,
+ ///
+ /// 休息。
+ ///
Rest
}
diff --git a/LandBasedAirCorpsPlugin/Models/Calculator.cs b/LandBasedAirCorpsPlugin/Models/Calculator.cs
index 00ad085..8fc288b 100644
--- a/LandBasedAirCorpsPlugin/Models/Calculator.cs
+++ b/LandBasedAirCorpsPlugin/Models/Calculator.cs
@@ -76,26 +76,36 @@ public static Squadron MaxByViewRange(this IEnumerable source)
: null;
}
- public static double GetSurveillanceBonus(this Squadron squadron)
+ public static double GetSurveillanceBonus(this Squadron squadron, AirRegimentBehavior behavior)
{
if (squadron == null) return 1;
var info = squadron.Plane.Info;
- if (info.Type == SlotItemType.艦上偵察機)
+ if (behavior == AirRegimentBehavior.Defense)
{
- return info.ViewRange <= 7 ? 1.2 : 1.3;
- }
- else if(info.Type == SlotItemType.大型飛行艇 || info.Type == SlotItemType.水上偵察機)
- {
- return info.ViewRange <= 7 ? 1.1
- : info.ViewRange == 8 ? 1.13
- : 1.16;
+ if (info.Type == SlotItemType.艦上偵察機)
+ {
+ return info.ViewRange <= 7 ? 1.2 : 1.3;
+ }
+ else if (info.Type == SlotItemType.大型飛行艇 || info.Type == SlotItemType.水上偵察機)
+ {
+ return info.ViewRange <= 7 ? 1.1
+ : info.ViewRange == 8 ? 1.13
+ : 1.16;
+ }
+ else
+ {
+ return info.ViewRange == 8 ? 1.18 : 1.23;
+ }
}
else
{
- return 1.18;
+ if (info.Type == SlotItemType.陸上偵察機)
+ {
+ return info.ViewRange == 8 ? 1.15 : 1.18;
+ }
+ return 1;
}
-
}
}
}
diff --git a/LandBasedAirCorpsPlugin/Models/Squadron.cs b/LandBasedAirCorpsPlugin/Models/Squadron.cs
index fdbb851..e46e7fb 100644
--- a/LandBasedAirCorpsPlugin/Models/Squadron.cs
+++ b/LandBasedAirCorpsPlugin/Models/Squadron.cs
@@ -42,34 +42,19 @@ public SlotItem Plane
}
#endregion
- public double AirSuperiorityAtSortie
+ public double GetAirSuperiority(AirRegimentBehavior behavior)
{
- get
- {
- if (this.State != SquadronState.Deployed) return 0;
-
- var info = this.Plane.Info;
- var intercept = this.IsInterceptor ? info.Evade : 0;
- var improvementBonus = this.GetImprovementBonus(this.Plane);
-
- return Math.Floor((info.AA + (1.5 * intercept) + improvementBonus) * Math.Sqrt(this.WorkingCount) + this.Plane.GetBonus());
- }
- }
+ if (this.State != SquadronState.Deployed) return 0;
- public double AirSuperiorityAtDefense
- {
- get
- {
- if (this.State != SquadronState.Deployed) return 0;
-
- var info = this.Plane.Info;
- var intercept = this.IsInterceptor ? info.Evade : 0;
- var antiBomber = this.IsInterceptor ? info.Hit : 0;
- var improvementBonus = this.GetImprovementBonus(this.Plane);
+ var info = this.Plane.Info;
+ var intercept = this.IsInterceptor ? info.Evade : 0;
+ var antiBomber = this.IsInterceptor ? info.Hit : 0;
+ var improvementBonus = this.GetImprovementBonus(this.Plane);
+
- return Math.Floor((info.AA + intercept + (2 * antiBomber) + improvementBonus) * Math.Sqrt(this.WorkingCount) + this.Plane.GetBonus());
- }
- }
+ var correctAA = (behavior == AirRegimentBehavior.Defense) ? (info.AA + intercept + (2 * antiBomber)) : (info.AA + (1.5 * intercept));
+ return Math.Floor((correctAA + improvementBonus) * Math.Sqrt(this.WorkingCount) + this.Plane.GetBonus());
+ }
public bool IsInterceptor => this.Plane?.Info.Type == SlotItemType.局地戦闘機;
diff --git a/LandBasedAirCorpsPlugin/Models/SquadronState.cs b/LandBasedAirCorpsPlugin/Models/SquadronState.cs
index 5d74300..2a859ba 100644
--- a/LandBasedAirCorpsPlugin/Models/SquadronState.cs
+++ b/LandBasedAirCorpsPlugin/Models/SquadronState.cs
@@ -8,8 +8,17 @@ namespace LandBasedAirCorpsPlugin.Models
{
public enum SquadronState
{
+ ///
+ /// 未配属。
+ ///
Undeployed,
+ ///
+ /// 配属済み。
+ ///
Deployed,
+ ///
+ /// 配置転換中。
+ ///
Relocating
}
}