public BigNum CustomerAcquisitionPerTick() { if (model.ActivePlayers == model.Resources[Units.ActivePlayer].MaxValue) { return(0); } BigNum rate = 2f; return(model.Marketers * rate); }
public void SellTrash(BigNum amount) { BigNum itemsSold = Model.ConsumeUpTo(Units.TrashItem, amount); if (itemsSold > 0) { BigNum salePrice = itemsSold * 5; Model.Add(Units.Money, salePrice); Model.Add(Units.TrashItemSold, itemsSold); } }
public BigNum HypePerRelease() { BigNum baseHype = 100000; if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.MarketingCampaign)) { baseHype *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.LootBoxPreOrders)) { baseHype *= 2; } return(baseHype * Mathf.Log10(CostOfGameInDevHours())); }
public void OpenLootBox(BigNum amount) { BigNum lootBoxesOpened = Model.ConsumeUpTo(Units.LootBox, amount); if (lootBoxesOpened > 0) { //TODO: this is opening a lootbox! This will be exciting! Model.Add(Units.TrashItem, lootBoxesOpened); Model.Add(Units.LootBoxOpened, lootBoxesOpened); if (Model.Influencer.IsActive) { Model.Add(Units.VideoContent, lootBoxesOpened); } } }
public void UpdateMaxCustomers() { //total should be 500M before multi BigNum amount = 30e6f; if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.PurchaseBelovedStudio)) { amount *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.TargetMinnows)) { amount *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.UseDataBreach)) { amount *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.CauseDataBreach)) { amount *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.TargetChildren)) { amount *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.DetermineDesires)) { amount *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.IsolateMicrotransactionGene)) { amount *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.LaunchMeshNetwork)) { amount = 7.6e9f; } model.Resources[Units.ActivePlayer].MaxValue = amount; }
public BigNum MicrotransactionRevenuePerCustomerPerTick() { BigNum amount = model.Studio.MicrotransactionRevenuePerTick() / model.ActivePlayers; amount += model.LootBoxTypes / 100f; if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.ReduceLootBoxOdds)) { amount *= 1.2f; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.ReduceLootBoxOddsToZero)) { amount *= 1.2f; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.EnforceWatchingAds)) { amount *= 2f; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.EmitInaudibleSound)) { amount *= 2f; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.SellBuffsToOdds)) { amount *= 2f; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.OptimizeRoAS)) { amount *= 2f; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.TargetedPersonalAds)) { amount *= 2f; } return(amount); }
public BigNum ActivePlayersDecayPerTick() { BigNum decay = model.ActivePlayers * 0.02f / 30f; if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.AddWeeklyRewards)) { decay /= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.AddDailyRewards)) { decay /= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.AddConstantRewards)) { decay = 0; } return(decay); }
public BigNum PercentOfPlayersWhoMonetize() { if (!model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.EnableMicrotransactions)) { return(0); } BigNum percent = 0.01f; if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.AddGoldBoxes)) { percent *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.AddSeasonalBoxes)) { percent *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.AddLuteBoxes)) { percent *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.AddSkinnerBoxes)) { percent *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.BuffsInBoxes)) { percent *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.CoreGameInBoxes)) { percent *= 2; } if (model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.WholeGameInBoxes)) { percent = 1; } return(percent); }
public BigNum ActionsPerClick() { if (EndGameStart) { return(1); } else { BigNum amount = 1; if (Model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.SecondMouse)) { amount += 1; } if (Model.UpgradeManager.IsPurchased(Upgrade.EUpgradeType.TieFiveMiceTogether)) { amount *= 5; } return(amount); } }
public static void ReleaseGame() { if (LootBoxModel.Instance.ConsumeExactly(Units.DevHour, LootBoxModel.Instance.Studio.CostOfGameInDevHours())) { LootBoxModel.Instance.Add(Units.ReleasedGame, 1); BigNum unitsSold = LootBoxModel.Instance.Studio.HypePerRelease(); BigNum revenue = unitsSold * LootBoxModel.Instance.Studio.RevenuePerUnitSold(); LootBoxModel.Instance.Add(Units.CopySold, unitsSold); LootBoxModel.Instance.Add(Units.Money, revenue); //prev: model.Add(Units.ActivePlayer, unitsSold); LootBoxModel.Instance.Resources[Units.ActivePlayer].Amount = unitsSold; Logger.Log(string.Format("Game {0} released and sold {1} copies for ${2} in profit.", LootBoxModel.Instance.ReleasedGames, unitsSold, revenue)); if (LootBoxModel.Instance.ReleasedGames == 5) { Logger.Log("These games are getting expensive to make."); } } LootBoxModel.Instance.Add(Units.Click, 1); }
public void Tick() { if (!IsActive) { return; } UpdateMaxCustomers(); //Set resources according to budget BigNum budget = GetBudget(); BigNum overhead = GetBaseOperatingCosts() + GetFines(); budget -= overhead; BigNum devBudget = (budget * (DevAllocation / 100f)); BigNum numDevs = 0; if (devBudget > 0) { numDevs = Mathf.Pow(devBudget, 0.5f) / 10; } model.Resources[Units.Developer].Amount = numDevs; BigNum marketBudget = (budget * (MarketerAllocation / 100f)); BigNum numMarketers = 0; if (marketBudget > 0) { numMarketers = Mathf.Pow(marketBudget, 0.5f) / 10; } model.Resources[Units.Marketer].Amount = numMarketers; BigNum lobbyBudget = (budget * (LobbyistAllocation / 100f)); BigNum numLobby = 0; if (lobbyBudget > 0) { numLobby = Mathf.Pow(lobbyBudget, 0.5f) / 10e3f; } model.Resources[Units.Lobbyist].Amount = numLobby; BigNum cpuBudget = (budget * (CPUAllocation / 100f)); BigNum numCPU = 0; if (cpuBudget > 0) { numCPU = Mathf.Pow(cpuBudget, 0.5f) / 10; } model.Resources[Units.CPU].Amount = numCPU; BigNum bioBudget = (budget * (BioengineerAllocation / 100f)); BigNum numBio = 0; if (bioBudget > 0) { numBio = Mathf.Pow(bioBudget, 0.5f) / 10e4f; } model.Resources[Units.Bioengineer].Amount = numBio; BigNum spent = overhead + devBudget + marketBudget + lobbyBudget + cpuBudget + bioBudget; model.ConsumeUpTo(Units.Money, spent); //Make money model.Add(Units.Money, MicrotransactionRevenuePerTick()); //Generate resources model.Add(Units.LootBoxType, model.Developers / 1000f); model.Add(Units.ActivePlayer, CustomerAcquisitionPerTick()); model.Add(Units.Favor, FavorPerTick()); model.Add(Units.Cycle, CyclesPerTick()); model.Add(Units.GenomeData, GenomePerTick()); //Make a note of the highest operating cost we've seen model.Resources[Units.OperatingCost].Amount = Mathf.Max(model.HighestOperatingCost, GetBaseOperatingCosts()); }