Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
andanteyk committed May 5, 2017
2 parents cd892ae + c8b89c8 commit 589a238
Show file tree
Hide file tree
Showing 19 changed files with 898 additions and 507 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.
8 changes: 4 additions & 4 deletions ElectronicObserver/Data/Battle/Detail/BattleDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ public BattleDayDetail( BattleData bd, int attackerId, int defenderId, int[] dam
}

protected override int CaclulateAttackKind( int[] slots, int attackerShipID, int defenderShipID ) {
return Calculator.GetDayAttackKind( slots, attackerShipID, defenderShipID, false );
return (int)Calculator.GetDayAttackKind( slots, attackerShipID, defenderShipID, false );
}

protected override string GetAttackKind() {
return Constants.GetDayAttackKind( AttackType );
return Constants.GetDayAttackKind( (DayAttackKind)AttackType );
}
}

Expand Down Expand Up @@ -230,11 +230,11 @@ public BattleNightDetail( BattleData bd, int attackerId, int defenderId, int[] d
}

protected override int CaclulateAttackKind( int[] slots, int attackerShipID, int defenderShipID ) {
return Calculator.GetNightAttackKind( slots, attackerShipID, defenderShipID, false );
return (int)Calculator.GetNightAttackKind( slots, attackerShipID, defenderShipID, false );
}

protected override string GetAttackKind() {
return Constants.GetNightAttackKind( AttackType );
return Constants.GetNightAttackKind( (NightAttackKind)AttackType );
}
}

Expand Down
75 changes: 42 additions & 33 deletions ElectronicObserver/Data/Constants.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using ElectronicObserver.Utility.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down Expand Up @@ -522,36 +523,40 @@ public static string GetAirSuperiority( int id ) {
/// <summary>
/// 昼戦攻撃種別を表す文字列を取得します。
/// </summary>
public static string GetDayAttackKind( int id ) {
public static string GetDayAttackKind( DayAttackKind id ) {
switch ( id ) {
case 0:
case DayAttackKind.Shelling:
return "砲撃";
case 1:
case DayAttackKind.Laser:
return "レーザー攻撃";
case 2:
case DayAttackKind.DoubleShelling:
return "連続射撃";
case 3:
case DayAttackKind.CutinMainSub:
return "カットイン(主砲/副砲)";
case 4:
case DayAttackKind.CutinMainLadar:
return "カットイン(主砲/電探)";
case 5:
case DayAttackKind.CutinMainAP:
return "カットイン(主砲/徹甲)";
case 6:
case DayAttackKind.CutinMainMain:
return "カットイン(主砲/主砲)";
case 7:
case DayAttackKind.AirAttack:
return "空撃";
case 8:
case DayAttackKind.DepthCharge:
return "爆雷攻撃";
case 9:
case DayAttackKind.Torpedo:
return "雷撃";
case 10:
case DayAttackKind.Rocket:
return "ロケット砲撃";
case 11:
case DayAttackKind.LandingDaihatsu:
return "揚陸攻撃(大発動艇)";
case DayAttackKind.LandingTokuDaihatsu:
return "揚陸攻撃(特大発動艇)";
case DayAttackKind.LandingDaihatsuTank:
return "揚陸攻撃(大発戦車)";
case 12:
case DayAttackKind.LandingAmphibious:
return "揚陸攻撃(内火艇)";
case 13:
return "揚陸攻撃(特大発)";
case DayAttackKind.LandingTokuDaihatsuTank:
return "揚陸攻撃(特大発戦車)";
default:
return "不明";
}
Expand All @@ -561,36 +566,40 @@ public static string GetDayAttackKind( int id ) {
/// <summary>
/// 夜戦攻撃種別を表す文字列を取得します。
/// </summary>
public static string GetNightAttackKind( int id ) {
public static string GetNightAttackKind( NightAttackKind id ) {
switch ( id ) {
case 0:
case NightAttackKind.Shelling:
return "砲撃";
case 1:
case NightAttackKind.DoubleShelling:
return "連続射撃";
case 2:
case NightAttackKind.CutinMainTorpedo:
return "カットイン(主砲/魚雷)";
case 3:
case NightAttackKind.CutinTorpedoTorpedo:
return "カットイン(魚雷x2)";
case 4:
case NightAttackKind.CutinMainSub:
return "カットイン(主砲x2/副砲)";
case 5:
case NightAttackKind.CutinMainMain:
return "カットイン(主砲x3)";
case 6:
case NightAttackKind.Reserved:
return "不明";
case 7:
case NightAttackKind.AirAttack:
return "空撃";
case 8:
case NightAttackKind.DepthCharge:
return "爆雷攻撃";
case 9:
case NightAttackKind.Torpedo:
return "雷撃";
case 10:
case NightAttackKind.Rocket:
return "ロケット砲撃";
case 11:
case NightAttackKind.LandingDaihatsu:
return "揚陸攻撃(大発動艇)";
case NightAttackKind.LandingTokuDaihatsu:
return "揚陸攻撃(特大発動艇)";
case NightAttackKind.LandingDaihatsuTank:
return "揚陸攻撃(大発戦車)";
case 12:
case NightAttackKind.LandingAmphibious:
return "揚陸攻撃(内火艇)";
case 13:
return "揚陸攻撃(特大発)";
case NightAttackKind.LandingTokuDaihatsuTank:
return "揚陸攻撃(特大発戦車)";
default:
return "不明";
}
Expand Down
25 changes: 12 additions & 13 deletions ElectronicObserver/Data/ShipData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,17 +1126,17 @@ private int CalculateShellingPower( int engagementForm = 1 ) {

//弾着
switch ( Calculator.GetDayAttackKind( AllSlotMaster.ToArray(), ShipID, -1 ) ) {
case 2: //連撃
case 4: //主砲/電探
case DayAttackKind.DoubleShelling:
case DayAttackKind.CutinMainLadar:
basepower *= 1.2;
break;
case 3: //主砲/副砲
case DayAttackKind.CutinMainSub:
basepower *= 1.1;
break;
case 5: //主砲/徹甲弾
case DayAttackKind.CutinMainAP:
basepower *= 1.3;
break;
case 6: //主砲/主砲
case DayAttackKind.CutinMainMain:
basepower *= 1.5;
break;
}
Expand All @@ -1149,7 +1149,7 @@ private int CalculateShellingPower( int engagementForm = 1 ) {
/// </summary>
/// <param name="engagementForm">交戦形態。既定値は 1 (同航戦) です。</param>
private int CalculateAircraftPower( int engagementForm = 1 ) {
if ( Calculator.GetDayAttackKind( AllSlotMaster.ToArray(), ShipID, -1, false ) != 7 )
if ( Calculator.GetDayAttackKind( AllSlotMaster.ToArray(), ShipID, -1, false ) != DayAttackKind.AirAttack )
return 0; //空撃以外は除外

double basepower = Math.Floor( ( FirepowerTotal + TorpedoTotal + Math.Floor( BomberTotal * 1.3 ) + GetAircraftEquipmentLevelBonus() + GetCombinedFleetShellingDamageBonus() ) * 1.5 ) + 55;
Expand Down Expand Up @@ -1190,7 +1190,7 @@ private int CalculateAntiSubmarinePower( int engagementForm = 1 ) {
}

double basepower = Math.Sqrt( ASWBase ) * 2 + eqpower * 1.5 + GetAntiSubmarineEquipmentLevelBonus();
if ( Calculator.GetDayAttackKind( AllSlotMaster.ToArray(), ShipID, 126, false ) == 7 ) { //126=伊168; 対潜攻撃が空撃なら
if ( Calculator.GetDayAttackKind( AllSlotMaster.ToArray(), ShipID, 126, false ) == DayAttackKind.AirAttack ) { //126=伊168; 対潜攻撃が空撃なら
basepower += 8;
} else { //爆雷攻撃なら
basepower += 13;
Expand Down Expand Up @@ -1238,14 +1238,13 @@ private int CalculateNightBattlePower() {
basepower *= GetHPDamageBonus();

switch ( Calculator.GetNightAttackKind( AllSlotMaster.ToArray(), ShipID, -1 ) ) {
case 1: //連撃
case NightAttackKind.DoubleShelling:
basepower *= 1.2;
break;
case 2: //主砲/魚雷
case NightAttackKind.CutinMainTorpedo:
basepower *= 1.3;
break;
case 3: //魚雷x2
{
case NightAttackKind.CutinTorpedoTorpedo: {
switch ( Calculator.GetNightTorpedoCutinKind( AllSlotMaster.ToArray(), ShipID, -1 ) ) {
case 1:
basepower *= 1.75;
Expand All @@ -1258,10 +1257,10 @@ private int CalculateNightBattlePower() {
break;
}
} break;
case 4: //主砲x2/副砲
case NightAttackKind.CutinMainSub:
basepower *= 1.75;
break;
case 5: //主砲x3
case NightAttackKind.CutinMainMain:
basepower *= 2.0;
break;
}
Expand Down
8 changes: 8 additions & 0 deletions ElectronicObserver/Data/ShipDataMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,14 @@ public string ShipTypeName {
}


/// <summary>
/// 潜水艦系か
/// </summary>
public bool IsSubmarine {
get { return ShipType == 13 || ShipType == 14; }
}


/// <summary>
/// 自身のパラメータレコードを取得します。
/// </summary>
Expand Down
5 changes: 4 additions & 1 deletion ElectronicObserver/Other/Information/apilist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ api_start2 :艦娘・装備固有データその他
41=輸送機材
42=潜水艦装備
43=水上戦闘機
44=陸軍戦闘機

[4]: 航空機カテゴリ
0=非航空機
Expand All @@ -421,6 +422,8 @@ api_start2 :艦娘・装備固有データその他
23=橘花改
24=試作機
25=伊水上機
26=強風改
27=一式戦

api_taik :耐久(0)
api_souk :装甲
Expand Down Expand Up @@ -1378,7 +1381,7 @@ api_req_map/next :進撃
10=長距離空襲戦
api_event_kind :イベント種別 
0=非戦闘セル, 1=通常戦闘, 2=夜戦, 3=夜昼戦, 4=航空戦, 5=敵連合艦隊戦, 6=長距離空襲戦
api_event_id=6(気のせいだった)時は 0="気のせいだった。", 1="敵影を見ず。", 2=能動分岐, 3="穏やかな海です。"
api_event_id=6(気のせいだった)時は 0="気のせいだった。", 1="敵影を見ず。", 2=能動分岐, 3="穏やかな海です。", 4="穏やかな海峡です。", 5="警戒が必要です。"
api_event_id=7(航空戦)時は 0=航空偵察, 4=航空戦
api_next :次のマスでのルート分岐の本数 0=行き止まり
api_bosscell_no :ボスセルID
Expand Down
Loading

0 comments on commit 589a238

Please sign in to comment.