Charters: a popup at the start, and a third one, the Cable broker (#300)
A new Normal game now asks what it is building before anything else, in a popup that holds the clock and cannot be closed without an answer; the tutorial waits for it. A save still in its first month that never picked is asked on load. Sandbox, puzzles and scenarios never ask. The Cable broker builds and lights glass from day one at the prices everyone pays at the top level: dark fiber, every line system and optic, digging without the pioneer markup, own subsea cables and their upgrades, eight pairs, and every router those optics need. Everything else unlocks by level as before. Its offers lean to carriers buying waves and pairs, capacity conferences are open to it at any level, and carriers call about three times a year with a capacity deal. It runs its own ten-goal ladder and wins Glass Baron (own cables on five continents, $1M a month of capacity sales), with a badge; Tier 1 stays its own win. Classic and boutique networks may lay their own subsea cable from customer level 9 as well as after Tier 1. Rule M6 (gameplay-rules): a charter changes what you set out to do, never what things cost. Closes #300.
This commit is contained in:
parent
f303f29f22
commit
934a83588a
40 changed files with 535 additions and 97 deletions
|
|
@ -289,6 +289,28 @@ test('M5: Sandbox has no locked feature', () => {
|
|||
assert.deepEqual(g.errors, []);
|
||||
});
|
||||
|
||||
test('M6: a charter changes what you set out to do, never what things cost', () => {
|
||||
const bad = [];
|
||||
const g = load();
|
||||
g.ev("beginGame('Charter','fra',{mode:'normal',preset:'oncall'});if(UI.pendGame)ACT.pitchSkip()");
|
||||
if (!g.ev('charterDue()')) bad.push('a new Normal game does not ask for its charter');
|
||||
g.ev("ACT.charter({k:'broker'});S.lvl=1");
|
||||
const glass = (x) => g.ev(`JSON.stringify({opt:Object.keys(OPT).map(o=>optCost(o)),sys:Object.keys(DF_SYS).map(sysCost),dig:digCost(500),cab:ownCabCost(5000),rt:RG.map((r,i)=>routerCost(i,1))})`);
|
||||
const b = JSON.parse(glass());
|
||||
g.ev("S.charter='global';S.lvl=LEVELS.length");
|
||||
const c = JSON.parse(glass());
|
||||
for (const k of Object.keys(b)) if (JSON.stringify(b[k]) !== JSON.stringify(c[k])) bad.push(`a broker at level 1 pays other prices for ${k} than a backbone at the top level`);
|
||||
g.ev("S.charter='broker';S.lvl=1");
|
||||
if (g.ev('S.te') || (g.ev('ACT.buyTE()'), g.ev('S.te'))) bad.push('a broker skips the levels for something that is not glass (Auto-TE)');
|
||||
for (const o of ["{mode:'sandbox'}", "{mode:'puzzle'}", '{scn:SCN[0]}']) {
|
||||
const h = load();
|
||||
h.ev(`beginGame('X','fra',${o});if(UI.pendGame)ACT.pitchSkip()`);
|
||||
if (h.ev('charterDue()')) bad.push(`${o} asks for a charter`);
|
||||
}
|
||||
fail('M6', bad, 'the broker gets glass early, not cheaper; charters belong to Normal games only');
|
||||
assert.deepEqual(g.errors, []);
|
||||
});
|
||||
|
||||
// ---------- Content ----------
|
||||
|
||||
test('C1: every scenario has a goal its card checks, and none is won on day 0', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue