/// <summary> /// Whether or not an item was purchased, on average, during the late stage of the game. /// </summary> public static bool IsLatePurchase(ItemPurchaseTrackerData tracker) { return (!IsStartPurchase(tracker) && !IsEarlyPurchase(tracker) && !IsMidPurchase(tracker)); }
/// <summary> /// Whether or not an item was purchased, on average, during the start of the game. /// </summary> public static bool IsStartPurchase(ItemPurchaseTrackerData tracker) { return (tracker.AveragePurchaseTimeSeconds <= 90.0 && tracker.AverageKills < 1.0f && tracker.AverageTowerKills < 1.0); }
/// <summary> /// Whether or not an item was purchased, on average, during the mid stage of the game. /// </summary> public static bool IsMidPurchase(ItemPurchaseTrackerData tracker) { return (!IsStartPurchase(tracker) && !IsEarlyPurchase(tracker) && tracker.AverageInnerTowerKills < 2.5f && // Getting too close to 3 puts a lot of items into the mid-game bucket tracker.AverageBaseTowerKills < 1.0f); }
/// <summary> /// Gets the game stage a purchase took place in. /// </summary> public static GameStage GetGameStage(ItemPurchaseTrackerData tracker) { return (IsStartPurchase(tracker) ? GameStage.Start : IsEarlyPurchase(tracker) ? GameStage.Early : IsMidPurchase(tracker) ? GameStage.Mid : GameStage.Late); }
/// <summary> /// Whether or not an item was purchased, on average, during the early stage of the game. /// </summary> public static bool IsEarlyPurchase(ItemPurchaseTrackerData tracker) { return (!IsStartPurchase(tracker) && tracker.AverageTowerKills < 1.0f); }