Ejemplo n.º 1
0
        private int getBaseExpPractice(BattleWinRankKinds rank)
        {
            int num  = 500;
            int key  = (E_Data.ShipData[0].Level != 100) ? E_Data.ShipData[0].Level : 99;
            int num2 = 0;

            if (E_Data.ShipData.Count() > 1)
            {
                num2 = ((E_Data.ShipData[1].Level != 100) ? E_Data.ShipData[1].Level : 99);
            }
            float num3 = (float)mst_shiplevel[key] / 100f;
            float num4 = (num2 <= 0) ? 0f : ((float)mst_shiplevel[num2] / 300f);
            int   num5 = (int)(num3 + num4);

            num5 += randInstance.Next(4);
            if (num5 > num)
            {
                num5 = (int)((double)num + Math.Sqrt(num5 - num));
            }
            float num6 = 1f;
            float num7 = 0.8f;
            Dictionary <BattleWinRankKinds, float> dictionary = new Dictionary <BattleWinRankKinds, float>();

            dictionary.Add(BattleWinRankKinds.S, 1.2f * num6);
            dictionary.Add(BattleWinRankKinds.A, 1f * num6);
            dictionary.Add(BattleWinRankKinds.B, 1f * num6);
            dictionary.Add(BattleWinRankKinds.C, 0.8f * num7);
            dictionary.Add(BattleWinRankKinds.D, 0.7f * num7);
            dictionary.Add(BattleWinRankKinds.E, 0.5f * num7);
            Dictionary <BattleWinRankKinds, float> dictionary2 = dictionary;

            return((int)((float)num5 * dictionary2[rank]));
        }
Ejemplo n.º 2
0
 private void getClearShip(DifficultKind kind, BattleWinRankKinds rank, out ItemGetFmt out_items)
 {
     out_items = null;
     if (Utils.IsBattleWin(rank))
     {
         List <int> clearRewardShipList      = ArrayMaster.GetClearRewardShipList(kind);
         Dictionary <int, Mst_ship> mst_ship = Mst_DataManager.Instance.Mst_ship;
         int num = 0;
         foreach (int item in clearRewardShipList)
         {
             string targetYomi = mst_ship[item].Yomi;
             if (!Comm_UserDatas.Instance.User_ship.Values.Any(delegate(Mem_ship x)
             {
                 int ship_id = x.Ship_id;
                 string yomi = mst_ship[ship_id].Yomi;
                 return(yomi.Equals(targetYomi));
             }))
             {
                 num = item;
                 break;
             }
         }
         if (num != 0)
         {
             out_items          = new ItemGetFmt();
             out_items.Category = ItemGetKinds.Ship;
             out_items.Count    = 1;
             out_items.Id       = num;
         }
     }
 }
Ejemplo n.º 3
0
        private SerializableDictionary <int, int> getShipExpSortie(BattleWinRankKinds rank, int mvpShip, int shipBaseExp)
        {
            SerializableDictionary <int, int> serializableDictionary = new SerializableDictionary <int, int>();
            float  num  = 1.5f;
            int    num2 = 2;
            double num3 = 4.5;

            new List <int>();
            foreach (KeyValuePair <int, BattleShipSubInfo> item in F_SubInfo)
            {
                Mem_ship shipInstance = item.Value.ShipInstance;
                double   num4         = shipInstance.IsFight() ? shipBaseExp : 0;
                if (item.Value.DeckIdx == 0)
                {
                    num4 *= (double)num;
                }
                num4 *= num3;
                serializableDictionary.Add(shipInstance.Rid, (int)num4);
            }
            if (mvpShip <= 0)
            {
                return(serializableDictionary);
            }
            double num5 = serializableDictionary[mvpShip] * num2;

            serializableDictionary[mvpShip] = (int)num5;
            return(serializableDictionary);
        }
Ejemplo n.º 4
0
 public static bool IsBattleWin(BattleWinRankKinds rank)
 {
     if (rank >= BattleWinRankKinds.B)
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 5
0
 private void updateRebellion(BattleWinRankKinds winRank)
 {
     if (mst_enemy.Boss != 0)
     {
         int maparea_id = mst_mapinfo.Maparea_id;
         if (Utils.IsBattleWin(winRank))
         {
             ((IRebellionPointOperator)this).SubRebellionPoint(maparea_id, 0);
         }
     }
 }
Ejemplo n.º 6
0
        public static bool IsPlayMVPVoice(BattleWinRankKinds iKind)
        {
            switch (iKind)
            {
            case BattleWinRankKinds.B:
            case BattleWinRankKinds.A:
            case BattleWinRankKinds.S:
                return(true);

            default:
                return(false);
            }
        }
Ejemplo n.º 7
0
        private int getUserExpPractice(BattleWinRankKinds rank, int myBasicLevel, int enemyBasicLevel)
        {
            Dictionary <BattleWinRankKinds, float> dictionary = new Dictionary <BattleWinRankKinds, float>();

            dictionary.Add(BattleWinRankKinds.S, 2f);
            dictionary.Add(BattleWinRankKinds.A, 1.5f);
            dictionary.Add(BattleWinRankKinds.B, 1.2f);
            dictionary.Add(BattleWinRankKinds.C, 1f);
            dictionary.Add(BattleWinRankKinds.D, 1f);
            dictionary.Add(BattleWinRankKinds.E, 1f);
            Dictionary <BattleWinRankKinds, float> dictionary2 = dictionary;
            List <int[]> list = new List <int[]>();

            list.Add(new int[2]
            {
                5,
                80
            });
            list.Add(new int[2]
            {
                3,
                60
            });
            list.Add(new int[2]
            {
                1,
                40
            });
            list.Add(new int[2]
            {
                0,
                30
            });
            list.Add(new int[2]
            {
                -2,
                20
            });
            list.Add(new int[2]
            {
                -3,
                10
            });
            List <int[]> list2  = list;
            int          lvaway = enemyBasicLevel - myBasicLevel;

            int[] array = list2.FirstOrDefault((int[] x) => lvaway >= x[0]);
            int   num   = (array == null) ? list2[list2.Count - 1][1] : array[1];

            return((int)((float)num * dictionary2[rank]));
        }
Ejemplo n.º 8
0
        private int getUserExpSortie(BattleWinRankKinds rank)
        {
            Dictionary <BattleWinRankKinds, float[]> dictionary = new Dictionary <BattleWinRankKinds, float[]>();

            dictionary.Add(BattleWinRankKinds.S, new float[2]
            {
                1f,
                2f
            });
            dictionary.Add(BattleWinRankKinds.A, new float[2]
            {
                0.8f,
                1.5f
            });
            dictionary.Add(BattleWinRankKinds.B, new float[2]
            {
                0.5f,
                1.2f
            });
            dictionary.Add(BattleWinRankKinds.C, new float[2]
            {
                0f,
                1f
            });
            dictionary.Add(BattleWinRankKinds.D, new float[2]
            {
                0f,
                1f
            });
            dictionary.Add(BattleWinRankKinds.E, new float[2]
            {
                0f,
                1f
            });
            Dictionary <BattleWinRankKinds, float[]> dictionary2 = dictionary;
            int boss = mst_enemy.Boss;
            int num  = 0;

            if (boss == 1 && Utils.IsBattleWin(rank))
            {
                num = mst_mapinfo.Clear_exp;
            }
            int member_exp = mst_mapinfo.Member_exp;

            return((int)((float)member_exp * dictionary2[rank][boss]) + num);
        }
        public static bool IsPlayMVPVoice(BattleWinRankKinds iKind)
        {
            bool result;

            switch (iKind)
            {
            case BattleWinRankKinds.B:
            case BattleWinRankKinds.A:
            case BattleWinRankKinds.S:
                result = true;
                break;

            default:
                result = false;
                break;
            }
            return(result);
        }
Ejemplo n.º 10
0
 private bool Init(BattleResultModel model, bool isBattleCut)
 {
     _clsResult              = model;
     _isBattleCut            = isBattleCut;
     winRank                 = model.WinRank;
     _nFriendFleetStartHP    = -1;
     _nFriendFleetEndHP      = -1;
     _uiCongratulation.alpha = 0f;
     InitHPGauge(_listHPGauges[0], new List <ShipModel_BattleResult>(_clsResult.Ships_f));
     InitHPGauge(_listHPGauges[1], new List <ShipModel_BattleResult>(_clsResult.Ships_e));
     _listHPGauges.ForEach(delegate(BtlCut_UICircleHPGauge x)
     {
         x.panel.alpha = 0f;
         x.transform.localScaleOne();
     });
     _uiJudgeLabel.text = ((_clsResult.WinRank != BattleWinRankKinds.S) ? BattleDefines.RESULT_WINRUNK_JUDGE_TEXT[(int)_iWinRank] : BattleDefines.RESULT_WINRUNK_JUDGE_TEXT[(int)(_iWinRank + (isPerfect ? 1 : 0))]);
     _uiBackground.Init();
     return(true);
 }
Ejemplo n.º 11
0
        private SerializableDictionary <int, int> getShipExpPractice(BattleWinRankKinds rank, int mvpShip, int shipBaseExp)
        {
            SerializableDictionary <int, int> serializableDictionary = new SerializableDictionary <int, int>();
            float  num  = 1.5f;
            int    num2 = 2;
            double num3 = 0.7;
            double difficultShipExpKeisuToPractice = getDifficultShipExpKeisuToPractice();
            double trainingShipExpKeisuToPractice  = getTrainingShipExpKeisuToPractice();
            double num4 = 7.5;

            new List <int>();
            foreach (KeyValuePair <int, BattleShipSubInfo> item in F_SubInfo)
            {
                Mem_ship shipInstance = item.Value.ShipInstance;
                double   num5         = shipInstance.IsFight() ? shipBaseExp : 0;
                if (item.Value.DeckIdx == 0)
                {
                    num5 *= (double)num;
                }
                num5 = num5 * difficultShipExpKeisuToPractice * trainingShipExpKeisuToPractice * num4 * num3;
                serializableDictionary.Add(shipInstance.Rid, (int)num5);
            }
            double num6 = (double)shipBaseExp * 0.5;
            double num7 = 3.5;

            foreach (KeyValuePair <int, BattleShipSubInfo> item2 in E_SubInfo)
            {
                Mem_ship shipInstance2 = item2.Value.ShipInstance;
                double   num8          = (!shipInstance2.IsFight()) ? 0.0 : num6;
                num8 = num8 * difficultShipExpKeisuToPractice * num7 * num3;
                serializableDictionary.Add(shipInstance2.Rid, (int)num8);
            }
            if (mvpShip <= 0)
            {
                return(serializableDictionary);
            }
            double num9 = serializableDictionary[mvpShip] * num2;

            serializableDictionary[mvpShip] = (int)num9;
            return(serializableDictionary);
        }
Ejemplo n.º 12
0
 public void UpdatePracticeCount(BattleWinRankKinds kinds, bool practiceBattle)
 {
     if (practiceBattle)
     {
         if (Utils.IsBattleWin(kinds))
         {
             if (this.Pt_win != 4294967295u)
             {
                 this.Pt_win += 1u;
             }
         }
         else if (this.Pt_lose != 4294967295u)
         {
             this.Pt_lose += 1u;
         }
     }
     else if (this.Deck_practice_num != 4294967295u)
     {
         this.Deck_practice_num += 1u;
     }
 }
Ejemplo n.º 13
0
 public void UpdateSortieCount(BattleWinRankKinds kinds, bool rebellionBoss)
 {
     if (Utils.IsBattleWin(kinds))
     {
         if (rebellionBoss)
         {
             if (this.Rebellion_win != 4294967295u)
             {
                 this.Rebellion_win += 1u;
             }
         }
         else if (this.St_win != 4294967295u)
         {
             this.St_win += 1u;
         }
     }
     else if (this.St_lose != 4294967295u)
     {
         this.St_lose += 1u;
     }
 }
Ejemplo n.º 14
0
 public void UpdatePracticeCount(BattleWinRankKinds kinds, bool practiceBattle)
 {
     if (practiceBattle)
     {
         if (Utils.IsBattleWin(kinds))
         {
             if (Pt_win != uint.MaxValue)
             {
                 Pt_win++;
             }
         }
         else if (Pt_lose != uint.MaxValue)
         {
             Pt_lose++;
         }
     }
     else if (Deck_practice_num != uint.MaxValue)
     {
         Deck_practice_num++;
     }
 }
Ejemplo n.º 15
0
 public void UpdateSortieCount(BattleWinRankKinds kinds, bool rebellionBoss)
 {
     if (Utils.IsBattleWin(kinds))
     {
         if (rebellionBoss)
         {
             if (Rebellion_win != uint.MaxValue)
             {
                 Rebellion_win++;
             }
         }
         else if (St_win != uint.MaxValue)
         {
             St_win++;
         }
     }
     else if (St_lose != uint.MaxValue)
     {
         St_lose++;
     }
 }
Ejemplo n.º 16
0
        private int getMvp(BattleWinRankKinds rank, Dictionary <int, BattleShipSubInfo> subInfoDict)
        {
            int num = (from item in subInfoDict.Values
                       select item.TotalDamage).Max();

            if (subInfoDict[0].TotalDamage == num)
            {
                return(subInfoDict[0].ShipInstance.Rid);
            }
            int num2   = -1;
            int result = 0;

            foreach (BattleShipSubInfo value in subInfoDict.Values)
            {
                if (value.ShipInstance.IsFight() && value.TotalDamage > num2)
                {
                    result = value.ShipInstance.Rid;
                    num2   = value.TotalDamage;
                }
            }
            return(result);
        }
Ejemplo n.º 17
0
        private void setCondBonus(BattleWinRankKinds rank, bool flagship, bool mvp, ref int cond)
        {
            if (rank != BattleWinRankKinds.E)
            {
                int num = 0;
                switch (rank)
                {
                case BattleWinRankKinds.S:
                    num = 4;
                    break;

                case BattleWinRankKinds.A:
                    num = 3;
                    break;

                case BattleWinRankKinds.B:
                    num = 2;
                    break;

                case BattleWinRankKinds.C:
                    num = 1;
                    break;
                }
                if (flagship)
                {
                    num += 3;
                }
                if (mvp)
                {
                    num += 10;
                }
                cond += num;
                if (cond > 100)
                {
                    cond = 100;
                }
            }
        }
Ejemplo n.º 18
0
 public static bool IsBattleWin(BattleWinRankKinds rank)
 {
     return(rank >= BattleWinRankKinds.B);
 }
Ejemplo n.º 19
0
        private void updateShip(BattleWinRankKinds rank, int mvpShip, SerializableDictionary <int, int> getShipExp, out SerializableDictionary <int, List <int> > lvupInfo)
        {
            lvupInfo = new SerializableDictionary <int, List <int> >();
            List <Mem_ship> shipData = F_Data.ShipData;
            int             count    = shipData.Count;
            bool            flag     = true;
            double          num      = 1.0;
            double          num2     = 0.0;

            if (!practiceFlag)
            {
                flag = E_Data.ShipData.Exists((Mem_ship x) => (!Mst_DataManager.Instance.Mst_stype[x.Stype].IsSubmarine()) ? true : false);
                if (!flag)
                {
                    num  = 0.25;
                    num2 = 0.5;
                }
            }
            Dictionary <int, int> dictionary = mst_shiplevel;

            for (int i = 0; i < count; i++)
            {
                Mem_ship     mem_ship     = shipData[i];
                Mem_shipBase mem_shipBase = new Mem_shipBase(mem_ship);
                Mst_ship     mst_ship     = Mst_DataManager.Instance.Mst_ship[mem_shipBase.Ship_id];
                int          addExp       = getShipExp[mem_ship.Rid];
                List <int>   lvupInfo2    = null;
                int          levelupInfo  = mem_ship.getLevelupInfo(dictionary, mem_shipBase.Level, mem_shipBase.Exp, ref addExp, out lvupInfo2);
                lvupInfo.Add(mem_ship.Rid, lvupInfo2);
                if (!mem_ship.Escape_sts)
                {
                    mem_shipBase.Level = levelupInfo;
                    mem_shipBase.Exp  += addExp;
                    mem_shipBase.Fuel -= mst_ship.Use_fuel;
                    if (mem_shipBase.Fuel < 0)
                    {
                        mem_shipBase.Fuel = 0;
                    }
                    int num3 = mst_ship.Use_bull;
                    if (battleKinds == ExecBattleKinds.DayToNight)
                    {
                        num3 = (int)Math.Ceiling((double)num3 * 1.5);
                    }
                    num3 = (int)((double)num3 * num + num2);
                    if (!flag && num3 <= 0)
                    {
                        num3 = 1;
                    }
                    mem_shipBase.Bull -= num3;
                    if (mem_shipBase.Bull < 0)
                    {
                        mem_shipBase.Bull = 0;
                    }
                    setCondSubValue(ref mem_shipBase.Cond);
                    bool mvp   = (mvpShip == mem_ship.Rid) ? true : false;
                    bool flag2 = (F_SubInfo[mem_ship.Rid].DeckIdx == 0) ? true : false;
                    setCondBonus(rank, flag2, mvp, ref mem_shipBase.Cond);
                    int num4 = levelupInfo - mem_ship.Level;
                    Dictionary <Mem_ship.enumKyoukaIdx, int> dictionary2 = mem_ship.Kyouka;
                    for (int j = 0; j < num4; j++)
                    {
                        dictionary2 = mem_ship.getLevelupKyoukaValue(mem_ship.Ship_id, dictionary2);
                    }
                    mem_shipBase.SetKyoukaValue(dictionary2);
                    if (mem_ship.Get_DamageState() >= DamageState.Tyuuha)
                    {
                        clothBrokenIds.Add(mem_ship.Ship_id);
                    }
                    if (practiceFlag)
                    {
                        mem_shipBase.Nowhp = F_Data.StartHp[i];
                    }
                    else if (mem_shipBase.Nowhp <= 0)
                    {
                        deleteTargetShip.Add(mem_ship);
                    }
                    int value  = 0;
                    int value2 = 0;
                    dictionary.TryGetValue(mem_shipBase.Level - 1, out value);
                    dictionary.TryGetValue(mem_shipBase.Level + 1, out value2);
                    mem_ship.SetRequireExp(mem_shipBase.Level, dictionary);
                    mem_ship.SumLovToBattle(rank, flag2, mvp, F_Data.StartHp[i], mem_ship.Nowhp);
                    mem_shipBase.Lov = mem_ship.Lov;
                    mem_ship.Set_ShipParam(mem_shipBase, mst_ship, enemy_flag: false);
                }
            }
        }
Ejemplo n.º 20
0
 private bool isMvpGet(BattleWinRankKinds kind)
 {
     return((kind != BattleWinRankKinds.E && kind != 0) ? true : false);
 }
Ejemplo n.º 21
0
        private void getRewardShip(BattleWinRankKinds rank, out ItemGetFmt out_items)
        {
            out_items = null;
            if (rank < BattleWinRankKinds.B || Comm_UserDatas.Instance.User_basic.IsMaxChara() || Comm_UserDatas.Instance.User_basic.IsMaxSlotitem())
            {
                return;
            }
            int enemy_type = 0;

            if (mst_enemy.Boss == 0)
            {
                enemy_type = 1;
                Dictionary <BattleWinRankKinds, int> dictionary = new Dictionary <BattleWinRankKinds, int>();
                dictionary.Add(BattleWinRankKinds.S, 30);
                dictionary.Add(BattleWinRankKinds.A, 40);
                dictionary.Add(BattleWinRankKinds.B, 30);
                Dictionary <BattleWinRankKinds, int> dictionary2 = dictionary;
                if (randInstance.Next(100) < dictionary2[rank])
                {
                    return;
                }
            }
            else
            {
                enemy_type = 2;
            }
            DifficultKind difficult = Comm_UserDatas.Instance.User_basic.Difficult;
            Mem_turn      user_turn = Comm_UserDatas.Instance.User_turn;
            Dictionary <BattleWinRankKinds, int[]> dictionary4;

            switch (difficult)
            {
            case DifficultKind.KOU:
            case DifficultKind.SHI:
            {
                Dictionary <BattleWinRankKinds, int[]> dictionary3 = new Dictionary <BattleWinRankKinds, int[]>();
                dictionary3.Add(BattleWinRankKinds.S, new int[2]
                    {
                        0,
                        50
                    });
                dictionary3.Add(BattleWinRankKinds.A, new int[2]
                    {
                        20,
                        70
                    });
                dictionary3.Add(BattleWinRankKinds.B, new int[2]
                    {
                        50,
                        100
                    });
                dictionary4 = dictionary3;
                break;
            }

            case DifficultKind.OTU:
                if (user_turn.Total_turn >= 0 && user_turn.Total_turn <= 50)
                {
                    Dictionary <BattleWinRankKinds, int[]> dictionary3 = new Dictionary <BattleWinRankKinds, int[]>();
                    dictionary3.Add(BattleWinRankKinds.S, new int[2]
                    {
                        0,
                        45
                    });
                    dictionary3.Add(BattleWinRankKinds.A, new int[2]
                    {
                        15,
                        60
                    });
                    dictionary3.Add(BattleWinRankKinds.B, new int[2]
                    {
                        50,
                        95
                    });
                    dictionary4 = dictionary3;
                }
                else if (user_turn.Total_turn >= 51 && user_turn.Total_turn <= 100)
                {
                    Dictionary <BattleWinRankKinds, int[]> dictionary3 = new Dictionary <BattleWinRankKinds, int[]>();
                    dictionary3.Add(BattleWinRankKinds.S, new int[2]
                    {
                        0,
                        50
                    });
                    dictionary3.Add(BattleWinRankKinds.A, new int[2]
                    {
                        15,
                        65
                    });
                    dictionary3.Add(BattleWinRankKinds.B, new int[2]
                    {
                        50,
                        100
                    });
                    dictionary4 = dictionary3;
                }
                else
                {
                    Dictionary <BattleWinRankKinds, int[]> dictionary3 = new Dictionary <BattleWinRankKinds, int[]>();
                    dictionary3.Add(BattleWinRankKinds.S, new int[2]
                    {
                        0,
                        50
                    });
                    dictionary3.Add(BattleWinRankKinds.A, new int[2]
                    {
                        20,
                        70
                    });
                    dictionary3.Add(BattleWinRankKinds.B, new int[2]
                    {
                        50,
                        100
                    });
                    dictionary4 = dictionary3;
                }
                break;

            case DifficultKind.HEI:
                if (user_turn.Total_turn >= 0 && user_turn.Total_turn <= 50)
                {
                    Dictionary <BattleWinRankKinds, int[]> dictionary3 = new Dictionary <BattleWinRankKinds, int[]>();
                    dictionary3.Add(BattleWinRankKinds.S, new int[2]
                    {
                        0,
                        40
                    });
                    dictionary3.Add(BattleWinRankKinds.A, new int[2]
                    {
                        15,
                        55
                    });
                    dictionary3.Add(BattleWinRankKinds.B, new int[2]
                    {
                        50,
                        90
                    });
                    dictionary4 = dictionary3;
                }
                else if (user_turn.Total_turn >= 51 && user_turn.Total_turn <= 100)
                {
                    Dictionary <BattleWinRankKinds, int[]> dictionary3 = new Dictionary <BattleWinRankKinds, int[]>();
                    dictionary3.Add(BattleWinRankKinds.S, new int[2]
                    {
                        0,
                        45
                    });
                    dictionary3.Add(BattleWinRankKinds.A, new int[2]
                    {
                        15,
                        60
                    });
                    dictionary3.Add(BattleWinRankKinds.B, new int[2]
                    {
                        50,
                        95
                    });
                    dictionary4 = dictionary3;
                }
                else
                {
                    Dictionary <BattleWinRankKinds, int[]> dictionary3 = new Dictionary <BattleWinRankKinds, int[]>();
                    dictionary3.Add(BattleWinRankKinds.S, new int[2]
                    {
                        0,
                        45
                    });
                    dictionary3.Add(BattleWinRankKinds.A, new int[2]
                    {
                        20,
                        65
                    });
                    dictionary3.Add(BattleWinRankKinds.B, new int[2]
                    {
                        50,
                        95
                    });
                    dictionary4 = dictionary3;
                }
                break;

            default:
                if (user_turn.Total_turn >= 0 && user_turn.Total_turn <= 100)
                {
                    Dictionary <BattleWinRankKinds, int[]> dictionary3 = new Dictionary <BattleWinRankKinds, int[]>();
                    dictionary3.Add(BattleWinRankKinds.S, new int[2]
                    {
                        0,
                        35
                    });
                    dictionary3.Add(BattleWinRankKinds.A, new int[2]
                    {
                        15,
                        50
                    });
                    dictionary3.Add(BattleWinRankKinds.B, new int[2]
                    {
                        50,
                        85
                    });
                    dictionary4 = dictionary3;
                }
                else if (user_turn.Total_turn >= 101 && user_turn.Total_turn <= 200)
                {
                    Dictionary <BattleWinRankKinds, int[]> dictionary3 = new Dictionary <BattleWinRankKinds, int[]>();
                    dictionary3.Add(BattleWinRankKinds.S, new int[2]
                    {
                        0,
                        40
                    });
                    dictionary3.Add(BattleWinRankKinds.A, new int[2]
                    {
                        15,
                        55
                    });
                    dictionary3.Add(BattleWinRankKinds.B, new int[2]
                    {
                        50,
                        90
                    });
                    dictionary4 = dictionary3;
                }
                else
                {
                    Dictionary <BattleWinRankKinds, int[]> dictionary3 = new Dictionary <BattleWinRankKinds, int[]>();
                    dictionary3.Add(BattleWinRankKinds.S, new int[2]
                    {
                        0,
                        45
                    });
                    dictionary3.Add(BattleWinRankKinds.A, new int[2]
                    {
                        15,
                        60
                    });
                    dictionary3.Add(BattleWinRankKinds.B, new int[2]
                    {
                        50,
                        95
                    });
                    dictionary4 = dictionary3;
                }
                break;
            }
            int num = randInstance.Next(dictionary4[rank][0], dictionary4[rank][1]) + mst_enemy.Geth;

            if (num > dictionary4[rank][1])
            {
                num = dictionary4[rank][1] - 1;
            }
            XElement[] array = (from data in Mst_DataManager.Instance.Mst_shipget
                                where int.Parse(data.Element("Type").Value) == enemy_type
                                orderby int.Parse(data.Element("Id").Value)
                                select data).Skip(num).Take(1).ToArray();
            if (array != null && array.Length != 0)
            {
                Mst_shipget2 instance = null;
                Model_Base.SetMaster(out instance, array[0]);
                if (instance.Ship_id > 0)
                {
                    out_items          = new ItemGetFmt();
                    out_items.Category = ItemGetKinds.Ship;
                    out_items.Count    = 1;
                    out_items.Id       = instance.Ship_id;
                }
            }
        }