Exemplo n.º 1
0
        public static int GetNecessaryAmountOfMarketers(GameEntity e, GameContext gameContext)
        {
            var clients = Marketing.GetClients(e);

            var support = (int)Mathf.Pow(clients / 1000, 0.5f);

            return(Mathf.Clamp(support, 0, 1000));
        }
Exemplo n.º 2
0
        internal static float GetIncomeBySegment(GameContext gameContext, GameEntity c, int segmentId)
        {
            if (c.isDumping)
            {
                return(0);
            }

            float unitIncome = GetUnitIncome(gameContext, c, segmentId);

            long clients = Marketing.GetClients(c);

            return(clients * unitIncome);
        }
        internal static void ReturnUsersWhenCompanyIsClosed(GameEntity e, GameContext gameContext)
        {
            var users = Marketing.GetClients(e);

            var niche = GetNiche(gameContext, e.product.Niche);

            var companies = GetProductsOnMarket(gameContext, e.company.Id);

            var powers = companies.Sum(c => c.branding.BrandPower + 1) - e.branding.BrandPower;

            foreach (var c in companies)
            {
                if (c == e)
                {
                    continue;
                }

                var part = (long)((1 + c.branding.BrandPower) * users / powers);
                Marketing.AddClients(c, part);
            }

            Marketing.AddClients(e, -users);
        }
Exemplo n.º 4
0
        public static bool IsReleaseableApp(GameEntity product, GameContext gameContext)
        {
            var hasCriticalMassOfUsers = Marketing.GetClients(product) >= 500;

            return(!product.isRelease && hasCriticalMassOfUsers && !Products.IsOutOfMarket(product, gameContext));
        }