public override Api_Result <BattleResultFmt> BattleResult()
        {
            Api_Result <BattleResultFmt> api_Result = base.BattleResult();

            if (api_Result.state == Api_Result_State.Parameter_Error)
            {
                return(api_Result);
            }
            List <Mem_ship> ships = null;
            List <Mem_ship> list  = null;

            this.mapInstance.GetSortieShipDatas(out ships, out list);
            EscapeInfo escapeInfo = new EscapeInfo(ships);

            api_Result.data.EscapeInfo = ((!escapeInfo.ValidEscape()) ? null : escapeInfo);
            if (api_Result.data.GetAirReconnaissanceItems != null)
            {
                this.mapInstance.updateMapitemGetData(api_Result.data.GetAirReconnaissanceItems);
            }
            this.battleKinds = ExecBattleKinds.None;
            Mst_mapcell2 nowCell = this.mapInstance.GetNowCell();
            bool         boss    = Mst_DataManager.Instance.Mst_mapenemy.get_Item(this.enemyData.Enemy_id).Boss == 1;
            List <int>   list2   = new QuestSortie(nowCell.Maparea_id, nowCell.Mapinfo_no, api_Result.data.WinRank, this.userData.Deck.Rid, this.userData.ShipData, this.enemyData.ShipData, boss).ExecuteCheck();

            this.mapInstance.SetSlotExpChangeValues(this, base.GetSlotExpBattleData());
            return(api_Result);
        }
Exemple #2
0
        public override Api_Result <AllBattleFmt> DayBattle()
        {
            Mst_mapcell2 nowCell = mapInstance.GetNowCell();

            if (nowCell.Event_2 != enumMapWarType.Normal)
            {
                Api_Result <AllBattleFmt> api_Result = new Api_Result <AllBattleFmt>();
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            return(base.DayBattle());
        }
        public Api_Result <AllBattleFmt> AirBattle()
        {
            Api_Result <AllBattleFmt> api_Result = new Api_Result <AllBattleFmt>();

            if (this.userData == null)
            {
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            Mst_mapcell2 nowCell = this.mapInstance.GetNowCell();

            if (nowCell.Event_2 != enumMapWarType.AirBattle && this.battleKinds != ExecBattleKinds.None)
            {
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            if (this.allBattleFmt == null)
            {
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            AllBattleFmt allBattleFmt = this.allBattleFmt;

            allBattleFmt.DayBattle.OpeningProduction = this.battleCommandParams.GetProductionData(this.userData.GetDeckBattleCommand().get_Item(0));
            if (this.battleCommandParams.IsEscape)
            {
                allBattleFmt.DayBattle.ValidMidnight = base.isGoMidnight();
                this.battleKinds = ExecBattleKinds.DayOnly;
                api_Result.data  = allBattleFmt;
                return(api_Result);
            }
            using (Exec_AirBattle exec_AirBattle = new Exec_AirBattle(this.userData, this.userSubInfo, this.enemyData, this.enemySubInfo, allBattleFmt.DayBattle.Search, false))
            {
                allBattleFmt.DayBattle.AirBattle = exec_AirBattle.GetResultData(this.formationParams, this.battleCommandParams);
                this.seikuValue = exec_AirBattle.getSeikuValue();
            }
            allBattleFmt.BattleFormation = (this.userData.BattleFormation = (this.enemyData.BattleFormation = this.formationParams.AfterAirBattle_RewriteBattleFormation2(this.userData)));
            using (Exec_AirBattle exec_AirBattle2 = new Exec_AirBattle(this.userData, this.userSubInfo, this.enemyData, this.enemySubInfo, allBattleFmt.DayBattle.Search, false))
            {
                allBattleFmt.DayBattle.AirBattle2 = exec_AirBattle2.GetResultData(this.formationParams, this.battleCommandParams);
            }
            allBattleFmt.DayBattle.ValidMidnight = base.isGoMidnight();
            this.battleKinds = ExecBattleKinds.DayOnly;
            api_Result.data  = allBattleFmt;
            return(api_Result);
        }
Exemple #4
0
        public override Api_Result <AllBattleFmt> NightBattle()
        {
            Mst_mapcell2          nowCell = mapInstance.GetNowCell();
            List <enumMapWarType> list    = new List <enumMapWarType>();

            list.Add(enumMapWarType.Normal);
            list.Add(enumMapWarType.AirBattle);
            List <enumMapWarType> list2 = list;

            if (!list2.Contains(nowCell.Event_2))
            {
                Api_Result <AllBattleFmt> api_Result = new Api_Result <AllBattleFmt>();
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            return(base.NightBattle());
        }
        public Api_Result <AllBattleFmt> Night_Sp(BattleFormationKinds1 formationKind)
        {
            Api_Result <AllBattleFmt> api_Result = new Api_Result <AllBattleFmt>();

            if (this.userData == null)
            {
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            Mst_mapcell2 nowCell = this.mapInstance.GetNowCell();

            if (nowCell.Event_2 != enumMapWarType.Midnight || this.battleKinds != ExecBattleKinds.None)
            {
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            if (this.userData.ShipData.get_Item(0).Get_DamageState() == DamageState.Taiha)
            {
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            base.initFormation(formationKind);
            AllBattleFmt allBattleFmt = new AllBattleFmt(this.userData.Formation, this.enemyData.Formation, this.userData.BattleFormation);
            Dictionary <int, List <Mst_slotitem> > useRationShips = null;
            List <int> list = null;

            if (!this.getCombatRationResult(out useRationShips, out list))
            {
                useRationShips = null;
            }
            using (Exec_Midnight exec_Midnight = new Exec_Midnight(2, this.seikuValue, this.userData, this.userSubInfo, this.enemyData, this.enemySubInfo, false))
            {
                allBattleFmt.NightBattle = exec_Midnight.GetResultData(this.formationParams, this.battleCommandParams);
                allBattleFmt.NightBattle.Header.UseRationShips = useRationShips;
            }
            this.battleKinds  = ExecBattleKinds.NightOnly;
            api_Result.data   = allBattleFmt;
            this.allBattleFmt = allBattleFmt;
            return(api_Result);
        }
Exemple #6
0
        public Api_Result <AllBattleFmt> Night_Sp(BattleFormationKinds1 formationKind)
        {
            Api_Result <AllBattleFmt> api_Result = new Api_Result <AllBattleFmt>();

            if (userData == null)
            {
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            Mst_mapcell2 nowCell = mapInstance.GetNowCell();

            if (nowCell.Event_2 != enumMapWarType.Midnight || battleKinds != 0)
            {
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            if (userData.ShipData[0].Get_DamageState() == DamageState.Taiha)
            {
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            initFormation(formationKind);
            AllBattleFmt allBattleFmt = new AllBattleFmt(userData.Formation, enemyData.Formation, userData.BattleFormation);
            Dictionary <int, List <Mst_slotitem> > useShipInfo = null;
            List <int> givenShips = null;

            if (!getCombatRationResult(out useShipInfo, out givenShips))
            {
                useShipInfo = null;
            }
            using (Exec_Midnight exec_Midnight = new Exec_Midnight(2, seikuValue, userData, userSubInfo, enemyData, enemySubInfo, practice: false))
            {
                allBattleFmt.NightBattle = exec_Midnight.GetResultData(formationParams, battleCommandParams);
                allBattleFmt.NightBattle.Header.UseRationShips = useShipInfo;
            }
            battleKinds       = ExecBattleKinds.NightOnly;
            api_Result.data   = allBattleFmt;
            base.allBattleFmt = allBattleFmt;
            return(api_Result);
        }
 public void SetMember(CompassType rashin_id, Mst_mapcell2 target_cell, MapItemGetFmt item, List <MapItemGetFmt> clearItems, MapHappningFmt happning, MapCommentKind comment, MapProductionKind production, AirReconnaissanceFmt airSearch, EventMapInfo eventMap, List <int> selectcell, List <int> newOpenMap, int spoint)
 {
     this.Rashin_id = rashin_id;
     this.Cell_no   = target_cell.No;
     if (selectcell != null)
     {
         this.SelectCells = Enumerable.ToList <int>(selectcell);
     }
     this.Color_no          = target_cell.Color_no;
     this.Event_id          = target_cell.Event_1;
     this.Event_kind        = target_cell.Event_2;
     this.IsNext            = target_cell.IsNext();
     this.Comment           = comment;
     this.Production        = production;
     this.AirReconnaissance = airSearch;
     this.ItemGet           = item;
     this.MapClearItem      = clearItems;
     this.Happning          = happning;
     this.MapHp             = eventMap;
     this.NewOpenMapId      = newOpenMap;
     this.GetSpoint         = spoint;
 }
Exemple #8
0
 public void SetMember(CompassType rashin_id, Mst_mapcell2 target_cell, MapItemGetFmt item, List <MapItemGetFmt> clearItems, MapHappningFmt happning, MapCommentKind comment, MapProductionKind production, AirReconnaissanceFmt airSearch, EventMapInfo eventMap, List <int> selectcell, List <int> newOpenMap, int spoint)
 {
     Rashin_id = rashin_id;
     Cell_no   = target_cell.No;
     if (selectcell != null)
     {
         SelectCells = selectcell.ToList();
     }
     Color_no          = target_cell.Color_no;
     Event_id          = target_cell.Event_1;
     Event_kind        = target_cell.Event_2;
     IsNext            = target_cell.IsNext();
     Comment           = comment;
     Production        = production;
     AirReconnaissance = airSearch;
     ItemGet           = item;
     MapClearItem      = clearItems;
     Happning          = happning;
     MapHp             = eventMap;
     NewOpenMapId      = newOpenMap;
     GetSpoint         = spoint;
 }
Exemple #9
0
        public override Api_Result <AllBattleFmt> GetDayPreBattleInfo(BattleFormationKinds1 formationKind)
        {
            Mst_mapcell2 nowCell = mapInstance.GetNowCell();

            if (nowCell.Event_2 == enumMapWarType.Midnight)
            {
                Api_Result <AllBattleFmt> api_Result = new Api_Result <AllBattleFmt>();
                api_Result.state = Api_Result_State.Parameter_Error;
                return(api_Result);
            }
            Api_Result <AllBattleFmt> dayPreBattleInfo = base.GetDayPreBattleInfo(formationKind);

            if (dayPreBattleInfo.state == Api_Result_State.Success)
            {
                Dictionary <int, List <Mst_slotitem> > useShipInfo = null;
                List <int> givenShips = null;
                if (getCombatRationResult(out useShipInfo, out givenShips))
                {
                    dayPreBattleInfo.data.DayBattle.Header.UseRationShips = useShipInfo;
                }
            }
            return(dayPreBattleInfo);
        }
Exemple #10
0
 public Exec_BattleResult(BattleResultBase execBattleData)
 {
     mst_shiplevel  = Mst_DataManager.Instance.Get_MstLevel(shipTable: true);
     _f_Data        = execBattleData.MyData;
     _e_Data        = execBattleData.EnemyData;
     _f_SubInfo     = execBattleData.F_SubInfo;
     _e_SubInfo     = execBattleData.E_SubInfo;
     practiceFlag   = execBattleData.PracticeFlag;
     battleKinds    = execBattleData.ExecKinds;
     clothBrokenIds = new List <int>();
     if (!execBattleData.PracticeFlag)
     {
         mst_enemy = Mst_DataManager.Instance.Mst_mapenemy[_e_Data.Enemy_id];
         string str  = mst_enemy.Maparea_id.ToString();
         string str2 = mst_enemy.Mapinfo_no.ToString();
         int    key  = int.Parse(str + str2);
         mst_mapinfo      = Mst_DataManager.Instance.Mst_mapinfo[key];
         deleteTargetShip = new List <Mem_ship>();
         cleard           = execBattleData.Cleard;
         nowCell          = execBattleData.NowCell;
     }
     isRebellionBattle = execBattleData.RebellionBattle;
     airCellItems      = execBattleData.GetAirCellItems;
 }
Exemple #11
0
 public User_MapCellInfo(Mst_mapcell2 cell, bool passed)
 {
     Mst_mapcell = cell;
     Passed      = passed;
 }
 public User_MapCellInfo(Mst_mapcell2 cell, bool passed)
 {
     this.Mst_mapcell = cell;
     this.Passed      = passed;
 }