Пример #1
0
        /// <summary>
        /// 升级收费速度的花费  Y=lv*10
        /// </summary>
        /// <param name="level"></param>
        /// <returns></returns>


        /// <summary>
        /// 每分钟购票顾客升级消耗
        /// </summary>
        /// <param name="entryID"></param>
        /// <param name="level"></param>
        /// <returns></returns>
        public static System.Numerics.BigInteger GetUpGradeCheckinSpeedConsumption(int entryID, int level)
        {   /*  Y=lvupcastbase*lvupcastratio^(lv-1)*加成预期【进客速度期望等级】+lv   */
            Config.ticketCell          ticketCell = Config.ticketConfig.getInstace().getCell(entryID);
            System.Numerics.BigInteger baseVal    = System.Numerics.BigInteger.Parse(ticketCell.lvupcastbase);
            int   expectlevel   = GetUpVisitorSpeedExpectLevel(entryID, level);
            float lvupcastratio = ticketCell.lvupcastratio;
            var   computePowFloatToBigInteger = PlayerDataModule.GetComputePowFloatToBigInteger(lvupcastratio, level - 1);

            int sceneID = ticketCell.scene;
            int number  = (int)(PlayerDataModule.GetAdditionExpect(sceneID, expectlevel) * 100);
            var price   = baseVal * computePowFloatToBigInteger.str_numerator * number / (computePowFloatToBigInteger.str_denominator * 100);

            //Logger.LogWarp.LogErrorFormat("测试:baseVal={0}  ,baseConsumption={1} number={2}", baseVal, baseConsumption, PlayerDataModule.GetAdditionExpect(level));
            return(price + level);
        }
        /// <summary>
        /// 当前动物栏的观光游客数量升级花费
        /// </summary>
        /// <param name="littleZooID"></param>
        /// <param name="level"></param>
        /// <returns></returns>
        public static System.Numerics.BigInteger GetUpGradeEnterVisitorSpawnLevelConsumption(int littleZooID, int level)
        {
            // Y=timeupbase*basenumber1^(lv-1)*加成预期【动物栏速率期望等级】
            string baseVal = Config.buildupConfig.getInstace().getCell(littleZooID).timeupbase;

            System.Numerics.BigInteger number01 = System.Numerics.BigInteger.Parse(baseVal);
            int expectlevel = GetUpVisitDurationExpectLevel(littleZooID, level);

            var basenumber = Config.buildupConfig.getInstace().getCell(littleZooID).basenumber1;
            var computePowFloatToBigInteger = PlayerDataModule.GetComputePowFloatToBigInteger(basenumber, level - 1);

            int sceneID  = Config.buildupConfig.getInstace().getCell(littleZooID).scene;
            int number03 = (int)(PlayerDataModule.GetAdditionExpect(sceneID, expectlevel) * 100);
            var price    = number01 * computePowFloatToBigInteger.str_numerator * number03 / (100 * computePowFloatToBigInteger.str_denominator);

            return(price);
        }
        /// <summary>
        /// 当前动物栏的观光点数量升级花费
        /// </summary>
        /// <param name="littleZooID"></param>
        /// <param name="level"></param>
        /// <returns></returns>
        public static System.Numerics.BigInteger GetUpGradeVisitorLocationLevelConsumption(int littleZooID, int level)
        {   /* Y=watchupbase*期望等级消耗基数【观光点期望等级】*加成预期【观光点期望等级】 */
            string baseVal     = Config.buildupConfig.getInstace().getCell(littleZooID).watchupbase;
            int    expectlevel = GetUpGradeVisitorLocationExpectLevel(littleZooID, level);

            System.Numerics.BigInteger number01 = System.Numerics.BigInteger.Parse(baseVal);

            var basenumber = Config.buildupConfig.getInstace().getCell(littleZooID).basenumber;
            var computePowFloatToBigInteger = PlayerDataModule.GetComputePowFloatToBigInteger(basenumber, expectlevel - 1);

            int sceneID  = GlobalDataManager.GetInstance().playerData.playerZoo.currSceneID;
            int number03 = (int)(PlayerDataModule.GetAdditionExpect(sceneID, expectlevel) * 100);
            var price    = number01 * computePowFloatToBigInteger.str_numerator * number03 / (100 * computePowFloatToBigInteger.str_denominator);

            //LogWarp.LogErrorFormat("  baseVal={0}, expectlevel={1}, number02={2}, number03={3} ", baseVal, expectlevel, number02, number03);

            return(price);
        }
Пример #4
0
        /// <summary>
        /// 售票口门票升级
        /// </summary>
        /// <param name="expectLevel"></param>
        /// <returns></returns>
        public static System.Numerics.BigInteger GetUpGradeConsumption(int level)
        {
            /*  Y=depbase*停售消耗基数【门票升级期望等级】*加成预期【门票升级期望等级】   */
            Config.ticketCell ticketCell = Config.ticketConfig.getInstace().getCell(sortEntryGateIDs[0]);
            string            depbase    = ticketCell.depbase;
            int sceneID = ticketCell.scene;

            System.Numerics.BigInteger baseVal = System.Numerics.BigInteger.Parse(depbase);
            int   expectLevel = GetUpTicketExpectLevel(level);
            float basenumber  = ticketCell.basenumber;
            var   computePowFloatToBigInteger = PlayerDataModule.GetComputePowFloatToBigInteger(basenumber, level + 1);
            int   additionExpect = (int)(PlayerDataModule.GetAdditionExpect(sceneID, expectLevel) * 100);
            var   price          = baseVal * computePowFloatToBigInteger.str_numerator * additionExpect / (100 * computePowFloatToBigInteger.str_denominator);

            //LogWarp.LogErrorFormat("测试:  depbase ={0},分子={1},AA={2},加成预期={3},等级={4}",
            //    baseVal, computePowFloatToBigInteger.str_numerator, basenumber, additionExpect, level);
            return(price + level);
        }
Пример #5
0
        /// <summary>
        /// 停车位数量最大位置升级消耗
        /// </summary>
        /// <returns></returns>
        public static System.Numerics.BigInteger GetUpGradeNumberConsumption(int level = -1)
        {   /*   Y=base*停售消耗基数【停车位数期望等级】*加成预期【停车位数期望等级】   */
            if (level == -1)
            {
                level = GlobalDataManager.GetInstance().playerData.GetParkingCenterDataIDIndexOfDataIdx().parkingSpaceLevel;
            }
            int expectlevel = ParkingSpaceExpectLevel(level);
            int sceneID     = GlobalDataManager.GetInstance().playerData.playerZoo.currSceneID;

            Config.parkingCell parkingCell = GlobalDataManager.GetInstance().logicTableParkingData.GetParkingCell(sceneID);
            string             str         = parkingCell.spaceupcastbase;

            System.Numerics.BigInteger baseVal = System.Numerics.BigInteger.Parse(str);
            var computePowFloatToBigInteger    = PlayerDataModule.GetComputePowFloatToBigInteger(parkingCell.basenumber, expectlevel - 1);
            int number = (int)(PlayerDataModule.GetAdditionExpect(sceneID, expectlevel) * 100);

            var price = baseVal * computePowFloatToBigInteger.str_numerator * number / (100 * computePowFloatToBigInteger.str_denominator);

            return(price);
        }
Пример #6
0
        /// <summary>
        /// 每分钟招揽游客升级消耗
        /// </summary>
        /// <returns></returns>
        public static System.Numerics.BigInteger GetUpGradeEnterCarSpawnConsumption(int level = -1)
        {   /*   Y=base*停售消耗基数【来客速度期望等级】*加成预期【来客速度期望等级】   */
            if (level == -1)
            {
                level = GlobalDataManager.GetInstance().playerData.GetParkingCenterDataIDIndexOfDataIdx().parkingEnterCarSpawnLevel;
            }
            int expectlevel = ParkingEnterCarSpawnExpectLevel(level);
            int sceneID     = GlobalDataManager.GetInstance().playerData.playerZoo.currSceneID;

            Config.parkingCell parkingCell = GlobalDataManager.GetInstance().logicTableParkingData.GetParkingCell(sceneID);
            string             str         = parkingCell.touristcastbase;

            System.Numerics.BigInteger baseVal = System.Numerics.BigInteger.Parse(str);
            float basenumber = parkingCell.basenumber;
            var   computePowFloatToBigInteger = PlayerDataModule.GetComputePowFloatToBigInteger(basenumber, expectlevel - 1);
            int   number = (int)(PlayerDataModule.GetAdditionExpect(sceneID, expectlevel) * 100);

            var price = baseVal * computePowFloatToBigInteger.str_numerator * number / (computePowFloatToBigInteger.str_denominator * 100);

            //LogWarp.LogErrorFormat("测试:  baseVal={0}, computePowFloatToBigInteger.str_numerator={1}, number={2}, computePowFloatToBigInteger.str_denominator={3}", baseVal, computePowFloatToBigInteger.str_numerator, number, computePowFloatToBigInteger.str_denominator);
            return(price);
        }
Пример #7
0
        /// <summary>
        /// 停车场利润升级消耗
        /// </summary>
        /// <returns></returns>
        public static System.Numerics.BigInteger GetUpGradeParkingProfitConsumption(int level = -1)
        {   /*   Y=base*停售消耗基数【停车位数期望等级】*加成预期【停车位数期望等级】   */
            if (level == -1)
            {
                level = GlobalDataManager.GetInstance().playerData.GetParkingCenterDataIDIndexOfDataIdx().parkingProfitLevel;
            }
            int expectLevel = ParkingProfitExpectLevel(level);
            int sceneID     = GlobalDataManager.GetInstance().playerData.playerZoo.currSceneID;

            Config.parkingCell parkingCell = GlobalDataManager.GetInstance().logicTableParkingData.GetParkingCell(sceneID);
            string             str         = parkingCell.depletebase;

            System.Numerics.BigInteger baseVal = System.Numerics.BigInteger.Parse(str);
            var computePowFloatToBigInteger    = PlayerDataModule.GetComputePowFloatToBigInteger(parkingCell.basenumber, expectLevel - 1);
            int additionExpect = (int)(PlayerDataModule.GetAdditionExpect(sceneID, expectLevel) * 100);

            var price = baseVal * computePowFloatToBigInteger.str_numerator * additionExpect / (100 * computePowFloatToBigInteger.str_denominator);

            //LogWarp.LogErrorFormat("测试:  depbase ={0},分子={1},AA={2},加成预期={3},等级={4}",
            //   baseVal, computePowFloatToBigInteger.str_numerator, parkingCell.basenumber, additionExpect, level);
            return(price + level);
        }
        ///// <summary>
        ///// 动物升级消耗基数
        ///// </summary>
        ///// <param name="littleZooID">动物栏ID</param>
        ///// <param name="level">初始基数</param>
        ///// <returns></returns>
        //public static System.Numerics.BigInteger GetUpGradeBaseConsumption(int littleZooID,int level)
        //{
        //    //         Y=basenumber^(lv-1)+1
        //    var basenumber = Config.buildupConfig.getInstace().getCell(littleZooID).basenumber;

        //    var computePowFloatToBigInteger = PlayerDataModule.GetComputePowFloatToBigInteger(basenumber,level-1);
        //    var number = computePowFloatToBigInteger.str_numerator / computePowFloatToBigInteger.str_denominator + 1;

        //    return number;
        //}


        /// <summary>
        /// 动物栏门票价格升级消耗
        /// </summary>
        /// <param name="littleZooID"></param>
        /// <param name="level"></param>
        /// <returns></returns>
        public static System.Numerics.BigInteger GetUpGradeConsumption(int littleZooID, int level)
        {   /*  Y=castbase*动物消耗基数【动物栏门票期望等级】*加成预期【动物栏门票期望等级】*0.7 + lv    */
            int isLevel = level;
            var str     = Config.buildupConfig.getInstace().getCell(littleZooID).castbase;

            System.Numerics.BigInteger allbase = System.Numerics.BigInteger.Parse(str);
            int sceneID = Config.buildupConfig.getInstace().getCell(littleZooID).scene;

            var expectLevel = GetUpLittleZooPriceExpectLevel(littleZooID, level);

            var basenumber = Config.buildupConfig.getInstace().getCell(littleZooID).basenumber;
            var computePowFloatToBigInteger = PlayerDataModule.GetComputePowFloatToBigInteger(basenumber, level - 1);

            //System.Numerics.BigInteger upGradeBaseConsumption = GetUpGradeBaseConsumption(littleZooID, level);

            float additionExpect = PlayerDataModule.GetAdditionExpect(sceneID, expectLevel);
            int   number1        = (int)((additionExpect * 0.7f) * 100);

            System.Numerics.BigInteger price = computePowFloatToBigInteger.str_numerator * allbase * number1 / (computePowFloatToBigInteger.str_denominator * 100);
            //LogWarp.LogErrorFormat("测试:动物栏={0} 期望等级={1},depbase ={2},底={3},加成预期={4},分子={5},",
            //                              littleZooID, expectLevel, allbase, basenumber, additionExpect, computePowFloatToBigInteger.str_numerator);
            return(price + level);
        }