From 9097e5fb382a16e2a25ca5a602e295fe35ca01d5 Mon Sep 17 00:00:00 2001 From: andanteyk Date: Sat, 2 May 2015 14:30:56 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=E5=BE=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・図鑑:未保有艦表示がずれる不具合を修正 --- ElectronicObserver/Data/FleetData.cs | 14 ++++++-------- ElectronicObserver/Other/Information/kcmemo.md | 1 + ElectronicObserver/Window/FormInformation.cs | 4 ++-- README.md | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ElectronicObserver/Data/FleetData.cs b/ElectronicObserver/Data/FleetData.cs index 85f48daec..c87d92607 100644 --- a/ElectronicObserver/Data/FleetData.cs +++ b/ElectronicObserver/Data/FleetData.cs @@ -673,19 +673,17 @@ public static void RefreshFleetState( ImageLabel label, FleetStates state, DateT private bool CanAnchorageRepair { get { KCDatabase db = KCDatabase.Instance; - ShipData flagship = db.Ships[Members[0]]; + ShipData flagship = MembersInstance[0]; return ( ExpeditionState == 0 && flagship != null && - flagship.MasterShip.ShipType == 19 && //旗艦工作艦 - (double)flagship.HPCurrent / flagship.HPMax > 0.5 && //旗艦が中破未満 - flagship.RepairingDockID == -1 && //旗艦が入渠中でない - Members.Take( 2 + flagship.SlotInstanceMaster.Count( eq => eq != null && eq.EquipmentType[2] == 31 ) ).Count( id => { //(2+装備)以内に50% 0.5 && //旗艦が中破未満 + flagship.RepairingDockID == -1 && //旗艦が入渠中でない + MembersInstance.Take( 2 + flagship.SlotInstanceMaster.Count( eq => eq != null && eq.EquipmentType[2] == 31 ) ).Count( ship => { //(2+装備)以内に50% 0 ); } } diff --git a/ElectronicObserver/Other/Information/kcmemo.md b/ElectronicObserver/Other/Information/kcmemo.md index 1384b6744..b7ee97703 100644 --- a/ElectronicObserver/Other/Information/kcmemo.md +++ b/ElectronicObserver/Other/Information/kcmemo.md @@ -335,6 +335,7 @@ C敗北判定の 敵損害率 >= 50 は試験実装。 * E-1 : 440 (旗艦HP88; 最低5回撃破) * E-2 : 1620 (旗艦HP270; 最低6回撃破) +* E-3 : 910 (旗艦HP130; 最低7回撃破) #### 海域HPゲージ わずかでもダメージを与えないと正常な値にならない。 diff --git a/ElectronicObserver/Window/FormInformation.cs b/ElectronicObserver/Window/FormInformation.cs index ea8b5215f..81a470801 100644 --- a/ElectronicObserver/Window/FormInformation.cs +++ b/ElectronicObserver/Window/FormInformation.cs @@ -121,8 +121,8 @@ private string GetAlbumInfo( dynamic data ) { StringBuilder sb = new StringBuilder(); if ( data.api_list != null ) { - int startIndex = (int)data.api_list[0].api_index_no; - int bound = 50; + const int bound = 50; + int startIndex = ( ( (int)data.api_list[0].api_index_no - 1 ) / bound ) * bound + 1; bool[] flags = Enumerable.Repeat( false, bound ).ToArray(); if ( data.api_list[0].api_yomi() ) { diff --git a/README.md b/README.md index a94894bc7..c639b83bd 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ *このリンクの更新は遅れる可能性があります。最新版は[こちら](http://electronicobserver.blog.fc2.com/)で確認してください。* -[ver. 1.2.3 (2015/05/01)](http://bit.ly/1Ap594O) +[ver. 1.2.3.1 (2015/05/01)](http://bit.ly/1Ap594O) 更新内容・履歴は[こちら](https://github.com/andanteyk/ElectronicObserver/wiki/ChangeLog)で確認できます。 From 863cc489f05037f0fac9f187b6a8ab0d1915c2a8 Mon Sep 17 00:00:00 2001 From: alalwww Date: Sat, 2 May 2015 14:11:43 +0900 Subject: [PATCH 2/5] =?UTF-8?q?using=E3=82=B9=E3=83=86=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=83=88=E3=81=AE=E5=BF=85=E8=A6=81=E3=81=AE?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=83=8D=E3=82=B9=E3=83=88=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ElectronicObserver/Window/FormMain.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ElectronicObserver/Window/FormMain.cs b/ElectronicObserver/Window/FormMain.cs index efcddb8d7..e3afd2f63 100644 --- a/ElectronicObserver/Window/FormMain.cs +++ b/ElectronicObserver/Window/FormMain.cs @@ -403,15 +403,14 @@ private void SaveLayout( string path ) { try { - using ( var stream = File.Open( path, FileMode.Create ) ) { - using ( var archive = new ZipArchive( stream, ZipArchiveMode.Create ) ) { + using ( var stream = File.Open( path, FileMode.Create ) ) + using ( var archive = new ZipArchive( stream, ZipArchiveMode.Create ) ) { - using ( var layoutstream = archive.CreateEntry( "SubWindowLayout.xml" ).Open() ) { - SaveSubWindowsLayout( layoutstream ); - } - using ( var placementstream = archive.CreateEntry( "WindowPlacement.xml" ).Open() ) { - WindowPlacementManager.SaveWindowPlacement( this, placementstream ); - } + using ( var layoutstream = archive.CreateEntry( "SubWindowLayout.xml" ).Open() ) { + SaveSubWindowsLayout( layoutstream ); + } + using ( var placementstream = archive.CreateEntry( "WindowPlacement.xml" ).Open() ) { + WindowPlacementManager.SaveWindowPlacement( this, placementstream ); } } From 312f239c12595ac974ab767360fc92cd0d50d28c Mon Sep 17 00:00:00 2001 From: alalwww Date: Sat, 2 May 2015 14:12:00 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E3=83=AC=E3=82=A4=E3=82=A2=E3=82=A6?= =?UTF-8?q?=E3=83=88=E8=A8=AD=E5=AE=9A=E3=81=AE=E4=BF=9D=E5=AD=98=E6=99=82?= =?UTF-8?q?=E3=81=AB=E5=87=BA=E5=8A=9B=E3=83=91=E3=82=B9=E3=81=AB=E5=90=AB?= =?UTF-8?q?=E3=81=BE=E3=82=8C=E3=82=8B=E8=A6=AA=E3=83=87=E3=82=A3=E3=83=AC?= =?UTF-8?q?=E3=82=AF=E3=83=88=E3=83=AA=E3=82=92=E7=94=9F=E6=88=90=E3=81=99?= =?UTF-8?q?=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92=E8=BF=BD=E5=8A=A0=20fixed?= =?UTF-8?q?=20#28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ElectronicObserver/Window/FormMain.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ElectronicObserver/Window/FormMain.cs b/ElectronicObserver/Window/FormMain.cs index e3afd2f63..d8e04316a 100644 --- a/ElectronicObserver/Window/FormMain.cs +++ b/ElectronicObserver/Window/FormMain.cs @@ -403,6 +403,8 @@ private void SaveLayout( string path ) { try { + CreateParentDirectories( path ); + using ( var stream = File.Open( path, FileMode.Create ) ) using ( var archive = new ZipArchive( stream, ZipArchiveMode.Create ) ) { @@ -424,7 +426,15 @@ private void SaveLayout( string path ) { } + private void CreateParentDirectories( string path ) { + + var parents = Path.GetDirectoryName( path ); + if ( !String.IsNullOrEmpty( parents ) ) { + Directory.CreateDirectory( parents ); + } + + } From a7629ce96a7aec94d91b92bff55a2aee03d979ce Mon Sep 17 00:00:00 2001 From: andanteyk Date: Sun, 3 May 2015 00:16:09 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E5=BE=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・100機以上の艦載機の表示を改善 ・戦闘:退避艦の表示が残る不具合を修正 --- ElectronicObserver/Observer/APIObserver.cs | 2 +- ElectronicObserver/Other/Information/kcmemo.md | 2 ++ ElectronicObserver/Utility/SoftwareInformation.cs | 6 +++--- ElectronicObserver/Window/Control/ShipStatusEquipment.cs | 4 ++-- ElectronicObserver/Window/FormBattle.cs | 1 + 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ElectronicObserver/Observer/APIObserver.cs b/ElectronicObserver/Observer/APIObserver.cs index 0d7a11c34..829ac84a2 100644 --- a/ElectronicObserver/Observer/APIObserver.cs +++ b/ElectronicObserver/Observer/APIObserver.cs @@ -271,7 +271,7 @@ private void FiddlerApplication_BeforeRequest( Fiddler.Session oSession ) { // 上流プロキシ設定 if ( c.UseUpstreamProxy ) { - oSession["X-OverrideGateway"] = string.Format( "localhost:{0}", c.UpstreamProxyPort ); + oSession["X-OverrideGateway"] = string.Format( "127.0.0.1:{0}", c.UpstreamProxyPort ); } diff --git a/ElectronicObserver/Other/Information/kcmemo.md b/ElectronicObserver/Other/Information/kcmemo.md index b7ee97703..2c8fc981d 100644 --- a/ElectronicObserver/Other/Information/kcmemo.md +++ b/ElectronicObserver/Other/Information/kcmemo.md @@ -336,6 +336,8 @@ C敗北判定の 敵損害率 >= 50 は試験実装。 * E-1 : 440 (旗艦HP88; 最低5回撃破) * E-2 : 1620 (旗艦HP270; 最低6回撃破) * E-3 : 910 (旗艦HP130; 最低7回撃破) +* E-4 : 3200 (旗艦HP450(最終形態500); 最低7回撃破) +* E-5 : 2410 (旗艦HP330(最終形態430); 最低7回撃破) #### 海域HPゲージ わずかでもダメージを与えないと正常な値にならない。 diff --git a/ElectronicObserver/Utility/SoftwareInformation.cs b/ElectronicObserver/Utility/SoftwareInformation.cs index af7e550b0..04cb75b4d 100644 --- a/ElectronicObserver/Utility/SoftwareInformation.cs +++ b/ElectronicObserver/Utility/SoftwareInformation.cs @@ -35,7 +35,7 @@ public static string SoftwareNameEnglish { /// public static string VersionJapanese { get { - return SoftwareNameJapanese + "一二型改三甲"; + return SoftwareNameJapanese + "一二型改四"; } } @@ -44,7 +44,7 @@ public static string VersionJapanese { /// public static string VersionEnglish { get { - return "1.2.3.1"; + return "1.2.4"; } } @@ -54,7 +54,7 @@ public static string VersionEnglish { /// public static DateTime UpdateTime { get { - return DateTimeHelper.CSVStringToTime( "2015/05/01 23:00:00" ); + return DateTimeHelper.CSVStringToTime( "2015/05/02 15:00:00" ); } } diff --git a/ElectronicObserver/Window/Control/ShipStatusEquipment.cs b/ElectronicObserver/Window/Control/ShipStatusEquipment.cs index bb646ee87..4ebf811ad 100644 --- a/ElectronicObserver/Window/Control/ShipStatusEquipment.cs +++ b/ElectronicObserver/Window/Control/ShipStatusEquipment.cs @@ -381,7 +381,7 @@ private void ShipStatusEquipment_Paint( object sender, PaintEventArgs e ) { Rectangle textarea = new Rectangle( basearea.X + sz_unit.Width * slotindex, basearea.Y, sz_unit.Width - SlotMargin, sz_unit.Height ); if ( OverlayAircraft ) { - using ( SolidBrush b = new SolidBrush( Color.FromArgb( 0x80, 0xFF, 0xFF, 0xFF ) ) ) { + using ( SolidBrush b = new SolidBrush( Color.FromArgb( 0xC0, 0xF0, 0xF0, 0xF0 ) ) ) { e.Graphics.FillRectangle( b, new Rectangle( textarea.X, textarea.Y, sz_eststr.Width, sz_eststr.Height ) ); } @@ -398,7 +398,7 @@ private void ShipStatusEquipment_Paint( object sender, PaintEventArgs e ) { Size sz_realstr = TextRenderer.MeasureText( slot.AircraftCurrent.ToString(), Font, new Size( int.MaxValue, int.MaxValue ), textformat ); sz_realstr.Width -= (int)( Font.Size / 2.0 ); - using ( SolidBrush b = new SolidBrush( Color.FromArgb( 0x80, 0xFF, 0xFF, 0xFF ) ) ) { + using ( SolidBrush b = new SolidBrush( Color.FromArgb( 0xC0, 0xF0, 0xF0, 0xF0 ) ) ) { e.Graphics.FillRectangle( b, new Rectangle( textarea.X + sz_unit.Width - sz_realstr.Width, textarea.Y + sz_unit.Height - sz_realstr.Height, diff --git a/ElectronicObserver/Window/FormBattle.cs b/ElectronicObserver/Window/FormBattle.cs index 13f6b9dcb..5816ef4cf 100644 --- a/ElectronicObserver/Window/FormBattle.cs +++ b/ElectronicObserver/Window/FormBattle.cs @@ -671,6 +671,7 @@ private void SetHPNormal( int[] hp, BattleData bd ) { HPBars[i].Value = hp[i]; HPBars[i].PrevValue = (int)bd.Data.api_nowhps[i + 1]; HPBars[i].MaximumValue = (int)bd.Data.api_maxhps[i + 1]; + HPBars[i].BackColor = SystemColors.Control; HPBars[i].Visible = true; } else { HPBars[i].Visible = false; From 01bf3a6db8f77f0676d9beb3b9a2779a2edb9ded Mon Sep 17 00:00:00 2001 From: andanteyk Date: Mon, 4 May 2015 23:17:55 +0900 Subject: [PATCH 5/5] Version 1.2.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・90mm単装高角砲を高射装置判定に追加 ・艦隊:ツールチップの増強 ・艦隊:疲労度処理の改善 ・通知:遠征中艦隊を大破通知から除外 ・通知:旗艦大破警告除外が機能しない不具合修正 ・羅針盤:不明なパラメータを???に変更 ・戦闘:連合艦隊戦でダメコン処理が反映されなかった不具合を修正 --- .../Data/Battle/BattleCombinedAirBattle.cs | 2 +- .../Data/Battle/BattleCombinedNightOnly.cs | 2 +- .../Data/Battle/BattleCombinedNormalDay.cs | 2 +- .../Data/Battle/BattleCombinedNormalNight.cs | 2 +- .../Data/Battle/BattleCombinedWater.cs | 2 +- ElectronicObserver/Data/FleetData.cs | 21 +++++++++++ ElectronicObserver/Notifier/NotifierDamage.cs | 36 +++++++++++-------- .../Other/Information/kcmemo.md | 1 + ElectronicObserver/Utility/Data/Calculator.cs | 3 +- .../Utility/SoftwareInformation.cs | 2 +- ElectronicObserver/Window/FormCompass.cs | 35 ++++++++++++------ ElectronicObserver/Window/FormFleet.cs | 12 +++++-- README.md | 2 +- 13 files changed, 86 insertions(+), 36 deletions(-) diff --git a/ElectronicObserver/Data/Battle/BattleCombinedAirBattle.cs b/ElectronicObserver/Data/Battle/BattleCombinedAirBattle.cs index 6060af4f2..957516c31 100644 --- a/ElectronicObserver/Data/Battle/BattleCombinedAirBattle.cs +++ b/ElectronicObserver/Data/Battle/BattleCombinedAirBattle.cs @@ -18,7 +18,7 @@ public override int[] EmulateBattle() { Action DealDamageFriend = ( int index, int damage ) => { //if ( hp[index] == -1 ) return; hp[index] -= Math.Max( damage, 0 ); - if ( hp[index] == 0 ) { + if ( hp[index] <= 0 ) { ShipData ship = db.Ships[db.Fleet[ index < 6 ? 1 : 2 ].Members[index]]; if ( ship == null ) return; diff --git a/ElectronicObserver/Data/Battle/BattleCombinedNightOnly.cs b/ElectronicObserver/Data/Battle/BattleCombinedNightOnly.cs index 250e7afc3..c0c271742 100644 --- a/ElectronicObserver/Data/Battle/BattleCombinedNightOnly.cs +++ b/ElectronicObserver/Data/Battle/BattleCombinedNightOnly.cs @@ -19,7 +19,7 @@ public override int[] EmulateBattle() { Action DealDamageFriend = ( int index, int damage ) => { //if ( hp[index] == -1 ) return; hp[index] -= Math.Max( damage, 0 ); - if ( hp[index] == 0 ) { + if ( hp[index] <= 0 ) { ShipData ship = db.Ships[db.Fleet[index < 6 ? 1 : 2].Members[index]]; if ( ship == null ) return; diff --git a/ElectronicObserver/Data/Battle/BattleCombinedNormalDay.cs b/ElectronicObserver/Data/Battle/BattleCombinedNormalDay.cs index 0ce3ab7e8..18cdc4b66 100644 --- a/ElectronicObserver/Data/Battle/BattleCombinedNormalDay.cs +++ b/ElectronicObserver/Data/Battle/BattleCombinedNormalDay.cs @@ -21,7 +21,7 @@ public override int[] EmulateBattle() { Action DealDamageFriend = ( int index, int damage ) => { //if ( hp[index] == -1 ) return; hp[index] -= Math.Max( damage, 0 ); - if ( hp[index] == 0 ) { + if ( hp[index] <= 0 ) { ShipData ship = db.Ships[db.Fleet[index < 6 ? 1 : 2].Members[index]]; if ( ship == null ) return; diff --git a/ElectronicObserver/Data/Battle/BattleCombinedNormalNight.cs b/ElectronicObserver/Data/Battle/BattleCombinedNormalNight.cs index c5f1d54e1..79486fa46 100644 --- a/ElectronicObserver/Data/Battle/BattleCombinedNormalNight.cs +++ b/ElectronicObserver/Data/Battle/BattleCombinedNormalNight.cs @@ -19,7 +19,7 @@ public override int[] EmulateBattle() { Action DealDamageFriend = ( int index, int damage ) => { //if ( hp[index] == -1 ) return; hp[index] -= Math.Max( damage, 0 ); - if ( hp[index] == 0 ) { + if ( hp[index] <= 0 ) { ShipData ship = db.Ships[db.Fleet[index < 6 ? 1 : 2].Members[index]]; if ( ship == null ) return; diff --git a/ElectronicObserver/Data/Battle/BattleCombinedWater.cs b/ElectronicObserver/Data/Battle/BattleCombinedWater.cs index a5ab37aca..496bcedc5 100644 --- a/ElectronicObserver/Data/Battle/BattleCombinedWater.cs +++ b/ElectronicObserver/Data/Battle/BattleCombinedWater.cs @@ -19,7 +19,7 @@ public override int[] EmulateBattle() { Action DealDamageFriend = ( int index, int damage ) => { //if ( hp[index] == -1 ) return; hp[index] -= Math.Max( damage, 0 ); - if ( hp[index] == 0 ) { + if ( hp[index] <= 0 ) { ShipData ship = db.Ships[db.Fleet[index < 6 ? 1 : 2].Members[index]]; if ( ship == null ) return; diff --git a/ElectronicObserver/Data/FleetData.cs b/ElectronicObserver/Data/FleetData.cs index c87d92607..9155e167e 100644 --- a/ElectronicObserver/Data/FleetData.cs +++ b/ElectronicObserver/Data/FleetData.cs @@ -328,6 +328,7 @@ private int GetConditionRecoveryMinute( int cond ) { return Math.Max( (int)Math.Ceiling( ( Utility.Configuration.Config.Control.ConditionBorder - cond ) / 3.0 ) * 3, 0 ); } + /*/ private void SetConditionTimer() { int minute = GetConditionRecoveryMinute( MembersInstance.Min( s => s != null ? s.Condition : 100 ) ); @@ -339,6 +340,26 @@ private void SetConditionTimer() { //Utility.Logger.Add( 1, string.Format( "Fleet #{0}: 疲労 再設定 {1:D2}:00", FleetID, minute ) ); } + /*/ + + private void SetConditionTimer() { + + int minute = GetConditionRecoveryMinute( MembersInstance.Min( s => s != null ? s.Condition : 100 ) ); + + if ( minute <= 0 ) { + ConditionTime = null; + + } else if ( ConditionTime != null ) { + TimeSpan ts = (DateTime)ConditionTime - DateTime.Now; + + ConditionTime = DateTime.Now + ts.Add( TimeSpan.FromMinutes( minute - 3 - (int)( ts.TotalMinutes / 3 ) * 3 ) ); + + } else { + ConditionTime = DateTime.Now.AddMinutes( minute ); + } + + } + //*/ private void ShortenConditionTimer() { diff --git a/ElectronicObserver/Notifier/NotifierDamage.cs b/ElectronicObserver/Notifier/NotifierDamage.cs index 8597631b8..14e0051aa 100644 --- a/ElectronicObserver/Notifier/NotifierDamage.cs +++ b/ElectronicObserver/Notifier/NotifierDamage.cs @@ -107,7 +107,10 @@ private void Initialize() { private void BeforeSortie( string apiname, dynamic data ) { if ( NotifiesNow || NotifiesBefore ) { - string[] array = GetDamagedShips( KCDatabase.Instance.Fleet.Fleets.Values.SelectMany( f => f.MembersWithoutEscaped ) ); + string[] array = GetDamagedShips( + KCDatabase.Instance.Fleet.Fleets.Values + .Where( f => f.ExpeditionState == 0 ) + .SelectMany( f => f.MembersWithoutEscaped.Skip( !ContainsFlagship ? 1 : 0 ) ) ); if ( array != null && array.Length > 0 ) { Notify( array ); @@ -119,7 +122,9 @@ private void BeforeSortie( string apiname, dynamic data ) { private void InSortie( string apiname, dynamic data ) { if ( NotifiesAfter ) { - string[] array = GetDamagedShips( KCDatabase.Instance.Fleet.Fleets.Values.Where( f => f.IsInSortie ).SelectMany( f => f.MembersWithoutEscaped ) ); + string[] array = GetDamagedShips( KCDatabase.Instance.Fleet.Fleets.Values + .Where( f => f.IsInSortie ) + .SelectMany( f => f.MembersWithoutEscaped.Skip( !ContainsFlagship ? 1 : 0 ) ) ); if ( array != null && array.Length > 0 ) { @@ -146,7 +151,7 @@ private void BattleFinished( string apiname, dynamic data ) { private void CheckBattle() { BattleManager bm = KCDatabase.Instance.Battle; - + if ( bm.Compass.IsEndPoint && !NotifiesAtEndpoint ) return; @@ -203,15 +208,20 @@ private void CheckBattle() { } - + // 注: 退避中かどうかまではチェックしない + private bool IsShipDamaged( ShipData ship, int hp ) { + return ship != null && + hp > 0 && + (double)hp / ship.HPMax <= 0.25 && + ship.RepairingDockID == -1 && + ship.Level >= LevelBorder && + ( ContainsNotLockedShip ? true : ( ship.IsLocked || ship.SlotInstance.Count( q => q != null && q.IsLocked ) > 0 ) ) && + ( ContainsSafeShip ? true : !ship.SlotInstanceMaster.Select( e => e != null ? e.CategoryType == 23 : false ).Contains( true ) ); + } + private string[] GetDamagedShips( IEnumerable ships ) { - return ships.Where( s => s != null && s.HPCurrent > 0 && s.HPRate <= 0.25 && s.RepairingDockID == -1 && - s.Level >= LevelBorder && - ( ContainsNotLockedShip ? true : ( s.IsLocked || s.SlotInstance.Count( q => q != null && q.IsLocked ) > 0 ) ) && - ( ContainsSafeShip ? true : !s.SlotInstanceMaster.Select( e => e != null ? e.EquipmentType[2] == 23 : false ).Contains( true ) ) - ).Select( s => string.Format( "{0} ({1}/{2})", s.NameWithLevel, s.HPCurrent, s.HPMax ) ).ToArray(); + return ships.Where( s => IsShipDamaged( s, s != null ? s.HPCurrent : 0 ) ).Select( s => string.Format( "{0} ({1}/{2})", s.NameWithLevel, s.HPCurrent, s.HPMax ) ).ToArray(); } - private string[] GetDamagedShips( FleetData fleet, int[] hps ) { @@ -223,10 +233,8 @@ private string[] GetDamagedShips( FleetData fleet, int[] hps ) { ShipData s = fleet.MembersInstance[i]; - if ( s != null && hps[i] > 0 && (double)hps[i] / s.HPMax <= 0.25 && - s.Level >= LevelBorder && !fleet.EscapedShipList.Contains( s.MasterID ) && - ( ContainsNotLockedShip ? true : ( s.IsLocked || s.SlotInstance.Count( q => q != null && q.IsLocked ) > 0 ) ) && - ( ContainsSafeShip ? true : !s.SlotInstanceMaster.Select( e => e != null ? e.EquipmentType[2] == 23 : false ).Contains( true ) ) ) { + if ( s != null && !fleet.EscapedShipList.Contains( s.MasterID ) && + IsShipDamaged( s, hps[i] ) ) { list.AddLast( string.Format( "{0} ({1}/{2})", s.NameWithLevel, hps[i], s.HPMax ) ); } diff --git a/ElectronicObserver/Other/Information/kcmemo.md b/ElectronicObserver/Other/Information/kcmemo.md index 2c8fc981d..f95292e1a 100644 --- a/ElectronicObserver/Other/Information/kcmemo.md +++ b/ElectronicObserver/Other/Information/kcmemo.md @@ -338,6 +338,7 @@ C敗北判定の 敵損害率 >= 50 は試験実装。 * E-3 : 910 (旗艦HP130; 最低7回撃破) * E-4 : 3200 (旗艦HP450(最終形態500); 最低7回撃破) * E-5 : 2410 (旗艦HP330(最終形態430); 最低7回撃破) +* E-6 : 3405 (旗艦HP500; 最低7回撃破) #### 海域HPゲージ わずかでもダメージを与えないと正常な値にならない。 diff --git a/ElectronicObserver/Utility/Data/Calculator.cs b/ElectronicObserver/Utility/Data/Calculator.cs index 50e70dc51..4b7ff5967 100644 --- a/ElectronicObserver/Utility/Data/Calculator.cs +++ b/ElectronicObserver/Utility/Data/Calculator.cs @@ -493,7 +493,8 @@ public static int GetAACutinKind( int shipID, int[] slot ) { if ( eq == null ) continue; if ( eq.IconType == 16 ) { //高角砲 - if ( eq.EquipmentID == 122 || eq.EquipmentID == 130 ) { //10cm連装高角砲+高射装置 or 12.7cm高角砲+高射装置 + // 10cm連装高角砲+高射装置 or 12.7cm高角砲+高射装置 or 90mm単装高角砲 + if ( eq.EquipmentID == 122 || eq.EquipmentID == 130 || eq.EquipmentID == 135 ) { highangle_director++; } highangle++; diff --git a/ElectronicObserver/Utility/SoftwareInformation.cs b/ElectronicObserver/Utility/SoftwareInformation.cs index 04cb75b4d..5b1b48362 100644 --- a/ElectronicObserver/Utility/SoftwareInformation.cs +++ b/ElectronicObserver/Utility/SoftwareInformation.cs @@ -54,7 +54,7 @@ public static string VersionEnglish { /// public static DateTime UpdateTime { get { - return DateTimeHelper.CSVStringToTime( "2015/05/02 15:00:00" ); + return DateTimeHelper.CSVStringToTime( "2015/05/04 22:00:00" ); } } diff --git a/ElectronicObserver/Window/FormCompass.cs b/ElectronicObserver/Window/FormCompass.cs index 7d2ed045e..b43248258 100644 --- a/ElectronicObserver/Window/FormCompass.cs +++ b/ElectronicObserver/Window/FormCompass.cs @@ -147,9 +147,9 @@ private string GetShipString( int shipID, int[] slot ) { if ( ship == null ) return null; return GetShipString( shipID, slot, -1, ship.HPMin, ship.FirepowerMax, ship.TorpedoMax, ship.AAMax, ship.ArmorMax, - ship.ASW != null && !ship.ASW.IsMaximumDefault ? ship.ASW.Maximum : 0, - ship.Evasion != null && !ship.Evasion.IsMaximumDefault ? ship.Evasion.Maximum : 0, - ship.LOS != null && !ship.LOS.IsMaximumDefault ? ship.LOS.Maximum : 0, + ship.ASW != null && !ship.ASW.IsMaximumDefault ? ship.ASW.Maximum : -1, + ship.Evasion != null && !ship.Evasion.IsMaximumDefault ? ship.Evasion.Maximum : -1, + ship.LOS != null && !ship.LOS.IsMaximumDefault ? ship.LOS.Maximum : -1, ship.LuckMin ); } @@ -158,9 +158,9 @@ private string GetShipString( int shipID, int[] slot, int level, int firepower, if ( ship == null ) return null; return GetShipString( shipID, slot, level, level > 99 ? ship.HPMaxMarried : ship.HPMin, firepower, torpedo, aa, armor, - ship.ASW != null && ship.ASW.IsAvailable ? ship.ASW.GetParameter( level ) : 0, - ship.Evasion != null && ship.Evasion.IsAvailable ? ship.Evasion.GetParameter( level ) : 0, - ship.LOS != null && ship.LOS.IsAvailable ? ship.LOS.GetParameter( level ) : 0, + ship.ASW != null && ship.ASW.IsAvailable ? ship.ASW.GetParameter( level ) : -1, + ship.Evasion != null && ship.Evasion.IsAvailable ? ship.Evasion.GetParameter( level ) : -1, + ship.LOS != null && ship.LOS.IsAvailable ? ship.LOS.GetParameter( level ) : -1, level > 99 ? Math.Min( ship.LuckMin + 3, ship.LuckMax ) : ship.LuckMin ); } @@ -173,10 +173,15 @@ private string GetShipString( int shipID, int[] slot, int level, int hp, int fir int torpedo_c = torpedo; int aa_c = aa; int armor_c = armor; - int asw_c = Math.Max( asw, 0 ); - int evasion_c = Math.Max( evasion, 0 ); - int los_c = Math.Max( los, 0 ); + int asw_c = asw; + int evasion_c = evasion; + int los_c = los; int luck_c = luck; + int range = ship.Range; + + asw = Math.Max( asw, 0 ); + evasion = Math.Max( evasion, 0 ); + los = Math.Max( los, 0 ); if ( slot != null ) { int count = slot.Length; @@ -192,11 +197,12 @@ private string GetShipString( int shipID, int[] slot, int level, int hp, int fir evasion += eq.Evasion; los += eq.LOS; luck += eq.Luck; + range = Math.Max( range, eq.Range ); } } return string.Format( - "{0} {1}{2}\n耐久: {3}\n火力: {4}/{5}\n雷装: {6}/{7}\n対空: {8}/{9}\n装甲: {10}/{11}\n対潜: {12}/{13}\n回避: {14}/{15}\n索敵: {16}/{17}\n運: {18}/{19}\n(右クリックで図鑑)\n", + "{0} {1}{2}\n耐久: {3}\n火力: {4}/{5}\n雷装: {6}/{7}\n対空: {8}/{9}\n装甲: {10}/{11}\n対潜: {12}/{13}\n回避: {14}/{15}\n索敵: {16}/{17}\n運: {18}/{19}\n射程: {20}\n(右クリックで図鑑)\n", ship.ShipTypeName, ship.NameWithClass, level < 1 ? "" : string.Format( " Lv. {0}", level ), hp, firepower_c, firepower, @@ -206,7 +212,8 @@ private string GetShipString( int shipID, int[] slot, int level, int hp, int fir asw_c == -1 ? "???" : asw_c.ToString(), asw, evasion_c == -1 ? "???" : evasion_c.ToString(), evasion, los_c == -1 ? "???" : los_c.ToString(), los, - luck_c, luck + luck_c, luck, + Constants.GetRange( range ) ); } @@ -231,6 +238,12 @@ private string GetEquipmentString( int shipID, int[] slot ) { sb.AppendFormat( "対空: {0}\r\n", Constants.GetAACutinKind( aacutin ) ); } } + { + int airsup = Calculator.GetAirSuperiority( slot, ship.Aircraft.ToArray() ); + if ( airsup > 0 ) { + sb.AppendFormat( "制空戦力: {0}\r\n", airsup ); + } + } return sb.ToString(); } diff --git a/ElectronicObserver/Window/FormFleet.cs b/ElectronicObserver/Window/FormFleet.cs index ddadb0f98..937338572 100644 --- a/ElectronicObserver/Window/FormFleet.cs +++ b/ElectronicObserver/Window/FormFleet.cs @@ -340,7 +340,7 @@ public void Update( int shipMasterID ) { Name.Tag = ship.ShipID; ToolTipInfo.SetToolTip( Name, string.Format( - "{0} {1}\n火力: {2}/{3}\n雷装: {4}/{5}\n対空: {6}/{7}\n装甲: {8}/{9}\n対潜: {10}/{11}\n回避: {12}/{13}\n索敵: {14}/{15}\n運: {16}\n(右クリックで図鑑)\n", + "{0} {1}\n火力: {2}/{3}\n雷装: {4}/{5}\n対空: {6}/{7}\n装甲: {8}/{9}\n対潜: {10}/{11}\n回避: {12}/{13}\n索敵: {14}/{15}\n運: {16}\n射程: {17}\n(右クリックで図鑑)\n", ship.MasterShip.ShipTypeName, ship.NameWithLevel, ship.FirepowerBase, ship.FirepowerTotal, ship.TorpedoBase, ship.TorpedoTotal, @@ -349,7 +349,8 @@ public void Update( int shipMasterID ) { ship.ASWBase, ship.ASWTotal, ship.EvasionBase, ship.EvasionTotal, ship.LOSBase, ship.LOSTotal, - ship.LuckTotal + ship.LuckTotal, + Constants.GetRange( ship.Range ) ) ); @@ -490,7 +491,12 @@ private string GetEquipmentString( ShipData ship ) { sb.AppendFormat( "対空: {0}\r\n", Constants.GetAACutinKind( aacutin ) ); } } - + { + int airsup = Calculator.GetAirSuperiority( ship ); + if ( airsup > 0 ) { + sb.AppendFormat( "制空戦力: {0}\r\n", airsup ); + } + } return sb.ToString(); } diff --git a/README.md b/README.md index c639b83bd..d26048d59 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ *このリンクの更新は遅れる可能性があります。最新版は[こちら](http://electronicobserver.blog.fc2.com/)で確認してください。* -[ver. 1.2.3.1 (2015/05/01)](http://bit.ly/1Ap594O) +[ver. 1.2.4 (2015/05/04)](http://bit.ly/1zHQI0U) 更新内容・履歴は[こちら](https://github.com/andanteyk/ElectronicObserver/wiki/ChangeLog)で確認できます。