Update story goals
This commit is contained in:
parent
5dab3508cd
commit
f4e4b6d027
|
@ -52,6 +52,17 @@ export class HubGoals extends BasicSerializableObject {
|
||||||
}
|
}
|
||||||
this.upgradeImprovements[upgradeId] = totalImprovement;
|
this.upgradeImprovements[upgradeId] = totalImprovement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Compute current goal
|
||||||
|
const goal = tutorialGoals[this.level - 1];
|
||||||
|
if (goal) {
|
||||||
|
this.currentGoal = {
|
||||||
|
/** @type {ShapeDefinition} */
|
||||||
|
definition: this.root.shapeDefinitionMgr.getShapeFromShortKey(goal.shape),
|
||||||
|
required: goal.required,
|
||||||
|
reward: goal.reward,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -201,7 +212,7 @@ export class HubGoals extends BasicSerializableObject {
|
||||||
this.currentGoal = {
|
this.currentGoal = {
|
||||||
/** @type {ShapeDefinition} */
|
/** @type {ShapeDefinition} */
|
||||||
definition: this.createRandomShape(),
|
definition: this.createRandomShape(),
|
||||||
required: 1000 + findNiceIntegerValue(this.level * 47.5),
|
required: 10000 + findNiceIntegerValue(this.level * 2000),
|
||||||
reward: enumHubGoalRewards.no_reward_freeplay,
|
reward: enumHubGoalRewards.no_reward_freeplay,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -312,7 +323,7 @@ export class HubGoals extends BasicSerializableObject {
|
||||||
* @returns {ShapeDefinition}
|
* @returns {ShapeDefinition}
|
||||||
*/
|
*/
|
||||||
createRandomShape() {
|
createRandomShape() {
|
||||||
const layerCount = clamp(this.level / 50, 2, 4);
|
const layerCount = clamp(this.level / 25, 2, 4);
|
||||||
/** @type {Array<import("./shape_definition").ShapeLayer>} */
|
/** @type {Array<import("./shape_definition").ShapeLayer>} */
|
||||||
let layers = [];
|
let layers = [];
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ export const tutorialGoals = [
|
||||||
// 8
|
// 8
|
||||||
{
|
{
|
||||||
shape: "RbRb----", // painter t2
|
shape: "RbRb----", // painter t2
|
||||||
required: 1250,
|
required: 1000,
|
||||||
reward: enumHubGoalRewards.reward_mixer,
|
reward: enumHubGoalRewards.reward_mixer,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ export const tutorialGoals = [
|
||||||
// Mixing (purple)
|
// Mixing (purple)
|
||||||
{
|
{
|
||||||
shape: "CpCpCpCp", // belts t3
|
shape: "CpCpCpCp", // belts t3
|
||||||
required: 1750,
|
required: 1400,
|
||||||
reward: enumHubGoalRewards.reward_splitter_compact,
|
reward: enumHubGoalRewards.reward_splitter_compact,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ export const tutorialGoals = [
|
||||||
// Star shape + cyan
|
// Star shape + cyan
|
||||||
{
|
{
|
||||||
shape: "ScScScSc", // miners t3
|
shape: "ScScScSc", // miners t3
|
||||||
required: 2250,
|
required: 1600,
|
||||||
reward: enumHubGoalRewards.reward_stacker,
|
reward: enumHubGoalRewards.reward_stacker,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ export const tutorialGoals = [
|
||||||
// Stacker
|
// Stacker
|
||||||
{
|
{
|
||||||
shape: "CgScScCg", // processors t3
|
shape: "CgScScCg", // processors t3
|
||||||
required: 3000,
|
required: 1800,
|
||||||
reward: enumHubGoalRewards.reward_miner_chainable,
|
reward: enumHubGoalRewards.reward_miner_chainable,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ export const tutorialGoals = [
|
||||||
// Blueprints
|
// Blueprints
|
||||||
{
|
{
|
||||||
shape: "CbCbCbRb:CwCwCwCw",
|
shape: "CbCbCbRb:CwCwCwCw",
|
||||||
required: 4000,
|
required: 2000,
|
||||||
reward: enumHubGoalRewards.reward_blueprints,
|
reward: enumHubGoalRewards.reward_blueprints,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ export const tutorialGoals = [
|
||||||
// 17
|
// 17
|
||||||
{
|
{
|
||||||
shape: "WrRgWrRg:CwCrCwCr:SgSgSgSg", // processors t4 (two varinats)
|
shape: "WrRgWrRg:CwCrCwCr:SgSgSgSg", // processors t4 (two varinats)
|
||||||
required: 100000,
|
required: 120000,
|
||||||
reward: enumHubGoalRewards.reward_painter_quad,
|
reward: enumHubGoalRewards.reward_painter_quad,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -165,19 +165,12 @@ export const tutorialGoals = [
|
||||||
{
|
{
|
||||||
shape: finalGameShape,
|
shape: finalGameShape,
|
||||||
required: 250000,
|
required: 250000,
|
||||||
reward: enumHubGoalRewards.reward_wires,
|
|
||||||
},
|
|
||||||
|
|
||||||
// 19
|
|
||||||
{
|
|
||||||
shape: finalGameShape,
|
|
||||||
required: 1,
|
|
||||||
reward: enumHubGoalRewards.reward_freeplay,
|
reward: enumHubGoalRewards.reward_freeplay,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
if (G_IS_DEV) {
|
if (G_IS_DEV) {
|
||||||
tutorialGoals.forEach(({ shape, required, reward }) => {
|
tutorialGoals.forEach(({ shape }) => {
|
||||||
try {
|
try {
|
||||||
ShapeDefinition.fromShortKey(shape);
|
ShapeDefinition.fromShortKey(shape);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const UPGRADES = {
|
||||||
improvement: 1,
|
improvement: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
required: [{ shape: "--CuCu--", amount: 1500 }],
|
required: [{ shape: "--CuCu--", amount: 1200 }],
|
||||||
improvement: 2,
|
improvement: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@ export const UPGRADES = {
|
||||||
improvement: 1,
|
improvement: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
required: [{ shape: "Cu------", amount: 5500 }],
|
required: [{ shape: "Cu------", amount: 4000 }],
|
||||||
improvement: 2,
|
improvement: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -102,7 +102,7 @@ export const UPGRADES = {
|
||||||
improvement: 2,
|
improvement: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
required: [{ shape: "WrWrWrWr", amount: 5000 }],
|
required: [{ shape: "WrWrWrWr", amount: 4000 }],
|
||||||
improvement: 1,
|
improvement: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Reference in New Issue