Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions scripts/smoke-secondary-journeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -3546,6 +3546,49 @@ async function smokeLevel(session, route, sceneName, exceptions, {
);
}

let mainRouteEffect = null;
if (route === 'auroraDepths') {
mainRouteEffect = await evaluate(session, `(() => {
const scene = window.mythicalGame.scene.getScene(
'AuroraDepthsLevel'
);
const selected = scene.selectAuroraRoute('shadow_current');
const result = {
selected,
routeChoice: scene.auroraRouteChoice,
currentChargeReady: scene.currentChargeReady === true,
auraActive: Boolean(scene.currentChargeAura?.active),
objective: scene.getAuroraObjectiveText?.() || ''
};

scene.auroraRouteChoice = '';
scene.currentChargeReady = false;
scene.clearCurrentChargeAura?.();
scene.refreshPersistedExpeditionRouteState?.();
return result;
})()`);
if (
mainRouteEffect?.selected !== true ||
mainRouteEffect.routeChoice !== 'shadow_current' ||
mainRouteEffect.currentChargeReady !== true ||
mainRouteEffect.auraActive !== true ||
!mainRouteEffect.objective.includes(
'YOUR NEXT HIT +2 DAMAGE'
) ||
!choicePresentation.mainTradeoff.includes(
'YOUR NEXT HIT +2'
) ||
!choicePresentation.challengeLabel.includes('1-HIT WARD')
) {
throw new Error(
`${sceneName} route impact contradicted its promise: ` +
JSON.stringify({ choicePresentation, mainRouteEffect })
);
}
await startCampaignScene(session, { route, sceneName });
await delay(400);
}

let rejectedOptionalPickup = null;
if (route === 'mythicalForest') {
const stagedMainRoute = await evaluate(session, `(() => {
Expand Down Expand Up @@ -3864,6 +3907,7 @@ async function smokeLevel(session, route, sceneName, exceptions, {
}
routeChoice = {
presentation: choicePresentation,
mainRouteEffect,
rejectedOptionalPickup,
optionalEntry,
rejoin
Expand Down
21 changes: 17 additions & 4 deletions src/__tests__/LevelTraversalQualityContract.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1349,10 +1349,10 @@ describe('campaign traversal quality contracts', () => {
expect(source).toContain('optional: true');
expect(source).toContain("mainLabel: 'SHADOW CURRENT →'");
expect(source).toContain(
"mainTradeoff: 'SHORTER // PHOENIX HITS HARDER + GUARDS'"
"mainTradeoff: 'SHORTER // 2 GUARDS // YOUR NEXT HIT +2'"
);
expect(source).toContain(
"challengeLabel: 'HIGH JUMPS // SHELTER + FEWER GUARDS'"
"challengeLabel: 'HIGH JUMPS // 1-HIT WARD // FEWER GUARDS'"
);
expect(source).toContain("id: 'aurora_quiet_light'");
expect(source).toContain("rewardLabel: 'QUIET LIGHT WARD // 1 HIT'");
Expand All @@ -1363,7 +1363,20 @@ describe('campaign traversal quality contracts', () => {
expect(source).toContain("this.isPlayerGroundedOnTraversalSupport(\n 'aurora-quiet-step-3'");
expect(source).toContain('const routeBonus = this.consumeCurrentCharge();');
expect(source).toContain('this.currentChargeAuraTween?.remove?.();');
expect(source).toContain(
"'CURRENT CHARGE // YOUR NEXT HIT +2 DAMAGE'"
);
expect(source).toContain(
"'DIRECT ROUTE // YOUR NEXT HIT +2 DAMAGE'"
);
expect(source).not.toContain('PHOENIX HITS HARDER');
expect(source).not.toContain('NEXT PHOENIX HIT +2');
expect(source).not.toContain('this.activateShield();');
const smoke = read('../../scripts/smoke-secondary-journeys.js');
expect(smoke).toContain(
"scene.selectAuroraRoute('shadow_current')"
);
expect(smoke).toContain('route impact contradicted its promise');
});

test('Forest canopy traversal earns a persistent one-hit guard', () => {
Expand Down Expand Up @@ -1512,8 +1525,8 @@ describe('campaign traversal quality contracts', () => {
'levels/AuroraDepthsLevel.js',
"id: 'aurora_quiet_light'",
"mainLabel: 'SHADOW CURRENT →'",
"mainTradeoff: 'SHORTER // PHOENIX HITS HARDER + GUARDS'",
"challengeLabel: 'HIGH JUMPS // SHELTER + FEWER GUARDS'"
"mainTradeoff: 'SHORTER // 2 GUARDS // YOUR NEXT HIT +2'",
"challengeLabel: 'HIGH JUMPS // 1-HIT WARD // FEWER GUARDS'"
],
[
'levels/FinalVoidLevel.js',
Expand Down
10 changes: 5 additions & 5 deletions src/scenes/levels/AuroraDepthsLevel.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,8 @@ class AuroraDepthsLevel extends PlatformerLevelScene {
returnLabel: 'DESCEND TO SKY PRISM →',
choice: {
mainLabel: 'SHADOW CURRENT →',
mainTradeoff: 'SHORTER // PHOENIX HITS HARDER + GUARDS',
challengeLabel: 'HIGH JUMPS // SHELTER + FEWER GUARDS',
mainTradeoff: 'SHORTER // 2 GUARDS // YOUR NEXT HIT +2',
challengeLabel: 'HIGH JUMPS // 1-HIT WARD // FEWER GUARDS',
mainMarker: directRouteMarker,
mainZone: {
left: 2700, right: 3500,
Expand Down Expand Up @@ -766,7 +766,7 @@ class AuroraDepthsLevel extends PlatformerLevelScene {
this.createCurrentChargeAura();
this.clearQuietLightPickup();
this.showFloatingText(
'CURRENT CHARGE // NEXT PHOENIX HIT +2',
'CURRENT CHARGE // YOUR NEXT HIT +2 DAMAGE',
this.player.x,
this.player.y - 68,
'#D7A8FF'
Expand Down Expand Up @@ -909,8 +909,8 @@ class AuroraDepthsLevel extends PlatformerLevelScene {
);
const routeStatus = this.auroraRouteChoice === 'shadow_current'
? (this.currentChargeReady
? 'DIRECT ROUTE // CURRENT CHARGE +2'
: 'DIRECT ROUTE // CHARGE RELEASED')
? 'DIRECT ROUTE // YOUR NEXT HIT +2 DAMAGE'
: 'DIRECT ROUTE // DAMAGE BONUS USED')
: routeReward;
const optional = `${routeStatus}\nOPTIONAL // AURORA FRAGMENTS ${this.starFragmentsCollected}/${this.totalStarFragments}`;

Expand Down