private void getPracticeUpInfo_To_Sougou(PracticeDeckResultFmt fmt) { int level = this.mem_ship.get_Item(0).Level; double num = Math.Sqrt((double)this.mem_ship.get_Item(0).Level); bool flag = Mst_DataManager.Instance.Mst_stype.get_Item(this.mem_ship.get_Item(0).Stype).IsTrainingShip(); double num2 = 30.0 + Utils.GetRandDouble(0.0, 10.0, 1.0, 1) + num; fmt.PracticeResult.GetMemberExp = (int)num2; int num3 = (!flag) ? 0 : 1; fmt.PracticeResult.GetShipExp = new Dictionary <int, int>(); fmt.PowerUpData = new Dictionary <int, PowUpInfo>(); Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship; double difficultShipExpKeisu = this.getDifficultShipExpKeisu(); double shipExpCommonKeisu = this.getShipExpCommonKeisu(); using (List <Mem_ship> .Enumerator enumerator = this.mem_ship.GetEnumerator()) { while (enumerator.MoveNext()) { Mem_ship current = enumerator.get_Current(); fmt.PracticeResult.GetShipExp.Add(current.Rid, 0); fmt.PowerUpData.Add(current.Rid, default(PowUpInfo)); Mst_ship mst_ship2 = mst_ship.get_Item(current.Ship_id); double num4 = Math.Sqrt((double)current.Level); double num5 = 40.0 + Utils.GetRandDouble(0.0, 10.0, 1.0, 1) + (double)(num3 * 10) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num4; num5 = num5 * difficultShipExpKeisu * shipExpCommonKeisu; fmt.PracticeResult.GetShipExp.set_Item(current.Rid, (int)num5); Ship_GrowValues battleBaseParam = current.GetBattleBaseParam(); PowUpInfo powUpInfo = default(PowUpInfo); double max = 1.0 + (num + num4) / 20.0; powUpInfo.Karyoku = (int)Utils.GetRandDouble(0.0, max, 1.0, 1); if (battleBaseParam.Houg + powUpInfo.Karyoku > mst_ship2.Houg_max) { int num6 = mst_ship2.Houg_max - mst_ship2.Houg; powUpInfo.Karyoku = num6 - current.Kyouka.get_Item(Mem_ship.enumKyoukaIdx.Houg); } double max2 = 0.7 + (num + num4) / 20.0; powUpInfo.Lucky = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1); if (battleBaseParam.Luck + powUpInfo.Lucky > mst_ship2.Luck_max) { int num7 = mst_ship2.Luck_max - mst_ship2.Luck; powUpInfo.Lucky = num7 - current.Kyouka.get_Item(Mem_ship.enumKyoukaIdx.Luck); } fmt.PowerUpData.set_Item(current.Rid, powUpInfo); } } }
private void getPracticeUpInfo_To_Sougou(PracticeDeckResultFmt fmt) { int level = mem_ship[0].Level; double num = Math.Sqrt(mem_ship[0].Level); bool flag = Mst_DataManager.Instance.Mst_stype[mem_ship[0].Stype].IsTrainingShip(); double num2 = 30.0 + Utils.GetRandDouble(0.0, 10.0, 1.0, 1) + num; fmt.PracticeResult.GetMemberExp = (int)num2; int num3 = flag ? 1 : 0; fmt.PracticeResult.GetShipExp = new Dictionary <int, int>(); fmt.PowerUpData = new Dictionary <int, PowUpInfo>(); Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship; double difficultShipExpKeisu = getDifficultShipExpKeisu(); double shipExpCommonKeisu = getShipExpCommonKeisu(); foreach (Mem_ship item in mem_ship) { fmt.PracticeResult.GetShipExp.Add(item.Rid, 0); fmt.PowerUpData.Add(item.Rid, default(PowUpInfo)); Mst_ship mst_ship2 = mst_ship[item.Ship_id]; double num4 = Math.Sqrt(item.Level); double num5 = 40.0 + Utils.GetRandDouble(0.0, 10.0, 1.0, 1) + (double)(num3 * 10) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num4; num5 = num5 * difficultShipExpKeisu * shipExpCommonKeisu; fmt.PracticeResult.GetShipExp[item.Rid] = (int)num5; Ship_GrowValues battleBaseParam = item.GetBattleBaseParam(); PowUpInfo value = default(PowUpInfo); double max = 1.0 + (num + num4) / 20.0; value.Karyoku = (int)Utils.GetRandDouble(0.0, max, 1.0, 1); if (battleBaseParam.Houg + value.Karyoku > mst_ship2.Houg_max) { int num6 = mst_ship2.Houg_max - mst_ship2.Houg; value.Karyoku = num6 - item.Kyouka[Mem_ship.enumKyoukaIdx.Houg]; } double max2 = 0.7 + (num + num4) / 20.0; value.Lucky = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1); if (battleBaseParam.Luck + value.Lucky > mst_ship2.Luck_max) { int num7 = mst_ship2.Luck_max - mst_ship2.Luck; value.Lucky = num7 - item.Kyouka[Mem_ship.enumKyoukaIdx.Luck]; } fmt.PowerUpData[item.Rid] = value; } }
private void getPracticeUpInfo_To_Taisen(PracticeDeckResultFmt fmt) { int level = this.mem_ship.get_Item(0).Level; double num = Math.Sqrt((double)this.mem_ship.get_Item(0).Level); bool flag = Mst_DataManager.Instance.Mst_stype.get_Item(this.mem_ship.get_Item(0).Stype).IsTrainingShip(); fmt.PracticeResult.GetMemberExp = 0; int num2 = (!flag) ? 0 : 1; fmt.PracticeResult.GetShipExp = new Dictionary <int, int>(); fmt.PowerUpData = new Dictionary <int, PowUpInfo>(); double difficultShipExpKeisu = this.getDifficultShipExpKeisu(); double shipExpCommonKeisu = this.getShipExpCommonKeisu(); Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship; using (List <Mem_ship> .Enumerator enumerator = this.mem_ship.GetEnumerator()) { while (enumerator.MoveNext()) { Mem_ship current = enumerator.get_Current(); fmt.PracticeResult.GetShipExp.Add(current.Rid, 0); fmt.PowerUpData.Add(current.Rid, default(PowUpInfo)); Mst_ship mst_ship2 = mst_ship.get_Item(current.Ship_id); if (mst_ship2.Tais != 0) { double num3 = Math.Sqrt((double)current.Level); double max = (double)(12 + num2 * 6); double num4 = 7.0 + Utils.GetRandDouble(0.0, max, 1.0, 1) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num / 2.0 + num3; num4 = num4 * difficultShipExpKeisu * shipExpCommonKeisu; fmt.PracticeResult.GetShipExp.set_Item(current.Rid, (int)num4); PowUpInfo powUpInfo = default(PowUpInfo); double max2 = 1.4 + (double)num2 * 0.3 + (num + num3) / 20.0; powUpInfo.Taisen = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1); Ship_GrowValues battleBaseParam = current.GetBattleBaseParam(); if (battleBaseParam.Taisen + powUpInfo.Taisen > mst_ship2.Tais_max) { int num5 = mst_ship2.Tais_max - mst_ship2.Tais; powUpInfo.Taisen = num5 - current.Kyouka.get_Item(Mem_ship.enumKyoukaIdx.Taisen); } fmt.PowerUpData.set_Item(current.Rid, powUpInfo); } } } }
private double getShipTaikuPow(Mem_ship shipData, List <Mst_slotitem> mst_slotData, List <int> slotLevels) { double num; if (shipData.IsEnemy()) { num = Math.Sqrt(shipData.Taiku); } else { Ship_GrowValues battleBaseParam = shipData.GetBattleBaseParam(); num = (double)battleBaseParam.Taiku * 0.5; } double num2 = 0.0; double num3 = 0.0; for (int i = 0; i < mst_slotData.Count; i++) { Mst_slotitem mst_slotitem = mst_slotData[i]; if (mst_slotitem.Tyku > 0) { int slotLevel = slotLevels[i]; if (mst_slotitem.Type4 == 16 || mst_slotitem.Type4 == 30) { double a1Plus = getA1Plus(1, mst_slotitem.Tyku, slotLevel); num3 += a1Plus; num2 += (double)mst_slotitem.Tyku * 2.0; } else if (mst_slotitem.Type4 == 15) { double a1Plus2 = getA1Plus(2, mst_slotitem.Tyku, slotLevel); num3 += a1Plus2; num2 += (double)mst_slotitem.Tyku * 3.0; } else if (mst_slotitem.Type4 == 11) { num2 += (double)mst_slotitem.Tyku * 1.5; } } } return(num + num2 + num3); }
private void getPracticeUpInfo_To_Taisen(PracticeDeckResultFmt fmt) { int level = mem_ship[0].Level; double num = Math.Sqrt(mem_ship[0].Level); bool flag = Mst_DataManager.Instance.Mst_stype[mem_ship[0].Stype].IsTrainingShip(); fmt.PracticeResult.GetMemberExp = 0; int num2 = flag ? 1 : 0; fmt.PracticeResult.GetShipExp = new Dictionary <int, int>(); fmt.PowerUpData = new Dictionary <int, PowUpInfo>(); double difficultShipExpKeisu = getDifficultShipExpKeisu(); double shipExpCommonKeisu = getShipExpCommonKeisu(); Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship; foreach (Mem_ship item in mem_ship) { fmt.PracticeResult.GetShipExp.Add(item.Rid, 0); fmt.PowerUpData.Add(item.Rid, default(PowUpInfo)); Mst_ship mst_ship2 = mst_ship[item.Ship_id]; if (mst_ship2.Tais != 0) { double num3 = Math.Sqrt(item.Level); double max = 12 + num2 * 6; double num4 = 7.0 + Utils.GetRandDouble(0.0, max, 1.0, 1) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num / 2.0 + num3; num4 = num4 * difficultShipExpKeisu * shipExpCommonKeisu; fmt.PracticeResult.GetShipExp[item.Rid] = (int)num4; PowUpInfo value = default(PowUpInfo); double max2 = 1.4 + (double)num2 * 0.3 + (num + num3) / 20.0; value.Taisen = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1); Ship_GrowValues battleBaseParam = item.GetBattleBaseParam(); if (battleBaseParam.Taisen + value.Taisen > mst_ship2.Tais_max) { int num5 = mst_ship2.Tais_max - mst_ship2.Tais; value.Taisen = num5 - item.Kyouka[Mem_ship.enumKyoukaIdx.Taisen]; } fmt.PowerUpData[item.Rid] = value; } } }
public BattleShipFmt(Mem_ship ship) { Id = ship.Rid; ShipId = ship.Ship_id; Level = ship.Level; NowHp = ship.Nowhp; MaxHp = ship.Maxhp; BattleParam = ship.GetBattleBaseParam().Copy(); EscapeFlag = ship.Escape_sts; Slot = new List <int>(); if (!ship.IsEnemy()) { ship.Slot.ForEach(delegate(int x) { int item = -1; if (Comm_UserDatas.Instance.User_slot.ContainsKey(x)) { item = Comm_UserDatas.Instance.User_slot[x].Slotitem_id; } Slot.Add(item); }); } else { ship.Slot.ForEach(delegate(int x) { Slot.Add(x); }); } Mst_slotitem mstSlotItemToExSlot = ship.GetMstSlotItemToExSlot(); if (mstSlotItemToExSlot != null) { ExSlot = mstSlotItemToExSlot.Id; } }
public BattleShipFmt(Mem_ship ship) { this.Id = ship.Rid; this.ShipId = ship.Ship_id; this.Level = ship.Level; this.NowHp = ship.Nowhp; this.MaxHp = ship.Maxhp; this.BattleParam = ship.GetBattleBaseParam().Copy(); this.EscapeFlag = ship.Escape_sts; this.Slot = new List <int>(); if (!ship.IsEnemy()) { ship.Slot.ForEach(delegate(int x) { int num = -1; if (Comm_UserDatas.Instance.User_slot.ContainsKey(x)) { num = Comm_UserDatas.Instance.User_slot.get_Item(x).Slotitem_id; } this.Slot.Add(num); }); } else { ship.Slot.ForEach(delegate(int x) { this.Slot.Add(x); }); } Mst_slotitem mstSlotItemToExSlot = ship.GetMstSlotItemToExSlot(); if (mstSlotItemToExSlot != null) { this.ExSlot = mstSlotItemToExSlot.Id; } }
private void getPracticeUpInfo_To_Kouku(PracticeDeckResultFmt fmt) { int level = mem_ship[0].Level; double num = Math.Sqrt(mem_ship[0].Level); bool flag = Mst_DataManager.Instance.Mst_stype[mem_ship[0].Stype].IsTrainingShip(); fmt.PracticeResult.GetMemberExp = 0; int num2 = flag ? 1 : 0; fmt.PracticeResult.GetShipExp = new Dictionary <int, int>(); fmt.PowerUpData = new Dictionary <int, PowUpInfo>(); double difficultShipExpKeisu = getDifficultShipExpKeisu(); double shipExpCommonKeisu = getShipExpCommonKeisu(); Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship; foreach (Mem_ship item in mem_ship) { fmt.PracticeResult.GetShipExp.Add(item.Rid, 0); fmt.PowerUpData.Add(item.Rid, default(PowUpInfo)); Mst_ship mst_ship2 = mst_ship[item.Ship_id]; if (mst_ship2.Stype != 13) { if (mst_ship2.Stype == 14) { List <Mst_slotitem> mstSlotItems = item.GetMstSlotItems(); bool flag2 = false; for (int i = 0; i < mstSlotItems.Count; i++) { SlotitemCategory slotitem_type = Mst_DataManager.Instance.Mst_equip_category[mstSlotItems[i].Type3].Slotitem_type; if (slotitem_type == SlotitemCategory.Kanjouki || slotitem_type == SlotitemCategory.Suijouki) { flag2 = true; break; } } if (!flag2) { continue; } } double num3 = Math.Sqrt(item.Level); double max = 14 + num2 * 7; double num4 = 10.0 + Utils.GetRandDouble(0.0, max, 1.0, 1) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num / 2.0 + num3; num4 = num4 * difficultShipExpKeisu * shipExpCommonKeisu; fmt.PracticeResult.GetShipExp[item.Rid] = (int)num4; Ship_GrowValues battleBaseParam = item.GetBattleBaseParam(); PowUpInfo value = default(PowUpInfo); double max2 = 1.5 + (double)num2 * 0.2 + (num + num3) / 20.0; value.Taiku = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1); if (battleBaseParam.Taiku + value.Taiku > mst_ship2.Tyku_max) { int num5 = mst_ship2.Tyku_max - mst_ship2.Tyku; value.Taiku = num5 - item.Kyouka[Mem_ship.enumKyoukaIdx.Tyku]; } if (motherBGroup.Contains(item.Stype)) { double max3 = 1.2 + (num + num3) / 20.0; value.Karyoku = (int)Utils.GetRandDouble(0.0, max3, 1.0, 1); if (battleBaseParam.Houg + value.Karyoku > mst_ship2.Houg_max) { int num6 = mst_ship2.Houg_max - mst_ship2.Houg; value.Karyoku = num6 - item.Kyouka[Mem_ship.enumKyoukaIdx.Houg]; } } fmt.PowerUpData[item.Rid] = value; } } }
private List <RadingDamageData> getRadingDamage(int area, RadingKind kind, Mst_radingrate rateRecord, List <Mem_ship> targetShips, out int deckPow, out List <Mem_ship> deleteShips) { List <Mem_ship> list = Enumerable.ToList <Mem_ship>(targetShips); int ec = 0; double ad1 = 0.0; double ad2 = 0.0; list.ForEach(delegate(Mem_ship ship) { if (ship.IsEscortDeffender()) { ec++; } Ship_GrowValues battleBaseParam = ship.GetBattleBaseParam(); int num11 = ship.Taiku - battleBaseParam.Taiku; ad1 = ad1 + Math.Sqrt((double)battleBaseParam.Taiku) + (double)num11; int num12 = ship.Taisen - battleBaseParam.Taisen; ad2 = ad2 + Math.Sqrt((double)battleBaseParam.Taisen) + (double)num12; }); int[] radingValues = rateRecord.GetRadingValues(kind); double num = (kind != RadingKind.AIR_ATTACK) ? ad2 : ad1; int num2 = radingValues[0]; int num3 = radingValues[1]; deckPow = (int)num; deleteShips = new List <Mem_ship>(); if (list.get_Count() == 0) { return(new List <RadingDamageData>()); } RadingResultData radingResultData = new RadingResultData(); radingResultData.DeckAttackPow = (int)num; double num4 = (double)num3 - Math.Sqrt((double)ec); int num5 = (num4 >= 1.0) ? ((int)Utils.GetRandDouble(0.0, num4, 0.1, 1)) : 0; List <RadingDamageData> list2 = new List <RadingDamageData>(); Dictionary <int, DamageState> dictionary = Enumerable.ToDictionary(Enumerable.Select(list, (Mem_ship x) => new { rid = x.Rid, state = x.Get_DamageState() }), key => key.rid, val => val.state); for (int i = 0; i < num5; i++) { if (list.get_Count() == 0) { return(list2); } RadingDamageData radingDamageData = new RadingDamageData(); double num6 = (double)(num3 * 5) - num / 5.0 - Math.Sqrt(num); int num7 = (int)Utils.GetRandDouble(0.0, (double)(list.get_Count() - 1), 1.0, 1); Mem_ship mem_ship = list.get_Item(num7); radingDamageData.Rid = mem_ship.Rid; if (num6 <= 0.0) { radingDamageData.Damage = false; radingDamageData.DamageState = DamagedStates.None; } else { int taik = Mst_DataManager.Instance.Mst_ship.get_Item(mem_ship.Ship_id).Taik; int num8 = (int)((double)taik * Utils.GetRandDouble(1.0, num6, 1.0, 1) / 100.0) + 1; int num9 = mem_ship.Nowhp - num8; if (num9 <= 0) { if (this.basicInstance.Difficult != DifficultKind.SHI) { num9 = 1; } else if (dictionary.get_Item(mem_ship.Rid) != DamageState.Taiha) { num9 = 1; } else { num9 = 0; } } int num10 = mem_ship.Nowhp - num9; if (num10 > 0) { DamageState damageState = mem_ship.Get_DamageState(); radingDamageData.Damage = true; if (num9 == 0) { int[] array = mem_ship.FindRecoveryItem(); if (array[0] == -1) { radingDamageData.DamageState = DamagedStates.Gekichin; list.Remove(mem_ship); deleteShips.Add(mem_ship); } else { mem_ship.SubHp(num10); mem_ship.UseRecoveryItem(array, false); radingDamageData.DamageState = ((array[1] != 43) ? DamagedStates.Youin : DamagedStates.Megami); dictionary.set_Item(mem_ship.Rid, DamageState.Normal); } } else { mem_ship.SubHp(num10); DamageState damageState2 = mem_ship.Get_DamageState(); if (damageState != damageState2) { if (damageState2 == DamageState.Taiha) { radingDamageData.DamageState = DamagedStates.Taiha; } else if (damageState2 == DamageState.Shouha) { radingDamageData.DamageState = DamagedStates.Shouha; } else if (damageState2 == DamageState.Tyuuha) { radingDamageData.DamageState = DamagedStates.Tyuuha; } } else { radingDamageData.DamageState = DamagedStates.None; } } } else { radingDamageData.Damage = false; radingDamageData.DamageState = DamagedStates.None; } } list2.Add(radingDamageData); } return(list2); }
private List <RadingDamageData> getRadingDamage(int area, RadingKind kind, Mst_radingrate rateRecord, List <Mem_ship> targetShips, out int deckPow, out List <Mem_ship> deleteShips) { List <Mem_ship> list = targetShips.ToList(); int ec = 0; double ad3 = 0.0; double ad2 = 0.0; list.ForEach(delegate(Mem_ship ship) { if (ship.IsEscortDeffender()) { ec++; } Ship_GrowValues battleBaseParam = ship.GetBattleBaseParam(); int num9 = ship.Taiku - battleBaseParam.Taiku; ad3 = ad3 + Math.Sqrt(battleBaseParam.Taiku) + (double)num9; int num10 = ship.Taisen - battleBaseParam.Taisen; ad2 = ad2 + Math.Sqrt(battleBaseParam.Taisen) + (double)num10; }); int[] radingValues = rateRecord.GetRadingValues(kind); double num = (kind != RadingKind.AIR_ATTACK) ? ad2 : ad3; int num11 = radingValues[0]; int num2 = radingValues[1]; deckPow = (int)num; deleteShips = new List <Mem_ship>(); if (list.Count == 0) { return(new List <RadingDamageData>()); } RadingResultData radingResultData = new RadingResultData(); radingResultData.DeckAttackPow = (int)num; double num3 = (double)num2 - Math.Sqrt(ec); int num4 = (!(num3 < 1.0)) ? ((int)Utils.GetRandDouble(0.0, num3, 0.1, 1)) : 0; List <RadingDamageData> list2 = new List <RadingDamageData>(); Dictionary <int, DamageState> dictionary = (from x in list select new { rid = x.Rid, state = x.Get_DamageState() }).ToDictionary(key => key.rid, val => val.state); for (int i = 0; i < num4; i++) { if (list.Count == 0) { return(list2); } RadingDamageData radingDamageData = new RadingDamageData(); double num5 = (double)(num2 * 5) - num / 5.0 - Math.Sqrt(num); int index = (int)Utils.GetRandDouble(0.0, list.Count - 1, 1.0, 1); Mem_ship mem_ship = list[index]; radingDamageData.Rid = mem_ship.Rid; if (num5 <= 0.0) { radingDamageData.Damage = false; radingDamageData.DamageState = DamagedStates.None; } else { int taik = Mst_DataManager.Instance.Mst_ship[mem_ship.Ship_id].Taik; int num6 = (int)((double)taik * Utils.GetRandDouble(1.0, num5, 1.0, 1) / 100.0) + 1; int num7 = mem_ship.Nowhp - num6; if (num7 <= 0) { num7 = ((basicInstance.Difficult != DifficultKind.SHI) ? 1 : ((dictionary[mem_ship.Rid] != DamageState.Taiha) ? 1 : 0)); } int num8 = mem_ship.Nowhp - num7; if (num8 > 0) { DamageState damageState = mem_ship.Get_DamageState(); radingDamageData.Damage = true; if (num7 == 0) { int[] array = mem_ship.FindRecoveryItem(); if (array[0] == -1) { radingDamageData.DamageState = DamagedStates.Gekichin; list.Remove(mem_ship); deleteShips.Add(mem_ship); } else { mem_ship.SubHp(num8); mem_ship.UseRecoveryItem(array, flagShipRecovery: false); radingDamageData.DamageState = ((array[1] != 43) ? DamagedStates.Youin : DamagedStates.Megami); dictionary[mem_ship.Rid] = DamageState.Normal; } } else { mem_ship.SubHp(num8); DamageState damageState2 = mem_ship.Get_DamageState(); if (damageState != damageState2) { switch (damageState2) { case DamageState.Taiha: radingDamageData.DamageState = DamagedStates.Taiha; break; case DamageState.Shouha: radingDamageData.DamageState = DamagedStates.Shouha; break; case DamageState.Tyuuha: radingDamageData.DamageState = DamagedStates.Tyuuha; break; } } else { radingDamageData.DamageState = DamagedStates.None; } } } else { radingDamageData.Damage = false; radingDamageData.DamageState = DamagedStates.None; } } list2.Add(radingDamageData); } return(list2); }
private void getPracticeUpInfo_To_Kouku(PracticeDeckResultFmt fmt) { int level = this.mem_ship.get_Item(0).Level; double num = Math.Sqrt((double)this.mem_ship.get_Item(0).Level); bool flag = Mst_DataManager.Instance.Mst_stype.get_Item(this.mem_ship.get_Item(0).Stype).IsTrainingShip(); fmt.PracticeResult.GetMemberExp = 0; int num2 = (!flag) ? 0 : 1; fmt.PracticeResult.GetShipExp = new Dictionary <int, int>(); fmt.PowerUpData = new Dictionary <int, PowUpInfo>(); double difficultShipExpKeisu = this.getDifficultShipExpKeisu(); double shipExpCommonKeisu = this.getShipExpCommonKeisu(); Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship; using (List <Mem_ship> .Enumerator enumerator = this.mem_ship.GetEnumerator()) { while (enumerator.MoveNext()) { Mem_ship current = enumerator.get_Current(); fmt.PracticeResult.GetShipExp.Add(current.Rid, 0); fmt.PowerUpData.Add(current.Rid, default(PowUpInfo)); Mst_ship mst_ship2 = mst_ship.get_Item(current.Ship_id); if (mst_ship2.Stype != 13) { if (mst_ship2.Stype == 14) { List <Mst_slotitem> mstSlotItems = current.GetMstSlotItems(); bool flag2 = false; for (int i = 0; i < mstSlotItems.get_Count(); i++) { SlotitemCategory slotitem_type = Mst_DataManager.Instance.Mst_equip_category.get_Item(mstSlotItems.get_Item(i).Type3).Slotitem_type; if (slotitem_type == SlotitemCategory.Kanjouki || slotitem_type == SlotitemCategory.Suijouki) { flag2 = true; break; } } if (!flag2) { continue; } } double num3 = Math.Sqrt((double)current.Level); double max = (double)(14 + num2 * 7); double num4 = 10.0 + Utils.GetRandDouble(0.0, max, 1.0, 1) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num / 2.0 + num3; num4 = num4 * difficultShipExpKeisu * shipExpCommonKeisu; fmt.PracticeResult.GetShipExp.set_Item(current.Rid, (int)num4); Ship_GrowValues battleBaseParam = current.GetBattleBaseParam(); PowUpInfo powUpInfo = default(PowUpInfo); double max2 = 1.5 + (double)num2 * 0.2 + (num + num3) / 20.0; powUpInfo.Taiku = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1); if (battleBaseParam.Taiku + powUpInfo.Taiku > mst_ship2.Tyku_max) { int num5 = mst_ship2.Tyku_max - mst_ship2.Tyku; powUpInfo.Taiku = num5 - current.Kyouka.get_Item(Mem_ship.enumKyoukaIdx.Tyku); } if (this.motherBGroup.Contains(current.Stype)) { double max3 = 1.2 + (num + num3) / 20.0; powUpInfo.Karyoku = (int)Utils.GetRandDouble(0.0, max3, 1.0, 1); if (battleBaseParam.Houg + powUpInfo.Karyoku > mst_ship2.Houg_max) { int num6 = mst_ship2.Houg_max - mst_ship2.Houg; powUpInfo.Karyoku = num6 - current.Kyouka.get_Item(Mem_ship.enumKyoukaIdx.Houg); } } fmt.PowerUpData.set_Item(current.Rid, powUpInfo); } } } }