三连胜提交

This commit is contained in:
COMPUTER\EDY
2026-10-16 16:24:28 +08:00
parent 400e0f81b9
commit aa1e079d22
108 changed files with 13748 additions and 1002 deletions
+11 -1
View File
@@ -444,6 +444,13 @@ export class GameConfig {
// 临时老彩虹测试开关(默认关闭):开启后强制 C、立即解锁连胜、始终十连胜。
static forceOldRainbowWinStreakC = false;
// 临时测试:本地始终保持三连胜,不写入真实存档;false 恢复正常规则。
static forceThreeWinStreak = false;
static isStartBoostersUnlocked(): boolean {
return this.GM_INFO.level + 1 >= 25 && !(this.GM_INFO.otherLevel > 0);
}
static isRainbowWinStreak(): boolean {
if (this.forceOldRainbowWinStreakC) return false;
if (this.forceRainbowWinStreakB) return true;
@@ -471,7 +478,8 @@ export class GameConfig {
}
static gameplayBlockExtraPaths(blocks: any[]): string[] {
return GAMEPLAY_ATLAS_PATHS.concat(this.isRainbowRewardActive() ? rainbowTexturePaths(blocks) : []);
return GAMEPLAY_ATLAS_PATHS.concat(this.isRainbowRewardActive() || this.isStartBoostersUnlocked()
? rainbowTexturePaths(blocks) : []);
}
static isWinStreakUnlocked(): boolean {
@@ -594,6 +602,7 @@ export class GameConfig {
getItemType: number; popPassCheck: boolean; // 弹窗通行证
passCheckActivate: boolean;
winStreak: number; //连胜
threeWinStreak: number; //独立三连胜,奖励封顶三档
tasks: any; addLevel: number; //每日/周任务数据
address: string; //用户城市信息
firstTime: number; //用户注册时间
@@ -820,6 +829,7 @@ export class GameConfig {
popPassCheck: false, // 弹窗通行证
passCheckActivate: false,
winStreak: (this.forceOldRainbowWinStreakC || this.forceRainbowWinStreakB) ? 10 : 0, //测试模式默认十连胜
threeWinStreak: this.forceThreeWinStreak ? 3 : 0,
tasks: { levelPass: { value: 0, target: 0, state: 0 }, share: { value: 0, target: 0, state: 0 }, useEnergy: { value: 0, target: 0, state: 0 }, useProp: { value: 0, target: 0, state: 0 } },
addLevel: 0, //每日过关数
address: "", //用户城市信息
+2 -2
View File
@@ -1633,7 +1633,7 @@ export default class Utils {
}
//设置连胜次数
static setWinStreak(callBack) {
static setWinStreak(callBack, fields?: { winStreak?: number; threeWinStreak?: number }) {
//@ts-ignore
if ((typeof wx !== 'undefined' && wx !== null) || (typeof tt !== 'undefined' && tt !== null)) {
let uid = cc.fx.StorageMessage.getStorage("uid");
@@ -1644,7 +1644,7 @@ export default class Utils {
let setData = {
uid: cc.fx.GameConfig.GM_INFO.uid,
action: 'save',
winStreak: cc.fx.GameConfig.GM_INFO.winStreak,
...(fields || { winStreak: cc.fx.GameConfig.GM_INFO.winStreak }),
}
Utils.POST("setWinStreak", setData, res => {
if (res.code === 1) {
+26 -3
View File
@@ -849,7 +849,7 @@ var GameTool = {
//更改用户道具数
buyProp(propid, callback: Function) {
//@ts-ignore
if ((typeof wx !== 'undefined' && wx !== null) || (typeof tt !== 'undefined' && tt !== null)) {
if ((typeof wx !== 'undefined' && wx !== null) || (typeof tt !== 'undefined' && tt !== null) || propid === 2006 || propid === 2007) {
let num = 3;
let cost = 600;
@@ -861,6 +861,10 @@ var GameTool = {
else if (propid == 2002) {
num = 1;
}
else if (propid == 2006 || propid == 2007) {
cost = propid == 2006 ? 200 : 800;
if (cc.fx.GameConfig.GM_INFO.coin < cost) return;
}
//console.log("_____________新版本", num);
cc.fx.GameTool.changeCoin(-cost);
const dataTemp = {
@@ -887,11 +891,19 @@ var GameTool = {
cc.fx.GameConfig.GM_INFO.magicAmount += num;
propNumber = cc.fx.GameConfig.GM_INFO.magicAmount;
}
else if (propid == 2006 || propid == 2007) {
const prop = propid == 2006 ? "hourglass" : "rocket";
_id = prop + "_in_game";
cc.fx.GameConfig.GM_INFO[prop + "Amount"] += num;
propNumber = cc.fx.GameConfig.GM_INFO[prop + "Amount"];
}
const timestamp = Date.now();
let propInfo = cc.fx.StorageMessage.getStorage("prop");
let propInfo = cc.fx.StorageMessage.getStorage("prop") || {};
propInfo.hammerAmount = cc.fx.GameConfig.GM_INFO.hammerAmount;
propInfo.magicAmount = cc.fx.GameConfig.GM_INFO.magicAmount;
propInfo.freezeAmount = cc.fx.GameConfig.GM_INFO.freezeAmount;
propInfo.hourglassAmount = cc.fx.GameConfig.GM_INFO.hourglassAmount;
propInfo.rocketAmount = cc.fx.GameConfig.GM_INFO.rocketAmount;
propInfo.timestamp = timestamp;
cc.fx.StorageMessage.setStorage("prop", propInfo);
@@ -937,6 +949,15 @@ var GameTool = {
},
//改变用户道具
saveStartBoostInventory(prop: "hourglass" | "rocket") {
const amount = cc.fx.GameConfig.GM_INFO[prop + "Amount"];
const cached = cc.fx.StorageMessage.getStorage("prop") || {};
cached[prop + "Amount"] = amount;
cached.timestamp = Date.now();
cc.fx.StorageMessage.setStorage("prop", cached);
this.setUserProp(prop === "hourglass" ? 2006 : 2007, amount, null);
},
setUserProp(propid, amount, callback) {
//@ts-ignore
if ((typeof wx !== 'undefined' && wx !== null) || (typeof tt !== 'undefined' && tt !== null)) {
@@ -958,7 +979,7 @@ var GameTool = {
else if (propid == 2002) {
newPropData = amount;
}
else if (propid == 2003) {
else if (propid == 2003 || propid == 2006 || propid == 2007) {
newPropData = amount;
}
@@ -1546,10 +1567,12 @@ var GameTool = {
stage_id: userLevel,
is_frenzy: data.is_frenzy,
infinity: data.infinity,
pilot_drop: data.pilot_drop || 0,
}
if (cc.fx.GameConfig.GM_INFO.otherLevel > 0) {
eventData = {
stage_id: cc.fx.GameConfig.GM_INFO.otherLevel,
pilot_drop: data.pilot_drop || 0,
}
}
break;