Vip宣伝発生の条件を変更

This commit is contained in:
kimura 2022-05-24 15:51:10 +09:00
parent bb936ae4a3
commit 1752153ad6
2 changed files with 6 additions and 3 deletions

View File

@ -142,8 +142,11 @@ public class CookingResult : MonoBehaviour
// 獲得、遷移 // 獲得、遷移
MoveStock(GameDataManager.GameData.WaitAddStock); MoveStock(GameDataManager.GameData.WaitAddStock);
// 確率でVip宣伝 // 獲得後、確率でVip宣伝
if (GameDataManager.GameData.ShopStock.Count >= Const.VipCustomerRewardStock) var shopStock = GameDataManager.GameData.ShopStock.Count;
var tankStock = GameDataManager.GameData.StorageTanks.Sum(x => x.Stock);
var totalStock = shopStock + tankStock;
if (totalStock >= Const.VipCustomerRewardStock)
{ {
if (Random.value <= Const.VipCustomerRewardRate) if (Random.value <= Const.VipCustomerRewardRate)
{ {

View File

@ -22,7 +22,7 @@ public static class Const {
public static readonly int[] FieldTutorial = { 5, 12, 6 }; public static readonly int[] FieldTutorial = { 5, 12, 6 };
public static readonly int[] ShoppingTutorial = { 7, 13, 8}; public static readonly int[] ShoppingTutorial = { 7, 13, 8};
public static readonly int[] ManagementTutorial = { 9 }; public static readonly int[] ManagementTutorial = { 9 };
public static readonly float VipCustomerRewardStock = 20; // Market.ShopStockCount以下にする public static readonly float VipCustomerRewardStock = 30;
public static readonly float VipCustomerRewardRate = 0.2f; public static readonly float VipCustomerRewardRate = 0.2f;
public static readonly int AutoCookAvailableLevel = 7; public static readonly int AutoCookAvailableLevel = 7;
public static readonly int ShopCustomizeDefaultSignBoardId = 1; public static readonly int ShopCustomizeDefaultSignBoardId = 1;