209 lines
6.7 KiB
TypeScript
209 lines
6.7 KiB
TypeScript
import { MOTIFS, NEST } from './LevelData';
|
||
import { LevelDef, MotifId, SectionDef } from './Types';
|
||
|
||
function pickSections(motif: MotifId, ids: string[]): SectionDef[] {
|
||
return ids.map(id => {
|
||
const hit = MOTIFS[motif].find(s => s.id === id);
|
||
if (!hit) throw new Error(`Unknown section "${id}" in motif "${motif}"`);
|
||
return hit;
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 「拆旧织新」特别番外原型(3 关渐进验证):
|
||
* - 番外 1:自由抽线体验(旧绣片无压层,感受抽线卷球滚入绣绷线碗 + 蚂蚁织画)
|
||
* - 番外 2:2 格线碗 + 压层 + 浮桥铜锁(验证“先抽压住绿线的左金线”核心顿悟)
|
||
* - 番外 3:双层压叠 + 不交叉 + 连锁锁桥(验证两步前瞻规划与双可行续法)
|
||
*/
|
||
export const UNSPOOL_LEVELS: LevelDef[] = [
|
||
{
|
||
id: 'unspool-1-scarf',
|
||
chapter: 0,
|
||
name: '旧围巾第一缕',
|
||
difficulty: '番外入门',
|
||
lesson: '点击或轻划上方旧绣片发光的线头,把旧毛线抽进绣绷线碗,再拖蚂蚁织成新花!',
|
||
goal: '拆下 3 缕旧毛线,补齐向日葵左右花瓣与绿叶。',
|
||
ruleTag: '拆旧织新 · 入门',
|
||
motif: 'sunflower',
|
||
budget: 1450,
|
||
nests: [{ ...NEST }],
|
||
targets: pickSections('sunflower', ['left', 'right', 'leaf']),
|
||
balls: [],
|
||
ponds: [],
|
||
spools: [],
|
||
buttons: [],
|
||
dyes: [],
|
||
gates: [],
|
||
roughZones: [],
|
||
threeStar: 1120,
|
||
twoStar: 1320,
|
||
demo: [],
|
||
unspool: {
|
||
storyTitle: '特别委托 · 旧围巾改织新画(1/3)',
|
||
storyNote: '林阿婆翻出一条褪边的小围巾,想拆下旧毛线给茶室织一朵新向日葵。',
|
||
slots: [
|
||
{ x: 186, y: 468 },
|
||
{ x: 414, y: 468 },
|
||
],
|
||
strands: [
|
||
{
|
||
id: 'u1-gold-l',
|
||
color: 'gold',
|
||
coveredBy: [],
|
||
points: [[54, 42], [110, 28], [156, 58], [122, 98], [72, 102]],
|
||
},
|
||
{
|
||
id: 'u1-green',
|
||
color: 'green',
|
||
coveredBy: [],
|
||
points: [[236, 98], [268, 42], [304, 34], [336, 76], [294, 106]],
|
||
},
|
||
{
|
||
id: 'u1-gold-r',
|
||
color: 'gold',
|
||
coveredBy: [],
|
||
points: [[414, 36], [472, 30], [506, 68], [468, 104], [418, 92]],
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
id: 'unspool-2-lock-bridge',
|
||
chapter: 0,
|
||
name: '压线解锁桥',
|
||
difficulty: '番外进阶',
|
||
lesson: '两格线碗有限!两片金花瓣都上了铜锁,必须先抽走压住绿线的那缕金线,拆出绿线搭桥解锁!',
|
||
goal: '先拆压层取绿线绣叶搭桥解锁,再双球绣齐金花瓣。',
|
||
ruleTag: '2 格线碗 · 压层解锁',
|
||
motif: 'sunflower',
|
||
budget: 1480,
|
||
locks: { left: 'leaf', right: 'leaf' },
|
||
nests: [{ ...NEST }],
|
||
targets: pickSections('sunflower', ['left', 'right', 'leaf']),
|
||
balls: [],
|
||
ponds: [{ x: 298, y: 392, rx: 82, ry: 24, bridgeSectionId: 'leaf' }],
|
||
spools: [],
|
||
buttons: [],
|
||
dyes: [],
|
||
gates: [],
|
||
roughZones: [],
|
||
threeStar: 1180,
|
||
twoStar: 1380,
|
||
demo: [],
|
||
unspool: {
|
||
storyTitle: '特别委托 · 旧围巾改织新画(2/3)',
|
||
storyNote: '旧绣片里绿线被左侧金线压在底下;线碗只有两格,先抽哪缕金线决定能不能过河!',
|
||
slots: [
|
||
{ x: 186, y: 474 },
|
||
{ x: 414, y: 474 },
|
||
],
|
||
strands: [
|
||
// 底层绿线(被左金线压住,清晰从下方透出绿色)
|
||
{
|
||
id: 'u2-green',
|
||
color: 'green',
|
||
coveredBy: ['u2-gold-l'],
|
||
points: [[96, 78], [134, 68], [182, 67], [238, 73], [296, 68]],
|
||
},
|
||
// 顶层左金线(斜跨压住绿线)
|
||
{
|
||
id: 'u2-gold-l',
|
||
color: 'gold',
|
||
coveredBy: [],
|
||
points: [[142, 24], [164, 39], [188, 65], [206, 91], [228, 110]],
|
||
},
|
||
// 顶层右金线(独立露在最上层,误先抽它会与左金线一起堵满 2 格线碗)
|
||
{
|
||
id: 'u2-gold-r',
|
||
color: 'gold',
|
||
coveredBy: [],
|
||
points: [[386, 32], [425, 27], [465, 42], [480, 69], [468, 91], [428, 108]],
|
||
},
|
||
],
|
||
},
|
||
},
|
||
{
|
||
id: 'unspool-3-double-lotus',
|
||
chapter: 1,
|
||
name: '双层织晨荷',
|
||
difficulty: '番外挑战',
|
||
lesson: '双层压线 + 不交叉 + 连锁锁桥!先解开左侧压层拿到绿叶搭桥,再灵活安排后续两缕旧线。',
|
||
goal: '不交叉避水,逐层拆出两绿两粉,绣成晨荷四区。',
|
||
ruleTag: '双层压叠 · 连锁锁桥',
|
||
motif: 'lotus',
|
||
noCross: true,
|
||
budget: 2150,
|
||
locks: { 'lotus-flower': 'lotus-pad-left', 'lotus-bud': 'lotus-pad-right' },
|
||
nests: [{ ...NEST }],
|
||
targets: pickSections('lotus', ['lotus-pad-left', 'lotus-pad-right', 'lotus-flower', 'lotus-bud']),
|
||
balls: [],
|
||
ponds: [{ x: 296, y: 382, rx: 74, ry: 22, bridgeSectionId: 'lotus-pad-left' }],
|
||
spools: [],
|
||
buttons: [],
|
||
dyes: [],
|
||
gates: [],
|
||
roughZones: [],
|
||
threeStar: 1760,
|
||
twoStar: 2020,
|
||
demo: [],
|
||
unspool: {
|
||
storyTitle: '特别委托 · 旧围巾改织新画(3/3)',
|
||
storyNote: '两缕翠绿丝线层层叠在旧荷帕底下;留好空碗与过桥顺序,让旧线重新开出双荷。',
|
||
slots: [
|
||
{ x: 186, y: 478 },
|
||
{ x: 414, y: 478 },
|
||
],
|
||
strands: [
|
||
// 最底层:第二缕绿线(被中层绿线压住)
|
||
{
|
||
id: 'u3-green-2',
|
||
color: 'green',
|
||
coveredBy: ['u3-green-1'],
|
||
points: [[204, 104], [268, 86], [334, 86], [386, 104]],
|
||
},
|
||
// 中层:第一缕绿线(压住 u3-green-2,同时被左粉线压住)
|
||
{
|
||
id: 'u3-green-1',
|
||
color: 'green',
|
||
coveredBy: ['u3-rose-l'],
|
||
points: [[96, 62], [178, 66], [254, 84], [312, 54]],
|
||
},
|
||
// 顶层左粉线(压住 u3-green-1)
|
||
{
|
||
id: 'u3-rose-l',
|
||
color: 'rose',
|
||
coveredBy: [],
|
||
points: [[130, 24], [174, 66], [198, 112]],
|
||
},
|
||
// 顶层右粉线(露在最上层的诱饵,先抽双粉会堵碗)
|
||
{
|
||
id: 'u3-rose-r',
|
||
color: 'rose',
|
||
coveredBy: [],
|
||
points: [[416, 28], [472, 46], [496, 92], [438, 106]],
|
||
},
|
||
],
|
||
},
|
||
},
|
||
];
|
||
|
||
const lockBridgePrototype = UNSPOOL_LEVELS[1];
|
||
|
||
export const LEAF_BRIDGE_PREVIEW: { number: number; level: LevelDef } = {
|
||
number: 24,
|
||
level: {
|
||
...lockBridgePrototype,
|
||
id: 'unspool-024-leaf-bridge',
|
||
chapter: 2,
|
||
name: '晨露叶桥',
|
||
difficulty: '样板关',
|
||
goal: '取旧线绣绿叶搭桥,再补齐两侧金瓣。',
|
||
ruleTag: '压线 · 搭桥',
|
||
unspool: {
|
||
...lockBridgePrototype.unspool!,
|
||
storyTitle: '旧荷包',
|
||
storyNote: '拆出荷包里的三缕旧线,织成晨露叶桥。',
|
||
},
|
||
},
|
||
};
|