From 0a1bf83966edfe49c2f28045f31dd9067f6a20bb Mon Sep 17 00:00:00 2001 From: "Mr.Yawnie" Date: Tue, 14 Jul 2020 16:51:00 +1000 Subject: [PATCH] added debug flag 'rewardsSingleShape' --- src/js/core/config.local.js | 3 +++ src/js/game/hub_goals.js | 21 +++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/js/core/config.local.js b/src/js/core/config.local.js index 7bf9a002..549f200f 100644 --- a/src/js/core/config.local.js +++ b/src/js/core/config.local.js @@ -32,6 +32,9 @@ export default { // All rewards can be unlocked by passing just 1 of any shape // rewardsInstant: true, // ----------------------------------------------------------------------------------- + // Rewards after level 18 can be unlocked by passing just 1 of required shape + // rewardsSingleShape: true, + // ----------------------------------------------------------------------------------- // Unlocks all buildings // allBuildingsUnlocked: true, // ----------------------------------------------------------------------------------- diff --git a/src/js/game/hub_goals.js b/src/js/game/hub_goals.js index 612bc124..c2222d5a 100644 --- a/src/js/game/hub_goals.js +++ b/src/js/game/hub_goals.js @@ -210,12 +210,21 @@ export class HubGoals extends BasicSerializableObject { return; } - this.currentGoal = { - /** @type {ShapeDefinition} */ - definition: this.createRandomShape(), - required: 10000 + findNiceIntegerValue(this.level * 2000), - reward: enumHubGoalRewards.no_reward_freeplay, - }; + if (globalConfig.debug.rewardsSingleShape) { + this.currentGoal = { + /** @type {ShapeDefinition} */ + definition: this.createRandomShape(), + required: 1, + reward: enumHubGoalRewards.no_reward_freeplay, + }; + } else { + this.currentGoal = { + /** @type {ShapeDefinition} */ + definition: this.createRandomShape(), + required: 10000 + findNiceIntegerValue(this.level * 2000), + reward: enumHubGoalRewards.no_reward_freeplay, + }; + } } /**