增加一版彩虹机制
This commit is contained in:
@@ -425,6 +425,7 @@ export class GameConfig {
|
||||
|
||||
// 以下功能门槛均使用已通关数。
|
||||
static getFeatureUnlockLevel(feature: string): number {
|
||||
if (this.forceOldRainbowWinStreakC && feature === "winStreak") return 0;
|
||||
const levels = this.isNewPlayerB()
|
||||
? { month: 20, pass: 20, daily: 35, winStreak: 50 }
|
||||
: { month: 16, pass: 21, daily: 0, winStreak: 17 };
|
||||
@@ -434,21 +435,41 @@ export class GameConfig {
|
||||
// 临时测试:强制彩虹 B 方案,输赢、退出均保持十连胜;false 恢复真实 AB 和正常连胜规则。
|
||||
static forceRainbowWinStreakB = false;
|
||||
|
||||
// 临时老彩虹测试开关:强制 C、立即解锁连胜、始终十连胜;改为 false 恢复正式规则。
|
||||
static forceOldRainbowWinStreakC = true;
|
||||
|
||||
static isRainbowWinStreak(): boolean {
|
||||
if (this.forceOldRainbowWinStreakC) return false;
|
||||
if (this.forceRainbowWinStreakB) return true;
|
||||
return !!this.GM_INFO && !!this.GM_INFO.abTests && this.GM_INFO.abTests.layer_two === 2;
|
||||
}
|
||||
|
||||
static isOldRainbowWinStreak(): boolean {
|
||||
if (this.forceOldRainbowWinStreakC) return true;
|
||||
if (this.forceRainbowWinStreakB) return false;
|
||||
return !!this.GM_INFO && !!this.GM_INFO.abTests && this.GM_INFO.abTests.layer_two === 3;
|
||||
}
|
||||
|
||||
static usesRainbowWinStreakUI(): boolean {
|
||||
return this.isRainbowWinStreak() || this.isOldRainbowWinStreak();
|
||||
}
|
||||
|
||||
static isRainbowRewardActive(): boolean {
|
||||
return this.isRainbowWinStreak() && this.isWinStreakUnlocked()
|
||||
&& this.GM_INFO.winStreak >= 10 && !(this.GM_INFO.otherLevel > 0);
|
||||
}
|
||||
|
||||
static isOldRainbowRewardActive(): boolean {
|
||||
return this.isOldRainbowWinStreak() && this.isWinStreakUnlocked()
|
||||
&& this.GM_INFO.winStreak >= 10 && !(this.GM_INFO.otherLevel > 0);
|
||||
}
|
||||
|
||||
static gameplayBlockExtraPaths(blocks: any[]): string[] {
|
||||
return GAMEPLAY_ATLAS_PATHS.concat(this.isRainbowRewardActive() ? rainbowTexturePaths(blocks) : []);
|
||||
}
|
||||
|
||||
static isWinStreakUnlocked(): boolean {
|
||||
if (this.forceOldRainbowWinStreakC) return true;
|
||||
return !this.isNewPlayerB() || this.GM_INFO.level >= 50;
|
||||
}
|
||||
|
||||
@@ -766,13 +787,13 @@ export class GameConfig {
|
||||
starterPackReactivatedDeadline: 0,
|
||||
wxFriend: false, //微信好友信息授权
|
||||
wxUserInfo: false, //微信用户信息授权
|
||||
winState: this.forceRainbowWinStreakB, //测试模式从十连胜状态启动
|
||||
winState: this.forceOldRainbowWinStreakC || this.forceRainbowWinStreakB, //测试模式从十连胜状态启动
|
||||
getProgressLevel: 1, //获取进度关卡
|
||||
getProgress: 0, //获取进度
|
||||
getItemType: 2,
|
||||
popPassCheck: false, // 弹窗通行证
|
||||
passCheckActivate: false,
|
||||
winStreak: this.forceRainbowWinStreakB ? 10 : 0, //测试模式默认十连胜
|
||||
winStreak: (this.forceOldRainbowWinStreakC || this.forceRainbowWinStreakB) ? 10 : 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: "", //用户城市信息
|
||||
|
||||
@@ -2054,7 +2054,7 @@ var GameTool = {
|
||||
},
|
||||
|
||||
setWinStreak(type) {
|
||||
if (cc.fx.GameConfig.forceRainbowWinStreakB) {
|
||||
if (cc.fx.GameConfig.forceOldRainbowWinStreakC || cc.fx.GameConfig.forceRainbowWinStreakB) {
|
||||
cc.fx.GameConfig.GM_INFO.winStreak = 10;
|
||||
cc.fx.GameConfig.GM_INFO.winState = true;
|
||||
cc.fx.StorageMessage.setStorage("winStreak", 10);
|
||||
|
||||
Reference in New Issue
Block a user