protected virtual void battleSeiku(int merits, LostPlaneInfo lostFmt, bool enemyFlag) { if (lostFmt.Count > 0) { Dictionary <int, int[]> slotExperience; Dictionary <Mem_ship, List <FighterInfo> > dictionary; Func <double> func; if (enemyFlag) { slotExperience = E_Data.SlotExperience; dictionary = e_FighterInfo; func = (() => (double)randInstance.Next(11 - merits + 1) * 0.35 + (double)randInstance.Next(11 - merits + 1) * 0.65); } else { slotExperience = F_Data.SlotExperience; dictionary = f_FighterInfo; func = delegate { double max = (double)merits / 3.0; return(Utils.GetRandDouble(0.0, max, 0.1, 2) + (double)merits / 4.0); }; } foreach (KeyValuePair <Mem_ship, List <FighterInfo> > item in dictionary) { Mem_ship key = item.Key; foreach (FighterInfo item2 in item.Value) { int slotIdx = item2.SlotIdx; double num = func(); int num2 = (int)Math.Floor((double)key.Onslot[slotIdx] * num / 10.0); if (num2 > key.Onslot[slotIdx]) { num2 = key.Onslot[slotIdx]; } int[] value = null; if (slotExperience.TryGetValue(key.Slot[slotIdx], out value)) { int slotExpSubValueToSeiku = getSlotExpSubValueToSeiku(key.Onslot[slotIdx], num2, value[0]); value[1] += slotExpSubValueToSeiku; } List <int> onslot; List <int> list = onslot = key.Onslot; int index; int index2 = index = slotIdx; index = onslot[index]; list[index2] = index - num2; lostFmt.LostCount += num2; } } } }
protected override void battleSeiku(int merits, LostPlaneInfo lostFmt, bool enemyFlag) { base.battleSeiku(merits, lostFmt, enemyFlag); }
public AirBattle2() { F_LostInfo = new LostPlaneInfo(); E_LostInfo = new LostPlaneInfo(); }