0.1.37 天人感应·因果织锦:功德系统+飞升试炼+世界奇观+MOD扩展口
This commit is contained in:
@@ -56,6 +56,40 @@ export function buildBiography(s: GameState, memberId: string): BioLine[] {
|
||||
lines.push({ at: t.year, label: '大比', text: `${t.year}年,随队参加太虚大比,列第${t.rank}名。` })
|
||||
}
|
||||
|
||||
// 0.1.37 飞升试炼传记
|
||||
if (c.deathCause === '飞升太虚') {
|
||||
const ascensionChronicles = s.chronicle.filter((e) =>
|
||||
e.category === 'breakthrough' && e.memberId === c.id &&
|
||||
(e.text.includes('心魔') || e.text.includes('天劫') || e.text.includes('飞升'))
|
||||
)
|
||||
for (const e of ascensionChronicles) {
|
||||
lines.push({ at: e.year, label: '飞升', text: `${e.year}年${e.month}月,${e.text.replace(new RegExp(`^${c.name}\\s*`), '')}` })
|
||||
}
|
||||
lines.push({
|
||||
at: c.deathYear,
|
||||
label: '飞升',
|
||||
text: `${c.name} 历经心魔、天劫、飞升三重试炼,终成正果——飞升太虚而去。此去仙凡永隔,然道韵余泽笼罩宗族,万世蒙荫。`
|
||||
})
|
||||
} else if (c.deathCause === '飞升劫陨') {
|
||||
lines.push({
|
||||
at: c.deathYear,
|
||||
label: '飞升',
|
||||
text: `${c.name} 于飞升天劫中形神俱灭——仙路终成绝响。壮志未酬,英魂归天。`
|
||||
})
|
||||
} else if (c.traits.includes('fengxian') && c.alive) {
|
||||
// 留仙坐镇者
|
||||
const stayEvent = s.chronicle.find((e) =>
|
||||
e.category === 'event' && e.memberId === c.id && e.text.includes('留世坐镇')
|
||||
)
|
||||
if (stayEvent) {
|
||||
lines.push({
|
||||
at: stayEvent.year,
|
||||
label: '飞升',
|
||||
text: `${stayEvent.year}年,${c.name} 谢绝仙门征召,留世镇守宗族——仙风入体,护佑万世。`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 墓碑铭文
|
||||
if (!c.alive) {
|
||||
const epitaph = EPITAPH[c.deathCause ?? '寿终'] ?? '一尘一土,终归青山。'
|
||||
@@ -72,6 +106,8 @@ const EPITAPH: Record<string, string> = {
|
||||
'伤势不治': '壮士折戟,魂兮归来。家祠之下,与祖同列。',
|
||||
'突破走火': '一念求道,九死未悔。灵前法灯,为君长明。',
|
||||
'渡劫陨落': '雷霆战天,其志未竟。遗骨归山,英风尚在。',
|
||||
'飞升太虚': '三劫渡尽化虹去,道韵长存荫后人。仙凡虽隔,香火永继。',
|
||||
'飞升劫陨': '壮志凌云欲破天,一着未成殒飞仙。英魂不灭,长照宗门。',
|
||||
'战殁': '马革裹尸,归葬桑梓。长剑挂壁,子孙相传。',
|
||||
'云游飞升': '此去云深不知处,魂同列宿游太虚。'
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ export interface LegacyDims {
|
||||
daoXing: number
|
||||
weiMing: number
|
||||
xiangHuo: number
|
||||
/** 0.1.37 因果维度:家族 karma 值的定鼎映射 */
|
||||
yinGuo: number
|
||||
total: number
|
||||
}
|
||||
|
||||
@@ -22,6 +24,11 @@ export const VERDICTS: Record<string, { title: string; poem: string[] }> = {
|
||||
title: '飞升之资',
|
||||
poem: ['海内升龙真气象,仙班亦录旧香名。', '遥看青山埋骨处,一脉烟霞送飞鸿。']
|
||||
},
|
||||
// 0.1.37 飞升 + 高 karma 的至高档位
|
||||
daofruit: {
|
||||
title: '道果圆满',
|
||||
poem: ['三劫渡尽化虹去,功德如海润苍生。', '后人仰首望星处,犹见仙班旧时名。']
|
||||
},
|
||||
celestial: {
|
||||
title: '仙朝遗脉',
|
||||
poem: ['祖庭灯火三千里,曾照中天玉斗垂。', '后世儿孙开卷处,犹闻钟鼎旧清音。']
|
||||
@@ -65,14 +72,22 @@ export function computeLegacy(s: GameState): LegacyDims {
|
||||
const daoXing = Math.round(st.maxRealmIdx * 26 + st.techniqueGrand * 4)
|
||||
const weiMing = Math.round(st.repPeak * 1.4 + (st.tourneyBest ? (6 - st.tourneyBest) * 12 : 0))
|
||||
const xiangHuo = Math.round(Math.min(s.year, 300) * 0.9 + st.feishengCount * 60)
|
||||
return { renXing, daoXing, weiMing, xiangHuo, total: renXing + daoXing + weiMing + xiangHuo }
|
||||
// 0.1.37 因果维度:karma 映射到 0~40 分(正 karma 加分,负 karma 扣分)
|
||||
// karma=50 → +20;karma=-30 → -12;让善恶影响最终评价
|
||||
const karma = s.family.karma ?? 0
|
||||
const yinGuo = Math.round(Math.max(-20, Math.min(30, karma * 0.4)))
|
||||
return { renXing, daoXing, weiMing, xiangHuo, yinGuo, total: renXing + daoXing + weiMing + xiangHuo + yinGuo }
|
||||
}
|
||||
|
||||
export function resolveLegacy(s: GameState): LegacyArch {
|
||||
const dims = computeLegacy(s)
|
||||
let key = 'dust'
|
||||
if (s.stats.feishengCount > 0) key = 'feisheng'
|
||||
else {
|
||||
// 0.1.37 飞升 + 高 karma → 道果圆满(至高档位)
|
||||
if (s.stats.feishengCount > 0 && (s.family.karma ?? 0) > 30) {
|
||||
key = 'daofruit'
|
||||
} else if (s.stats.feishengCount > 0) {
|
||||
key = 'feisheng'
|
||||
} else {
|
||||
for (const [need, k] of RANK_MAP) {
|
||||
if (dims.total >= need) {
|
||||
key = k
|
||||
|
||||
Reference in New Issue
Block a user