示例#1
0
        protected virtual double getHougSlotPlus_Attack(Mst_slotitem mstItem, int slotLevel)
        {
            double result = 0.0;

            if (slotLevel <= 0)
            {
                return(result);
            }
            if (mstItem.Api_mapbattle_type3 == 5 || mstItem.Api_mapbattle_type3 == 22)
            {
                return(result);
            }
            double num = 2.0;

            if (mstItem.Houg > 12)
            {
                num = 3.0;
            }
            if (mstItem.Api_mapbattle_type3 == 12 || mstItem.Api_mapbattle_type3 == 13 || mstItem.Api_mapbattle_type3 == 16 || mstItem.Api_mapbattle_type3 == 17 || mstItem.Api_mapbattle_type3 == 27 || mstItem.Api_mapbattle_type3 == 28)
            {
                num = 0.0;
            }
            else if (mstItem.Api_mapbattle_type3 == 14 || mstItem.Api_mapbattle_type3 == 15 || mstItem.Api_mapbattle_type3 == 40)
            {
                num = 1.5;
            }
            return(num * Math.Sqrt((double)slotLevel) * 0.5);
        }
示例#2
0
        protected virtual int getHougAttackValue(Mem_ship atk_ship, List <Mst_slotitem> atk_slot, List <int> slotLevel, Mem_ship def_ship)
        {
            int        num  = 150;
            List <int> list = slotLevel;
            double     num2 = 0.0;
            int        num3 = 0;
            int        num4 = 0;
            int        num5 = 0;

            using (var enumerator = Enumerable.Select(atk_slot, (Mst_slotitem obj, int idx) => new
            {
                obj,
                idx
            }).GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    var          current = enumerator.Current;
                    Mst_slotitem obj2    = current.obj;
                    num2 += this.getHougSlotPlus_Attack(obj2, list[current.idx]);
                }
            }
            double      num6        = this.valance1 + (double)atk_ship.Houg + num2;
            DamageState damageState = atk_ship.Get_DamageState();
            double      num7        = 1.0;

            if (damageState == DamageState.Tyuuha)
            {
                num7 = 0.7;
            }
            else if (damageState == DamageState.Taiha)
            {
                num7 = 0.4;
            }
            num6 *= num7;
            num6 += this.getHougItemAtackHosei(atk_ship, atk_slot);
            if (num6 > (double)num)
            {
                num6 = (double)num + Math.Sqrt(num6 - (double)num);
            }
            return((int)num6);
        }
示例#3
0
        protected virtual double getHougSlotPlus_Hit(Mst_slotitem mstItem, int slotLevel)
        {
            double result = 0.0;

            if (slotLevel <= 0)
            {
                return(result);
            }
            if (mstItem.Api_mapbattle_type3 == 5 || mstItem.Api_mapbattle_type3 == 22)
            {
                return(result);
            }
            if ((mstItem.Api_mapbattle_type3 == 12 || mstItem.Api_mapbattle_type3 == 13) && mstItem.Houm > 2)
            {
                result = Math.Sqrt((double)slotLevel) * 1.7;
            }
            else if (mstItem.Api_mapbattle_type3 == 21 || mstItem.Api_mapbattle_type3 == 14 || mstItem.Api_mapbattle_type3 == 40 || mstItem.Api_mapbattle_type3 == 16 || mstItem.Api_mapbattle_type3 == 27 || mstItem.Api_mapbattle_type3 == 28 || mstItem.Api_mapbattle_type3 == 17 || mstItem.Api_mapbattle_type3 == 15)
            {
                result = Math.Sqrt((double)slotLevel);
            }
            return(result);
        }