public override double Calc(Ship[] ships) { if (ships == null || ships.Length == 0) return 0; // http://wikiwiki.jp/kancolle/?%C6%EE%C0%BE%BD%F4%C5%E7%B3%A4%B0%E8#search-calc // > 2-5式では説明出来ない事象を解決するため膨大な検証報告数より導き出した新式。2014年11月に改良され精度があがった。 // > 索敵スコア // > = 艦上爆撃機 × (1.04) // > + 艦上攻撃機 × (1.37) // > + 艦上偵察機 × (1.66) // > + 水上偵察機 × (2.00) // > + 水上爆撃機 × (1.78) // > + 小型電探 × (1.00) // > + 大型電探 × (.99) // > + 探照灯 × (0.91) // > + √(各艦毎の素索敵) × (1.69) // > + (司令部レベルを5の倍数に切り上げ) × (-0.61) var itemScore = ships .SelectMany(x => x.EquippedItems) .Select(x => x.Item.Info) .GroupBy( x => x.Type, x => x.RawData.api_saku, (type, scores) => new { type, score = scores.Sum() }) .Aggregate(.0, (score, item) => score + GetScore(item.type, item.score)); var shipScore = ships .Select(x => x.ViewRange - x.EquippedItems.Sum(s => s.Item.Info.RawData.api_saku)) .Select(x => Math.Sqrt(x)) .Sum() * 1.69; var level = (((KanColleClient.Current.Homeport.Admiral.Level + 4) / 5) * 5); var admiralScore = level * -0.61; return itemScore + shipScore + admiralScore; }
public override double Calc(Ship[] ships) { if (ships == null || ships.Length == 0) return 0; // http://wikiwiki.jp/kancolle/?%C6%EE%C0%BE%BD%F4%C5%E7%B3%A4%B0%E8#area5 // [索敵装備と装備例] によって示されている計算式 // stype=7 が偵察機 (2 倍する索敵値)、stype=8 が電探 var spotter = ships.SelectMany( x => x.EquippedItems .Where(s => s.Item.Info.RawData.api_type.Get(1) == 7) .Where(s => s.Current > 0) .Select(s => s.Item.Info.RawData.api_saku) ).Sum(); var radar = ships.SelectMany( x => x.EquippedItems .Where(s => s.Item.Info.RawData.api_type.Get(1) == 8) .Select(s => s.Item.Info.RawData.api_saku) ).Sum(); return (spotter * 2) + radar + (int)Math.Sqrt(ships.Sum(x => x.ViewRange) - spotter - radar); }
public override double Calc(Ship[] ships) { if (ships == null || ships.Length == 0) return 0; // http://wikiwiki.jp/kancolle/?%C6%EE%C0%BE%BD%F4%C5%E7%B3%A4%B0%E8#area5 // 2-5 詳細2 var itemScore = ships .SelectMany(x => x.EquippedSlots) .Select(x => x.Item.Info) .GroupBy( x => x.Type, x => x.RawData.api_saku, (type, scores) => new { type, score = scores.Sum() }) .Aggregate(.0, (score, item) => score + GetScore(item.type, item.score)); var shipScore = ships .Select(x => x.ViewRange - x.EquippedSlots.Sum(s => s.Item.Info.RawData.api_saku)) .Select(x => Math.Sqrt(x)) .Sum(); //var level = (((KanColleClient.Current.Homeport.Admiral.Level + 4) / 5) * 5); var admiralScore = KanColleClient.Current.Homeport.Admiral.Level * -0.36; return itemScore + shipScore + admiralScore; }