public void NightBattle(sortie_battle api) { if (api.api_friendly_info != null) { var friend = api.api_friendly_info; FriendFleet = friend.api_ship_id .Select((x, i) => new ShipInBattle { Index = i + 1, ShipInfo = Staff.Current.MasterData.ShipInfo[x], Level = friend.api_ship_lv[i], Equipments = friend.api_Slot[i].Select(y => Staff.Current.MasterData.EquipInfo[y]).Where(y => y != null).Select(y => new EquipInBattle(y)).ToArray(), Firepower = friend.api_Param[i][0], Torpedo = friend.api_Param[i][1], AA = friend.api_Param[i][2], Armor = friend.api_Param[i][3] }).ToArray(); SetHPs(FriendFleet, friend.api_nowhps, friend.api_maxhps); var fleet1 = Fleet1; Fleet1 = FriendFleet; FriendNight = new NightCombat(this, api.api_friendly_battle, FriendFleet, AllEnemies.ToArray()); Fleet1 = fleet1; } if (api.api_active_deck != null) { Night = new NightCombat(this, api, NightOrTorpedo, api.api_active_deck[1] == 1 ? EnemyFleet : EnemyFleet2); } else { Night = new NightCombat(this, api, NightOrTorpedo, EnemyFleet); } EndApplyBattle(); }