const FRAME_IDS = [ "formation-review", "approach-contact", "damage-feedback", "heal-response", "ranged-finish", "first-diagnosis", ]; const ASSETS = { field: "assets/backgrounds/first_expedition_field.png", farstring: "assets/actors/farstring.png", kindhand: "assets/actors/kindhand.png", farstringIdle: "assets/actions/farstring/idle.png", farstringShot: "assets/actions/farstring/draw-release.png", kindhandIdle: "assets/actions/kindhand/idle.png", kindhandHeal: "assets/actions/kindhand/lantern-heal.png", enemy: "assets/enemies/riftblade-idle.png", damage: "assets/vfx/damage-heavy.png", heal: "assets/vfx/heal-safe.png", }; const frame = new URLSearchParams(window.location.search).get("frame") || FRAME_IDS[0]; const selectedFrame = FRAME_IDS.includes(frame) ? frame : FRAME_IDS[0]; function img(src, className, alt) { return `${alt}`; } function icon(name) { const icons = { home: '', restart: '', pause: '', inspect: '', captions: '', arrow: '', check: '', }; return ``; } function statusRail(context, battle = false) { return `
第一份委托 · 断裂风路 ${context}
${battle ? '
战斗 1 / 5自动战斗
' : '
小队2
'} ${battle ? `` : ''}
`; } function actor({who, action = "idle", x, y, order, label, hp = 100, urgent = ""}) { const actorSrc = who === "farstring" ? (action === "shot" ? ASSETS.farstringShot : action === "full" ? ASSETS.farstring : ASSETS.farstringIdle) : (action === "heal" ? ASSETS.kindhandHeal : action === "full" ? ASSETS.kindhand : ASSETS.kindhandIdle); const name = who === "farstring" ? "妮娅" : "赛布尔"; const role = who === "farstring" ? "弓手" : "治疗"; return `
${order}${label}
${name} · ${role}
${name} · ${role} ${hp} / 100${urgent ? ` · ${urgent}` : ""}
`; } function enemy(hp = 100, urgent = "") { return `
裂影刃手路线守卫
${img(ASSETS.enemy, "enemy-sprite", "裂影刃手")} ${hp} / 100${urgent ? ` · ${urgent}` : ""}
`; } function battlefieldBase(title, objective) { return ` ${statusRail(title, true)}
断裂风路遗迹战场
当前目标${objective}
`; } function eventRibbon(step, text, source, action, target, result) { return `
事件 ${step} ${text}
${source}→${action}→${target}→${result}
`; } function formationReview() { return ` ${statusRail("系统编队 · 检查两人的职责")}
断裂风路遗迹
${actor({who:"kindhand", action:"full", x:64, y:82, order:"1", label:"第二位", hp:100})} ${actor({who:"farstring", action:"full", x:282, y:74, order:"0", label:"先行位", hp:100, urgent:"暴露"})}
敌人方向
第二位 · 1受击后举灯,为先行者恢复生命
先行位 · 0先接触威胁,以弓术回应敌人
选择顺序不会改变系统编队
`; } function approachContact() { return ` ${battlefieldBase("第一战 · 接敌", "守住断裂风路 · 读取敌人锁定")} ${actor({who:"kindhand", x:112, y:137, order:"1", label:"第二位", hp:100})} ${actor({who:"farstring", x:270, y:125, order:"0", label:"先行位", hp:100, urgent:"被锁定"})} ${enemy(100, "蓄势")}
锁定先行者
!
${eventRibbon("01 · 1.20s", "危险:裂影刃手锁定妮娅", "裂影刃手", "重击预兆", "妮娅 · 先行位", "即将命中")}`; } function damageFeedback() { return ` ${battlefieldBase("第一战 · 敌方压力", "确认受击对象与生命变化")} ${actor({who:"kindhand", x:112, y:137, order:"1", label:"第二位", hp:100})} ${actor({who:"farstring", x:270, y:125, order:"0", label:"先行位", hp:58, urgent:"高暴露"})} ${enemy(100, "攻击已结算")}
${img(ASSETS.damage, "vfx", "重击伤害")}
-42100 → 58
${eventRibbon("02 · 2.35s", "妮娅在先行位承受高额伤害", "裂影刃手", "裂隙重击", "妮娅", "-42 · 58/100")}`; } function healResponse() { return ` ${battlefieldBase("第一战 · 职业回应", "赛布尔恢复实际受伤的妮娅")} ${actor({who:"kindhand", action:"heal", x:112, y:137, order:"1", label:"第二位", hp:100, urgent:"正在恢复"})} ${actor({who:"farstring", x:270, y:125, order:"0", label:"先行位", hp:70, urgent:"恢复后"})} ${enemy(100, "等待")}
${img(ASSETS.heal, "vfx", "恢复效果")}
+1258 → 70
${eventRibbon("03 · 3.60s", "赛布尔从第二位举灯恢复妮娅", "赛布尔", "灵灯恢复", "妮娅", "+12 · 70/100")}`; } function rangedFinish() { return ` ${battlefieldBase("第一战 · 两人连携", "妮娅完成本轮远程回应")} ${actor({who:"kindhand", x:112, y:137, order:"1", label:"第二位", hp:100})} ${actor({who:"farstring", action:"shot", x:270, y:125, order:"0", label:"先行位", hp:70, urgent:"远程射击"})} ${enemy(34, "即将倒下")}
-3064 → 34
${eventRibbon("04 · 5.10s", "妮娅以弓术把敌人压入终结线", "妮娅", "远程射击", "裂影刃手", "-30 · 34/100")}`; } function firstDiagnosis() { return ` ${statusRail("第一战诊断 · 这支小队如何配合")}
战后断裂风路
${img(ASSETS.kindhand, "result-kindhand", "赛布尔 · 治疗")} ${img(ASSETS.farstring, "result-farstring", "妮娅 · 弓手")} 1 · 第二位 0 · 先行位
系统编队妮娅先行远程职责,但高暴露
最早差异 · 2.35s重击 -42妮娅 100 → 58
职业回应 · 3.60s恢复 +12妮娅 58 → 70
`; } const renderers = { "formation-review": formationReview, "approach-contact": approachContact, "damage-feedback": damageFeedback, "heal-response": healResponse, "ranged-finish": rangedFinish, "first-diagnosis": firstDiagnosis, }; const root = document.querySelector("#slice"); root.dataset.frame = selectedFrame; root.innerHTML = renderers[selectedFrame](); document.documentElement.dataset.ready = "true";