Skip to content

Commit

Permalink
4.6.4 merge
Browse files Browse the repository at this point in the history
  • Loading branch information
myangelkamikaze committed Nov 29, 2020
2 parents af442dd + a91c231 commit 23c1fc0
Show file tree
Hide file tree
Showing 15 changed files with 251 additions and 95 deletions.
2 changes: 1 addition & 1 deletion BrowserLib/PipeCommunicator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public async void AsyncRemoteRun(Action action)
}
catch (CommunicationException cex)
{
((IClientChannel)Proxy).Abort();
((IClientChannel)Proxy)?.Abort();
Proxy = null;
if (i >= 1)
{
Expand Down
Binary file modified ElectronicObserver/Assets.zip
Binary file not shown.
Binary file added ElectronicObserver/Assets/Equipment/HeavyBomber.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions ElectronicObserver/Data/DataRes.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ElectronicObserver/Data/DataRes.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,7 @@
<data name="MissionClearShipCount" xml:space="preserve">
<value>{1}{2} {0}</value>
</data>
<data name="MissionClearExcludingSeaplaneTender" xml:space="preserve">
<value>(Excluding AV)</value>
</data>
</root>
143 changes: 83 additions & 60 deletions ElectronicObserver/Data/DataRes.resx
Original file line number Diff line number Diff line change
@@ -1,76 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
Expand All @@ -89,13 +109,13 @@
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="MissionClearTotalShipCount" xml:space="preserve">
<value>艦船数{0}{1}</value>
Expand Down Expand Up @@ -166,4 +186,7 @@
<data name="MissionClearShipCount" xml:space="preserve">
<value>{0} {1}{2}</value>
</data>
<data name="MissionClearExcludingSeaplaneTender" xml:space="preserve">
<value>(水母除く)</value>
</data>
</root>
33 changes: 29 additions & 4 deletions ElectronicObserver/Data/MissionClearCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public static MissionClearConditionResult Check(int missionID, FleetData fleet)
.CheckLevelSum(300)
.CheckShipCount(6)
.CheckFlagshipType(ShipTypes.LightAircraftCarrier)
.CheckEscortFleet()
.CheckEscortFleetDD4()
.CheckFirepower(500)
.CheckAA(280)
.CheckASW(280)
Expand All @@ -431,8 +431,13 @@ public static MissionClearConditionResult Check(int missionID, FleetData fleet)
.CheckFlagshipLevel(35)
.CheckLevelSum(210)
.CheckShipCount(6)
.CheckAircraftCarrierCount(1, includesSeaplaneTender: false)
.CheckShipCountByType(ShipTypes.SeaplaneTender, 1)
.OrCondition(
r => r
.CheckShipCountByType(ShipTypes.SeaplaneTender, 2),
r => r
.CheckShipCountByType(ShipTypes.SeaplaneTender, 1)
.CheckAircraftCarrierCount(1, false)
)
.CheckShipCountByType(ShipTypes.LightCruiser, 1)
.CheckSmallShipCount(2)
.CheckEquippedShipCount(EquipmentTypes.TransportContainer, 3)
Expand Down Expand Up @@ -597,7 +602,7 @@ public MissionClearConditionResult CheckSmallShipCount(int leastCount) =>
CheckShipCount(s => s.MasterShip.ShipType == ShipTypes.Destroyer || s.MasterShip.ShipType == ShipTypes.Escort, leastCount, DataRes.MissionClearSmallShipCount);

public MissionClearConditionResult CheckAircraftCarrierCount(int leastCount, bool includesSeaplaneTender = true) =>
CheckShipCount(s => s.MasterShip.IsAircraftCarrier || (includesSeaplaneTender && s.MasterShip.ShipType == ShipTypes.SeaplaneTender), leastCount, DataRes.MissionClearAircraftCarrierCount);
CheckShipCount(s => s.MasterShip.IsAircraftCarrier || (includesSeaplaneTender && s.MasterShip.ShipType == ShipTypes.SeaplaneTender), leastCount, DataRes.MissionClearAircraftCarrierCount + (includesSeaplaneTender ? "" : DataRes.MissionClearExcludingSeaplaneTender));

public MissionClearConditionResult CheckSubmarineCount(int leastCount) =>
CheckShipCount(s => s.MasterShip.IsSubmarine, leastCount, DataRes.MissionClearSubmarineCount);
Expand Down Expand Up @@ -644,6 +649,26 @@ public MissionClearConditionResult CheckEscortFleetDD3()
return this;
}

public MissionClearConditionResult CheckEscortFleetDD4()
{
int lightCruiser = members.Count(s => s.MasterShip.ShipType == ShipTypes.LightCruiser);
int destroyer = members.Count(s => s.MasterShip.ShipType == ShipTypes.Destroyer);
int trainingCruiser = members.Count(s => s.MasterShip.ShipType == ShipTypes.TrainingCruiser);
int escort = members.Count(s => s.MasterShip.ShipType == ShipTypes.Escort);
int escortAircraftCarrier = members.Count(s => s.MasterShip.ShipType == ShipTypes.LightAircraftCarrier && s.ASWBase > 0);

Assert(
(lightCruiser >= 1 && (destroyer + escort) >= 4) ||
(lightCruiser >= 1 && escort >= 2) ||
(escortAircraftCarrier >= 1 && (destroyer >= 2 || escort >= 2)) ||
(destroyer >= 1 && escort >= 3) ||
(trainingCruiser >= 1 && escort >= 2),
//() => "[軽巡+(駆逐+海防)4 or 軽巡+海防2 or 護衛空母+(駆逐2 or 海防2) or 駆逐+海防3 or 練巡+海防2]" // 厳密だけど長いので
() => "護衛隊(軽巡1駆逐4他)"
);
return this;
}

public MissionClearConditionResult CheckFlagshipType(ShipTypes shipType)
{
Assert(
Expand Down
73 changes: 58 additions & 15 deletions ElectronicObserver/Data/Quest/ProgressSpecialBattle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -278,24 +278,11 @@ static int CountSpecific(IEnumerable<IShipData?>? fleet, IEnumerable<(ShipId Bas
break;

case 872: // |872|季|戦果拡張任務!「Z作戦」後段作戦|5-5・6-2・6-5・7-2(第二)ボスS勝利各1|要第一艦隊
isAccepted = fleet.FleetID == 1;
if (bm.Compass.MapAreaID == 7 && bm.Compass.MapInfoID == 2)
{
if (GaugeIndex == 1)
isAccepted &= bm.Compass.Destination == 7;
else if (GaugeIndex == 2)
isAccepted &= bm.Compass.Destination == 15;
}
isAccepted = fleet.FleetID == 1 && CheckGaugeIndex72(bm.Compass);
break;

case 893: // |893|季|泊地周辺海域の安全確保を徹底せよ!|1-5・7-1・7-2(第一&第二)ボスS勝利各3|3エリア達成時点で80%
if (bm.Compass.MapAreaID == 7 && bm.Compass.MapInfoID == 2)
{
if (GaugeIndex == 1)
isAccepted = bm.Compass.Destination == 7;
else if (GaugeIndex == 2)
isAccepted = bm.Compass.Destination == 15;
}
isAccepted = CheckGaugeIndex72(bm.Compass);
break;

// |894|季|空母戦力の投入による兵站線戦闘哨戒|1-3・1-4・2-1・2-2・2-3ボスS勝利各1?|要空母系
Expand Down Expand Up @@ -798,6 +785,23 @@ static int CountSpecific(IEnumerable<IShipData?>? fleet, IEnumerable<(ShipId Bas
isAccepted = flag && second && count;
}
break;

case 928: //|928|9|歴戦「第十方面艦隊」、全力出撃!|4-2・7-2(第二)・7-3(第二)ボスS勝利各2|要(羽黒/足柄/妙高/高雄/神風)2
isAccepted = members.Count(s =>
{
switch (s?.MasterShip?.NameReading)
{
case "はぐろ":
case "あしがら":
case "みょうこう":
case "たかお":
case "かみかぜ":
return true;
default:
return false;
}
}) >= 2 && CheckGaugeIndex72(bm.Compass) && CheckGaugeIndex73(bm.Compass);
break;
}

// 第二ゲージでも第一ボスに行ける場合があるので、個別対応が必要
Expand All @@ -810,6 +814,45 @@ static int CountSpecific(IEnumerable<IShipData?>? fleet, IEnumerable<(ShipId Bas



private bool CheckGaugeIndex72(CompassData compass)
{
if (compass.MapAreaID == 7 && compass.MapInfoID == 2)
{
switch (compass.Destination)
{
case 7:
return GaugeIndex == 1;
case 15:
return GaugeIndex == 2;
default:
return false;
}
}
return true;
}

private bool CheckGaugeIndex73(CompassData compass)
{
if (compass.MapAreaID == 7 && compass.MapInfoID == 3)
{
switch (compass.Destination)
{
case 5:
case 8:
return GaugeIndex == 1;
case 18:
case 23:
case 24:
case 25:
return GaugeIndex == 2;
default:
return false;
}
}
return true;
}


public override string GetClearCondition()
{
var sb = new StringBuilder(base.GetClearCondition());
Expand Down
Loading

0 comments on commit 23c1fc0

Please sign in to comment.