Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
andanteyk committed Apr 1, 2021
2 parents d8dd328 + eac8a1f commit ff91432
Show file tree
Hide file tree
Showing 21 changed files with 207 additions and 56 deletions.
2 changes: 1 addition & 1 deletion Browser/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
6 changes: 4 additions & 2 deletions Browser/Browser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
Expand All @@ -67,8 +67,10 @@
<HintPath>..\packages\Nekoxy.1.5.3.21\lib\net45\Nekoxy.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down
2 changes: 1 addition & 1 deletion Browser/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<package id="cef.redist.x86" version="86.0.24" targetFramework="net452" />
<package id="CefSharp.Common" version="86.0.241" targetFramework="net452" />
<package id="CefSharp.WinForms" version="86.0.241" targetFramework="net452" />
<package id="log4net" version="2.0.8" targetFramework="net452" />
<package id="log4net" version="2.0.12" targetFramework="net452" />
<package id="Nekoxy" version="1.5.3.21" targetFramework="net45" />
</packages>
2 changes: 1 addition & 1 deletion ElectronicObserver/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
<bindingRedirect oldVersion="0.0.0.0-2.0.12.0" newVersion="2.0.12.0" />
</dependentAssembly>
</assemblyBinding>
<enforceFIPSPolicy enabled="false" />
Expand Down
2 changes: 2 additions & 0 deletions ElectronicObserver/Data/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,8 @@ public static string GetShipClass(int id)
case 104: return "丁型海防艦"; // 86 に同じ
case 105: return "Yorktown級";
case 106: return "St. Louis級";
case 107: return "North Carolina級";
case 108: return "Town級";
default: return "不明";
}
}
Expand Down
5 changes: 4 additions & 1 deletion ElectronicObserver/Data/EquipmentDataMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,11 @@ public bool IsAircraft
case EquipmentTypes.SeaplaneFighter:
case EquipmentTypes.LandBasedAttacker:
case EquipmentTypes.Interceptor:
case EquipmentTypes.HeavyBomber:
case EquipmentTypes.JetFighter:
case EquipmentTypes.JetBomber:
case EquipmentTypes.JetTorpedo:

case EquipmentTypes.CarrierBasedRecon:
case EquipmentTypes.SeaplaneRecon:
case EquipmentTypes.FlyingBoat:
Expand Down Expand Up @@ -259,6 +260,7 @@ public bool IsCombatAircraft
case EquipmentTypes.SeaplaneFighter:
case EquipmentTypes.LandBasedAttacker:
case EquipmentTypes.Interceptor:
case EquipmentTypes.HeavyBomber:
case EquipmentTypes.JetFighter:
case EquipmentTypes.JetBomber:
case EquipmentTypes.JetTorpedo:
Expand Down Expand Up @@ -304,6 +306,7 @@ public bool IsAntiSubmarineAircraft
case EquipmentTypes.ASPatrol:
case EquipmentTypes.FlyingBoat:
case EquipmentTypes.LandBasedAttacker:
case EquipmentTypes.HeavyBomber:
case EquipmentTypes.JetBomber:
case EquipmentTypes.JetTorpedo:
return ASW > 0;
Expand Down
3 changes: 3 additions & 0 deletions ElectronicObserver/Data/EquipmentTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ public enum EquipmentTypes
/// <summary>潜水艦装備</summary>
SubmarineEquipment = 51,

/// <summary>大型陸上機</summary>
HeavyBomber = 53,

/// <summary>噴式戦闘機</summary>
JetFighter = 56,

Expand Down
43 changes: 31 additions & 12 deletions ElectronicObserver/Data/MissionClearCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ public static MissionClearConditionResult Check(int missionID, FleetData fleet)
.CheckAA(400)
.CheckASW(285)
.CheckLOS(385);
case 115: // 精鋭水雷戦隊夜襲
return result
.CheckFlagshipLevel(75)
.CheckLevelSum(400)
.CheckFlagshipType(ShipTypes.LightCruiser)
.CheckShipCountByType(ShipTypes.Destroyer, 5)
.CheckFirepower(410)
.CheckAA(390)
.CheckASW(410)
.CheckLOS(340);

case 17: // 敵地偵察作戦
return result
Expand Down Expand Up @@ -323,6 +333,17 @@ public static MissionClearConditionResult Check(int missionID, FleetData fleet)
.CheckFirepower(60)
.CheckAA(80)
.CheckASW(50);
case 133: // 欧州方面友軍との接触
return result
.CheckFlagshipLevel(65)
.CheckLevelSum(350)
.CheckFlagshipType(ShipTypes.SubmarineTender)
.CheckSubmarineCount(3)
.CheckShipCount(5)
.CheckFirepower(115)
.CheckAA(90)
.CheckASW(70)
.CheckLOS(95);

case 33: // 前衛支援任務
return result
Expand Down Expand Up @@ -387,18 +408,17 @@ public static MissionClearConditionResult Check(int missionID, FleetData fleet)
.CheckASW(330)
.CheckLOS(250);

case 142: // 強行鼠輸送作戦 (unchecked)
case 142: // 強行鼠輸送作戦
return result
.CheckFlagshipLevel(70)
.CheckLevelSum(353)
.CheckLevelSum(320)
.CheckShipCountByType(ShipTypes.Destroyer, 5)
.CheckEquippedShipCount(EquipmentTypes.TransportContainer, 3)
.CheckEquipmentCount(EquipmentTypes.TransportContainer, 5)
.CheckEquipmentCount(EquipmentTypes.TransportContainer, 4)
.CheckFirepower(280)
.CheckAA(289)
.CheckASW(278)
.CheckLOS(164)
.SuppressWarnings();
.CheckAA(240)
.CheckASW(200)
.CheckLOS(160);

case 41: // ブルネイ泊地沖哨戒
return result
Expand Down Expand Up @@ -453,19 +473,18 @@ public static MissionClearConditionResult Check(int missionID, FleetData fleet)
.CheckAA(240)
.CheckASW(300)
.CheckLOS(180);
case 46: // 南西海域戦闘哨戒 (unchecked)
case 46: // 南西海域戦闘哨戒
return result
.CheckFlagshipLevel(65)
.CheckFlagshipLevel(60)
.CheckLevelSum(300)
.CheckShipCount(5)
.CheckShipCountByType(ShipTypes.HeavyCruiser, 2)
.CheckShipCountByType(ShipTypes.LightCruiser, 1)
.CheckShipCountByType(ShipTypes.Destroyer, 2)
.CheckFirepower(350)
.CheckAA(324)
.CheckAA(250)
.CheckASW(220)
.CheckLOS(220)
.SuppressWarnings();
.CheckLOS(190);

default:
{
Expand Down
17 changes: 11 additions & 6 deletions ElectronicObserver/Data/Quest/ProgressData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,8 @@ public virtual void Decrement()
/// <param name="q">任務データ。</param>
public virtual void CheckProgress(QuestData q)
{
ApplyTemporaryProgress(q);

if (TemporaryProgress > 0)
{
if (q.State == 2)
Progress = Math.Min(Progress + TemporaryProgress, ProgressMax);
TemporaryProgress = 0;
}

if (QuestType == 0) // ver. 1.6.6 以前のデータとの互換性維持
QuestType = q.Type;
Expand All @@ -162,6 +157,16 @@ public virtual void CheckProgress(QuestData q)

}

public virtual void ApplyTemporaryProgress(QuestData q)
{
if (TemporaryProgress > 0)
{
if (q.State == 2)
Progress = Math.Min(Progress + TemporaryProgress, ProgressMax);
TemporaryProgress = 0;
}
}


/// <summary>
/// この任務の達成に必要な条件を表す文字列を返します。
Expand Down
5 changes: 4 additions & 1 deletion ElectronicObserver/Data/Quest/ProgressMultiBattle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public override void Decrement()

public override void CheckProgress(QuestData q)
{
// do nothing
foreach (var p in ProgressList)
p.ApplyTemporaryProgress(q);

Progress = ProgressList.Sum(p => p.Progress);
}

public override string ToString()
Expand Down
5 changes: 4 additions & 1 deletion ElectronicObserver/Data/Quest/ProgressMultiDiscard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ public override void Decrement()

public override void CheckProgress(QuestData q)
{
// do nothing
foreach (var p in ProgressList)
p.ApplyTemporaryProgress(q);

Progress = ProgressList.Sum(p => p.Progress);
}


Expand Down
7 changes: 5 additions & 2 deletions ElectronicObserver/Data/Quest/ProgressMultiExpedition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ public override void Decrement()

public override void CheckProgress(QuestData q)
{
// do nothing
}
foreach (var p in ProgressList)
p.ApplyTemporaryProgress(q);

Progress = ProgressList.Sum(p => p.Progress);
}

public override string ToString()
{
Expand Down
15 changes: 15 additions & 0 deletions ElectronicObserver/Data/Quest/QuestProgressManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,21 @@ void QuestUpdated(string apiname, dynamic data)
new ProgressExpedition(q, 1, new[]{ 142 }),
new ProgressExpedition(q, 1, new[]{ 46 }),
})); break;
case 442: //|442|2|西方連絡作戦準備を実施せよ!|「西方海域偵察作戦」「潜水艦派遣演習」「潜水艦派遣作戦」「欧州方面友軍との接触」成功各1?|
Progresses.Add(new ProgressMultiExpedition(q, new[]{
new ProgressExpedition(q, 1, new[]{ 131 }),
new ProgressExpedition(q, 1, new[]{ 29 }),
new ProgressExpedition(q, 1, new[]{ 30 }),
new ProgressExpedition(q, 1, new[]{ 133 }),
})); break;
case 444: //|444|3|新兵装開発資材輸送を船団護衛せよ!|「海上護衛任務」「資源輸送任務」「タンカー護衛任務」「南西方面航空偵察作戦」「ボーキサイト輸送任務」成功各1|
Progresses.Add(new ProgressMultiExpedition(q, new[]{
new ProgressExpedition(q, 1, new[]{ 5 }),
new ProgressExpedition(q, 1, new[]{ 12 }),
new ProgressExpedition(q, 1, new[]{ 9 }),
new ProgressExpedition(q, 1, new[]{ 110 }),
new ProgressExpedition(q, 1, new[]{ 11 }),
})); break;

case 503: //|503|艦隊大整備!|入渠5
Progresses.Add(new ProgressDocking(q, 5));
Expand Down
15 changes: 9 additions & 6 deletions ElectronicObserver/Data/ShipData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ private int CalculateAirBattlePower(int slotIndex)
}

//キャップ
basepower = Math.Floor(CapDamage(basepower, 150));
basepower = Math.Floor(CapDamage(basepower, 170));

return (int)(basepower * GetAmmoDamageRate());
}
Expand All @@ -1013,7 +1013,7 @@ private int CalculateShellingPower(int engagementForm = 1)
basepower += GetLightCruiserDamageBonus() + GetItalianDamageBonus();

// キャップ
basepower = Math.Floor(CapDamage(basepower, 180));
basepower = Math.Floor(CapDamage(basepower, 220));

// 弾着観測射撃
switch (attackKind)
Expand Down Expand Up @@ -1058,7 +1058,7 @@ private int CalculateAircraftPower(int engagementForm = 1)
basepower *= GetHPDamageBonus() * GetEngagementFormDamageRate(engagementForm);

// キャップ
basepower = Math.Floor(CapDamage(basepower, 180));
basepower = Math.Floor(CapDamage(basepower, 220));


// 空母カットイン
Expand Down Expand Up @@ -1166,7 +1166,7 @@ private int CalculateAntiSubmarinePower(int engagementForm = 1)


//キャップ
basepower = Math.Floor(CapDamage(basepower, 150));
basepower = Math.Floor(CapDamage(basepower, 170));

return (int)(basepower * GetAmmoDamageRate());
}
Expand All @@ -1185,7 +1185,7 @@ private int CalculateTorpedoPower(int engagementForm = 1)
basepower *= GetTorpedoHPDamageBonus() * GetEngagementFormDamageRate(engagementForm);

//キャップ
basepower = Math.Floor(CapDamage(basepower, 150));
basepower = Math.Floor(CapDamage(basepower, 180));


return (int)(basepower * GetAmmoDamageRate());
Expand Down Expand Up @@ -1312,7 +1312,7 @@ private int CalculateNightBattlePower()
basepower += GetLightCruiserDamageBonus() + GetItalianDamageBonus();

//キャップ
basepower = Math.Floor(CapDamage(basepower, 300));
basepower = Math.Floor(CapDamage(basepower, 360));


return (int)(basepower * GetAmmoDamageRate());
Expand Down Expand Up @@ -1391,7 +1391,10 @@ public bool CanOpeningASW
case 689: // Johnston改
case 596: // Fletcher
case 692: // Fletcher改
case 628: // Fletcher改 Mod.2
case 629: // Fletcher Mk.II
case 893: // Janus改
case 624: // 夕張改二丁
return true;
}

Expand Down
10 changes: 5 additions & 5 deletions ElectronicObserver/ElectronicObserver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="DynaJson, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynaJson.2.0.0\lib\net45\DynaJson.dll</HintPath>
<Reference Include="DynaJson, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DynaJson.2.2.0\lib\net45\DynaJson.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
Expand All @@ -72,6 +71,7 @@
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
Expand Down
Loading

0 comments on commit ff91432

Please sign in to comment.