Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
andanteyk committed Jan 31, 2016
2 parents 19f311f + 6cdbfa8 commit 4216b2f
Show file tree
Hide file tree
Showing 27 changed files with 655 additions and 264 deletions.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 20 additions & 36 deletions ElectronicObserver/Data/Battle/BattleData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,55 +44,39 @@ public override void LoadFromResponse( string apiname, dynamic data ) {


/// <summary>
/// MVPを取得した艦のインデックス
/// MVP 取得候補艦のインデックス [0-5]
/// </summary>
public int MVPShipIndex {
public IEnumerable<int> MVPShipIndexes {
get {
int index = -1;
int max = 1;
for ( int i = 0; i < 6; i++ ) {
if ( _attackDamages[i] >= max ) {
max = _attackDamages[i];
index = i;
int max = _attackDamages.Take( 6 ).Max();
if ( max == 0 ) { // 全員ノーダメージなら旗艦MVP
yield return 0;

} else {
for ( int i = 0; i < 6; i++ ) {
if ( _attackDamages[i] == max )
yield return i;
}
}
return index == -1 ? 0 : index;
}
}

/// <summary>
/// MVPを取得した艦
/// </summary>
public ShipData MVPShip {
get {
return Initial.FriendFleet.MembersInstance[MVPShipIndex];
}
}


/// <summary>
/// MVPを取得した艦のインデックス(随伴護衛部隊)
/// 連合艦隊随伴艦隊の MVP 取得候補艦のインデックス [0-5]
/// </summary>
public int MVPShipCombinedIndex {
public IEnumerable<int> MVPShipCombinedIndexes {
get {
int index = -1;
int max = 1;
for ( int i = 0; i < 6; i++ ) {
if ( _attackDamages[i + 12] >= max ) {
max = _attackDamages[i + 12];
index = i;
int max = _attackDamages.Skip( 12 ).Take( 6 ).Max();
if ( max == 0 ) { // 全員ノーダメージなら旗艦MVP
yield return 0;

} else {
for ( int i = 0; i < 6; i++ ) {
if ( _attackDamages[i + 12] == max )
yield return i;
}
}
return index == -1 ? 0 : index;
}
}

/// <summary>
/// MVPを取得した艦(随伴護衛部隊)
/// </summary>
public ShipData MVPShipCombined {
get {
return KCDatabase.Instance.Fleet[2].MembersInstance[MVPShipCombinedIndex];
}
}

Expand Down
6 changes: 6 additions & 0 deletions ElectronicObserver/Data/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,12 @@ public static string GetAACutinKind( int id ) {
return "集中機銃/機銃/電探";
case 14:
return "高角砲/機銃/電探";
case 15:
return "高角砲/機銃";
case 16:
return "高角砲/機銃/電探";
case 17:
return "高角砲/機銃";
default:
return "不明";
}
Expand Down
5 changes: 3 additions & 2 deletions ElectronicObserver/Data/ShipData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,9 @@ public int AntiSubmarinePower {
basepower *= GetHPDamageBonus();

//対潜シナジー
if ( SlotInstanceMaster.Where( s => s != null && s.CategoryType == 14 ).Count() > 0 &&
SlotInstanceMaster.Where( s => s != null && s.CategoryType == 15 ).Count() > 0 )
if ( ( SlotInstanceMaster.Where( s => s != null && s.CategoryType == 14 ).Any() || //ソナー
SlotInstanceMaster.Where( s => s != null && s.CategoryType == 40 ).Any() ) && //大型ソナー
SlotInstanceMaster.Where( s => s != null && s.CategoryType == 15 ).Any() ) //爆雷
basepower *= 1.15;

//キャップ
Expand Down
5 changes: 5 additions & 0 deletions ElectronicObserver/Notifier/NotifierBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,14 @@ private void Initialize() {
Sound.IsShuffle = true;
Sound.MediaEnded += Sound_MediaEnded;
SoundPath = "";

}


public void SetInitialVolume( int volume ) {
Sound.Volume = volume;
}


protected virtual void UpdateTimerTick() { }

Expand Down
8 changes: 8 additions & 0 deletions ElectronicObserver/Notifier/NotifierManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ public void ShowNotifier( ElectronicObserver.Window.Dialog.DialogNotifier form )
form.Show();
}

public IEnumerable<NotifierBase> GetNotifiers() {
yield return Expedition;
yield return Construction;
yield return Repair;
yield return Condition;
yield return Damage;
}

}

}
4 changes: 4 additions & 0 deletions ElectronicObserver/Other/Information/apilist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,10 @@ api_req_sortie/battle :戦闘(昼戦)
10:高角砲/集中機銃/電探
11:高角砲/集中機銃
12:集中機銃/機銃/電探
14:高角砲/対空機銃/電探
15:高角砲/対空機銃
16:高角砲/対空機銃/電探
17:高角砲/対空機銃
api_use_items :表示装備IDリスト
api_stage3 :航空攻撃
api_frai_flag :味方被雷撃フラグ
Expand Down
37 changes: 22 additions & 15 deletions ElectronicObserver/Other/Information/kcmemo.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,23 +228,28 @@ else 攻撃種別 = 0(砲撃);
なお、「最初の表示装備」は戦闘時にカットインとして表示される装備であり、第一スロットに装備されているアイテムとは異なる場合がある。

#### 対空カットイン
* 1:高角砲x2/電探
* 2:高角砲/電探
* 3:高角砲x2
* 4:大口径主砲/三式弾/高射装置/電探
* 5:高角砲+高射装置x2/電探
* 6:大口径主砲/三式弾/高射装置
* 7:高角砲/高射装置/電探
* 8:高角砲+高射装置/電探
* 9:高角砲/高射装置
* 10:高角砲/集中機銃/電探
* 11:高角砲/集中機銃
* 12:集中機銃/機銃/電探
* 13:???
* 14:高角砲/対空機銃/電探

|ID|必要装備|発動可能艦|
|--:|:--|:--|
| 1|高角砲x2/電探|秋月型|
| 2|高角砲/電探|秋月型|
| 3|高角砲x2|秋月型|
| 4|大口径主砲/三式弾/高射装置/電探||
| 5|高角砲+高射装置x2/電探||
| 6|大口径主砲/三式弾/高射装置||
| 7|高角砲/高射装置/電探||
| 8|高角砲+高射装置/電探||
| 9|高角砲/高射装置||
|10|高角砲/集中機銃/電探|摩耶改二|
|11|高角砲/集中機銃|摩耶改二|
|12|集中機銃/機銃/電探||
|13|???||
|14|高角砲/対空機銃/電探|五十鈴改二|
|15|高角砲/対空機銃|五十鈴改二|
|16|高角砲/対空機銃/電探|霞改二乙|
|17|高角砲/対空機銃|霞改二乙|

(個艦については)固有優先、他はID昇順優先で判定される?
なお、1-3は秋月型専用、10-11は摩耶改二専用。14は五十鈴改二専用。
秋月型のみ対空電探(対空値が1以上の電探)でなくても可。

以下の装備は「高角砲+高射装置」として扱われる:
Expand Down Expand Up @@ -508,6 +513,8 @@ Bismarck dreiに対する魚雷装備・試製51cm連装砲といったものの
|阿武隈改二|特殊潜航艇・上陸用舟艇||
|速吸改|艦上攻撃機・大型電探・ソナー||
|香取改, 鹿島改|探照灯||
|霞改二|上陸用舟艇・司令部施設||
|霞改二乙|大型電探・上陸用舟艇||

となっている。
(艦船IDが特殊装備リストに含まれていた場合は*マスターデータの内容にかかわらず*装備可能・不可能にする、というコードになっている)
Expand Down
10 changes: 10 additions & 0 deletions ElectronicObserver/Resource/ResourceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ public enum IconContent {
ParameterAircraft,
ParameterSpeed,
ParameterRange,
BattleFormationEnemyLineAhead,
BattleFormationEnemyDoubleLine,
BattleFormationEnemyDiamond,
BattleFormationEnemyEchelon,
BattleFormationEnemyLineAbreast,
}

public enum EquipmentContent {
Expand Down Expand Up @@ -317,6 +322,11 @@ private void LoadFromArchive( string path ) {
LoadImageFromArchive( Icons, archive, mstpath + @"Parameter/Speed.png", "Parameter_Speed" );
LoadImageFromArchive( Icons, archive, mstpath + @"Parameter/Range.png", "Parameter_Range" );

LoadImageFromArchive( Icons, archive, mstpath + @"Battle/FormationEnemy01.png", "Battle_FormationEnemy_LineAhead" );
LoadImageFromArchive( Icons, archive, mstpath + @"Battle/FormationEnemy02.png", "Battle_FormationEnemy_DoubleLine" );
LoadImageFromArchive( Icons, archive, mstpath + @"Battle/FormationEnemy03.png", "Battle_FormationEnemy_Diamond" );
LoadImageFromArchive( Icons, archive, mstpath + @"Battle/FormationEnemy04.png", "Battle_FormationEnemy_Echelon" );
LoadImageFromArchive( Icons, archive, mstpath + @"Battle/FormationEnemy05.png", "Battle_FormationEnemy_LineAbreast" );


// ------------------------ equipments ------------------------
Expand Down
27 changes: 22 additions & 5 deletions ElectronicObserver/Utility/Data/Calculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,14 @@ public static int GetNightAttackKind( int[] slot, int attackerShipID, int defene
if ( defship != null && defship.IsLandBase && rocketcnt > 0 )
return 10; //ロケット砲撃

else if ( atkship.ShipType == 7 || atkship.ShipType == 11 || atkship.ShipType == 18 ) //軽空母/正規空母/装甲空母
return 7; //空撃
else if ( atkship.ShipType == 7 || atkship.ShipType == 11 || atkship.ShipType == 18 ) { //軽空母/正規空母/装甲空母

else if ( atkship.ShipType == 13 || atkship.ShipType == 14 ) //潜水艦/潜水空母
if ( attackerShipID == 432 || attackerShipID == 353 ) //Graf Zeppelin(改)
return 0; //砲撃
else
return 7; //空撃

} else if ( atkship.ShipType == 13 || atkship.ShipType == 14 ) //潜水艦/潜水空母
return 9; //雷撃

else if ( defship != null && ( defship.ShipType == 13 || defship.ShipType == 14 ) ) //潜水艦/潜水空母
Expand Down Expand Up @@ -640,8 +644,21 @@ public static int GetAACutinKind( int shipID, int[] slot ) {
}

if ( shipID == 141 ) { //五十鈴改二限定
if ( highangle >= 1 && aagun >= 1 && aaradar >= 1 )
return 14;
if ( highangle >= 1 && aagun >= 1 ) {
if ( aaradar >= 1 )
return 14;
else
return 15;
}
}

if ( shipID == 470 ) { //霞改二乙限定
if ( highangle >= 1 && aagun >= 1 ) {
if ( aaradar >= 1 )
return 16;
else
return 17;
}
}

if ( maingunl >= 1 && aashell >= 1 && director >= 1 && aaradar >= 1 ) {
Expand Down
6 changes: 3 additions & 3 deletions ElectronicObserver/Utility/SoftwareInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static string SoftwareNameEnglish {
/// </summary>
public static string VersionJapanese {
get {
return SoftwareNameJapanese + "二一型改二";
return SoftwareNameJapanese + "二一型改三";
}
}

Expand All @@ -44,7 +44,7 @@ public static string VersionJapanese {
/// </summary>
public static string VersionEnglish {
get {
return "2.1.2";
return "2.1.3";
}
}

Expand All @@ -54,7 +54,7 @@ public static string VersionEnglish {
/// </summary>
public static DateTime UpdateTime {
get {
return DateTimeHelper.CSVStringToTime( "2016/01/17 23:00:00" );
return DateTimeHelper.CSVStringToTime( "2016/01/31 23:00:00" );
}
}

Expand Down
5 changes: 5 additions & 0 deletions ElectronicObserver/Utility/SyncBGMPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ void SystemEvents_SystemShuttingDown() {
}


public void SetInitialVolume( int volume ) {
_mp.Volume = volume;
}



void PlayPort( string apiname, dynamic data ) {
_isBoss = false;
Expand Down
4 changes: 2 additions & 2 deletions ElectronicObserver/Window/Dialog/DialogAlbumMasterShip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public DialogAlbumMasterShip() {
TitleNightAttack.ImageIndex = (int)ResourceManager.EquipmentContent.Torpedo;

ParameterLevel.Value = ParameterLevel.Maximum = ExpTable.ShipMaximumLevel;


TableBattle.Visible = false;
BasePanelShipGirl.Visible = false;
Expand Down Expand Up @@ -353,7 +353,7 @@ private void UpdateAlbumPage( int shipID ) {
Speed.Text = Constants.GetSpeed( ship.Speed );
Range.Text = Constants.GetRange( ship.Range );
Rarity.Text = Constants.GetShipRarity( ship.Rarity );
Rarity.ImageIndex = (int)ResourceManager.IconContent.RarityRed + ship.Rarity; //checkme
Rarity.ImageIndex = (int)ResourceManager.IconContent.RarityRed + ship.Rarity;

TableParameterSub.ResumeLayout();

Expand Down
2 changes: 2 additions & 0 deletions ElectronicObserver/Window/Dialog/DialogConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ private void UpdateBGMPlayerUI() {
}

BGMPlayer_ControlGrid.Rows.AddRange( rows );

BGMPlayer_VolumeAll.Value = (int)BGMHandles.Values.Average( h => h.Volume );
}


Expand Down
13 changes: 13 additions & 0 deletions ElectronicObserver/Window/Dialog/DialogLocalAPILoader2.Designer.cs

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

15 changes: 15 additions & 0 deletions ElectronicObserver/Window/Dialog/DialogLocalAPILoader2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,19 @@ private void ButtonSearch_Click( object sender, EventArgs e ) {
}
}

private void ButtonSearchLastStart2_Click( object sender, EventArgs e ) {
for ( int i = APIView.Rows.Count - 1; i >= 0; i-- ) {
if ( APIView[APIView_FileName.Index, i].Value.ToString().ToLower().Contains( "s@api_start2." ) ) {
APIView.ClearSelection();
APIView.Rows[i].Selected = true;
APIView.FirstDisplayedScrollingRowIndex = i;
return;
}
}

//failed
System.Media.SystemSounds.Asterisk.Play();
}


private void TextFilter_KeyDown( object sender, KeyEventArgs e ) {
Expand All @@ -220,5 +233,7 @@ private void TextFilter_KeyDown( object sender, KeyEventArgs e ) {
}
}



}
}
Loading

0 comments on commit 4216b2f

Please sign in to comment.