Skip to content

Commit

Permalink
add aaci 48
Browse files Browse the repository at this point in the history
  • Loading branch information
myangelkamikaze committed Oct 3, 2024
1 parent 3bc45af commit 64755df
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ElectronicObserver/Window/Wpf/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ private static List<string> 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}");
Expand Down
3 changes: 3 additions & 0 deletions ElectronicObserverTypes/AntiAir/AaciResources.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,7 @@
<data name="Radar4AaOrMore" xml:space="preserve">
<value>Radar (AA &gt;= 4)</value>
</data>
<data name="AkizukiGunKai" xml:space="preserve">
<value>Akizuki gun kai</value>
</data>
</root>
3 changes: 3 additions & 0 deletions ElectronicObserverTypes/AntiAir/AaciResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,7 @@
<data name="Radar4AaOrMore" xml:space="preserve">
<value>電探(対空4以上)</value>
</data>
<data name="AkizukiGunKai" xml:space="preserve">
<value>秋月砲改</value>
</data>
</root>
24 changes: 24 additions & 0 deletions ElectronicObserverTypes/AntiAir/AntiAirCutIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<AntiAirCutIn> AllCutIns => CutIns
Expand Down
2 changes: 2 additions & 0 deletions ElectronicObserverTypes/AntiAir/AntiAirCutInCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
}
Expand Down
5 changes: 5 additions & 0 deletions ElectronicObserverTypes/Extensions/ShipDataExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 64755df

Please sign in to comment.