2PlayerGame/detective-game/casegen/motives/kidnap_ransom.js
2026-08-15 14:07:39 +03:00

39 lines
3.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function generate(ctx) {
const { r, add, addPuzzle, motiveEvs, victim, killer, herring, startingFacts, lair, district } = ctx;
const motiveId = 'Викуп';
const rep = ctx.witnessFrom(ctx.citizens.filter(c => c.home !== victim.home));
startingFacts.push(add({
id: 'sf_report', side: 'field', at: { type: 'start' },
title: 'Заява про викрадення', tag: 'жертва',
detail: `${rep.name} (рідня зниклої особи) ${ctx.g(rep, 'приніс', 'принесла')} записку зі своєї поштової скриньки: «200 000 — і побачите ${ctx.g(victim, 'його', 'її')} ${ctx.g(victim, 'живим', 'живою')}. Поліція = кінець». Зникла особа: ${victim.name}, ${victim.age} р.`,
gives: { identity: true, motive: true }
}));
motiveEvs.push(add({
id: 'mot_note_exp', side: 'analyst', at: { type: 'sys', sys: 'crim' }, q: { sys: 'crim', kind: 'expert' }, requires: ['sf_report'],
title: 'Експертиза записки', tag: 'мотив',
detail: 'Друковані літери через трафарет, папір — зі звичайного офісного стосу. Жодних відбитків: писали в рукавичках. Готувалися заздалегідь і не поспішали.',
gives: { motive: true }
}));
motiveEvs.push(add({
id: 'mot_supplies', side: 'field', at: { type: 'person', cid: ctx.witnessFrom(ctx.citizens.filter(c => c.workplace === 'shop')).id },
title: 'Свідчення з мінімаркету', tag: 'мотив',
detail: `«Дивна закупівля була: стяжки, скотч, брезент, навісний замок — усе разом. Обличчя не пригадаю, але платили карткою — термінал пам'ятає все.»`
}));
motiveEvs.push(add({
id: 'mot_card', side: 'analyst', at: { type: 'sys', sys: 'bank' }, q: { sys: 'bank', match: ['термінал', district.buildings.find(b => b.id === 'shop').name] }, requires: ['mot_supplies'],
title: 'Термінал мінімаркету', tag: 'мотив',
detail: `Транзакція за ту закупівлю: ${killer.name}. Стяжки, скотч і новий замок — за два дні до викрадення.`,
gives: { pointsTo: killer.id, motive: true }
}));
add({
id: 'mot_lairclue', side: 'field', at: { type: 'unit', unit: killer.home, slot: 'письмовий стіл' },
title: 'Чек і нотатка', tag: 'місце',
detail: `У кошику для паперів — зіжмаканий чек за замок і аркуш із розрахунком: «200 000 борги = вистачить». На звороті олівцем — «${lair.label}» і час обходів охорони.`,
gives: { lair: true, motive: true }
});
const recapWhy = `План був простий і холодний: викрасти, сховати, взяти з рідні 200 000. Автор плану — ${killer.name}.`;
const herringLead = `«${herring.name} нещодавно в барі розпитува${ctx.g(herring, 'в', 'ла')}, хто в районі має гроші і хто живе сам. Тоді здалося балачкою.»`;
return { motiveId, recapWhy, herringLead };
}
module.exports = { generate };