feat: add per-run reborn gift price tiers

This commit is contained in:
COMPUTER\EDY
2026-09-21 17:13:35 +08:00
parent 736a6bb342
commit 4018dbfbfc
14 changed files with 405 additions and 52 deletions
+9 -1
View File
@@ -999,6 +999,9 @@ var GameTool = {
//商城购买
shopBuy(productId, compensate, orderContext: any = null) {
const rebornOrderKey = /^reborn_Gift(?:_[2-5])?$/.test(productId) && orderContext?.outTradeNo
? "RebornGiftGranted_" + cc.fx.GameConfig.GM_INFO.uid + "_" + orderContext.outTradeNo : "";
if (rebornOrderKey && cc.fx.StorageMessage.getStorage(rebornOrderKey)) return false;
const starterOrderKey = productId === "starter_pack" && orderContext?.outTradeNo
? "StarterPackGranted_" + cc.fx.GameConfig.GM_INFO.uid + "_" + orderContext.outTradeNo : "";
if (starterOrderKey && cc.fx.StorageMessage.getStorage(starterOrderKey)) return;
@@ -1234,9 +1237,13 @@ var GameTool = {
]
break;
case "reborn_Gift":
case "reborn_Gift_2":
case "reborn_Gift_3":
case "reborn_Gift_4":
case "reborn_Gift_5":
cc.fx.GameTool.changeCoin(1000);
coin = 1000;
price = 600;
price = { reborn_Gift: 600, reborn_Gift_2: 800, reborn_Gift_3: 1000, reborn_Gift_4: 1200, reborn_Gift_5: 1500 }[productId];
rewardData = [
{ type: "coin", count: coin },
{ type: "freeze", count: 1 },
@@ -1250,6 +1257,7 @@ var GameTool = {
"price": price
}
this.getShopProp(propData3, compensate);
if (rebornOrderKey) cc.fx.StorageMessage.setStorage(rebornOrderKey, true);
break;
case "starter_pack": {
const reward = starterPackReward();