public override SupportAtack GetResultData(FormationDatas formation, BattleCommandParams cParam) { SupportAtack supportAtack = new SupportAtack(); BattleSupportKinds battleSupportKinds = Init(ref supportAtack.Undressing_Flag); if (battleSupportKinds == BattleSupportKinds.None) { return(null); } supportAtack.Deck_Id = supportDeck.Rid; supportAtack.SupportType = battleSupportKinds; switch (battleSupportKinds) { case BattleSupportKinds.AirAtack: using (Exec_SupportAirBattle exec_SupportAirBattle = new Exec_SupportAirBattle(F_Data, F_SubInfo, E_Data, E_SubInfo, practiceFlag)) { supportAtack.AirBattle = exec_SupportAirBattle.GetResultData(formation, cParam); } if (supportAtack.AirBattle == null) { return(null); } break; case BattleSupportKinds.Hougeki: using (Exec_SupportHougeki exec_SupportHougeki = new Exec_SupportHougeki(F_Data, F_SubInfo, E_Data, E_SubInfo, practiceFlag)) { supportAtack.Hourai = exec_SupportHougeki.GetResultData <Support_HouRai>(formation); } if (supportAtack.Hourai == null) { return(null); } break; case BattleSupportKinds.Raigeki: using (Exec_SupportRaigeki exec_SupportRaigeki = new Exec_SupportRaigeki(F_Data, F_SubInfo, E_Data, E_SubInfo, practiceFlag)) { supportAtack.Hourai = exec_SupportRaigeki.GetResultData <Support_HouRai>(formation); } if (supportAtack.Hourai == null) { return(null); } break; } supportDeck.ChangeSupported(); return(supportAtack); }
public override SupportAtack GetResultData(FormationDatas formation, BattleCommandParams cParam) { SupportAtack supportAtack = new SupportAtack(); BattleSupportKinds battleSupportKinds = this.Init(ref supportAtack.Undressing_Flag); if (battleSupportKinds == BattleSupportKinds.None) { return(null); } supportAtack.Deck_Id = this.supportDeck.Rid; supportAtack.SupportType = battleSupportKinds; if (battleSupportKinds == BattleSupportKinds.AirAtack) { using (Exec_SupportAirBattle exec_SupportAirBattle = new Exec_SupportAirBattle(this.F_Data, this.F_SubInfo, this.E_Data, this.E_SubInfo, this.practiceFlag)) { supportAtack.AirBattle = exec_SupportAirBattle.GetResultData(formation, cParam); } if (supportAtack.AirBattle == null) { return(null); } } else if (battleSupportKinds == BattleSupportKinds.Hougeki) { using (Exec_SupportHougeki exec_SupportHougeki = new Exec_SupportHougeki(this.F_Data, this.F_SubInfo, this.E_Data, this.E_SubInfo, this.practiceFlag)) { supportAtack.Hourai = exec_SupportHougeki.GetResultData <Support_HouRai>(formation); } if (supportAtack.Hourai == null) { return(null); } } else if (battleSupportKinds == BattleSupportKinds.Raigeki) { using (Exec_SupportRaigeki exec_SupportRaigeki = new Exec_SupportRaigeki(this.F_Data, this.F_SubInfo, this.E_Data, this.E_SubInfo, this.practiceFlag)) { supportAtack.Hourai = exec_SupportRaigeki.GetResultData <Support_HouRai>(formation); } if (supportAtack.Hourai == null) { return(null); } } this.supportDeck.ChangeSupported(); return(supportAtack); }
public void __createCacheDataAfterCommand__() { if (this._phase != CombatPhase.DAY) { return; } if (!this.IsTakeCommand()) { return; } this._cache_opening_effect = null; if (this._battleData.DayBattle.OpeningProduction != null) { this._cache_opening_effect = new __EffectModel__(this._battleData.DayBattle.OpeningProduction); } this._cache_kouku = null; if (this._battleData.DayBattle.AirBattle != null) { int count = this._battleData.DayBattle.AirBattle.F_PlaneFrom.get_Count(); int count2 = this._battleData.DayBattle.AirBattle.E_PlaneFrom.get_Count(); if (count > 0 || count2 > 0) { this._cache_kouku = new KoukuuModel(this._ships_f, this._ships_e, this._battleData.DayBattle.AirBattle); } } this._cache_shien = null; if (this._battleData.DayBattle.SupportAtack != null) { SupportAtack supportAtack = this._battleData.DayBattle.SupportAtack; int deck_Id = supportAtack.Deck_Id; DeckModel deck = base.UserInfo.GetDeck(deck_Id); BattleSupportKinds supportType = supportAtack.SupportType; if (supportType == BattleSupportKinds.AirAtack) { this._cache_shien = new ShienModel_Air(deck, this._ships_f, this._ships_e, supportAtack); } else if (supportType == BattleSupportKinds.Hougeki) { this._cache_shien = new ShienModel_Hou(deck, this._ships_f, this._ships_e, supportAtack); } else if (supportType == BattleSupportKinds.Raigeki) { this._cache_shien = new ShienModel_Rai(deck, this._ships_f, this._ships_e, supportAtack); } } this._cache_kaimaku = null; if (this._battleData.DayBattle.OpeningAtack != null) { this._cache_kaimaku = new RaigekiModel(this._ships_f, this._ships_e, this._battleData.DayBattle.OpeningAtack); if (this._cache_kaimaku.Count_f == 0 && this._cache_kaimaku.Count_e == 0) { this._cache_kaimaku = null; } } this._cache_cmd_actions = null; if (this._battleData.DayBattle.FromMiddleDayBattle != null) { this._cache_cmd_actions = new List <CmdActionPhaseModel>(); Dictionary <int, ShipModel_BattleAll> ships = this._GetShipsDic(); for (int i = 0; i < this._battleData.DayBattle.FromMiddleDayBattle.get_Count(); i++) { FromMiddleBattleDayData data = this._battleData.DayBattle.FromMiddleDayBattle.get_Item(i); CmdActionPhaseModel cmdActionPhaseModel = new CmdActionPhaseModel(data, ships); this._cache_cmd_actions.Add(cmdActionPhaseModel); } if (this._cache_cmd_actions.TrueForAll((CmdActionPhaseModel model) => model == null || !model.HasAction())) { this._cache_cmd_actions = null; } else if (this._cache_cmd_actions.get_Count() == 0) { this._cache_cmd_actions = null; } } this._cache_raigeki = null; if (this._battleData.DayBattle.Raigeki != null) { this._cache_raigeki = new RaigekiModel(this._ships_f, this._ships_e, this._battleData.DayBattle.Raigeki); if (this._cache_raigeki.Count_f == 0 && this._cache_raigeki.Count_e == 0) { this._cache_raigeki = null; } } this._cache_kouku2 = null; if (this._battleData.DayBattle.AirBattle2 != null) { int count3 = this._battleData.DayBattle.AirBattle2.F_PlaneFrom.get_Count(); int count4 = this._battleData.DayBattle.AirBattle2.E_PlaneFrom.get_Count(); if (count3 > 0 || count4 > 0) { this._cache_kouku2 = new KoukuuModel(this._ships_f, this._ships_e, this._battleData.DayBattle.AirBattle2); } } if (this._cache_opening_effect != null) { ShipModel_Battle nextActionShip = this._GetFirstActionShip(0); ((__EffectModel__)this._cache_opening_effect).SetNextActionShip(nextActionShip); } if (this._cache_cmd_actions != null) { for (int j = 0; j < this._cache_cmd_actions.get_Count(); j++) { CmdActionPhaseModel cmdActionPhaseModel2 = this._cache_cmd_actions.get_Item(j); if (cmdActionPhaseModel2 != null && cmdActionPhaseModel2.Effect != null) { ShipModel_Battle nextActionShip = this._GetFirstActionShip(j + 1); ((__EffectModel__)cmdActionPhaseModel2.Effect).SetNextActionShip(nextActionShip); } } } }