public BattleInfo(ShipInfo shipInfo, ItemInfo itemInfo, AirBase airBase) { _shipInfo = shipInfo; _itemInfo = itemInfo; _airBase = airBase; AirBattleResult = new AirBattleResult(GetAirFireShipName, GetItemNames); }
private void CalcAirBaseAttackDamage(dynamic json) { var i = 1; foreach (var entry in json) { AirBattleResult.Add(entry, "基地" + i++); CalcKoukuDamage(entry); } }
public void InspectBattle(string url, string request, dynamic json) { SetFormation(json); SetSupportType(json); ClearDamagedShipWarning(); ShowResult(); // 昼戦の結果を夜戦のときに表示する SetupDamageRecord(request, json, url.Contains("practice")); SetFighterPower(); SetEnemyFighterPower(); BattleState = url.Contains("sp_midnight") ? BattleState.SpNight : url.Contains("midnight") ? BattleState.Night : BattleState.Day; if (BattleState != BattleState.Night) { AirBattleResult.Clear(); SetAirControlLevel(json); } CalcDamage(json); ResultRank = url.Contains("/ld_") ? CalcLdResultRank() : CalcResultRank(); SetResult(); }
private void InspectAirRaidBattle(int areaId, dynamic json) { SetFormation(json); var attack = json.api_air_base_attack; var stage1 = attack.api_stage1; AirControlLevel = (int)stage1.api_disp_seiku; var ships = (ShipStatus[])CreateShipsForAirBase(json); _friend = Record.Setup(ships, false); _guard = new Record[0]; FighterPower = _airBase.GetAirBase(areaId).CalcInterceptionFighterPower(); SetupEnemyDamageRecord(json, false); SetEnemyFighterPower(); BattleState = BattleState.AirRaid; AirBattleResult.Clear(); AirBattleResult.Add(json.api_air_base_attack, "空襲"); CalcKoukuDamage(json.api_air_base_attack); SetAirRaidResultRank(json); SetResult(); CleanupResult(); }
private void CalcDamage(dynamic json) { foreach (KeyValuePair <string, dynamic> kv in json) { if (kv.Value == null) { continue; } switch (kv.Key) { case "api_air_base_injection": AirBattleResult.Add(kv.Value, "AB噴式"); CalcKoukuDamage(kv.Value); break; case "api_injection_kouku": AirBattleResult.Add(kv.Value, "噴式"); CalcKoukuDamage(kv.Value); break; case "api_air_base_attack": CalcAirBaseAttackDamage(kv.Value); break; case "api_n_support_info": CalcSupportDamage(kv.Value); break; case "api_n_hougeki1": CalcDamageByTurn(kv.Value); break; case "api_n_hougeki2": CalcDamageByTurn(kv.Value); break; case "api_kouku": AirBattleResult.Add(kv.Value, "航空戦"); CalcKoukuDamage(kv.Value); break; case "api_kouku2": AirBattleResult.Add(kv.Value, "航空戦2"); CalcKoukuDamage(kv.Value); break; case "api_support_info": CalcSupportDamage(kv.Value); break; case "api_opening_taisen": CalcDamageByTurn(kv.Value); break; case "api_opening_atack": CalcDamageAtOnce(kv.Value); break; case "api_friendly_battle": CalcFriendAttackDamage(kv.Value); break; case "api_hougeki": CalcDamageByTurn(kv.Value); break; case "api_hougeki1": CalcDamageByTurn(kv.Value); break; case "api_hougeki2": CalcDamageByTurn(kv.Value); break; case "api_hougeki3": CalcDamageByTurn(kv.Value); break; case "api_raigeki": CalcDamageAtOnce(kv.Value); break; } } }