From 64755df292dd7627b68fec77cadd1c4fe64b91d1 Mon Sep 17 00:00:00 2001 From: MyAngelKamikaze Date: Fri, 4 Oct 2024 00:44:10 +0900 Subject: [PATCH] add aaci 48 --- ElectronicObserver/Window/Wpf/Extensions.cs | 5 ++++ .../AntiAir/AaciResources.en.resx | 3 +++ .../AntiAir/AaciResources.resx | 3 +++ .../AntiAir/AntiAirCutIn.cs | 24 +++++++++++++++++++ .../AntiAir/AntiAirCutInCondition.cs | 2 ++ .../Extensions/ShipDataExtensions.cs | 5 ++++ 6 files changed, 42 insertions(+) diff --git a/ElectronicObserver/Window/Wpf/Extensions.cs b/ElectronicObserver/Window/Wpf/Extensions.cs index c6616ca01..7e6d24109 100644 --- a/ElectronicObserver/Window/Wpf/Extensions.cs +++ b/ElectronicObserver/Window/Wpf/Extensions.cs @@ -129,6 +129,11 @@ private static List EquipmentConditions(this AntiAirCutInCondition condi conditions.Add($"{AaciResources.HighAngleWithoutDirector} >= {condition.HighAngleWithoutDirector}"); } + if (condition.AkizukiGunKai > 0) + { + conditions.Add($"{AaciResources.AkizukiGunKai} >= {condition.AkizukiGunKai}"); + } + if (condition.AaDirector > 0) { conditions.Add($"{AaciResources.AaDirector} >= {condition.AaDirector}"); diff --git a/ElectronicObserverTypes/AntiAir/AaciResources.en.resx b/ElectronicObserverTypes/AntiAir/AaciResources.en.resx index 6f485de01..94a98d9bf 100644 --- a/ElectronicObserverTypes/AntiAir/AaciResources.en.resx +++ b/ElectronicObserverTypes/AntiAir/AaciResources.en.resx @@ -207,4 +207,7 @@ Radar (AA >= 4) + + Akizuki gun kai + \ No newline at end of file diff --git a/ElectronicObserverTypes/AntiAir/AaciResources.resx b/ElectronicObserverTypes/AntiAir/AaciResources.resx index aa20779d0..b1aa8e147 100644 --- a/ElectronicObserverTypes/AntiAir/AaciResources.resx +++ b/ElectronicObserverTypes/AntiAir/AaciResources.resx @@ -187,4 +187,7 @@ 電探(対空4以上) + + 秋月砲改 + \ No newline at end of file diff --git a/ElectronicObserverTypes/AntiAir/AntiAirCutIn.cs b/ElectronicObserverTypes/AntiAir/AntiAirCutIn.cs index 2f7c32407..140ba0e10 100644 --- a/ElectronicObserverTypes/AntiAir/AntiAirCutIn.cs +++ b/ElectronicObserverTypes/AntiAir/AntiAirCutIn.cs @@ -1145,6 +1145,30 @@ public record AntiAirCutIn }, ], }, + new() + { + Id = 48, + FixedBonus = 8, + VariableBonus = 1.75, + Rate = 0.643, + Conditions = + [ + new() + { + Ships = + [ + ShipId.AkizukiKai, + ShipId.TeruzukiKai, + ShipId.SuzutsukiKai, + ShipId.HatsuzukiKai, + ShipId.HatsuzukiKaiNi, + ShipId.FuyutsukiKai, + ], + AkizukiGunKai = 2, + Radar4AaOrMore = 1, + }, + ], + }, ]; public static IEnumerable AllCutIns => CutIns diff --git a/ElectronicObserverTypes/AntiAir/AntiAirCutInCondition.cs b/ElectronicObserverTypes/AntiAir/AntiAirCutInCondition.cs index 5f423a365..121e367c4 100644 --- a/ElectronicObserverTypes/AntiAir/AntiAirCutInCondition.cs +++ b/ElectronicObserverTypes/AntiAir/AntiAirCutInCondition.cs @@ -57,6 +57,7 @@ public class AntiAirCutInCondition public int AaGunShigure { get; init; } public int Radar4AaOrMore { get; init; } + public int AkizukiGunKai { get; init; } public bool CanBeActivatedBy(IShipData ship, AntiAirCutIn antiAirCutIn) { @@ -97,6 +98,7 @@ public bool CanBeActivatedBy(IShipData ship, AntiAirCutIn antiAirCutIn) if (!ship.HasHarusameGun(HarusameGun)) return false; if (!ship.HasShigureAaGun(HarusameGun)) return false; if (!ship.HasAirRadar(Radar4AaOrMore, 4)) return false; + if (!ship.HasAkizukiGunKai(AkizukiGunKai)) return false; return true; } diff --git a/ElectronicObserverTypes/Extensions/ShipDataExtensions.cs b/ElectronicObserverTypes/Extensions/ShipDataExtensions.cs index bccc65e21..a58aae896 100644 --- a/ElectronicObserverTypes/Extensions/ShipDataExtensions.cs +++ b/ElectronicObserverTypes/Extensions/ShipDataExtensions.cs @@ -315,6 +315,11 @@ public static bool HasHarusameGun(this IShipData ship, int count) => ship.AllSlo EquipmentId.MainGunSmall_12_7cmTwinGunModelCKaiSanH) >= count; + public static bool HasAkizukiGunKai(this IShipData ship, int count) => ship.AllSlotInstance + .Count(e => e?.MasterEquipment.EquipmentId is + EquipmentId.MainGunSmall_10cmTwinHighangleMountKai_AntiAircraftFireDirectorKai) + >= count; + public static bool HasHighAngleConcentrated(this IShipData ship, int count = 1) => ship.AllSlotInstance .Count(e => e?.MasterEquipment.EquipmentId is EquipmentId.SecondaryGun_10cmTwinHighangleGunMountBatteryConcentratedDeployment)