public override string ToString()
        {
            string text = string.Format("==[艦隊演習結果]==\n", new object[0]);

            text += string.Format("艦隊 ID:{0}({1}) 艦隊演習タイプ:{2}\n", base.DeckID, base.FleetName, this.PracticeType);
            text += string.Format("提督名:{0} Lv{1}  獲得提督経験値:{2}\n", base.Name, base.Level, base.Exp);
            text += "\n";
            ShipModel[] ships = base.Ships;
            for (int i = 0; i < ships.Length; i++)
            {
                ShipModel    shipModel   = ships[i];
                ShipExpModel shipExpInfo = base.GetShipExpInfo(shipModel.MemId);
                text += string.Format(" {0}(ID:{1}) {2}\n", shipModel.Name, shipModel.MemId, shipExpInfo);
                PowUpInfo powUpInfo = this._powup.get_Item(shipModel.MemId);
                text += string.Format("   火力上昇:{0} 雷装上昇:{1} 対空上昇:{2} 対潜上昇:{3} 装甲上昇:{4} 回避上昇:{5} 運上昇:{6}", new object[]
                {
                    powUpInfo.Karyoku,
                    powUpInfo.Raisou,
                    powUpInfo.Taiku,
                    powUpInfo.Taisen,
                    powUpInfo.Soukou,
                    powUpInfo.Kaihi,
                    powUpInfo.Lucky
                });
                text += "\n";
            }
            return(text);
        }
示例#2
0
        public string ToString(List <ShipModel> MaterialShips)
        {
            string empty = string.Empty;

            empty += ToString();
            empty += "\n";
            empty  = ((PowupTargetShip != null) ? (empty + $"対象艦: {PowupTargetShip.ShortName}\n") : (empty + $"対象艦: 未設定\n"));
            empty += "[--餌艦--]\n";
            for (int i = 0; i < MaterialShips.Count; i++)
            {
                ShipModel shipModel = MaterialShips[i];
                empty = ((shipModel == null) ? (empty + $"- - -\n") : (empty + $"{shipModel.ShortName} 餌艦効果(火:{shipModel.PowUpKaryoku} 雷:{shipModel.PowUpRaisou} 空:{shipModel.PowUpTaikuu} 装:{shipModel.PowUpSoukou})\n"));
            }
            if (_powup_target_ship != null)
            {
                PowUpInfo powUpInfo = getPowUpInfo(MaterialShips);
                empty += "対象艦のステ\u30fcタス\n";
                if (powUpInfo.Taikyu > 0)
                {
                    empty += $"耐久:{PowupTargetShip.MaxHp}->{PowupTargetShip.MaxHp + powUpInfo.Taikyu}(+{powUpInfo.Taikyu}) ";
                }
                empty += $"火力:{PowupTargetShip.Karyoku}->{PowupTargetShip.Karyoku + powUpInfo.Karyoku}(+{powUpInfo.Karyoku}) 雷装:{PowupTargetShip.Raisou}->{PowupTargetShip.Raisou + powUpInfo.Raisou}(+{powUpInfo.Raisou}) 対空:{PowupTargetShip.Taiku}->{PowupTargetShip.Taiku + powUpInfo.Taiku}(+{powUpInfo.Taiku}) 装甲:{PowupTargetShip.Soukou}->{PowupTargetShip.Soukou + powUpInfo.Soukou}(+{powUpInfo.Soukou}) 運:{PowupTargetShip.Lucky}->{PowupTargetShip.Lucky + powUpInfo.Lucky}(+{powUpInfo.Lucky})";
            }
            return(empty);
        }
        private void OnPowerUpNotify(ShipModel shipModel)
        {
            ShipExpModel shipExpInfo   = this.mDeckPracticeResultModel.GetShipExpInfo(shipModel.MemId);
            PowUpInfo    shipPowupInfo = this.mDeckPracticeResultModel.GetShipPowupInfo(shipModel.MemId);

            this.OnShipParameterUpEventListener(shipModel, shipExpInfo, shipPowupInfo);
        }
示例#4
0
 public void Forward2KindaikaKaishuKakunin(ShipModel targetShipModel, List <ShipModel> sozaiShipModels)
 {
     if (status == ScreenStatus.MODE_KINDAIKA_KAISHU)
     {
         SetStatus(ScreenStatus.MODE_KINDAIKA_KAISHU_KAKUNIN);
         PowUpInfo powUpInfo = mRemodelManager.getPowUpInfo(sozaiShipModels);
         mUIRemodelModernizationStartConfirm.Initialize(mKeyController, targetShipModel, sozaiShipModels, powUpInfo);
     }
 }
示例#5
0
 private void addKyoukaValues(PowUpInfo powerUpValues, Dictionary <Mem_ship.enumKyoukaIdx, int> baseKyouka)
 {
     if (powerUpValues.Kaihi > 0)
     {
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary;
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary2 = dictionary = baseKyouka;
         Mem_ship.enumKyoukaIdx key;
         Mem_ship.enumKyoukaIdx key2 = key = Mem_ship.enumKyoukaIdx.Kaihi;
         int num = dictionary[key];
         dictionary2[key2] = num + powerUpValues.Kaihi;
     }
     if (powerUpValues.Karyoku > 0)
     {
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary3;
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary4 = dictionary3 = baseKyouka;
         Mem_ship.enumKyoukaIdx key;
         Mem_ship.enumKyoukaIdx key3 = key = Mem_ship.enumKyoukaIdx.Houg;
         int num = dictionary3[key];
         dictionary4[key3] = num + powerUpValues.Karyoku;
     }
     if (powerUpValues.Raisou > 0)
     {
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary5;
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary6 = dictionary5 = baseKyouka;
         Mem_ship.enumKyoukaIdx key;
         Mem_ship.enumKyoukaIdx key4 = key = Mem_ship.enumKyoukaIdx.Raig;
         int num = dictionary5[key];
         dictionary6[key4] = num + powerUpValues.Raisou;
     }
     if (powerUpValues.Taisen > 0)
     {
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary7;
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary8 = dictionary7 = baseKyouka;
         Mem_ship.enumKyoukaIdx key;
         Mem_ship.enumKyoukaIdx key5 = key = Mem_ship.enumKyoukaIdx.Taisen;
         int num = dictionary7[key];
         dictionary8[key5] = num + powerUpValues.Taisen;
     }
     if (powerUpValues.Taiku > 0)
     {
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary9;
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary10 = dictionary9 = baseKyouka;
         Mem_ship.enumKyoukaIdx key;
         Mem_ship.enumKyoukaIdx key6 = key = Mem_ship.enumKyoukaIdx.Tyku;
         int num = dictionary9[key];
         dictionary10[key6] = num + powerUpValues.Taiku;
     }
     if (powerUpValues.Lucky > 0)
     {
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary11;
         Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary12 = dictionary11 = baseKyouka;
         Mem_ship.enumKyoukaIdx key;
         Mem_ship.enumKyoukaIdx key7 = key = Mem_ship.enumKyoukaIdx.Luck;
         int num = dictionary11[key];
         dictionary12[key7] = num + powerUpValues.Lucky;
     }
 }
示例#6
0
        public static void SetShipKyoukaValue(int ship_id, PowUpInfo powerUpValues)
        {
            Mem_ship     mem_ship     = Comm_UserDatas.Instance.User_ship.get_Item(ship_id);
            Mst_ship     mst_ship     = Mst_DataManager.Instance.Mst_ship.get_Item(mem_ship.Ship_id);
            Mem_shipBase mem_shipBase = new Mem_shipBase(mem_ship);

            mem_shipBase.C_houg   = ((powerUpValues.Karyoku - mst_ship.Houg <= 0) ? mem_shipBase.C_houg : (powerUpValues.Karyoku - mst_ship.Houg));
            mem_shipBase.C_raig   = ((powerUpValues.Raisou - mst_ship.Raig <= 0) ? mem_shipBase.C_raig : (powerUpValues.Raisou - mst_ship.Raig));
            mem_shipBase.C_kaihi  = ((powerUpValues.Kaihi - mst_ship.Kaih <= 0) ? mem_shipBase.C_kaihi : (powerUpValues.Kaihi - mst_ship.Kaih));
            mem_shipBase.C_luck   = ((powerUpValues.Lucky - mst_ship.Luck <= 0) ? mem_shipBase.C_luck : (powerUpValues.Lucky - mst_ship.Luck));
            mem_shipBase.C_souk   = ((powerUpValues.Soukou - mst_ship.Souk <= 0) ? mem_shipBase.C_souk : (powerUpValues.Soukou - mst_ship.Souk));
            mem_shipBase.C_tyku   = ((powerUpValues.Taiku - mst_ship.Tyku <= 0) ? mem_shipBase.C_tyku : (powerUpValues.Taiku - mst_ship.Tyku));
            mem_shipBase.C_taisen = ((powerUpValues.Taisen - mst_ship.Tais <= 0) ? mem_shipBase.C_taisen : (powerUpValues.Taisen - mst_ship.Tais));
            mem_ship.Set_ShipParam(mem_shipBase, mst_ship, false);
        }
示例#7
0
        private void getPracticeUpInfo_To_Sougou(PracticeDeckResultFmt fmt)
        {
            int    level = this.mem_ship.get_Item(0).Level;
            double num   = Math.Sqrt((double)this.mem_ship.get_Item(0).Level);
            bool   flag  = Mst_DataManager.Instance.Mst_stype.get_Item(this.mem_ship.get_Item(0).Stype).IsTrainingShip();
            double num2  = 30.0 + Utils.GetRandDouble(0.0, 10.0, 1.0, 1) + num;

            fmt.PracticeResult.GetMemberExp = (int)num2;
            int num3 = (!flag) ? 0 : 1;

            fmt.PracticeResult.GetShipExp = new Dictionary <int, int>();
            fmt.PowerUpData = new Dictionary <int, PowUpInfo>();
            Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship;
            double difficultShipExpKeisu        = this.getDifficultShipExpKeisu();
            double shipExpCommonKeisu           = this.getShipExpCommonKeisu();

            using (List <Mem_ship> .Enumerator enumerator = this.mem_ship.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    Mem_ship current = enumerator.get_Current();
                    fmt.PracticeResult.GetShipExp.Add(current.Rid, 0);
                    fmt.PowerUpData.Add(current.Rid, default(PowUpInfo));
                    Mst_ship mst_ship2 = mst_ship.get_Item(current.Ship_id);
                    double   num4      = Math.Sqrt((double)current.Level);
                    double   num5      = 40.0 + Utils.GetRandDouble(0.0, 10.0, 1.0, 1) + (double)(num3 * 10) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num4;
                    num5 = num5 * difficultShipExpKeisu * shipExpCommonKeisu;
                    fmt.PracticeResult.GetShipExp.set_Item(current.Rid, (int)num5);
                    Ship_GrowValues battleBaseParam = current.GetBattleBaseParam();
                    PowUpInfo       powUpInfo       = default(PowUpInfo);
                    double          max             = 1.0 + (num + num4) / 20.0;
                    powUpInfo.Karyoku = (int)Utils.GetRandDouble(0.0, max, 1.0, 1);
                    if (battleBaseParam.Houg + powUpInfo.Karyoku > mst_ship2.Houg_max)
                    {
                        int num6 = mst_ship2.Houg_max - mst_ship2.Houg;
                        powUpInfo.Karyoku = num6 - current.Kyouka.get_Item(Mem_ship.enumKyoukaIdx.Houg);
                    }
                    double max2 = 0.7 + (num + num4) / 20.0;
                    powUpInfo.Lucky = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1);
                    if (battleBaseParam.Luck + powUpInfo.Lucky > mst_ship2.Luck_max)
                    {
                        int num7 = mst_ship2.Luck_max - mst_ship2.Luck;
                        powUpInfo.Lucky = num7 - current.Kyouka.get_Item(Mem_ship.enumKyoukaIdx.Luck);
                    }
                    fmt.PowerUpData.set_Item(current.Rid, powUpInfo);
                }
            }
        }
示例#8
0
 private IEnumerator StartProductionCoroutine(DeckPracticeResultModel deckPracticeResultModel, Action onFinished)
 {
     TrophyUtil.Unlock_UserLevel();
     ShipModel[] ships = deckPracticeResultModel.Ships;
     foreach (ShipModel ship in ships)
     {
         ShipExpModel shipExpInfo = deckPracticeResultModel.GetShipExpInfo(ship.MemId);
         PowUpInfo    powUpInfo   = deckPracticeResultModel.GetShipPowupInfo(ship.MemId);
         IEnumerator  startProductionShipResult = StartProductionShipResult(ship, shipExpInfo, powUpInfo);
         yield return(StartCoroutine(startProductionShipResult));
     }
     if (onFinished != null)
     {
         SoundUtils.PlaySE(SEFIleInfos.CommonEnter1);
         onFinished();
     }
 }
示例#9
0
        public PowUpInfo getPowUpInfo(List <ShipModel> material_ships)
        {
            PowUpInfo result = default(PowUpInfo);

            if (_powup_target_ship == null)
            {
                return(result);
            }
            HashSet <int> hashSet = new HashSet <int>();

            for (int i = 0; i < material_ships.Count; i++)
            {
                ShipModel shipModel = material_ships[i];
                if (shipModel != null)
                {
                    result.Karyoku += shipModel.PowUpKaryoku;
                    result.Raisou  += shipModel.PowUpRaisou;
                    result.Taiku   += shipModel.PowUpTaikuu;
                    result.Soukou  += shipModel.PowUpSoukou;
                    result.Lucky   += shipModel.PowUpLucky;
                    hashSet.Add(shipModel.MemId);
                }
            }
            result.Karyoku = (int)((double)result.Karyoku * 1.2 + 0.3);
            result.Raisou  = (int)((double)result.Raisou * 1.2 + 0.3);
            result.Taiku   = (int)((double)result.Taiku * 1.2 + 0.3);
            result.Soukou  = (int)((double)result.Soukou * 1.2 + 0.3);
            result.Lucky   = (int)((double)result.Lucky * 1.2 + 0.3);
            Api_req_Kaisou api_req_Kaisou = new Api_req_Kaisou();

            result.Taikyu += api_req_Kaisou.GetSameShipPowerupTaikyu(_powup_target_ship.MemId, hashSet);
            result.Lucky  += api_req_Kaisou.GetSameShipPowerupLuck(_powup_target_ship.MemId, hashSet);
            int val      = _powup_target_ship.MaxHp + result.Taikyu;
            int taik_max = Mst_DataManager.Instance.Mst_ship[_powup_target_ship.MstId].Taik_max;
            int num      = Math.Min(val, taik_max);
            int val2     = num - _powup_target_ship.MaxHp;

            result.Taikyu  = Math.Max(val2, 0);
            result.Karyoku = Math.Min(_powup_target_ship.KaryokuMax - _powup_target_ship.Karyoku, result.Karyoku);
            result.Raisou  = Math.Min(_powup_target_ship.RaisouMax - _powup_target_ship.Raisou, result.Raisou);
            result.Taiku   = Math.Min(_powup_target_ship.TaikuMax - _powup_target_ship.Taiku, result.Taiku);
            result.Soukou  = Math.Min(_powup_target_ship.SoukouMax - _powup_target_ship.Soukou, result.Soukou);
            result.Lucky   = Math.Min(_powup_target_ship.LuckyMax - _powup_target_ship.Lucky, result.Lucky);
            result.RemoveNegative();
            return(result);
        }
示例#10
0
 private void addKyoukaValues(PowUpInfo powerUpValues, Dictionary <Mem_ship.enumKyoukaIdx, int> baseKyouka)
 {
     if (powerUpValues.Kaihi > 0)
     {
         Mem_ship.enumKyoukaIdx enumKyoukaIdx;
         Mem_ship.enumKyoukaIdx expr_11 = enumKyoukaIdx = Mem_ship.enumKyoukaIdx.Kaihi;
         int num = baseKyouka.get_Item(enumKyoukaIdx);
         baseKyouka.set_Item(expr_11, num + powerUpValues.Kaihi);
     }
     if (powerUpValues.Karyoku > 0)
     {
         Mem_ship.enumKyoukaIdx enumKyoukaIdx;
         Mem_ship.enumKyoukaIdx expr_3A = enumKyoukaIdx = Mem_ship.enumKyoukaIdx.Houg;
         int num = baseKyouka.get_Item(enumKyoukaIdx);
         baseKyouka.set_Item(expr_3A, num + powerUpValues.Karyoku);
     }
     if (powerUpValues.Raisou > 0)
     {
         Mem_ship.enumKyoukaIdx enumKyoukaIdx;
         Mem_ship.enumKyoukaIdx expr_64 = enumKyoukaIdx = Mem_ship.enumKyoukaIdx.Raig;
         int num = baseKyouka.get_Item(enumKyoukaIdx);
         baseKyouka.set_Item(expr_64, num + powerUpValues.Raisou);
     }
     if (powerUpValues.Taisen > 0)
     {
         Mem_ship.enumKyoukaIdx enumKyoukaIdx;
         Mem_ship.enumKyoukaIdx expr_8F = enumKyoukaIdx = Mem_ship.enumKyoukaIdx.Taisen;
         int num = baseKyouka.get_Item(enumKyoukaIdx);
         baseKyouka.set_Item(expr_8F, num + powerUpValues.Taisen);
     }
     if (powerUpValues.Taiku > 0)
     {
         Mem_ship.enumKyoukaIdx enumKyoukaIdx;
         Mem_ship.enumKyoukaIdx expr_BA = enumKyoukaIdx = Mem_ship.enumKyoukaIdx.Tyku;
         int num = baseKyouka.get_Item(enumKyoukaIdx);
         baseKyouka.set_Item(expr_BA, num + powerUpValues.Taiku);
     }
     if (powerUpValues.Lucky > 0)
     {
         Mem_ship.enumKyoukaIdx enumKyoukaIdx;
         Mem_ship.enumKyoukaIdx expr_E5 = enumKyoukaIdx = Mem_ship.enumKyoukaIdx.Luck;
         int num = baseKyouka.get_Item(enumKyoukaIdx);
         baseKyouka.set_Item(expr_E5, num + powerUpValues.Lucky);
     }
 }
示例#11
0
        public override string ToString()
        {
            string str = $"==[艦隊演習結果]==\n";

            str += $"艦隊 ID:{base.DeckID}({base.FleetName}) 艦隊演習タイプ:{PracticeType}\n";
            str += $"提督名:{base.Name} Lv{base.Level}  獲得提督経験値:{base.Exp}\n";
            str += "\n";
            ShipModel[] ships = base.Ships;
            foreach (ShipModel shipModel in ships)
            {
                ShipExpModel shipExpInfo = GetShipExpInfo(shipModel.MemId);
                str += $" {shipModel.Name}(ID:{shipModel.MemId}) {shipExpInfo}\n";
                PowUpInfo powUpInfo = _powup[shipModel.MemId];
                str += $"   火力上昇:{powUpInfo.Karyoku} 雷装上昇:{powUpInfo.Raisou} 対空上昇:{powUpInfo.Taiku} 対潜上昇:{powUpInfo.Taisen} 装甲上昇:{powUpInfo.Soukou} 回避上昇:{powUpInfo.Kaihi} 運上昇:{powUpInfo.Lucky}";
                str += "\n";
            }
            return(str);
        }
示例#12
0
        private void getPracticeUpInfo_To_Taisen(PracticeDeckResultFmt fmt)
        {
            int    level = this.mem_ship.get_Item(0).Level;
            double num   = Math.Sqrt((double)this.mem_ship.get_Item(0).Level);
            bool   flag  = Mst_DataManager.Instance.Mst_stype.get_Item(this.mem_ship.get_Item(0).Stype).IsTrainingShip();

            fmt.PracticeResult.GetMemberExp = 0;
            int num2 = (!flag) ? 0 : 1;

            fmt.PracticeResult.GetShipExp = new Dictionary <int, int>();
            fmt.PowerUpData = new Dictionary <int, PowUpInfo>();
            double difficultShipExpKeisu        = this.getDifficultShipExpKeisu();
            double shipExpCommonKeisu           = this.getShipExpCommonKeisu();
            Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship;

            using (List <Mem_ship> .Enumerator enumerator = this.mem_ship.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    Mem_ship current = enumerator.get_Current();
                    fmt.PracticeResult.GetShipExp.Add(current.Rid, 0);
                    fmt.PowerUpData.Add(current.Rid, default(PowUpInfo));
                    Mst_ship mst_ship2 = mst_ship.get_Item(current.Ship_id);
                    if (mst_ship2.Tais != 0)
                    {
                        double num3 = Math.Sqrt((double)current.Level);
                        double max  = (double)(12 + num2 * 6);
                        double num4 = 7.0 + Utils.GetRandDouble(0.0, max, 1.0, 1) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num / 2.0 + num3;
                        num4 = num4 * difficultShipExpKeisu * shipExpCommonKeisu;
                        fmt.PracticeResult.GetShipExp.set_Item(current.Rid, (int)num4);
                        PowUpInfo powUpInfo = default(PowUpInfo);
                        double    max2      = 1.4 + (double)num2 * 0.3 + (num + num3) / 20.0;
                        powUpInfo.Taisen = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1);
                        Ship_GrowValues battleBaseParam = current.GetBattleBaseParam();
                        if (battleBaseParam.Taisen + powUpInfo.Taisen > mst_ship2.Tais_max)
                        {
                            int num5 = mst_ship2.Tais_max - mst_ship2.Tais;
                            powUpInfo.Taisen = num5 - current.Kyouka.get_Item(Mem_ship.enumKyoukaIdx.Taisen);
                        }
                        fmt.PowerUpData.set_Item(current.Rid, powUpInfo);
                    }
                }
            }
        }
示例#13
0
        private void getPracticeUpInfo_To_Sougou(PracticeDeckResultFmt fmt)
        {
            int    level = mem_ship[0].Level;
            double num   = Math.Sqrt(mem_ship[0].Level);
            bool   flag  = Mst_DataManager.Instance.Mst_stype[mem_ship[0].Stype].IsTrainingShip();
            double num2  = 30.0 + Utils.GetRandDouble(0.0, 10.0, 1.0, 1) + num;

            fmt.PracticeResult.GetMemberExp = (int)num2;
            int num3 = flag ? 1 : 0;

            fmt.PracticeResult.GetShipExp = new Dictionary <int, int>();
            fmt.PowerUpData = new Dictionary <int, PowUpInfo>();
            Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship;
            double difficultShipExpKeisu        = getDifficultShipExpKeisu();
            double shipExpCommonKeisu           = getShipExpCommonKeisu();

            foreach (Mem_ship item in mem_ship)
            {
                fmt.PracticeResult.GetShipExp.Add(item.Rid, 0);
                fmt.PowerUpData.Add(item.Rid, default(PowUpInfo));
                Mst_ship mst_ship2 = mst_ship[item.Ship_id];
                double   num4      = Math.Sqrt(item.Level);
                double   num5      = 40.0 + Utils.GetRandDouble(0.0, 10.0, 1.0, 1) + (double)(num3 * 10) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num4;
                num5 = num5 * difficultShipExpKeisu * shipExpCommonKeisu;
                fmt.PracticeResult.GetShipExp[item.Rid] = (int)num5;
                Ship_GrowValues battleBaseParam = item.GetBattleBaseParam();
                PowUpInfo       value           = default(PowUpInfo);
                double          max             = 1.0 + (num + num4) / 20.0;
                value.Karyoku = (int)Utils.GetRandDouble(0.0, max, 1.0, 1);
                if (battleBaseParam.Houg + value.Karyoku > mst_ship2.Houg_max)
                {
                    int num6 = mst_ship2.Houg_max - mst_ship2.Houg;
                    value.Karyoku = num6 - item.Kyouka[Mem_ship.enumKyoukaIdx.Houg];
                }
                double max2 = 0.7 + (num + num4) / 20.0;
                value.Lucky = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1);
                if (battleBaseParam.Luck + value.Lucky > mst_ship2.Luck_max)
                {
                    int num7 = mst_ship2.Luck_max - mst_ship2.Luck;
                    value.Lucky = num7 - item.Kyouka[Mem_ship.enumKyoukaIdx.Luck];
                }
                fmt.PowerUpData[item.Rid] = value;
            }
        }
示例#14
0
        private void getPracticeUpInfo_To_Taisen(PracticeDeckResultFmt fmt)
        {
            int    level = mem_ship[0].Level;
            double num   = Math.Sqrt(mem_ship[0].Level);
            bool   flag  = Mst_DataManager.Instance.Mst_stype[mem_ship[0].Stype].IsTrainingShip();

            fmt.PracticeResult.GetMemberExp = 0;
            int num2 = flag ? 1 : 0;

            fmt.PracticeResult.GetShipExp = new Dictionary <int, int>();
            fmt.PowerUpData = new Dictionary <int, PowUpInfo>();
            double difficultShipExpKeisu        = getDifficultShipExpKeisu();
            double shipExpCommonKeisu           = getShipExpCommonKeisu();
            Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship;

            foreach (Mem_ship item in mem_ship)
            {
                fmt.PracticeResult.GetShipExp.Add(item.Rid, 0);
                fmt.PowerUpData.Add(item.Rid, default(PowUpInfo));
                Mst_ship mst_ship2 = mst_ship[item.Ship_id];
                if (mst_ship2.Tais != 0)
                {
                    double num3 = Math.Sqrt(item.Level);
                    double max  = 12 + num2 * 6;
                    double num4 = 7.0 + Utils.GetRandDouble(0.0, max, 1.0, 1) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num / 2.0 + num3;
                    num4 = num4 * difficultShipExpKeisu * shipExpCommonKeisu;
                    fmt.PracticeResult.GetShipExp[item.Rid] = (int)num4;
                    PowUpInfo value = default(PowUpInfo);
                    double    max2  = 1.4 + (double)num2 * 0.3 + (num + num3) / 20.0;
                    value.Taisen = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1);
                    Ship_GrowValues battleBaseParam = item.GetBattleBaseParam();
                    if (battleBaseParam.Taisen + value.Taisen > mst_ship2.Tais_max)
                    {
                        int num5 = mst_ship2.Tais_max - mst_ship2.Tais;
                        value.Taisen = num5 - item.Kyouka[Mem_ship.enumKyoukaIdx.Taisen];
                    }
                    fmt.PowerUpData[item.Rid] = value;
                }
            }
        }
示例#15
0
        private IEnumerator InitializeCoroutine(ShipModel shipModel, PowUpInfo powUpInfo)
        {
            Texture prevTexture      = mTexture_Ship.mainTexture;
            bool    aleadyKaryokuMax = shipModel.IsMaxKaryoku() && powUpInfo.Karyoku == 0;

            mUIDeckPracticeUpParameters[0].Initialize(shipModel.Karyoku - powUpInfo.Karyoku, shipModel.Karyoku, aleadyKaryokuMax);
            bool aleadyRaisouMax = shipModel.IsMaxRaisou() && powUpInfo.Raisou == 0;

            mUIDeckPracticeUpParameters[1].Initialize(shipModel.Raisou - powUpInfo.Raisou, shipModel.Raisou, aleadyRaisouMax);
            bool aleadyTaikuMax = shipModel.IsMaxTaiku() && powUpInfo.Taiku == 0;

            mUIDeckPracticeUpParameters[2].Initialize(shipModel.Taiku - powUpInfo.Taiku, shipModel.Taiku, aleadyTaikuMax);
            bool aleadyKaihiMax = shipModel.IsMaxKaihi() && powUpInfo.Kaihi == 0;

            mUIDeckPracticeUpParameters[3].Initialize(shipModel.Kaihi - powUpInfo.Kaihi, shipModel.Kaihi, aleadyKaihiMax);
            bool aleadyLuckyMax = shipModel.IsMaxLucky() && powUpInfo.Lucky == 0;

            mUIDeckPracticeUpParameters[4].Initialize(shipModel.Lucky - powUpInfo.Lucky, shipModel.Lucky, aleadyLuckyMax);
            bool aleadyTaisenMax = shipModel.IsMaxTaisen() && powUpInfo.Taisen == 0;

            mUIDeckPracticeUpParameters[5].Initialize(shipModel.Taisen - powUpInfo.Taisen, shipModel.Taisen, aleadyTaisenMax);
            yield return(new WaitForEndOfFrame());

            ResetPositionParameterSlot();
            mUIDeckPracticeShipInfo.Reposition();
            ResetPositionShip();
            mTexture_Ship.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(shipModel.GetGraphicsMstId(), 9);

            mTexture_Ship.MakePixelPerfect();
            mTexture_Ship.transform.localPosition = Util.Poi2Vec(shipModel.Offsets.GetShipDisplayCenter(shipModel.IsDamaged()));
            if (prevTexture != null)
            {
                yield return(new WaitForEndOfFrame());

                Resources.UnloadAsset(prevTexture);
            }
        }
示例#16
0
 private void OnShipParameterUpEventListener(ShipModel shipModel, ShipExpModel shipExpModel, PowUpInfo powUpInfo)
 {
     if (mOnShipParameterUpEvent != null)
     {
         mOnShipParameterUpEvent(shipModel, shipExpModel, powUpInfo);
     }
 }
示例#17
0
        private void getPracticeUpInfo_To_Kouku(PracticeDeckResultFmt fmt)
        {
            int    level = mem_ship[0].Level;
            double num   = Math.Sqrt(mem_ship[0].Level);
            bool   flag  = Mst_DataManager.Instance.Mst_stype[mem_ship[0].Stype].IsTrainingShip();

            fmt.PracticeResult.GetMemberExp = 0;
            int num2 = flag ? 1 : 0;

            fmt.PracticeResult.GetShipExp = new Dictionary <int, int>();
            fmt.PowerUpData = new Dictionary <int, PowUpInfo>();
            double difficultShipExpKeisu        = getDifficultShipExpKeisu();
            double shipExpCommonKeisu           = getShipExpCommonKeisu();
            Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship;

            foreach (Mem_ship item in mem_ship)
            {
                fmt.PracticeResult.GetShipExp.Add(item.Rid, 0);
                fmt.PowerUpData.Add(item.Rid, default(PowUpInfo));
                Mst_ship mst_ship2 = mst_ship[item.Ship_id];
                if (mst_ship2.Stype != 13)
                {
                    if (mst_ship2.Stype == 14)
                    {
                        List <Mst_slotitem> mstSlotItems = item.GetMstSlotItems();
                        bool flag2 = false;
                        for (int i = 0; i < mstSlotItems.Count; i++)
                        {
                            SlotitemCategory slotitem_type = Mst_DataManager.Instance.Mst_equip_category[mstSlotItems[i].Type3].Slotitem_type;
                            if (slotitem_type == SlotitemCategory.Kanjouki || slotitem_type == SlotitemCategory.Suijouki)
                            {
                                flag2 = true;
                                break;
                            }
                        }
                        if (!flag2)
                        {
                            continue;
                        }
                    }
                    double num3 = Math.Sqrt(item.Level);
                    double max  = 14 + num2 * 7;
                    double num4 = 10.0 + Utils.GetRandDouble(0.0, max, 1.0, 1) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num / 2.0 + num3;
                    num4 = num4 * difficultShipExpKeisu * shipExpCommonKeisu;
                    fmt.PracticeResult.GetShipExp[item.Rid] = (int)num4;
                    Ship_GrowValues battleBaseParam = item.GetBattleBaseParam();
                    PowUpInfo       value           = default(PowUpInfo);
                    double          max2            = 1.5 + (double)num2 * 0.2 + (num + num3) / 20.0;
                    value.Taiku = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1);
                    if (battleBaseParam.Taiku + value.Taiku > mst_ship2.Tyku_max)
                    {
                        int num5 = mst_ship2.Tyku_max - mst_ship2.Tyku;
                        value.Taiku = num5 - item.Kyouka[Mem_ship.enumKyoukaIdx.Tyku];
                    }
                    if (motherBGroup.Contains(item.Stype))
                    {
                        double max3 = 1.2 + (num + num3) / 20.0;
                        value.Karyoku = (int)Utils.GetRandDouble(0.0, max3, 1.0, 1);
                        if (battleBaseParam.Houg + value.Karyoku > mst_ship2.Houg_max)
                        {
                            int num6 = mst_ship2.Houg_max - mst_ship2.Houg;
                            value.Karyoku = num6 - item.Kyouka[Mem_ship.enumKyoukaIdx.Houg];
                        }
                    }
                    fmt.PowerUpData[item.Rid] = value;
                }
            }
        }
示例#18
0
        public void Initialize(KeyControl keyController, ShipModel eatShipModel, List <ShipModel> baitShipModels, PowUpInfo powerUpInfo)
        {
            base.enabled = true;
            camera.gameObject.SetActive(true);
            mKeyController      = keyController;
            mEatShipModel       = eatShipModel;
            mBaitShipmodels     = baitShipModels;
            _BeforeFocus        = mButton_Positive;
            mButtonCurrentFocus = mButton_Negative;
            UIRemodelModernizationStartConfirmSlot[] array = mUIRemodelModernizationStartConfirmSlots;
            foreach (UIRemodelModernizationStartConfirmSlot uIRemodelModernizationStartConfirmSlot in array)
            {
                uIRemodelModernizationStartConfirmSlot.StopKira();
            }
            for (int j = 0; j < mUIRemodelModernizationStartConfirmSlots.Length; j++)
            {
                if (j < baitShipModels.Count)
                {
                    mUIRemodelModernizationStartConfirmSlots[j].Initialize(baitShipModels[j]);
                }
                else
                {
                    mUIRemodelModernizationStartConfirmSlots[j].Initialize(null);
                }
            }
            int num = eatShipModel.Karyoku + powerUpInfo.Karyoku;

            if (eatShipModel.KaryokuMax <= eatShipModel.Karyoku)
            {
                mTransform_MaxTags[0].localScale = Vector3.one;
                mTransform_Arrows[0].SetActive(isActive: false);
                mLabel_PrevParams[0].text = "[202020]" + eatShipModel.Karyoku.ToString() + "[-]";
                mLabel_NextParams[0].text = string.Empty;
            }
            else if (0 < powerUpInfo.Karyoku)
            {
                if (eatShipModel.KaryokuMax <= num)
                {
                    mLabel_PrevParams[0].text = "[e3904d]" + eatShipModel.Karyoku.ToString() + "[-]";
                    mLabel_NextParams[0].text = string.Empty;
                    mTransform_Arrows[0].SetActive(isActive: false);
                    mTransform_MaxTags[0].localScale = Vector3.one;
                }
                else
                {
                    mLabel_PrevParams[0].text = "[202020]" + eatShipModel.Karyoku.ToString() + "[-]";
                    mLabel_NextParams[0].text = "[00a4ff]" + num.ToString() + "[-]";
                    mTransform_Arrows[0].SetActive(isActive: true);
                    mTransform_MaxTags[0].localScale = Vector3.zero;
                }
            }
            else
            {
                mLabel_PrevParams[0].text        = "[202020]" + eatShipModel.Karyoku.ToString() + "[-]";
                mLabel_NextParams[0].text        = "[202020]" + eatShipModel.Karyoku.ToString() + "[-]";
                mTransform_MaxTags[0].localScale = Vector3.zero;
                mTransform_Arrows[0].SetActive(isActive: false);
            }
            int num2 = eatShipModel.Raisou + powerUpInfo.Raisou;

            if (eatShipModel.RaisouMax <= eatShipModel.Raisou)
            {
                mTransform_MaxTags[1].localScale = Vector3.one;
                mTransform_Arrows[1].SetActive(isActive: false);
                mLabel_PrevParams[1].text = "[202020]" + eatShipModel.Raisou.ToString() + "[-]";
                mLabel_NextParams[1].text = string.Empty;
            }
            else if (0 < powerUpInfo.Raisou)
            {
                if (eatShipModel.RaisouMax <= num2)
                {
                    mLabel_PrevParams[1].text = "[e3904d]" + eatShipModel.Raisou.ToString() + "[-]";
                    mLabel_NextParams[1].text = string.Empty;
                    mTransform_Arrows[1].SetActive(isActive: false);
                    mTransform_MaxTags[1].localScale = Vector3.one;
                }
                else
                {
                    mLabel_PrevParams[1].text = "[202020]" + eatShipModel.Raisou.ToString() + "[-]";
                    mLabel_NextParams[1].text = "[00a4ff]" + num2.ToString() + "[-]";
                    mTransform_Arrows[1].SetActive(isActive: true);
                    mTransform_MaxTags[1].localScale = Vector3.zero;
                }
            }
            else
            {
                mLabel_PrevParams[1].text        = "[202020]" + eatShipModel.Raisou.ToString() + "[-]";
                mLabel_NextParams[1].text        = "[202020]" + eatShipModel.Raisou.ToString() + "[-]";
                mTransform_MaxTags[1].localScale = Vector3.zero;
                mTransform_Arrows[1].SetActive(isActive: false);
            }
            int num3 = eatShipModel.Taiku + powerUpInfo.Taiku;

            if (eatShipModel.TaikuMax <= eatShipModel.Taiku)
            {
                mTransform_MaxTags[2].localScale = Vector3.one;
                mTransform_Arrows[2].SetActive(isActive: false);
                mLabel_PrevParams[2].text = "[202020]" + eatShipModel.Taiku.ToString() + "[-]";
                mLabel_NextParams[2].text = string.Empty;
            }
            else if (0 < powerUpInfo.Taiku)
            {
                if (eatShipModel.TaikuMax <= num3)
                {
                    mLabel_PrevParams[2].text = "[e3904d]" + eatShipModel.Taiku.ToString() + "[-]";
                    mLabel_NextParams[2].text = string.Empty;
                    mTransform_Arrows[2].SetActive(isActive: false);
                    mTransform_MaxTags[2].localScale = Vector3.one;
                }
                else
                {
                    mLabel_PrevParams[2].text = "[202020]" + eatShipModel.Taiku.ToString() + "[-]";
                    mLabel_NextParams[2].text = "[00a4ff]" + num3.ToString() + "[-]";
                    mTransform_Arrows[2].SetActive(isActive: true);
                    mTransform_MaxTags[2].localScale = Vector3.zero;
                }
            }
            else
            {
                mLabel_PrevParams[2].text        = "[202020]" + eatShipModel.Taiku.ToString() + "[-]";
                mLabel_NextParams[2].text        = "[202020]" + eatShipModel.Taiku.ToString() + "[-]";
                mTransform_MaxTags[2].localScale = Vector3.zero;
                mTransform_Arrows[2].SetActive(isActive: false);
            }
            int num4 = eatShipModel.Soukou + powerUpInfo.Soukou;

            if (eatShipModel.SoukouMax <= eatShipModel.Soukou)
            {
                mTransform_MaxTags[3].localScale = Vector3.one;
                mTransform_Arrows[3].SetActive(isActive: false);
                mLabel_PrevParams[3].text = "[202020]" + eatShipModel.Soukou.ToString() + "[-]";
                mLabel_NextParams[3].text = string.Empty;
            }
            else if (0 < powerUpInfo.Soukou)
            {
                if (eatShipModel.SoukouMax <= num4)
                {
                    mLabel_PrevParams[3].text = "[e3904d]" + eatShipModel.Soukou.ToString() + "[-]";
                    mLabel_NextParams[3].text = string.Empty;
                    mTransform_Arrows[3].SetActive(isActive: false);
                    mTransform_MaxTags[3].localScale = Vector3.one;
                }
                else
                {
                    mLabel_PrevParams[3].text = "[202020]" + eatShipModel.Soukou.ToString() + "[-]";
                    mLabel_NextParams[3].text = "[00a4ff]" + num4.ToString() + "[-]";
                    mTransform_Arrows[3].SetActive(isActive: true);
                    mTransform_MaxTags[3].localScale = Vector3.zero;
                }
            }
            else
            {
                mLabel_PrevParams[3].text        = "[202020]" + eatShipModel.Soukou.ToString() + "[-]";
                mLabel_NextParams[3].text        = "[202020]" + eatShipModel.Soukou.ToString() + "[-]";
                mTransform_MaxTags[3].localScale = Vector3.zero;
                mTransform_Arrows[3].SetActive(isActive: false);
            }
            int num5 = eatShipModel.Lucky + powerUpInfo.Lucky;

            if (eatShipModel.LuckyMax <= eatShipModel.Lucky)
            {
                mTransform_MaxTags[4].localScale = Vector3.one;
                mTransform_Arrows[4].SetActive(isActive: false);
                mLabel_PrevParams[4].text = "[202020]" + eatShipModel.Lucky.ToString() + "[-]";
                mLabel_NextParams[4].text = string.Empty;
            }
            else if (0 < powerUpInfo.Lucky)
            {
                if (eatShipModel.LuckyMax <= num5)
                {
                    mLabel_PrevParams[4].text = "[e3904d]" + eatShipModel.Lucky.ToString() + "[-]";
                    mLabel_NextParams[4].text = string.Empty;
                    mTransform_Arrows[4].SetActive(isActive: false);
                    mTransform_MaxTags[4].localScale = Vector3.one;
                }
                else
                {
                    mLabel_PrevParams[4].text = "[202020]" + eatShipModel.Lucky.ToString() + "[-]";
                    mLabel_NextParams[4].text = "[00a4ff]" + num5.ToString() + "[-]";
                    mTransform_Arrows[4].SetActive(isActive: true);
                    mTransform_MaxTags[4].localScale = Vector3.zero;
                }
            }
            else
            {
                mLabel_PrevParams[4].text        = "[202020]" + eatShipModel.Lucky.ToString() + "[-]";
                mLabel_NextParams[4].text        = "[202020]" + eatShipModel.Lucky.ToString() + "[-]";
                mTransform_MaxTags[4].localScale = Vector3.zero;
                mTransform_Arrows[4].SetActive(isActive: false);
            }
            List <UIButton> list = new List <UIButton>();

            list.Add(mButton_Negative);
            list.Add(mButton_Positive);
            mButtonFocasable = list.ToArray();
            mButtonFocasable[0].GetComponent <UISprite>().spriteName = "btn_cancel_on";
        }
        public void Initialize(KeyControl keyController, ShipModel eatShipModel, List <ShipModel> baitShipModels, PowUpInfo powerUpInfo)
        {
            base.set_enabled(true);
            this.camera.get_gameObject().SetActive(true);
            this.mKeyController      = keyController;
            this.mEatShipModel       = eatShipModel;
            this.mBaitShipmodels     = baitShipModels;
            this._BeforeFocus        = this.mButton_Positive;
            this.mButtonCurrentFocus = this.mButton_Negative;
            UIRemodelModernizationStartConfirmSlot[] array = this.mUIRemodelModernizationStartConfirmSlots;
            for (int i = 0; i < array.Length; i++)
            {
                UIRemodelModernizationStartConfirmSlot uIRemodelModernizationStartConfirmSlot = array[i];
                uIRemodelModernizationStartConfirmSlot.StopKira();
            }
            for (int j = 0; j < this.mUIRemodelModernizationStartConfirmSlots.Length; j++)
            {
                if (j < baitShipModels.get_Count())
                {
                    this.mUIRemodelModernizationStartConfirmSlots[j].Initialize(baitShipModels.get_Item(j));
                }
                else
                {
                    this.mUIRemodelModernizationStartConfirmSlots[j].Initialize(null);
                }
            }
            int num = eatShipModel.Karyoku + powerUpInfo.Karyoku;

            if (eatShipModel.KaryokuMax <= eatShipModel.Karyoku)
            {
                this.mTransform_MaxTags[0].set_localScale(Vector3.get_one());
                this.mTransform_Arrows[0].SetActive(false);
                this.mLabel_PrevParams[0].text = "[202020]" + eatShipModel.Karyoku.ToString() + "[-]";
                this.mLabel_NextParams[0].text = string.Empty;
            }
            else if (0 < powerUpInfo.Karyoku)
            {
                if (eatShipModel.KaryokuMax <= num)
                {
                    this.mLabel_PrevParams[0].text = "[e3904d]" + eatShipModel.Karyoku.ToString() + "[-]";
                    this.mLabel_NextParams[0].text = string.Empty;
                    this.mTransform_Arrows[0].SetActive(false);
                    this.mTransform_MaxTags[0].set_localScale(Vector3.get_one());
                }
                else
                {
                    this.mLabel_PrevParams[0].text = "[202020]" + eatShipModel.Karyoku.ToString() + "[-]";
                    this.mLabel_NextParams[0].text = "[00a4ff]" + num.ToString() + "[-]";
                    this.mTransform_Arrows[0].SetActive(true);
                    this.mTransform_MaxTags[0].set_localScale(Vector3.get_zero());
                }
            }
            else
            {
                this.mLabel_PrevParams[0].text = "[202020]" + eatShipModel.Karyoku.ToString() + "[-]";
                this.mLabel_NextParams[0].text = "[202020]" + eatShipModel.Karyoku.ToString() + "[-]";
                this.mTransform_MaxTags[0].set_localScale(Vector3.get_zero());
                this.mTransform_Arrows[0].SetActive(false);
            }
            int num2 = eatShipModel.Raisou + powerUpInfo.Raisou;

            if (eatShipModel.RaisouMax <= eatShipModel.Raisou)
            {
                this.mTransform_MaxTags[1].set_localScale(Vector3.get_one());
                this.mTransform_Arrows[1].SetActive(false);
                this.mLabel_PrevParams[1].text = "[202020]" + eatShipModel.Raisou.ToString() + "[-]";
                this.mLabel_NextParams[1].text = string.Empty;
            }
            else if (0 < powerUpInfo.Raisou)
            {
                if (eatShipModel.RaisouMax <= num2)
                {
                    this.mLabel_PrevParams[1].text = "[e3904d]" + eatShipModel.Raisou.ToString() + "[-]";
                    this.mLabel_NextParams[1].text = string.Empty;
                    this.mTransform_Arrows[1].SetActive(false);
                    this.mTransform_MaxTags[1].set_localScale(Vector3.get_one());
                }
                else
                {
                    this.mLabel_PrevParams[1].text = "[202020]" + eatShipModel.Raisou.ToString() + "[-]";
                    this.mLabel_NextParams[1].text = "[00a4ff]" + num2.ToString() + "[-]";
                    this.mTransform_Arrows[1].SetActive(true);
                    this.mTransform_MaxTags[1].set_localScale(Vector3.get_zero());
                }
            }
            else
            {
                this.mLabel_PrevParams[1].text = "[202020]" + eatShipModel.Raisou.ToString() + "[-]";
                this.mLabel_NextParams[1].text = "[202020]" + eatShipModel.Raisou.ToString() + "[-]";
                this.mTransform_MaxTags[1].set_localScale(Vector3.get_zero());
                this.mTransform_Arrows[1].SetActive(false);
            }
            int num3 = eatShipModel.Taiku + powerUpInfo.Taiku;

            if (eatShipModel.TaikuMax <= eatShipModel.Taiku)
            {
                this.mTransform_MaxTags[2].set_localScale(Vector3.get_one());
                this.mTransform_Arrows[2].SetActive(false);
                this.mLabel_PrevParams[2].text = "[202020]" + eatShipModel.Taiku.ToString() + "[-]";
                this.mLabel_NextParams[2].text = string.Empty;
            }
            else if (0 < powerUpInfo.Taiku)
            {
                if (eatShipModel.TaikuMax <= num3)
                {
                    this.mLabel_PrevParams[2].text = "[e3904d]" + eatShipModel.Taiku.ToString() + "[-]";
                    this.mLabel_NextParams[2].text = string.Empty;
                    this.mTransform_Arrows[2].SetActive(false);
                    this.mTransform_MaxTags[2].set_localScale(Vector3.get_one());
                }
                else
                {
                    this.mLabel_PrevParams[2].text = "[202020]" + eatShipModel.Taiku.ToString() + "[-]";
                    this.mLabel_NextParams[2].text = "[00a4ff]" + num3.ToString() + "[-]";
                    this.mTransform_Arrows[2].SetActive(true);
                    this.mTransform_MaxTags[2].set_localScale(Vector3.get_zero());
                }
            }
            else
            {
                this.mLabel_PrevParams[2].text = "[202020]" + eatShipModel.Taiku.ToString() + "[-]";
                this.mLabel_NextParams[2].text = "[202020]" + eatShipModel.Taiku.ToString() + "[-]";
                this.mTransform_MaxTags[2].set_localScale(Vector3.get_zero());
                this.mTransform_Arrows[2].SetActive(false);
            }
            int num4 = eatShipModel.Soukou + powerUpInfo.Soukou;

            if (eatShipModel.SoukouMax <= eatShipModel.Soukou)
            {
                this.mTransform_MaxTags[3].set_localScale(Vector3.get_one());
                this.mTransform_Arrows[3].SetActive(false);
                this.mLabel_PrevParams[3].text = "[202020]" + eatShipModel.Soukou.ToString() + "[-]";
                this.mLabel_NextParams[3].text = string.Empty;
            }
            else if (0 < powerUpInfo.Soukou)
            {
                if (eatShipModel.SoukouMax <= num4)
                {
                    this.mLabel_PrevParams[3].text = "[e3904d]" + eatShipModel.Soukou.ToString() + "[-]";
                    this.mLabel_NextParams[3].text = string.Empty;
                    this.mTransform_Arrows[3].SetActive(false);
                    this.mTransform_MaxTags[3].set_localScale(Vector3.get_one());
                }
                else
                {
                    this.mLabel_PrevParams[3].text = "[202020]" + eatShipModel.Soukou.ToString() + "[-]";
                    this.mLabel_NextParams[3].text = "[00a4ff]" + num4.ToString() + "[-]";
                    this.mTransform_Arrows[3].SetActive(true);
                    this.mTransform_MaxTags[3].set_localScale(Vector3.get_zero());
                }
            }
            else
            {
                this.mLabel_PrevParams[3].text = "[202020]" + eatShipModel.Soukou.ToString() + "[-]";
                this.mLabel_NextParams[3].text = "[202020]" + eatShipModel.Soukou.ToString() + "[-]";
                this.mTransform_MaxTags[3].set_localScale(Vector3.get_zero());
                this.mTransform_Arrows[3].SetActive(false);
            }
            int num5 = eatShipModel.Lucky + powerUpInfo.Lucky;

            if (eatShipModel.LuckyMax <= eatShipModel.Lucky)
            {
                this.mTransform_MaxTags[4].set_localScale(Vector3.get_one());
                this.mTransform_Arrows[4].SetActive(false);
                this.mLabel_PrevParams[4].text = "[202020]" + eatShipModel.Lucky.ToString() + "[-]";
                this.mLabel_NextParams[4].text = string.Empty;
            }
            else if (0 < powerUpInfo.Lucky)
            {
                if (eatShipModel.LuckyMax <= num5)
                {
                    this.mLabel_PrevParams[4].text = "[e3904d]" + eatShipModel.Lucky.ToString() + "[-]";
                    this.mLabel_NextParams[4].text = string.Empty;
                    this.mTransform_Arrows[4].SetActive(false);
                    this.mTransform_MaxTags[4].set_localScale(Vector3.get_one());
                }
                else
                {
                    this.mLabel_PrevParams[4].text = "[202020]" + eatShipModel.Lucky.ToString() + "[-]";
                    this.mLabel_NextParams[4].text = "[00a4ff]" + num5.ToString() + "[-]";
                    this.mTransform_Arrows[4].SetActive(true);
                    this.mTransform_MaxTags[4].set_localScale(Vector3.get_zero());
                }
            }
            else
            {
                this.mLabel_PrevParams[4].text = "[202020]" + eatShipModel.Lucky.ToString() + "[-]";
                this.mLabel_NextParams[4].text = "[202020]" + eatShipModel.Lucky.ToString() + "[-]";
                this.mTransform_MaxTags[4].set_localScale(Vector3.get_zero());
                this.mTransform_Arrows[4].SetActive(false);
            }
            List <UIButton> list = new List <UIButton>();

            list.Add(this.mButton_Negative);
            list.Add(this.mButton_Positive);
            this.mButtonFocasable = list.ToArray();
            this.mButtonFocasable[0].GetComponent <UISprite>().spriteName = "btn_cancel_on";
        }
        private void OnShipParameterUpEventListener(ShipModel shipModel, ShipExpModel shipExpModel, PowUpInfo powUpInfo)
        {
            UIDeckPracticeBanner uIDeckPracticeBanner = mUIDeckPracticeBanners.First((UIDeckPracticeBanner shipBanner) => shipBanner.Model.MemId == shipModel.MemId);

            if (!powUpInfo.IsAllZero())
            {
                uIDeckPracticeBanner.PlayPracticeWithLevelUp();
            }
            else
            {
                uIDeckPracticeBanner.PlayPractice();
            }
        }
示例#21
0
        public string ToString(List <ShipModel> MaterialShips)
        {
            string text = string.Empty;

            text += base.ToString();
            text += "\n";
            if (this.PowupTargetShip == null)
            {
                text += string.Format("対象艦: 未設定\n", new object[0]);
            }
            else
            {
                text += string.Format("対象艦: {0}\n", this.PowupTargetShip.ShortName);
            }
            text += "[--餌艦--]\n";
            for (int i = 0; i < MaterialShips.get_Count(); i++)
            {
                ShipModel shipModel = MaterialShips.get_Item(i);
                if (shipModel != null)
                {
                    text += string.Format("{0} 餌艦効果(火:{1} 雷:{2} 空:{3} 装:{4})\n", new object[]
                    {
                        shipModel.ShortName,
                        shipModel.PowUpKaryoku,
                        shipModel.PowUpRaisou,
                        shipModel.PowUpTaikuu,
                        shipModel.PowUpSoukou
                    });
                }
                else
                {
                    text += string.Format("- - -\n", new object[0]);
                }
            }
            if (this._powup_target_ship != null)
            {
                PowUpInfo powUpInfo = this.getPowUpInfo(MaterialShips);
                text += "対象艦のステータス\n";
                if (powUpInfo.Taikyu > 0)
                {
                    text += string.Format("耐久:{0}->{1}(+{2}) ", this.PowupTargetShip.MaxHp, this.PowupTargetShip.MaxHp + powUpInfo.Taikyu, powUpInfo.Taikyu);
                }
                text += string.Format("火力:{0}->{1}(+{2}) 雷装:{3}->{4}(+{5}) 対空:{6}->{7}(+{8}) 装甲:{9}->{10}(+{11}) 運:{12}->{13}(+{14})", new object[]
                {
                    this.PowupTargetShip.Karyoku,
                    this.PowupTargetShip.Karyoku + powUpInfo.Karyoku,
                    powUpInfo.Karyoku,
                    this.PowupTargetShip.Raisou,
                    this.PowupTargetShip.Raisou + powUpInfo.Raisou,
                    powUpInfo.Raisou,
                    this.PowupTargetShip.Taiku,
                    this.PowupTargetShip.Taiku + powUpInfo.Taiku,
                    powUpInfo.Taiku,
                    this.PowupTargetShip.Soukou,
                    this.PowupTargetShip.Soukou + powUpInfo.Soukou,
                    powUpInfo.Soukou,
                    this.PowupTargetShip.Lucky,
                    this.PowupTargetShip.Lucky + powUpInfo.Lucky,
                    powUpInfo.Lucky
                });
            }
            return(text);
        }
示例#22
0
        private void getPracticeUpInfo_To_Kouku(PracticeDeckResultFmt fmt)
        {
            int    level = this.mem_ship.get_Item(0).Level;
            double num   = Math.Sqrt((double)this.mem_ship.get_Item(0).Level);
            bool   flag  = Mst_DataManager.Instance.Mst_stype.get_Item(this.mem_ship.get_Item(0).Stype).IsTrainingShip();

            fmt.PracticeResult.GetMemberExp = 0;
            int num2 = (!flag) ? 0 : 1;

            fmt.PracticeResult.GetShipExp = new Dictionary <int, int>();
            fmt.PowerUpData = new Dictionary <int, PowUpInfo>();
            double difficultShipExpKeisu        = this.getDifficultShipExpKeisu();
            double shipExpCommonKeisu           = this.getShipExpCommonKeisu();
            Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship;

            using (List <Mem_ship> .Enumerator enumerator = this.mem_ship.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    Mem_ship current = enumerator.get_Current();
                    fmt.PracticeResult.GetShipExp.Add(current.Rid, 0);
                    fmt.PowerUpData.Add(current.Rid, default(PowUpInfo));
                    Mst_ship mst_ship2 = mst_ship.get_Item(current.Ship_id);
                    if (mst_ship2.Stype != 13)
                    {
                        if (mst_ship2.Stype == 14)
                        {
                            List <Mst_slotitem> mstSlotItems = current.GetMstSlotItems();
                            bool flag2 = false;
                            for (int i = 0; i < mstSlotItems.get_Count(); i++)
                            {
                                SlotitemCategory slotitem_type = Mst_DataManager.Instance.Mst_equip_category.get_Item(mstSlotItems.get_Item(i).Type3).Slotitem_type;
                                if (slotitem_type == SlotitemCategory.Kanjouki || slotitem_type == SlotitemCategory.Suijouki)
                                {
                                    flag2 = true;
                                    break;
                                }
                            }
                            if (!flag2)
                            {
                                continue;
                            }
                        }
                        double num3 = Math.Sqrt((double)current.Level);
                        double max  = (double)(14 + num2 * 7);
                        double num4 = 10.0 + Utils.GetRandDouble(0.0, max, 1.0, 1) + Utils.GetRandDouble(0.0, num, 1.0, 1) + num / 2.0 + num3;
                        num4 = num4 * difficultShipExpKeisu * shipExpCommonKeisu;
                        fmt.PracticeResult.GetShipExp.set_Item(current.Rid, (int)num4);
                        Ship_GrowValues battleBaseParam = current.GetBattleBaseParam();
                        PowUpInfo       powUpInfo       = default(PowUpInfo);
                        double          max2            = 1.5 + (double)num2 * 0.2 + (num + num3) / 20.0;
                        powUpInfo.Taiku = (int)Utils.GetRandDouble(0.0, max2, 1.0, 1);
                        if (battleBaseParam.Taiku + powUpInfo.Taiku > mst_ship2.Tyku_max)
                        {
                            int num5 = mst_ship2.Tyku_max - mst_ship2.Tyku;
                            powUpInfo.Taiku = num5 - current.Kyouka.get_Item(Mem_ship.enumKyoukaIdx.Tyku);
                        }
                        if (this.motherBGroup.Contains(current.Stype))
                        {
                            double max3 = 1.2 + (num + num3) / 20.0;
                            powUpInfo.Karyoku = (int)Utils.GetRandDouble(0.0, max3, 1.0, 1);
                            if (battleBaseParam.Houg + powUpInfo.Karyoku > mst_ship2.Houg_max)
                            {
                                int num6 = mst_ship2.Houg_max - mst_ship2.Houg;
                                powUpInfo.Karyoku = num6 - current.Kyouka.get_Item(Mem_ship.enumKyoukaIdx.Houg);
                            }
                        }
                        fmt.PowerUpData.set_Item(current.Rid, powUpInfo);
                    }
                }
            }
        }
 private void OnShipParameterUpEventListener(ShipModel shipModel, ShipExpModel shipExpModel, PowUpInfo powUpInfo)
 {
     if (this.mOnShipParameterUpEvent != null)
     {
         this.mOnShipParameterUpEvent.Invoke(shipModel, shipExpModel, powUpInfo);
     }
 }
示例#24
0
        private IEnumerator StartProductionShipResult(ShipModel shipModel, ShipExpModel expModel, PowUpInfo powUpInfo)
        {
            if (DOTween.IsTweening(this))
            {
                DOTween.Kill(this);
            }
            bool animationNow = true;

            yield return(StartCoroutine(InitializeCoroutine(shipModel, powUpInfo)));

            mUIDeckPracticeShipInfo.Initialize(shipModel, expModel);
            WaitForKeyOrTouch(mKeyController, delegate
            {
                this.mKeyController.ClearKeyAll();
                this.mKeyController.firstUpdate = true;
                DOTween.Kill(this, complete: true);
            });
            Sequence seq = DOTween.Sequence().SetId(this);

            seq.Append(GenerateTweenShipIn());
            seq.Join(mUIDeckPracticeShipInfo.GenerateTweenExpAndLevel());
            seq.Join(GenerateTweenParameterResult());
            ShipUtils.PlayShipVoice(shipModel, local.utils.Utils.GetSpecialVoiceId(shipModel.MstId));
            yield return(seq.WaitForStart());

            yield return(StartCoroutine(WaitForKeyOrTouch(mKeyController, delegate
            {
                animationNow = false;
            })));

            while (animationNow)
            {
                yield return(null);
            }
            yield return(null);
        }