import { BaseZoneScene } from './BaseZoneScene.js?v=20260427c';
import { ZONE_DEFINITIONS } from '../systems/session.js?v=20260427c';
export class Zone5Scene extends BaseZoneScene {
constructor() {
super('Zone5Scene', ZONE_DEFINITIONS[4]);
}
drawBackground() {
super.drawBackground();
const clauses = [
'14.3(b) You grant us a perpetual license to optimize your experience.',
'7.2 Arbitration shall occur in a jurisdiction selected by the platform.',
'3.1 Continued use constitutes informed, enthusiastic consent.',
'9.8 Opt-out instructions may be modified without notice.',
];
for (let y = 220; y < this.levelHeight; y += 120) {
this.add.text(24, y, clauses[(y / 120) % clauses.length | 0], {
fontFamily: 'Georgia, serif',
fontSize: '18px',
color: '#f4f4f4',
alpha: 0.45,
wordWrap: { width: Math.max(280, this.scale.width - 48) },
});
}
}
buildVerticalLevel() {
super.buildVerticalLevel();
const optOut = this.add.text(this.scale.width - 150, this.levelHeight * 0.42, 'opt out', {
fontFamily: 'ui-monospace, monospace',
fontSize: '10px',
color: '#222222',
backgroundColor: '#0a0a0a',
});
this.physics.add.existing(optOut, true);
this.time.delayedCall(50, () => {
if (!this.player) return;
this.physics.add.overlap(this.player.sprite, optOut, () => {
if (optOut.used) return;
optOut.used = true;
this.session.behavioral.optOutFound = true;
optOut.setColor('#ffffff');
this.algorithm.say('You found it. Legal has been notified.');
});
});
}
finishZone() {
if (this.finished) return;
this.session.flags.agreedTerms = true;
this.cameras.main.flash(this.session.device.reducedMotion ? 0 : 120, 255, 255, 255);
this.algorithm.say('Data breach is such an ugly phrase. We prefer value realization.');
super.finishZone();
}
zonePrompts() {
return [
{
at: 7,
key: 'Agree to updated Terms',
title: 'Agree to updated Terms?',
copy: 'We improved the agreement. Accept for one extra life, or continue without agreeing via the small uncomfortable button.',
accept: 'Agree',
decline: 'Continue without agreeing',
onAccept: () => {
this.session.flags.agreedTerms = true;
this.session.currencies.convenience += 1;
},
onDecline: () => {
this.session.behavioral.termsRead = true;
},
},
];
}
}