Waste rock pays: richer granite and basalt grinding, bulk rock orders (t3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 17:39:30 -04:00
co-authored by Claude Opus 5.5
parent 9682cab6d4
commit 06f8f90f19
5 changed files with 25 additions and 5 deletions
+12
View File
@@ -68,6 +68,18 @@ const p2 = run('priceNow(BARCU)');
check('selling 100 copper bars lowers their price, which recovers within half an hour', p1 < p0 * 0.5 && p2 > p0 * 0.9, `${p0} -> ${p1.toFixed(1)} -> ${p2.toFixed(1)}`);
check('dirt earns nothing, and rubble only a pittance (builders pay a few times that)', run('PRICE[LDIRT]') === 0 && run('PRICE[RSTONE]') > 0 && run('PRICE[RSTONE]') < 0.05);
check('refined goods pay more than the raw ore in them', run('PRICE[BARCU] > 13 * PRICE[CUORE] + 13 * PRICE[COAL]') && run('PRICE[BARBZ] > 2 * PRICE[BARCU]'));
// New bulk rocks stay hidden until discovered; isolate each candidate without random selection.
run('orders = []; ordersDone = 0; seen.fill(0);');
check('builders do not order unseen granite or basalt rubble', run('makeBuildersOrder()') === null);
run('seen[RGRAN] = seen[RBAS] = 1;');
for (const material of ['RGRAN', 'RBAS']) {
run(`orders = [{ m: ${material === 'RGRAN' ? 'RBAS' : 'RGRAN'} }];`);
check(`builders offer bulk ${material === 'RGRAN' ? 'granite' : 'basalt'} rubble after discovery`, run(`(() => {
const o = makeBuildersOrder();
return !!o && o.m === ${material} && o.who === 'Builders' && o.qty >= 300 && o.qty <= 1200 && o.pay > o.qty * PRICE[o.m];
})()`));
}
check('rubble prices rise from stone to granite to basalt', run('PRICE[RSTONE] < PRICE[RGRAN] && PRICE[RGRAN] < PRICE[RBAS]'));
// machines cost money, walls do not
flatWorld(run, 240, 160, 100);
run('money = 30; bag[RSTONE] = 100; bagTotal = 100; bot.x = 110; bot.y = 70;');
+8
View File
@@ -91,6 +91,14 @@ const fed = 400, sand = count(run, run('SAND')), o = ore();
check('the Grinder grinds all the stone rubble it is fed', count(run, run('RSTONE')) === 0 && run('stats.refined') === fed, `${count(run, run('RSTONE'))} left, ${run('stats.refined')} of ${fed} ground`);
check('about half as much sand comes out', sand > fed * 0.35 && sand < fed * 0.6, `${sand} sand from ${fed} rubble`);
check('with the odd grain of common ore', o > 0 && o < fed * 0.15, `${o} ore grains`);
// Old chances are tried in turn, so later ores require every earlier roll to miss.
const oldGraniteChances = [0.02, 0.012, 0.01, 0.002];
const oldGraniteExpected = 2000 * (1 - oldGraniteChances.reduce((miss, chance) => miss * (1 - chance), 1));
grinderRig(); grind('RGRAN', 2000);
const graniteOre = run('stats.refinedOre');
check('all 2000 granite rubble grains are ground', run('stats.refined') === 2000, run('stats.refined'));
check('granite yields at least 1.5 times its old expected ore', graniteOre >= 1.5 * oldGraniteExpected,
`${graniteOre} ore; old expectation ${oldGraniteExpected.toFixed(1)}, minimum ${(1.5 * oldGraniteExpected).toFixed(1)}`);
// gravel, sand and dirt are refined too; ore drops straight through
grinderRig(); grind('LDIRT', 60);
check('dirt goes through the Grinder too', count(run, run('LDIRT')) === 0 && run('stats.refined') === 60);