mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Rebalance levels, adjustments, etc
This commit is contained in:
parent
dab688cefb
commit
5627d656cc
@ -121,15 +121,16 @@ export class HUDStandaloneAdvantages extends BaseHUDPart {
|
|||||||
this.root.app.gameAnalytics.noteMinor("game.std_advg.show");
|
this.root.app.gameAnalytics.noteMinor("game.std_advg.show");
|
||||||
this.root.app.gameAnalytics.noteMinor("game.std_advg.show-" + (final ? "final" : "nonfinal"));
|
this.root.app.gameAnalytics.noteMinor("game.std_advg.show-" + (final ? "final" : "nonfinal"));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.lastShown = this.root.time.now();
|
this.lastShown = this.root.time.now();
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.final = final;
|
this.final = final;
|
||||||
this.root.app.inputMgr.makeSureAttachedAndOnTop(this.inputReciever);
|
this.root.app.inputMgr.makeSureAttachedAndOnTop(this.inputReciever);
|
||||||
|
|
||||||
if (this.root.time.now() < 120) {
|
if (this.final) {
|
||||||
this.title.innerText = "";
|
|
||||||
} else if (this.final) {
|
|
||||||
this.title.innerText = T.ingame.standaloneAdvantages.titleExpiredV2;
|
this.title.innerText = T.ingame.standaloneAdvantages.titleExpiredV2;
|
||||||
|
} else if (this.root.time.now() < 120) {
|
||||||
|
this.title.innerText = "";
|
||||||
} else {
|
} else {
|
||||||
this.title.innerText = T.ingame.standaloneAdvantages.titleEnjoyingDemo;
|
this.title.innerText = T.ingame.standaloneAdvantages.titleEnjoyingDemo;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
/* typehints:start */
|
||||||
|
import { Application } from "../../application";
|
||||||
|
/* typehints:end */
|
||||||
import { WEB_STEAM_SSO_AUTHENTICATED } from "../../core/steam_sso";
|
import { WEB_STEAM_SSO_AUTHENTICATED } from "../../core/steam_sso";
|
||||||
import { enumHubGoalRewards } from "../tutorial_goals";
|
import { enumHubGoalRewards } from "../tutorial_goals";
|
||||||
|
|
||||||
@ -7,7 +10,15 @@ const chinaShapes = G_WEGAME_VERSION || G_CHINA_VERSION;
|
|||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const WEB_DEMO_LEVELS = () => [
|
/**
|
||||||
|
*
|
||||||
|
* @param {Application} app
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
const WEB_DEMO_LEVELS = app => {
|
||||||
|
const variant = app.gameAnalytics.abtVariant;
|
||||||
|
|
||||||
|
const levels = [
|
||||||
// 1
|
// 1
|
||||||
// Circle
|
// Circle
|
||||||
{
|
{
|
||||||
@ -28,7 +39,7 @@ const WEB_DEMO_LEVELS = () => [
|
|||||||
// Rectangle
|
// Rectangle
|
||||||
{
|
{
|
||||||
shape: "RuRuRuRu", // miners t1
|
shape: "RuRuRuRu", // miners t1
|
||||||
required: 50,
|
required: variant === "0" ? 50 : 30,
|
||||||
reward: enumHubGoalRewards.reward_balancer,
|
reward: enumHubGoalRewards.reward_balancer,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -46,34 +57,51 @@ const WEB_DEMO_LEVELS = () => [
|
|||||||
required: 75,
|
required: 75,
|
||||||
reward: enumHubGoalRewards.reward_tunnel,
|
reward: enumHubGoalRewards.reward_tunnel,
|
||||||
},
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
if (["0", "1", "2", "3"].includes(variant)) {
|
||||||
|
levels.push(
|
||||||
// 6
|
// 6
|
||||||
{
|
|
||||||
shape: "Cu------", // miners t2
|
|
||||||
required: 75,
|
|
||||||
reward: enumHubGoalRewards.reward_painter,
|
|
||||||
},
|
|
||||||
|
|
||||||
// 7
|
|
||||||
// Painter
|
// Painter
|
||||||
|
{
|
||||||
|
shape: "Cu------", // miners t2
|
||||||
|
required: variant === "0" ? 75 : 50,
|
||||||
|
reward: enumHubGoalRewards.reward_painter,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (["0", "1", "2"].includes(variant)) {
|
||||||
|
levels.push(
|
||||||
|
// 7
|
||||||
{
|
{
|
||||||
shape: "CrCrCrCr", // unused
|
shape: "CrCrCrCr", // unused
|
||||||
required: 120,
|
required: variant === "0" ? 120 : 85,
|
||||||
reward: enumHubGoalRewards.reward_rotater_ccw,
|
reward: enumHubGoalRewards.reward_rotater_ccw,
|
||||||
},
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (["0", "1"].includes(variant)) {
|
||||||
|
levels.push(
|
||||||
// 8
|
// 8
|
||||||
{
|
{
|
||||||
shape: "RbRb----", // painter t2
|
shape: "RbRb----", // painter t2
|
||||||
required: 170,
|
required: variant === "0" ? 170 : 100,
|
||||||
reward: enumHubGoalRewards.reward_mixer,
|
reward: enumHubGoalRewards.reward_mixer,
|
||||||
},
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// End of demo
|
// End of demo
|
||||||
{
|
levels.push({
|
||||||
shape: "RbRb----",
|
shape: levels[levels.length - 1].shape,
|
||||||
required: 0,
|
required: 0,
|
||||||
reward: enumHubGoalRewards.reward_demo_end,
|
reward: enumHubGoalRewards.reward_demo_end,
|
||||||
},
|
});
|
||||||
];
|
|
||||||
|
return levels;
|
||||||
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
@ -354,11 +382,11 @@ const STANDALONE_LEVELS = () => [
|
|||||||
/**
|
/**
|
||||||
* Generates the level definitions
|
* Generates the level definitions
|
||||||
*/
|
*/
|
||||||
export function generateLevelsForVariant() {
|
export function generateLevelsForVariant(app) {
|
||||||
if (G_IS_STEAM_DEMO) {
|
if (G_IS_STEAM_DEMO) {
|
||||||
return STEAM_DEMO_LEVELS();
|
return STEAM_DEMO_LEVELS();
|
||||||
} else if (G_IS_STANDALONE || WEB_STEAM_SSO_AUTHENTICATED) {
|
} else if (G_IS_STANDALONE || WEB_STEAM_SSO_AUTHENTICATED) {
|
||||||
return STANDALONE_LEVELS();
|
return STANDALONE_LEVELS();
|
||||||
}
|
}
|
||||||
return WEB_DEMO_LEVELS();
|
return WEB_DEMO_LEVELS(app);
|
||||||
}
|
}
|
||||||
|
@ -299,11 +299,11 @@ let levelDefinitionsCache = null;
|
|||||||
/**
|
/**
|
||||||
* Generates the level definitions
|
* Generates the level definitions
|
||||||
*/
|
*/
|
||||||
export function generateLevelDefinitions() {
|
export function generateLevelDefinitions(app) {
|
||||||
if (levelDefinitionsCache) {
|
if (levelDefinitionsCache) {
|
||||||
return levelDefinitionsCache;
|
return levelDefinitionsCache;
|
||||||
}
|
}
|
||||||
const levelDefinitions = generateLevelsForVariant();
|
const levelDefinitions = generateLevelsForVariant(app);
|
||||||
MOD_SIGNALS.modifyLevelDefinitions.dispatch(levelDefinitions);
|
MOD_SIGNALS.modifyLevelDefinitions.dispatch(levelDefinitions);
|
||||||
if (G_IS_DEV) {
|
if (G_IS_DEV) {
|
||||||
levelDefinitions.forEach(({ shape }) => {
|
levelDefinitions.forEach(({ shape }) => {
|
||||||
@ -403,7 +403,7 @@ export class RegularGameMode extends GameMode {
|
|||||||
* @returns {Array<LevelDefinition>}
|
* @returns {Array<LevelDefinition>}
|
||||||
*/
|
*/
|
||||||
getLevelDefinitions() {
|
getLevelDefinitions() {
|
||||||
return generateLevelDefinitions();
|
return generateLevelDefinitions(this.root.app);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,7 +39,7 @@ if (G_IS_DEV && IS_DEBUG) {
|
|||||||
|
|
||||||
/* typehints:start */
|
/* typehints:start */
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
assert(false, "typehints built in, this should never be the case!");
|
throw new Error("typehints built in, this should never be the case!");
|
||||||
/* typehints:end */
|
/* typehints:end */
|
||||||
|
|
||||||
/* dev:start */
|
/* dev:start */
|
||||||
|
@ -36,8 +36,8 @@ const analyticsUrl = G_IS_DEV ? "http://localhost:8001" : "https://analytics.sha
|
|||||||
// Be sure to increment the ID whenever it changes
|
// Be sure to increment the ID whenever it changes
|
||||||
const analyticsLocalFile = G_IS_STEAM_DEMO ? "shapez_token_steamdemo.bin" : "shapez_token_123.bin";
|
const analyticsLocalFile = G_IS_STEAM_DEMO ? "shapez_token_steamdemo.bin" : "shapez_token_123.bin";
|
||||||
|
|
||||||
const CURRENT_ABT = "abt_mmnd";
|
const CURRENT_ABT = "abt_lvcp";
|
||||||
const CURRENT_ABT_COUNT = 1;
|
const CURRENT_ABT_COUNT = 4;
|
||||||
|
|
||||||
export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
||||||
constructor(app) {
|
constructor(app) {
|
||||||
|
Loading…
Reference in New Issue
Block a user