Esempio n. 1
0
        public static CropSpeedGrid CalculateDaysNeededForAllHarvestsWithRegrowth(SVCrop crop, CropSpeedGrid maxHarvests)
        {
            var grid = new CropSpeedGrid()
            {
                Normal = crop.DaysToGrow.Normal + ((maxHarvests.Normal - 1) * crop.DaysToReGrow),
                SpeedGroOrAgriculturalist  = crop.DaysToGrow.SpeedGroOrAgriculturalist + ((maxHarvests.SpeedGroOrAgriculturalist - 1) * crop.DaysToReGrow),
                SpeedGroAndAgriculturalist = crop.DaysToGrow.SpeedGroAndAgriculturalist + ((maxHarvests.SpeedGroAndAgriculturalist - 1) * crop.DaysToReGrow),
                Deluxe = crop.DaysToGrow.Deluxe + ((maxHarvests.Deluxe - 1) * crop.DaysToReGrow),
                DeluxeAndAgriculturalist = crop.DaysToGrow.DeluxeAndAgriculturalist + ((maxHarvests.DeluxeAndAgriculturalist - 1) * crop.DaysToReGrow),
            };

            return(grid);
        }
Esempio n. 2
0
        public static CropSpeedGrid CalculateGoldPerDay(SVCrop crop, CropSpeedGrid maxHarvests)
        {
            var grid = new CropSpeedGrid()
            {
                Normal = (maxHarvests.Normal * crop.SellPrice * crop.NumberPerHarvest - maxHarvests.Normal * crop.SeedPrice) / (maxHarvests.Normal * crop.DaysToGrow.Normal),
                SpeedGroOrAgriculturalist  = (maxHarvests.SpeedGroOrAgriculturalist * crop.SellPrice * crop.NumberPerHarvest - maxHarvests.SpeedGroOrAgriculturalist * crop.SeedPrice) / (maxHarvests.SpeedGroOrAgriculturalist * crop.DaysToGrow.SpeedGroOrAgriculturalist),
                SpeedGroAndAgriculturalist = (maxHarvests.SpeedGroAndAgriculturalist * crop.SellPrice * crop.NumberPerHarvest - maxHarvests.SpeedGroAndAgriculturalist * crop.SeedPrice) / (maxHarvests.SpeedGroAndAgriculturalist * crop.DaysToGrow.SpeedGroAndAgriculturalist),
                Deluxe = (maxHarvests.Deluxe * crop.SellPrice * crop.NumberPerHarvest - maxHarvests.Deluxe * crop.SeedPrice) / (maxHarvests.Deluxe * crop.DaysToGrow.Deluxe),
                DeluxeAndAgriculturalist = (maxHarvests.DeluxeAndAgriculturalist * crop.SellPrice * crop.NumberPerHarvest - maxHarvests.DeluxeAndAgriculturalist * crop.SeedPrice) / (maxHarvests.DeluxeAndAgriculturalist * crop.DaysToGrow.DeluxeAndAgriculturalist),
            };

            return(grid);
        }
Esempio n. 3
0
        public static CropSpeedGrid CalculateLastDayToPlant(SVCrop crop)
        {
            var grid = new CropSpeedGrid()
            {
                Normal = 27 - crop.DaysToGrow.Normal + 1,
                SpeedGroOrAgriculturalist  = 27 - crop.DaysToGrow.SpeedGroOrAgriculturalist + 1,
                SpeedGroAndAgriculturalist = 27 - crop.DaysToGrow.SpeedGroAndAgriculturalist + 1,
                Deluxe = 27 - crop.DaysToGrow.Deluxe + 1,
                DeluxeAndAgriculturalist = 27 - crop.DaysToGrow.DeluxeAndAgriculturalist + 1,
            };

            return(grid);
        }
Esempio n. 4
0
        public static CropSpeedGrid CalculateDaysNeededForAllHarvests(SVCrop crop, CropSpeedGrid maxHarvests)
        {
            var grid = new CropSpeedGrid()
            {
                Normal = maxHarvests.Normal * crop.DaysToGrow.Normal,
                SpeedGroOrAgriculturalist  = maxHarvests.SpeedGroOrAgriculturalist * crop.DaysToGrow.SpeedGroOrAgriculturalist,
                SpeedGroAndAgriculturalist = maxHarvests.SpeedGroAndAgriculturalist * crop.DaysToGrow.SpeedGroAndAgriculturalist,
                Deluxe = maxHarvests.Deluxe * crop.DaysToGrow.Deluxe,
                DeluxeAndAgriculturalist = maxHarvests.DeluxeAndAgriculturalist * crop.DaysToGrow.DeluxeAndAgriculturalist,
            };

            return(grid);
        }
Esempio n. 5
0
        public static CropSpeedGrid CalculateMaxHarvests(SVCrop crop)
        {
            var growingDays = crop.Seasons.Count * 28 - 1;

            var grid = new CropSpeedGrid()
            {
                Normal = Math.Floor(growingDays / crop.DaysToGrow.Normal),
                SpeedGroOrAgriculturalist  = Math.Floor(growingDays / crop.DaysToGrow.SpeedGroOrAgriculturalist),
                SpeedGroAndAgriculturalist = Math.Floor(growingDays / crop.DaysToGrow.SpeedGroAndAgriculturalist),
                Deluxe = Math.Floor(growingDays / crop.DaysToGrow.Deluxe),
                DeluxeAndAgriculturalist = Math.Floor(growingDays / crop.DaysToGrow.DeluxeAndAgriculturalist),
            };

            return(grid);
        }
Esempio n. 6
0
        public static CropSpeedGrid CalculateFirstDayToPlant(SVCrop crop, CropSpeedGrid daysNeededForAllHarvests)
        {
            var growingDays = crop.Seasons.Count * 28 - 1;

            var grid = new CropSpeedGrid()
            {
                Normal = growingDays - daysNeededForAllHarvests.Normal + 1,
                SpeedGroOrAgriculturalist  = growingDays - daysNeededForAllHarvests.SpeedGroOrAgriculturalist + 1,
                SpeedGroAndAgriculturalist = growingDays - daysNeededForAllHarvests.SpeedGroAndAgriculturalist + 1,
                Deluxe = growingDays - daysNeededForAllHarvests.Deluxe + 1,
                DeluxeAndAgriculturalist = growingDays - daysNeededForAllHarvests.DeluxeAndAgriculturalist + 1,
            };

            return(grid);
        }