void ChangeBrandPowers(GameEntity[] products)
    {
        for (var i = 0; i < products.Length; i++)
        {
            var powerChange = Marketing.GetBrandChange(products[i], gameContext).Sum();

            Marketing.AddBrandPower(products[i], (float)powerChange);
        }
    }
Exemplo n.º 2
0
        internal static void BrandingCampaign(CompanyTask task, GameContext gameContext)
        {
            var t = task as CompanyTaskBrandingCampaign;

            var c = Companies.Get(gameContext, t.CompanyId);

            Marketing.AddBrandPower(c, Balance.BRAND_CAMPAIGN_BRAND_POWER_GAIN);

            var clients = Marketing.GetAudienceGrowth(c, gameContext);

            Marketing.AddClients(c, clients);
        }
Exemplo n.º 3
0
    void PrepareMarket(GameEntity niche, long startCapital)
    {
        // spawn competitors
        for (var i = 0; i < 1; i++)
        {
            var c = Markets.SpawnCompany(niche, Q, Random.Range(2, 5) * startCapital);

            //MarketingUtils.AddClients(c, MarketingUtils.GetClients(c) * Random.Range(1, 1.5f));
            Marketing.AddBrandPower(c, 10);
        }

        // spawn investors
        for (var i = 0; i < 1; i++)
        {
            var fund = Companies.GenerateInvestmentFund(Q, RandomUtils.GenerateInvestmentCompanyName(), 500000);
            Companies.AddFocusNiche(niche.niche.NicheType, fund, Q);
        }
    }
Exemplo n.º 4
0
    private static long GiveInnovationBenefits(GameEntity product, GameContext gameContext)
    {
        Marketing.AddBrandPower(product, Balance.INNOVATION_BRAND_POWER_GAIN);

        // get your competitor's clients
        var products = Markets.GetProductsOnMarket(gameContext, product)
                       .Where(p => p.isRelease)
                       .Where(p => p.company.Id != product.company.Id);

        long sum = 0;

        foreach (var p in products)
        {
            var disloyal = Marketing.GetClients(p) / 6;

            Marketing.LooseClients(p, disloyal);
            Marketing.AddClients(product, disloyal);

            sum += disloyal;
        }

        return(sum);
    }