protected void _CalcStage2() { if (_data.Air2 == null) { return; } Random random = new Random(); if (_planes_f.Count > 0) { int lost = Stage2_LostCount_f; while (lost > 0) { List <PlaneModelBase> list = _planes_f.FindAll((PlaneModelBase plane) => plane.Power_Stage2End > 0); if (list.Count > 0) { PlaneModelBase planeModelBase = list[random.Next(list.Count)]; planeModelBase.SetStage2Lost(ref lost); } } } if (_planes_e.Count > 0) { int lost2 = Stage2_LostCount_e; while (lost2 > 0) { List <PlaneModelBase> list2 = _planes_e.FindAll((PlaneModelBase plane) => plane.Power_Stage2End > 0); if (list2.Count > 0) { PlaneModelBase planeModelBase2 = list2[random.Next(list2.Count)]; planeModelBase2.SetStage2Lost(ref lost2); } } } if (_data.Air2.F_AntiFire != null) { AirFireInfo info = _data.Air2.F_AntiFire; _taiku_ship_f = _ships_f.Find((ShipModel_BattleAll ship) => ship.TmpId == info.AttackerId).__CreateAttacker__(); _taiku_slotitems_f = new List <SlotitemModel_Battle>(); for (int i = 0; i < info.UseItems.Count; i++) { _taiku_slotitems_f.Add(new SlotitemModel_Battle(info.UseItems[i])); } } if (_data.Air2.E_AntiFire != null) { AirFireInfo info2 = _data.Air2.E_AntiFire; _taiku_ship_e = _ships_e.Find((ShipModel_BattleAll ship) => ship.TmpId == info2.AttackerId).__CreateAttacker__(); _taiku_slotitems_e = new List <SlotitemModel_Battle>(); for (int j = 0; j < info2.UseItems.Count; j++) { _taiku_slotitems_e.Add(new SlotitemModel_Battle(info2.UseItems[j])); } } }
protected void _CalcStage2() { if (this._data.Air2 == null) { return; } Random random = new Random(); if (this._planes_f.get_Count() > 0) { int i = this.Stage2_LostCount_f; while (i > 0) { List <PlaneModelBase> list = this._planes_f.FindAll((PlaneModelBase plane) => plane.Power_Stage2End > 0); if (list.get_Count() > 0) { PlaneModelBase planeModelBase = list.get_Item(random.Next(list.get_Count())); planeModelBase.SetStage2Lost(ref i); } } } if (this._planes_e.get_Count() > 0) { int j = this.Stage2_LostCount_e; while (j > 0) { List <PlaneModelBase> list2 = this._planes_e.FindAll((PlaneModelBase plane) => plane.Power_Stage2End > 0); if (list2.get_Count() > 0) { PlaneModelBase planeModelBase2 = list2.get_Item(random.Next(list2.get_Count())); planeModelBase2.SetStage2Lost(ref j); } } } if (this._data.Air2.F_AntiFire != null) { AirFireInfo info = this._data.Air2.F_AntiFire; this._taiku_ship_f = this._ships_f.Find((ShipModel_BattleAll ship) => ship.TmpId == info.AttackerId).__CreateAttacker__(); this._taiku_slotitems_f = new List <SlotitemModel_Battle>(); for (int k = 0; k < info.UseItems.get_Count(); k++) { this._taiku_slotitems_f.Add(new SlotitemModel_Battle(info.UseItems.get_Item(k))); } } if (this._data.Air2.E_AntiFire != null) { AirFireInfo info = this._data.Air2.E_AntiFire; this._taiku_ship_e = this._ships_e.Find((ShipModel_BattleAll ship) => ship.TmpId == info.AttackerId).__CreateAttacker__(); this._taiku_slotitems_e = new List <SlotitemModel_Battle>(); for (int l = 0; l < info.UseItems.get_Count(); l++) { this._taiku_slotitems_e.Add(new SlotitemModel_Battle(info.UseItems.get_Item(l))); } } }
protected void _CalcStage1() { if (_data.Air1 == null) { return; } Random random = new Random(); if (_planes_f.Count > 0) { int count = _data.Air1.F_LostInfo.Count; int power = (int)Math.Floor((double)count / (double)_planes_f.Count); int extra = count % _planes_f.Count; for (int i = 0; i < _planes_f.Count; i++) { _planes_f[i].SetStage1Power(power, ref extra); } int lost = _data.Air1.F_LostInfo.LostCount; while (lost > 0) { List <PlaneModelBase> list = _planes_f.FindAll((PlaneModelBase plane) => plane.Power_Stage1End > 0); if (list.Count > 0) { PlaneModelBase planeModelBase = list[random.Next(list.Count)]; planeModelBase.SetStage1Lost(ref lost); } } } if (_planes_e.Count <= 0) { return; } int count2 = _data.Air1.E_LostInfo.Count; int power2 = (int)Math.Floor((double)count2 / (double)_planes_e.Count); int extra2 = count2 % _planes_e.Count; for (int j = 0; j < _planes_e.Count; j++) { _planes_e[j].SetStage1Power(power2, ref extra2); } int lost2 = _data.Air1.E_LostInfo.LostCount; while (lost2 > 0) { List <PlaneModelBase> list2 = _planes_e.FindAll((PlaneModelBase plane) => plane.Power_Stage1End > 0); if (list2.Count > 0) { PlaneModelBase planeModelBase2 = list2[random.Next(list2.Count)]; planeModelBase2.SetStage1Lost(ref lost2); } } }
protected void _CalcStage1() { if (this._data.Air1 == null) { return; } Random random = new Random(); if (this._planes_f.get_Count() > 0) { int count = this._data.Air1.F_LostInfo.Count; int power = (int)Math.Floor((double)count / (double)this._planes_f.get_Count()); int num = count % this._planes_f.get_Count(); for (int i = 0; i < this._planes_f.get_Count(); i++) { this._planes_f.get_Item(i).SetStage1Power(power, ref num); } int j = this._data.Air1.F_LostInfo.LostCount; while (j > 0) { List <PlaneModelBase> list = this._planes_f.FindAll((PlaneModelBase plane) => plane.Power_Stage1End > 0); if (list.get_Count() > 0) { PlaneModelBase planeModelBase = list.get_Item(random.Next(list.get_Count())); planeModelBase.SetStage1Lost(ref j); } } } if (this._planes_e.get_Count() > 0) { int count2 = this._data.Air1.E_LostInfo.Count; int power2 = (int)Math.Floor((double)count2 / (double)this._planes_e.get_Count()); int num2 = count2 % this._planes_e.get_Count(); for (int k = 0; k < this._planes_e.get_Count(); k++) { this._planes_e.get_Item(k).SetStage1Power(power2, ref num2); } int l = this._data.Air1.E_LostInfo.LostCount; while (l > 0) { List <PlaneModelBase> list2 = this._planes_e.FindAll((PlaneModelBase plane) => plane.Power_Stage1End > 0); if (list2.get_Count() > 0) { PlaneModelBase planeModelBase2 = list2.get_Item(random.Next(list2.get_Count())); planeModelBase2.SetStage1Lost(ref l); } } } }