45 lines
2.3 KiB
TypeScript
45 lines
2.3 KiB
TypeScript
export interface ShopProduct {
|
|
id: string;
|
|
price: number; // 分
|
|
coin: number;
|
|
firstPurchaseKey?: string;
|
|
hammer?: number;
|
|
freeze?: number;
|
|
magic?: number;
|
|
infiniteHealth?: number; // 秒;8 元礼包没有无限体力
|
|
}
|
|
|
|
export const SHOP_A_GOLD: ShopProduct[] = [
|
|
{ id: "gold_1", price: 600, coin: 1200, firstPurchaseKey: "gold_1" },
|
|
{ id: "gold_2", price: 3600, coin: 8000, firstPurchaseKey: "gold_2" },
|
|
{ id: "gold_3", price: 6800, coin: 16000, firstPurchaseKey: "gold_3" },
|
|
{ id: "gold_4", price: 12800, coin: 32000, firstPurchaseKey: "gold_4" },
|
|
{ id: "gold_5", price: 32800, coin: 100000, firstPurchaseKey: "gold_5" },
|
|
{ id: "gold_6", price: 64800, coin: 240000, firstPurchaseKey: "gold_6" },
|
|
];
|
|
|
|
export const SHOP_B_GOLD: ShopProduct[] = [
|
|
{ id: "new_gold_1", price: 600, coin: 1200, firstPurchaseKey: "gold_1" },
|
|
{ id: "new_gold_2", price: 3000, coin: 6800, firstPurchaseKey: "gold_2" },
|
|
{ id: "new_gold_3", price: 6800, coin: 16000, firstPurchaseKey: "gold_3" },
|
|
{ id: "new_gold_4", price: 12800, coin: 32000, firstPurchaseKey: "gold_4" },
|
|
{ id: "new_gold_5", price: 32800, coin: 84000, firstPurchaseKey: "gold_5" },
|
|
{ id: "new_gold_6", price: 64800, coin: 168000, firstPurchaseKey: "gold_6" },
|
|
];
|
|
|
|
export const SHOP_B_BUNDLES: ShopProduct[] = [
|
|
{ id: "new_unlimited_health_bundle_8", price: 800, coin: 1500, hammer: 2, freeze: 2, magic: 2, infiniteHealth: 0 },
|
|
{ id: "new_unlimited_health_bundle_18", price: 1800, coin: 3000, hammer: 5, freeze: 5, magic: 5, infiniteHealth: 1800 },
|
|
{ id: "new_unlimited_health_bundle_36", price: 3600, coin: 6000, hammer: 10, freeze: 10, magic: 10, infiniteHealth: 7200 },
|
|
{ id: "new_unlimited_health_bundle_68", price: 6800, coin: 10000, hammer: 20, freeze: 20, magic: 20, infiniteHealth: 21600 },
|
|
{ id: "new_unlimited_health_bundle_98", price: 9800, coin: 20000, hammer: 25, freeze: 25, magic: 25, infiniteHealth: 43200 },
|
|
];
|
|
|
|
export const STAMINA_PACK: ShopProduct = { id: "StaminaPack", price: 800, coin: 1200, infiniteHealth: 3600 };
|
|
|
|
// 按订单商品 ID 查奖励,补单不能使用玩家当前的 AB 分组决定数值。
|
|
export function getNewShopProduct(id: string): ShopProduct {
|
|
if (id === STAMINA_PACK.id) return STAMINA_PACK;
|
|
return SHOP_B_GOLD.concat(SHOP_B_BUNDLES).find(product => product.id === id);
|
|
}
|