Exemplo n.º 1
0
        public T GetResultData <T>(FormationDatas formation) where T : Support_HouRai, new()
        {
            this.formationData = formation;
            Support_HouRai hougekiData = this.getHougekiData();

            return((T)((object)hougekiData));
        }
Exemplo n.º 2
0
        public override HougekiDayBattleFmt GetResultData(FormationDatas formation, BattleCommandParams cParam)
        {
            commandParams = cParam;
            setTargetingKind(formation);
            formationData = formation;
            int num  = f_AtkIdxs.Count();
            int num2 = e_AtkIdxs.Count();

            if (num == 0 && num2 == 0)
            {
                return(null);
            }
            new HougekiDayBattleFmt();
            List <int> fAtkIdx = new List <int>();
            List <int> eAtkIdx = new List <int>();

            if (callReferenceInfo.CommandPos != -1)
            {
                fAtkIdx = takeAttacker(f_AtkIdxs, callReferenceInfo.AttackType);
            }
            else
            {
                eAtkIdx = takeAttacker(e_AtkIdxs, callReferenceInfo.AttackType);
            }
            return(GetResultData(callReferenceInfo.UseCommand, callReferenceInfo.CommandPos, fAtkIdx, eAtkIdx));
        }
Exemplo n.º 3
0
        public override SearchInfo[] GetResultData(FormationDatas formation, BattleCommandParams cParam)
        {
            SearchInfo searchInfo  = new SearchInfo();
            SearchInfo searchInfo2 = new SearchInfo();

            SearchInfo[] result = new SearchInfo[2]
            {
                searchInfo,
                searchInfo2
            };
            f_Param.SetParametar(F_Data, out searchInfo.UsePlane);
            e_Param.SetParametar(E_Data, out searchInfo2.UsePlane);
            searchInfo.SearchValue  = execSearch(f_Param, e_Param);
            searchInfo2.SearchValue = ((!practiceFlag) ? BattleSearchValues.Success : execSearch(e_Param, f_Param));
            if (searchInfo.SearchValue == BattleSearchValues.Success_Lost || searchInfo.SearchValue == BattleSearchValues.Lost)
            {
                subSlotExp(f_Param, searchInfo.SearchValue);
                subOnslot(f_Param);
            }
            if (searchInfo2.SearchValue == BattleSearchValues.Success_Lost || searchInfo2.SearchValue == BattleSearchValues.Lost)
            {
                subOnslot(e_Param);
            }
            return(result);
        }
Exemplo n.º 4
0
        public T GetResultData <T>(FormationDatas formation) where T : Support_HouRai, new()
        {
            formationData = formation;
            Support_HouRai hougekiData = getHougekiData();

            return((T)hougekiData);
        }
        public override SearchInfo[] GetResultData(FormationDatas formation, BattleCommandParams cParam)
        {
            SearchInfo searchInfo  = new SearchInfo();
            SearchInfo searchInfo2 = new SearchInfo();

            SearchInfo[] result = new SearchInfo[]
            {
                searchInfo,
                searchInfo2
            };
            this.f_Param.SetParametar(this.F_Data, out searchInfo.UsePlane);
            this.e_Param.SetParametar(this.E_Data, out searchInfo2.UsePlane);
            searchInfo.SearchValue  = this.execSearch(this.f_Param, this.e_Param);
            searchInfo2.SearchValue = ((!this.practiceFlag) ? BattleSearchValues.Success : this.execSearch(this.e_Param, this.f_Param));
            if (searchInfo.SearchValue == BattleSearchValues.Success_Lost || searchInfo.SearchValue == BattleSearchValues.Lost)
            {
                this.subSlotExp(this.f_Param, searchInfo.SearchValue);
                this.subOnslot(this.f_Param);
            }
            if (searchInfo2.SearchValue == BattleSearchValues.Success_Lost || searchInfo2.SearchValue == BattleSearchValues.Lost)
            {
                this.subOnslot(this.e_Param);
            }
            return(result);
        }
Exemplo n.º 6
0
        public override AirBattle GetResultData(FormationDatas formation, BattleCommandParams cParam)
        {
            commandParams = cParam;
            AirBattle airBattle = new AirBattle();

            if (!F_Data.ShipData.Any((Mem_ship x) => x.IsFight()) || !E_Data.ShipData.Any((Mem_ship y) => y.IsFight()))
            {
                airBattle.SetStageFlag();
                return(airBattle);
            }
            setTargetingKind(formation);
            if (isSearchSuccess[0] && isAirBattleCommand())
            {
                setPlaneData(F_Data, F_SubInfo, airBattle.F_PlaneFrom, out f_FighterInfo);
            }
            if (isSearchSuccess[1])
            {
                setPlaneData(E_Data, E_SubInfo, airBattle.E_PlaneFrom, out e_FighterInfo);
            }
            formationData  = formation;
            airBattle.Air1 = getAirBattle1();
            airBattle.Air2 = getAirBattle2();
            airBattle.Air3 = getAirBattle3(airBattle.Air2);
            airBattle.SetStageFlag();
            return(airBattle);
        }
        public T GetResultData <T>(FormationDatas formation) where T : Support_HouRai
        {
            this.formationData = formation;
            Support_HouRai raigekiData = this.getRaigekiData();

            return((T)((object)raigekiData));
        }
Exemplo n.º 8
0
        public T GetResultData <T>(FormationDatas formation) where T : Support_HouRai
        {
            formationData = formation;
            Support_HouRai raigekiData = getRaigekiData();

            return((T)raigekiData);
        }
Exemplo n.º 9
0
        public override Raigeki GetResultData(FormationDatas formation, BattleCommandParams cParam)
        {
            commandParams = cParam;
            setTargetingKind(formation);
            int num  = f_AtkIdxs.Count();
            int num2 = e_AtkIdxs.Count();

            if (num == 0 && num2 == 0)
            {
                return(null);
            }
            if (num > 0)
            {
                setHitHoseiFromBattleCommand();
            }
            Raigeki raigeki = new Raigeki();

            formationData = formation;
            raigeki.F_Rai = getRaigekiData(enemyFlag: false);
            raigeki.E_Rai = getRaigekiData(enemyFlag: true);
            foreach (var item in F_Data.ShipData.Select((Mem_ship obj, int idx) => new
            {
                obj,
                idx
            }))
            {
                if (item.obj.Nowhp <= 0)
                {
                    RecoveryShip(item.idx);
                }
            }
            return(raigeki);
        }
Exemplo n.º 10
0
        public override NightBattleFmt GetResultData(FormationDatas formation, BattleCommandParams cParam)
        {
            int            num            = Enumerable.Count <int>(this.f_AtkIdxs);
            int            num2           = Enumerable.Count <int>(this.e_AtkIdxs);
            NightBattleFmt nightBattleFmt = new NightBattleFmt(this.F_Data.Deck.Rid, this.F_Data.ShipData, this.E_Data.ShipData);

            this.setTargetingKind(formation);
            this.formationData        = formation;
            nightBattleFmt.F_SearchId = this.getSerchLightFirstPos(this.fSerchLightIdxs, this.F_Data.ShipData);
            nightBattleFmt.E_SearchId = this.getSerchLightFirstPos(this.eSerchLightIdxs, this.E_Data.ShipData);
            nightBattleFmt.F_FlareId  = this.getFlarePos(this.fFlareIdxs, this.F_Data.ShipData, ref this.fValance2);
            nightBattleFmt.E_FlareId  = this.getFlarePos(this.eFlareIdxs, this.E_Data.ShipData, ref this.eValance2);
            if (this.seikuValue[0] >= 1 && this.seikuValue[0] <= 3)
            {
                nightBattleFmt.F_TouchPlane = this.getSyokusetuPlane(this.fTouchPlane);
                this.setTouchPlaneValanceValue(nightBattleFmt.F_TouchPlane, ref this.fValance1, ref this.fValance2, ref this.fValance3);
            }
            if (this.seikuValue[1] >= 1 && this.seikuValue[1] <= 3)
            {
                nightBattleFmt.E_TouchPlane = this.getSyokusetuPlane(this.eTouchPlane);
                this.setTouchPlaneValanceValue(nightBattleFmt.E_TouchPlane, ref this.eValance1, ref this.eValance2, ref this.eValance3);
            }
            int num3 = (num < num2) ? num2 : num;

            for (int i = 0; i < num3; i++)
            {
                if (i >= num && i >= num2)
                {
                    return(nightBattleFmt);
                }
                if (i < num)
                {
                    Hougeki <BattleAtackKinds_Night> hougekiData = this.getHougekiData(this.f_AtkIdxs.get_Item(i), this.F_Data.ShipData.get_Item(this.f_AtkIdxs.get_Item(i)));
                    if (hougekiData != null)
                    {
                        nightBattleFmt.Hougeki.Add(hougekiData);
                    }
                }
                if (i < num2)
                {
                    Hougeki <BattleAtackKinds_Night> hougekiData2 = this.getHougekiData(this.e_AtkIdxs.get_Item(i), this.E_Data.ShipData.get_Item(this.e_AtkIdxs.get_Item(i)));
                    if (hougekiData2 != null)
                    {
                        nightBattleFmt.Hougeki.Add(hougekiData2);
                    }
                }
            }
            return(nightBattleFmt);
        }
Exemplo n.º 11
0
        public override NightBattleFmt GetResultData(FormationDatas formation, BattleCommandParams cParam)
        {
            int            num            = f_AtkIdxs.Count();
            int            num2           = e_AtkIdxs.Count();
            NightBattleFmt nightBattleFmt = new NightBattleFmt(F_Data.Deck.Rid, F_Data.ShipData, E_Data.ShipData);

            setTargetingKind(formation);
            formationData             = formation;
            nightBattleFmt.F_SearchId = getSerchLightFirstPos(fSerchLightIdxs, F_Data.ShipData);
            nightBattleFmt.E_SearchId = getSerchLightFirstPos(eSerchLightIdxs, E_Data.ShipData);
            nightBattleFmt.F_FlareId  = getFlarePos(fFlareIdxs, F_Data.ShipData, ref fValance2);
            nightBattleFmt.E_FlareId  = getFlarePos(eFlareIdxs, E_Data.ShipData, ref eValance2);
            if (seikuValue[0] >= 1 && seikuValue[0] <= 3)
            {
                nightBattleFmt.F_TouchPlane = getSyokusetuPlane(fTouchPlane);
                setTouchPlaneValanceValue(nightBattleFmt.F_TouchPlane, ref fValance1, ref fValance2, ref fValance3);
            }
            if (seikuValue[1] >= 1 && seikuValue[1] <= 3)
            {
                nightBattleFmt.E_TouchPlane = getSyokusetuPlane(eTouchPlane);
                setTouchPlaneValanceValue(nightBattleFmt.E_TouchPlane, ref eValance1, ref eValance2, ref eValance3);
            }
            int num3 = (num < num2) ? num2 : num;

            for (int i = 0; i < num3; i++)
            {
                if (i >= num && i >= num2)
                {
                    return(nightBattleFmt);
                }
                if (i < num)
                {
                    Hougeki <BattleAtackKinds_Night> hougekiData = getHougekiData(f_AtkIdxs[i], F_Data.ShipData[f_AtkIdxs[i]]);
                    if (hougekiData != null)
                    {
                        nightBattleFmt.Hougeki.Add(hougekiData);
                    }
                }
                if (i < num2)
                {
                    Hougeki <BattleAtackKinds_Night> hougekiData2 = getHougekiData(e_AtkIdxs[i], E_Data.ShipData[e_AtkIdxs[i]]);
                    if (hougekiData2 != null)
                    {
                        nightBattleFmt.Hougeki.Add(hougekiData2);
                    }
                }
            }
            return(nightBattleFmt);
        }
Exemplo n.º 12
0
        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);
        }
Exemplo n.º 13
0
        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);
        }
Exemplo n.º 14
0
 protected virtual void setTargetingKind(FormationDatas formation)
 {
     if ((formation.F_Formation == BattleFormationKinds1.TanJuu || formation.F_Formation == BattleFormationKinds1.FukuJuu) && (formation.E_Formation == BattleFormationKinds1.TanJuu || formation.E_Formation == BattleFormationKinds1.FukuJuu))
     {
         if (formation.BattleFormation == BattleFormationKinds2.Doukou)
         {
             this.battleTargetKind = BattleTargetKind.Case1;
         }
         else if (formation.BattleFormation == BattleFormationKinds2.Hankou)
         {
             this.battleTargetKind = BattleTargetKind.Case2;
         }
         else if (formation.BattleFormation == BattleFormationKinds2.T_Own)
         {
             this.battleTargetKind = BattleTargetKind.Case3;
         }
         else if (formation.BattleFormation == BattleFormationKinds2.T_Enemy)
         {
             this.battleTargetKind = BattleTargetKind.Case4;
         }
     }
 }
        public override Raigeki GetResultData(FormationDatas formation, BattleCommandParams cParam)
        {
            this.commandParams = cParam;
            this.setTargetingKind(formation);
            int num  = Enumerable.Count <int>(this.f_AtkIdxs);
            int num2 = Enumerable.Count <int>(this.e_AtkIdxs);

            if (num == 0 && num2 == 0)
            {
                return(null);
            }
            if (num > 0)
            {
                this.setHitHoseiFromBattleCommand();
            }
            Raigeki raigeki = new Raigeki();

            this.formationData = formation;
            raigeki.F_Rai      = this.getRaigekiData(false);
            raigeki.E_Rai      = this.getRaigekiData(true);
            using (var enumerator = Enumerable.Select(this.F_Data.ShipData, (Mem_ship obj, int idx) => new
            {
                obj,
                idx
            }).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    var current = enumerator.get_Current();
                    if (current.obj.Nowhp <= 0)
                    {
                        bool flag = base.RecoveryShip(current.idx);
                    }
                }
            }
            return(raigeki);
        }
Exemplo n.º 16
0
 public override HougekiDayBattleFmt GetResultData(FormationDatas formation, BattleCommandParams cParam)
 {
     return(null);
 }
Exemplo n.º 17
0
 public override AirBattle GetResultData(FormationDatas formation, BattleCommandParams cParam)
 {
     return(base.GetResultData(formation, cParam));
 }
Exemplo n.º 18
0
 public override BattleResultFmt GetResultData(FormationDatas formation, BattleCommandParams cParam)
 {
     return(getData());
 }
Exemplo n.º 19
0
 public override Raigeki GetResultData(FormationDatas formation, BattleCommandParams cParam)
 {
     return(null);
 }
Exemplo n.º 20
0
 protected override void setTargetingKind(FormationDatas formationDatas)
 {
     this.battleTargetKind = BattleTargetKind.Other;
 }
Exemplo n.º 21
0
 public abstract T GetResultData(FormationDatas formation, BattleCommandParams cParam);