protected void subOnslot(SakutekiInfo targetInfo) { using (Dictionary <Mem_ship, List <int> > .Enumerator enumerator = targetInfo.LostTargetOnslot.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <Mem_ship, List <int> > current = enumerator.get_Current(); Mem_ship key = current.get_Key(); using (List <int> .Enumerator enumerator2 = current.get_Value().GetEnumerator()) { while (enumerator2.MoveNext()) { int current2 = enumerator2.get_Current(); int num = this.randInstance.Next(3); if (key.Onslot.get_Item(current2) < num) { num = key.Onslot.get_Item(current2); } List <int> onslot; List <int> expr_73 = onslot = key.Onslot; int num2; int expr_78 = num2 = current2; num2 = onslot.get_Item(num2); expr_73.set_Item(expr_78, num2 - num); } } } } }
protected void subSlotExp(SakutekiInfo targetInfo, BattleSearchValues serchKind) { if (serchKind == BattleSearchValues.Lost || serchKind == BattleSearchValues.Success_Lost) { Dictionary <int, int[]> slotExperience = F_Data.SlotExperience; foreach (KeyValuePair <Mem_ship, List <int> > item in targetInfo.LostTargetOnslot) { Mem_ship key = item.Key; foreach (int item2 in item.Value) { if (key.Onslot[item2] > 0) { int key2 = key.Slot[item2]; double num = (serchKind != BattleSearchValues.Lost) ? 6.0 : 12.0; double randDouble = Utils.GetRandDouble(0.0, num - 1.0, 1.0, 1); int num2 = slotExperience[key2][0]; int num3 = num2 - (int)(num * 0.5 + randDouble * 0.05); if (num3 < 0) { num3 = 0; } int num4 = num3 - num2; slotExperience[key2][1] = slotExperience[key2][1] + num4; } } } } }
protected BattleSearchValues execSearch(SakutekiInfo atk_info, SakutekiInfo def_info) { double randDouble = Utils.GetRandDouble(1.0, 1.4, 0.1, 1); int key = atk_info.LostTargetOnslot.Count(); int num = atk_info.BasePow + valanceShipCount[key] - valance1 + (int)Math.Sqrt((double)atk_info.Attack * 10.0); int num2 = atk_info.Attack - (int)((double)def_info.Def * randDouble); int num3 = randInstance.Next(20); if (atk_info.Attack == 0) { return((num <= num3) ? BattleSearchValues.NotFound : BattleSearchValues.Found); } if (num > num3) { return((num2 > 0) ? BattleSearchValues.Success : BattleSearchValues.Success_Lost); } return((num2 <= 0) ? BattleSearchValues.Faile : BattleSearchValues.Lost); }
protected BattleSearchValues execSearch(SakutekiInfo atk_info, SakutekiInfo def_info) { double randDouble = Utils.GetRandDouble(1.0, 1.4, 0.1, 1); int num = Enumerable.Count <KeyValuePair <Mem_ship, List <int> > >(atk_info.LostTargetOnslot); int num2 = atk_info.BasePow + this.valanceShipCount.get_Item(num) - this.valance1 + (int)Math.Sqrt((double)atk_info.Attack * 10.0); int num3 = atk_info.Attack - (int)((double)def_info.Def * randDouble); int num4 = this.randInstance.Next(20); if (atk_info.Attack == 0) { return((num2 <= num4) ? BattleSearchValues.NotFound : BattleSearchValues.Found); } if (num2 > num4) { return((num3 <= 0) ? BattleSearchValues.Success_Lost : BattleSearchValues.Success); } return((num3 <= 0) ? BattleSearchValues.Faile : BattleSearchValues.Lost); }
public Exec_Search(BattleBaseData myData, Dictionary <int, BattleShipSubInfo> mySubInfo, BattleBaseData enemyData, Dictionary <int, BattleShipSubInfo> enemySubInfo, bool practice) { this._f_Data = myData; this._e_Data = enemyData; this._f_SubInfo = mySubInfo; this._e_SubInfo = enemySubInfo; this.practiceFlag = practice; this.f_Param = new SakutekiInfo(this.practiceFlag); this.e_Param = new SakutekiInfo(this.practiceFlag); Dictionary <int, int> dictionary = new Dictionary <int, int>(); dictionary.Add(1, 0); dictionary.Add(2, 0); dictionary.Add(3, 1); dictionary.Add(4, 2); dictionary.Add(5, 3); dictionary.Add(6, 4); this.valanceShipCount = dictionary; this.valance1 = 20; }
protected void subOnslot(SakutekiInfo targetInfo) { foreach (KeyValuePair <Mem_ship, List <int> > item in targetInfo.LostTargetOnslot) { Mem_ship key = item.Key; foreach (int item2 in item.Value) { int num = randInstance.Next(3); if (key.Onslot[item2] < num) { num = key.Onslot[item2]; } List <int> onslot; List <int> list = onslot = key.Onslot; int index; int index2 = index = item2; index = onslot[index]; list[index2] = index - num; } } }
public Exec_Search(BattleBaseData myData, Dictionary <int, BattleShipSubInfo> mySubInfo, BattleBaseData enemyData, Dictionary <int, BattleShipSubInfo> enemySubInfo, bool practice) { _f_Data = myData; _e_Data = enemyData; _f_SubInfo = mySubInfo; _e_SubInfo = enemySubInfo; practiceFlag = practice; f_Param = new SakutekiInfo(practiceFlag); e_Param = new SakutekiInfo(practiceFlag); valanceShipCount = new Dictionary <int, int> { { 1, 0 }, { 2, 0 }, { 3, 1 }, { 4, 2 }, { 5, 3 }, { 6, 4 } }; valance1 = 20; }
protected void subSlotExp(SakutekiInfo targetInfo, BattleSearchValues serchKind) { if (serchKind != BattleSearchValues.Lost && serchKind != BattleSearchValues.Success_Lost) { return; } Dictionary <int, int[]> slotExperience = this.F_Data.SlotExperience; using (Dictionary <Mem_ship, List <int> > .Enumerator enumerator = targetInfo.LostTargetOnslot.GetEnumerator()) { while (enumerator.MoveNext()) { KeyValuePair <Mem_ship, List <int> > current = enumerator.get_Current(); Mem_ship key = current.get_Key(); using (List <int> .Enumerator enumerator2 = current.get_Value().GetEnumerator()) { while (enumerator2.MoveNext()) { int current2 = enumerator2.get_Current(); if (key.Onslot.get_Item(current2) > 0) { int num = key.Slot.get_Item(current2); double num2 = (serchKind != BattleSearchValues.Lost) ? 6.0 : 12.0; double randDouble = Utils.GetRandDouble(0.0, num2 - 1.0, 1.0, 1); int num3 = slotExperience.get_Item(num)[0]; int num4 = num3 - (int)(num2 * 0.5 + randDouble * 0.05); if (num4 < 0) { num4 = 0; } int num5 = num4 - num3; slotExperience.get_Item(num)[1] = slotExperience.get_Item(num)[1] + num5; } } } } } }