Skip to content

Commit

Permalink
Release v2.5.4.1-m1
Browse files Browse the repository at this point in the history
自定义配色:请参考范例配色文件 (Settings\ColorScheme.Example.json)
自定义配色:内嵌配色主题 (VS2012 Light)
舰队:内部熟练度制空值范围显示 ( 隐藏选项 AirSuperiorityShowRange )
舰队:优化 33 式索敌值显示 ( 点击切换分歧点系数 )
舰队:表头宽度扩展到面板宽度
舰队:修理时间格式和明石 tooltip 统一 ( 使用分秒符号 )
战斗:基地被空袭时下方受损文字使用中文字体
基地航空队:不显示当前不可达海域的航空队,修复返回母港、出击时报错
初次启动时新增"浏览器不会自动加载页面"的提示
浏览器:刷新时提示"建议使用转到登录页"
浏览器:清除缓存时提醒刷新页面

合并原版:v2.5.3, v2.5.4, v2.5.4.1 更新内容
对空详情:修正全灭概率计算、修正联合舰队补正,修正部分阵形补正
战斗详情:确保在画面内弹出,追加支援舰队信息
舰队:新增用数字表示舰载机熟练度选项,伤害计算弹药参量补正修正
其他各种微修正 ( 完整原版更新列表见 GitHub Release )

CefEOBrowser 需要更新到 v0.0.3 ( 说得就像除了我自己有人用一样 )
  • Loading branch information
RadarNyan committed Mar 19, 2017
2 parents 204d2e2 + 49d6d24 commit 558d75e
Show file tree
Hide file tree
Showing 69 changed files with 1,791 additions and 483 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Set default behavior to automatically normalize line endings.
###############################################################################
#* text=auto
ElectronicObserver/Settings/*.json eol=crlf

###############################################################################
# Set default behavior for command prompt diff.
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,4 @@ $RECYCLE.BIN/
ElectronicObserver/Other/Information/todo.txt
DigitalArsenal/
packages/
cleanup.bat
34 changes: 31 additions & 3 deletions Browser/FormBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ public void InitialAPIReceived() {
//ロード直後の適用ではレイアウトがなぜか崩れるのでこのタイミングでも適用
ApplyStyleSheet();
ApplyZoom();
DestroyDMMreloadDialog();

//起動直後はまだ音声が鳴っていないのでミュートできないため、この時点で有効化
SetVolumeState();
Expand Down Expand Up @@ -280,6 +281,7 @@ private void Browser_DocumentCompleted( object sender, WebBrowserDocumentComplet
ApplyStyleSheet();

ApplyZoom();
DestroyDMMreloadDialog();
}

/// <summary>
Expand Down Expand Up @@ -325,6 +327,32 @@ public void ApplyStyleSheet() {

}

/// <summary>
/// DMMによるページ更新ダイアログを非表示にします。
/// </summary>
public void DestroyDMMreloadDialog() {

if ( !Configuration.IsDMMreloadDialogDestroyable )
return;

try {

var document = Browser.Document;
if ( document == null ) return;

var swf = getFrameElementById( document, "externalswf" );
if ( swf == null ) return;

document.InvokeScript( "eval", new object[] { Properties.Resources.DMMScript } );

} catch ( Exception ex ) {

BrowserHost.AsyncRemoteRun( () =>
BrowserHost.Proxy.SendErrorReport( ex.ToString(), "DMMによるページ更新ダイアログの非表示に失敗しました。" ) );
}

}

/// <summary>
/// 指定した URL のページを開きます。
/// </summary>
Expand Down Expand Up @@ -810,7 +838,7 @@ void ToolMenu_Other_Volume_ValueChanged( object sender, EventArgs e ) {
private void ToolMenu_Other_Refresh_Click( object sender, EventArgs e ) {

if ( !Configuration.ConfirmAtRefresh ||
MessageBox.Show( "即将刷新浏览器。\r\n确认刷新吗?", "要求确认",
MessageBox.Show( "即将刷新浏览器。\r\n确认刷新吗?\r\n※ 译注:除非网页 ( 非游戏画面 ) 显示异常,建议使用「转到登录页」代替刷新。", "要求确认",
MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2 )
== System.Windows.Forms.DialogResult.OK ) {

Expand Down Expand Up @@ -867,12 +895,12 @@ private void ToolMenu_Other_Alignment_Invisible_Click( object sender, EventArgs

private void ToolMenu_Other_ClearCache_Click( object sender, EventArgs e ) {

if ( MessageBox.Show( "ブラウザのキャッシュを削除します。\nよろしいですか?", "キャッシュの削除", MessageBoxButtons.OKCancel, MessageBoxIcon.Question )
if ( MessageBox.Show( "即将清除浏览器的缓存。\n确定清除吗?", "清除缓存", MessageBoxButtons.OKCancel, MessageBoxIcon.Question )
== System.Windows.Forms.DialogResult.OK ) {

BeginInvoke( (MethodInvoker)( () => {
ClearCache();
MessageBox.Show( "キャッシュの削除が完了しました。", "削除完了", MessageBoxButtons.OK, MessageBoxIcon.Information );
MessageBox.Show( "缓存清除完毕。\n※ 如果已经在游戏中建议刷新页面 ※", "清除完成", MessageBoxButtons.OK, MessageBoxIcon.Information );
} ) );

}
Expand Down
7 changes: 7 additions & 0 deletions Browser/Properties/Resources.Designer.cs

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

9 changes: 9 additions & 0 deletions Browser/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,13 @@ catch(e) {{
alert("ページCSS適用に失敗しました: "+e);
}}</value>
</data>
<data name="DMMScript" xml:space="preserve">
<value>
try {
if ( DMM.netgame.reloadDialog ) DMM.netgame.reloadDialog = function (){};
}
catch(e) {
alert("DMMによるページ更新ダイアログの非表示に失敗しました: "+e);
}</value>
</data>
</root>
3 changes: 3 additions & 0 deletions BrowserLib/IBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public interface IBrowser {

[OperationContract]
void ApplyStyleSheet();

[OperationContract]
void DestroyDMMreloadDialog();

[OperationContract]
void CloseBrowser();
Expand Down
6 changes: 6 additions & 0 deletions BrowserLib/IBrowserHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ public class BrowserConfiguration {
/// </summary>
[DataMember]
public bool AppliesStyleSheet { get; set; }

/// <summary>
/// DMMによるページ更新ダイアログを表示するか
/// </summary>
[DataMember]
public bool IsDMMreloadDialogDestroyable { get; set; }

/// <summary>
/// ツールメニューの配置
Expand Down
Binary file modified ElectronicObserver/Assets.zip
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ElectronicObserver/Data/Battle/BattleCombinedEachDay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override void LoadFromResponse( string apiname, dynamic data ) {
BaseAirAttack = new PhaseBaseAirAttack( this, "基地航空队攻击" );
AirBattle = new PhaseAirBattle( this, "航空战" );
Support = new PhaseSupport( this, "支援攻击" );
OpeningASW = new PhaseOpeningASW( this, "先制对潜", true );
OpeningASW = new PhaseOpeningASW( this, "先制对潜", true, true );
OpeningTorpedo = new PhaseTorpedo( this, "开幕雷击", 0 );
Shelling1 = new PhaseShelling( this, "第一次炮击战", 1, "1", false, false );
Shelling2 = new PhaseShelling( this, "第二次炮击战", 2, "2", true, true );
Expand Down
2 changes: 1 addition & 1 deletion ElectronicObserver/Data/Battle/BattleCombinedEachWater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override void LoadFromResponse( string apiname, dynamic data ) {
BaseAirAttack = new PhaseBaseAirAttack( this, "基地航空队攻击" );
AirBattle = new PhaseAirBattle( this, "航空战" );
Support = new PhaseSupport( this, "支援攻击" );
OpeningASW = new PhaseOpeningASW( this, "先制对潜", true );
OpeningASW = new PhaseOpeningASW( this, "先制对潜", true, true );
OpeningTorpedo = new PhaseTorpedo( this, "开幕雷击", 0 );
Shelling1 = new PhaseShelling( this, "第一次炮击战", 1, "1", false, false );
Shelling2 = new PhaseShelling( this, "第二次炮击战", 2, "2", false, false );
Expand Down
4 changes: 2 additions & 2 deletions ElectronicObserver/Data/Battle/BattleEnemyCombinedDay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace ElectronicObserver.Data.Battle {

/// <summary>
/// 敵連合艦隊昼戦
/// 通常艦隊vs敵連合艦隊昼戦
/// </summary>
public class BattleEnemyCombinedDay : BattleDay {

Expand All @@ -20,7 +20,7 @@ public override void LoadFromResponse( string apiname, dynamic data ) {
BaseAirAttack = new PhaseBaseAirAttack( this, "基地航空队攻击" );
AirBattle = new PhaseAirBattle( this, "航空战" );
Support = new PhaseSupport( this, "支援攻击" );
OpeningASW = new PhaseOpeningASW( this, "先制对潜", false );
OpeningASW = new PhaseOpeningASW( this, "先制对潜", false, true );
OpeningTorpedo = new PhaseTorpedo( this, "开幕雷击", 0 );
Shelling1 = new PhaseShelling( this, "第一次炮击战", 1, "1", false, true );
Torpedo = new PhaseTorpedo( this, "雷击战", 2 );
Expand Down
3 changes: 3 additions & 0 deletions ElectronicObserver/Data/Battle/BattleEnemyCombinedNight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

namespace ElectronicObserver.Data.Battle {

/// <summary>
/// 敵連合艦隊夜戦
/// </summary>
public class BattleEnemyCombinedNight : BattleNight {

public override void LoadFromResponse( string apiname, dynamic data ) {
Expand Down
27 changes: 27 additions & 0 deletions ElectronicObserver/Data/Battle/BattleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,33 @@ private void BattleFinished() {
Result.BaseExp)
);
}

// Level up
{
var exps = Result.ExpList;
var lvup = Result.LevelUpList;
for ( int i = 0; i < lvup.Length; i++ ) {
if ( lvup[i].Length >= 2 && lvup[i][0] + exps[i] >= lvup[i][1] ) {
var ship = FirstBattle.Initial.FriendFleet.MembersInstance[i];
int increment = Math.Max( lvup[i].Length - 2, 1 );

Utility.Logger.Add(2, ship.Name, string.Format(" 的等级达到了 Lv. {0} 。", ship.Level + increment));
}
}

if ( IsCombinedBattle ) {
exps = Result.ExpListCombined;
lvup = Result.LevelUpListCombined;
for ( int i = 0; i < lvup.Length; i++ ) {
if ( lvup[i].Length >= 2 && lvup[i][0] + exps[i] >= lvup[i][1] ) {
var ship = FirstBattle.Initial.FriendFleetEscort.MembersInstance[i];
int increment = Math.Max( lvup[i].Length - 2, 1 );

Utility.Logger.Add(2, ship.Name, string.Format(" 的等级达到了 Lv. {0} 。", ship.Level + increment));
}
}
}
}



Expand Down
66 changes: 65 additions & 1 deletion ElectronicObserver/Data/Battle/BattleResultData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,71 @@ public int BaseExp {
get { return (int)RawData.api_get_base_exp; }
}

//exp

/// <summary>
/// 主力艦隊の入手経験値リスト [0-5]
/// 欠番は -1
/// </summary>
public int[] ExpList {
get {
int[] ret = new int[6];
if ( RawData.api_get_ship_exp() ) {
var src = (int[])RawData.api_get_ship_exp;
Array.Copy( src, 1, ret, 0, src.Length - 1 );
}
return ret;
}
}

/// <summary>
/// 随伴艦隊の入手経験値リスト [0-5]
/// 欠番は -1
/// </summary>
public int[] ExpListCombined {
get {
int[] ret = new int[6];
if ( RawData.api_get_ship_exp_combined() ) {
var src = (int[])RawData.api_get_ship_exp_combined;
Array.Copy( src, 1, ret, 0, src.Length - 1 );
}
return ret;
}
}

/// <summary>
/// 主力艦隊のレベルアップリスト [所属艦船数]
/// [0]=現在のexp, [1]=(あれば)次のレベルの経験値, [2]=(あれば)その次のレベルの経験値, ...
/// </summary>
public int[][] LevelUpList {
get {
if ( !RawData.api_get_exp_lvup() )
return new int[0][];

var ret = new List<int[]>();
foreach ( var data in RawData.api_get_exp_lvup ) {
ret.Add( (int[])data );
}
return ret.ToArray();
}
}

/// <summary>
/// 随伴艦隊のレベルアップリスト [所属艦船数]
/// [0]=現在のexp, [1]=(あれば)次のレベルの経験値, [2]=(あれば)その次のレベルの経験値, ...
/// </summary>
public int[][] LevelUpListCombined {
get {
if ( !RawData.api_get_exp_lvup_combined() )
return new int[0][];

var ret = new List<int[]>();
foreach ( var data in RawData.api_get_exp_lvup_combined ) {
ret.Add( (int[])data );
}
return ret.ToArray();
}
}


//lostflag

Expand Down
50 changes: 50 additions & 0 deletions ElectronicObserver/Data/Battle/Detail/BattleDetailDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ public static string GetBattleDetail( BattleManager bm ) {
if ( bm.Compass.EventID == 5 )
sb.Append( " ( BOSS )" );
sb.AppendLine();

var mapinfo = bm.Compass.MapInfo;
if ( !mapinfo.IsCleared ) {
if ( mapinfo.RequiredDefeatedCount != -1 ) {
sb.AppendFormat( "击破 : {0} / {1} 次", mapinfo.CurrentDefeatedCount, mapinfo.RequiredDefeatedCount )
.AppendLine();
} else if ( mapinfo.MapHPMax > 0 ) {
int current = bm.Compass.MapHPCurrent > 0 ? bm.Compass.MapHPCurrent : mapinfo.MapHPCurrent;
int max = bm.Compass.MapHPMax > 0 ? bm.Compass.MapHPMax : mapinfo.MapHPMax;
sb.AppendFormat( "{0}: {1} / {2}", mapinfo.GaugeType == 3 ? "TP" : "HP", current, max )
.AppendLine();
}
}
}
if ( bm.Result != null ) {
sb.AppendLine( bm.Result.EnemyFleetName );
Expand Down Expand Up @@ -215,6 +228,16 @@ public static string GetBattleDetail( BattleData battle ) {
sb.Append( " / 敌军索敌 : " ).AppendLine( Constants.GetSearchingResult( p.SearchingEnemy ) );

sb.AppendLine();


} else if ( phase is PhaseSupport ) {
var p = phase as PhaseSupport;

if ( p.IsAvailable ) {
sb.AppendLine( "〈支援舰队〉" );
OutputSupportData( sb, p.SupportFleet );
sb.AppendLine();
}
}


Expand Down Expand Up @@ -391,6 +414,33 @@ private static void OutputFriendBase( StringBuilder sb, int[] initialHPs, int[]

}

public static void OutputSupportData( StringBuilder sb, FleetData fleet ) {

for ( int i = 0; i < fleet.MembersInstance.Count; i++ ) {
var ship = fleet.MembersInstance[i];

if ( ship == null )
continue;

sb.AppendFormat( "#{0}: {1} {2} - 火力 {3}, 雷装 {4}, 对空 {5}, 装甲 {6}\r\n",
i + 1,
ship.MasterShip.ShipTypeName, ship.NameWithLevel,
ship.FirepowerBase, ship.TorpedoBase, ship.AABase, ship.ArmorBase );

sb.Append( " " );
for ( int k = 0; k < ship.SlotInstance.Count; k++ ) {
var eq = ship.SlotInstance[k];
if ( eq != null ) {
if ( k > 0 )
sb.Append( ", " );
sb.Append( eq.ToString() );
}
}
sb.AppendLine();
}

}

private static void OutputEnemyData( StringBuilder sb, ShipDataMaster[] members, int[] levels, int[] initialHPs, int[] maxHPs, EquipmentDataMaster[][] slots, int[][] parameters ) {

for ( int i = 0; i < members.Length; i++ ) {
Expand Down
5 changes: 2 additions & 3 deletions ElectronicObserver/Data/Battle/Phase/PhaseOpeningASW.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ namespace ElectronicObserver.Data.Battle.Phase {
public class PhaseOpeningASW : PhaseShelling {

// 砲撃戦とフォーマットが同じなので流用
// undone: 敵連合艦隊時にどちらを狙うか/誰が参加するか不明

public PhaseOpeningASW( BattleData data, string title, bool isEscort )
: base( data, title, 0, "", isEscort ) {
public PhaseOpeningASW( BattleData data, string title, bool isEscort, bool isEnemyEscort = false )
: base( data, title, 0, "", isEscort, isEnemyEscort ) {

}

Expand Down
13 changes: 3 additions & 10 deletions ElectronicObserver/Data/Battle/Phase/PhaseSupport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,10 @@ public PhaseSupport( BattleData data, string title )
{
if ( (int)RawData.api_support_info.api_support_airatack.api_stage_flag[2] != 0 ) {

var maindmg = ( (int[])RawData.api_support_info.api_support_airatack.api_stage3.api_edam ).Skip( 1 );
var escortdmg = !RawData.api_support_info.api_support_airatack.api_stage3_combined() ? empty :
( (int[])RawData.api_support_info.api_support_airatack.api_stage3_combined.api_edam ).Skip( 1 );
// 敵連合でも api_stage3_combined は存在せず、[13] になる

var maincl = ( (int[])RawData.api_support_info.api_support_airatack.api_stage3.api_ecl_flag ).Skip( 1 );
var escortcl = !RawData.api_support_info.api_support_airatack.api_stage3_combined() ? empty :
( (int[])RawData.api_support_info.api_support_airatack.api_stage3_combined.api_ecl_flag ).Skip( 1 );


Damages = maindmg.Concat( escortdmg ).ToArray();
Criticals = maincl.Concat( escortcl ).ToArray();
Damages = ( (int[])RawData.api_support_info.api_support_airatack.api_stage3.api_edam ).Skip( 1 ).ToArray();
Criticals = ( (int[])RawData.api_support_info.api_support_airatack.api_stage3.api_ecl_flag ).Skip( 1 ).ToArray();

// 航空戦なので crit フラグが違う
for ( int i = 0; i < Criticals.Length; i++ )
Expand Down
Loading

0 comments on commit 558d75e

Please sign in to comment.