private readonly ExMapInfo _exMapInfo = new ExMapInfo();\r
private readonly MiscTextInfo _miscTextInfo = new MiscTextInfo();\r
private readonly BaseAirCoprs _baseAirCoprs;\r
+ private readonly PresetDeck _presetDeck = new PresetDeck();\r
private readonly Status _status = new Status();\r
private bool _saveState;\r
private readonly List<IHaveState> _haveState;\r
_shipInfo = new ShipInfo(_itemInfo);\r
_conditionTimer = new ConditionTimer(_shipInfo);\r
_dockInfo = new DockInfo(_shipInfo, _materialInfo);\r
- _akashiTimer = new AkashiTimer(_shipInfo, _dockInfo);\r
+ _akashiTimer = new AkashiTimer(_shipInfo, _dockInfo, _presetDeck);\r
_battleInfo = new BattleInfo(_shipInfo, _itemInfo);\r
_logger = new Logger(_shipInfo, _itemInfo, _battleInfo);\r
_baseAirCoprs = new BaseAirCoprs(_itemInfo);\r
private Update ApiPort(dynamic data)\r
{\r
_itemInfo.InspectBasic(data.api_basic);\r
- _materialInfo.InspectMaterial(data.api_material, true);\r
+ _materialInfo.InspectMaterialPort(data.api_material);\r
_logger.InspectBasic(data.api_basic);\r
_logger.InspectMaterial(data.api_material);\r
_shipInfo.InspectShip(data);\r
_achievement.InspectBasic(data.api_basic);\r
if (data.api_parallel_quest_count()) // 昔のログにはないので\r
_questInfo.QuestCount = (int)data.api_parallel_quest_count;\r
+ if (data.api_event_object())\r
+ _baseAirCoprs.InspectEventObject(data.api_event_object);\r
+ if (data.api_plane_info())\r
+ _baseAirCoprs.InspectPlaneInfo(data.api_plane_info);\r
_battleInfo.CleanupResult();\r
- _battleInfo.InBattle = false;\r
+ _battleInfo.BattleState = BattleState.None;\r
_shipInfo.ClearEscapedShips();\r
_miscTextInfo.ClearIfNeeded();\r
SaveState();\r
// ここだけjsonなので注意\r
_shipInfo.InspectShip(json);\r
_akashiTimer.CheckFleet();\r
- _battleInfo.InBattle = false;\r
+ _battleInfo.BattleState = BattleState.None;\r
return Update.Item | Update.Ship | Update.Battle;\r
}\r
if (url.EndsWith("api_get_member/ship_deck"))\r
{\r
_shipInfo.InspectShip(data);\r
_akashiTimer.CheckFleet();\r
- _battleInfo.InBattle = false;\r
+ _battleInfo.BattleState = BattleState.None;\r
return Update.Ship | Update.Battle;\r
}\r
if (url.EndsWith("api_get_member/ship3"))\r
{\r
_exMapInfo.InspectMapInfo(data);\r
_miscTextInfo.InspectMapInfo(data);\r
+ if (data.api_air_base())\r
+ _baseAirCoprs.Inspect(data.api_air_base);\r
return Update.Item;\r
}\r
if (url.EndsWith("api_req_member/get_practice_enemyinfo"))\r
}\r
if (url.EndsWith("api_get_member/preset_deck"))\r
{\r
- _shipInfo.InspectPresetDeck(data);\r
+ _presetDeck.Inspect(data);\r
return Update.None;\r
}\r
if (url.EndsWith("api_get_member/base_air_corps"))\r
\r
private Update ApiBattle(string url, string request, dynamic data)\r
{\r
- if (IsNormalBattleAPI(url))\r
+ if (IsNormalBattleAPI(url) || IsCombinedBattleAPI(url))\r
{\r
_battleInfo.InspectBattle(data, url);\r
_logger.InspectBattle(data);\r
_battleInfo.InspectBattle(data, url);\r
return Update.Ship | Update.Battle | Update.Timer;\r
}\r
- if (url.EndsWith("api_req_sortie/battleresult"))\r
+ if (url.EndsWith("api_req_sortie/battleresult") || url.EndsWith("api_req_combined_battle/battleresult"))\r
{\r
+ _shipInfo.SaveBattleResult();\r
_battleInfo.InspectBattleResult(data);\r
_exMapInfo.InspectBattleResult(data);\r
_logger.InspectBattleResult(data);\r
_battleInfo.InspectPracticeResult(data);\r
return Update.Ship;\r
}\r
- if (IsCombinedBattleAPI(url))\r
- {\r
- _battleInfo.InspectCombinedBattle(data, url);\r
- _logger.InspectBattle(data);\r
- return Update.Ship | Update.Battle;\r
- }\r
- if (url.EndsWith("api_req_combined_battle/battleresult"))\r
- {\r
- _battleInfo.InspectCombinedBattleResult(data);\r
- _logger.InspectBattleResult(data);\r
- return Update.Ship;\r
- }\r
if (url.EndsWith("api_req_combined_battle/goback_port"))\r
{\r
_battleInfo.CauseCombinedBattleEscape();\r
return Update.Ship;\r
}\r
+ _battleInfo.BattleState = BattleState.Unknown;\r
return Update.None;\r
}\r
\r
url.EndsWith("api_req_combined_battle/ld_airbattle") ||\r
url.EndsWith("api_req_combined_battle/battle_water") ||\r
url.EndsWith("api_req_combined_battle/midnight_battle") ||\r
- url.EndsWith("api_req_combined_battle/sp_midnight");\r
+ url.EndsWith("api_req_combined_battle/sp_midnight") ||\r
+ url.EndsWith("api_req_combined_battle/ec_battle") ||\r
+ url.EndsWith("api_req_combined_battle/ec_midnight_battle") ||\r
+ url.EndsWith("api_req_combined_battle/ec_night_to_day") ||\r
+ url.EndsWith("api_req_combined_battle/each_battle") ||\r
+ url.EndsWith("api_req_combined_battle/each_battle_water");\r
}\r
\r
private Update ApiOthers(string url, string request, dynamic data)\r
}\r
if (url.EndsWith("api_req_hensei/preset_register"))\r
{\r
- _shipInfo.InspectPresetRegister(data);\r
+ _presetDeck.InspectRegister(data);\r
return Update.None;\r
}\r
if (url.EndsWith("api_req_hensei/preset_delete"))\r
{\r
- _shipInfo.InspectPresetDelete(request);\r
+ _presetDeck.InspectDelete(request);\r
return Update.Timer;\r
}\r
if (url.EndsWith("api_req_hensei/combined"))\r
{\r
_dockInfo.InspectSpeedChange(request);\r
_conditionTimer.CheckCond();\r
- return Update.NDock | Update.Timer | Update.Ship;\r
+ return Update.NDock | Update.Timer | Update.Item | Update.Ship;\r
}\r
if (url.EndsWith("api_req_map/start"))\r
{\r
_shipInfo.InspectMapStart(request); // 出撃中判定が必要なので_conditionTimerより前\r
_conditionTimer.InvalidateCond();\r
_exMapInfo.InspectMapStart(data);\r
+ _battleInfo.InspectMapStart(data);\r
_logger.InspectMapStart(data);\r
_miscTextInfo.ClearFlag = true;\r
return Update.Timer | Update.Ship;\r
{\r
_battleInfo.InspectMapNext(request);\r
_exMapInfo.InspectMapNext(data);\r
+ _battleInfo.InspectMapNext(data);\r
_logger.InspectMapNext(data);\r
return Update.None;\r
}\r
if (url.EndsWith("api_req_quest/clearitemget"))\r
{\r
_questInfo.InspectClearItemGet(request);\r
+ _logger.InspectClearItemGet(data);\r
return Update.QuestList;\r
}\r
if (url.EndsWith("api_req_air_corps/supply"))\r
{\r
_materialInfo.InspectAirCorpsSupply(data);\r
+ _baseAirCoprs.InspectSupply(request, data);\r
return Update.Item;\r
}\r
if (url.EndsWith("api_req_air_corps/set_plane"))\r
_baseAirCoprs.InspectSetAction(request);\r
return Update.Ship;\r
}\r
+ if (url.EndsWith("api_req_air_corps/expand_base"))\r
+ {\r
+ _baseAirCoprs.InspectExpandBase(request, data);\r
+ return Update.Ship;\r
+ }\r
return Update.None;\r
}\r
\r
\r
public int[] GetDeck(int fleet) => _shipInfo.GetDeck(fleet);\r
\r
+ public List<ShipInfo.ShipStatusPair> WrongBattleResult => _shipInfo.WrongBattleResult;\r
+\r
public int CombinedFleetType => _shipInfo.CombinedFleetType;\r
\r
public ChargeStatus[] ChargeStatuses => _shipInfo.ChargeStatuses;\r
\r
public double GetContactTriggerRate(int fleet) => _shipInfo.GetContactTriggerRate(fleet);\r
\r
- public double GetFleetLineOfSights(int fleet) => _shipInfo.GetLineOfSights(fleet);\r
+ public double GetFleetLineOfSights(int fleet, int factor) => _shipInfo.GetLineOfSights(fleet, factor);\r
\r
public ShipStatus[] RepairList => _shipInfo.GetRepairList(_dockInfo);\r
\r
\r
public string[] BadlyDamagedShips => _shipInfo.BadlyDamagedShips;\r
\r
+ public double GetDaihatsuBonus(int fleet) => _shipInfo.GetDaihatsuBonus(fleet);\r
+\r
+ public double GetTransportPoint(int fleet) => _shipInfo.GetTransportPoint(fleet);\r
+\r
public ItemStatus[] ItemList\r
{\r
get\r
{\r
_itemInfo.ClearHolder();\r
_shipInfo.SetItemHolder();\r
+ _baseAirCoprs.SetItemHolder();\r
return _itemInfo.ItemList;\r
}\r
}\r
\r
public string MiscText => _miscTextInfo.Text;\r
\r
- public BaseAirCoprs.AirCorpsInfo[] BaseAirCorps => _baseAirCoprs.AirCorps;\r
+ public BaseAirCoprs.BaseInfo[] BaseAirCorps => _baseAirCoprs.AllAirCorps;\r
+\r
+ public bool UseOldEnemyId\r
+ {\r
+ set => _shipInfo.UseOldEnemyId = value;\r
+ }\r
\r
public void SetLogWriter(Action<string, string, string> writer, Func<DateTime> nowFunc)\r
{\r
\r
public int MaterialLogInterval\r
{\r
- set { _logger.MaterialLogInterval = value; }\r
+ set => _logger.MaterialLogInterval = value;\r
}\r
\r
public string LogOutputDir\r
{\r
- set { _logger.OutputDir = value; }\r
+ set => _logger.OutputDir = value;\r
+ }\r
+\r
+ public void FlashLog()\r
+ {\r
+ _logger.FlashLog();\r
}\r
}\r
\r