feat: companion 關係改為好感、信賴、親密、依賴四維度與四階段

- 兩本帳(原典基準、存檔累積),日限、有效增量、期望違反公式
- 階段 陌生/熟人/朋友/好友,只升不降;14 天無互動每日 −0.5
- 舊 affinity 存檔讀檔時自動升級
- 版本 0.0.2

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 07:54:08 +00:00
co-authored by Claude Sonnet 5.5
parent b47c838fd5
commit 4f86b6b7dc
8 changed files with 298 additions and 102 deletions
@@ -9,8 +9,8 @@ const VIEW: View = {
mood: { p: 0.5, a: 0, d: -0.5 },
label: '放鬆',
kaomoji: '(´ᴗ`)',
affinity: 0.35,
stage: '熟悉',
relation: { affection: 35, trust: 20, intimacy: 10, dependence: 5 },
stage: '熟人',
todos: 2,
}
@@ -18,7 +18,7 @@ const text = (v: View, cols: number, compact = false, bubble?: string) => fitCom
describe('角色行', () => {
test('寬版顯示顏文字、名字、心情、PAD 條、階段、待辦、氣泡', () => {
expect(text(VIEW, 200, false, '早安')).toBe('(´ᴗ`) 月見ミコ 放鬆 · P▰▰▱ A▰▰▱ D▰▱▱ · 熟悉 · ☐2 · 💬 早安')
expect(text(VIEW, 200, false, '早安')).toBe('(´ᴗ`) 月見ミコ 放鬆 · P▰▰▱ A▰▰▱ D▰▱▱ · 熟人 · ☐2 · 💬 早安')
})
test('緊湊模式只剩「顏文字 名字 心情」', () => {