dsh-metaphysics 0.62.4 → 0.62.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -362,7 +362,7 @@ h3::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--li
362
362
  <div class="wrap">
363
363
  <header>
364
364
  <div class="brand-row">
365
- <div class="brand"><span class="seal" aria-hidden="true">命</span><span class="brand-txt">命理排盘<span class="ver">v0.62.4</span><small>八字 · 紫微 · 六爻 · 梅花 · 六壬 · 奇门 · 合盘 · 塔罗 全部在本机计算</small></span></div>
365
+ <div class="brand"><span class="seal" aria-hidden="true">命</span><span class="brand-txt">命理排盘<span class="ver">v0.62.5</span><small>八字 · 紫微 · 六爻 · 梅花 · 六壬 · 奇门 · 合盘 · 塔罗 全部在本机计算</small></span></div>
366
366
  <div class="view-switch">
367
367
  <span class="hint">熟练了可以换回平铺</span>
368
368
  <span class="seg" role="group" aria-label="首屏样式">
@@ -653,7 +653,7 @@ h3::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--li
653
653
  <h3>对拍:把典籍当期望值</h3>
654
654
  <ul><li>六爻:京房八宫卦序与世应,64 卦全表;旬空六旬表</li><li>六壬:日干寄宫、中气换将;紫微:纳音定五行局、紫微天府相照</li><li>卦例:《增删卜易》9 条 +《卜筮正宗》128 条(93 成对 + 35 静卦),核本变卦 / 动爻数 / 卦宫 / 缺爻 / 旬空</li><li>奇门:20 个时辰 × 9 宫,核四柱 / 局数 / 值符 / 值使 / 星门神 / 天盘干</li></ul>
655
655
  <h3>工程验证</h3>
656
- <ul><li>测试:155 个测试文件 / 8376 条断言;七道闸(回归 · 断言基线 · 测试可失败自检 · HTML 注入面 · 工程约定 · 产物宿主形态 · 随机扫射)</li><li>可复现:seed / asOf 显式;同一输入同一输出</li><li>口径:晚子时、真太阳时、奇门三流派、闰月归月都可切换,并有字段级差异对照</li></ul>
656
+ <ul><li>测试:163 个测试文件 / 8729 条断言;七道闸(回归 · 断言基线 · 测试可失败自检 · HTML 注入面 · 工程约定 · 产物宿主形态 · 随机扫射)</li><li>可复现:seed / asOf 显式;同一输入同一输出</li><li>口径:晚子时、真太阳时、奇门三流派、闰月归月都可切换,并有字段级差异对照</li></ul>
657
657
 
658
658
  <h3>已知边界(不猜)</h3>
659
659
  <ul><li>六爻应期(具体哪天应验)不做;卦例只录动爻个数,不录爻位</li><li>财富/健康只给结构判断与档位,不给金额区间、不作诊断</li><li>紫微飞星已做「单一支化逐宫追到成环」与「三方四正 16 条按落宫归堆」,但都未叠大限流年四化、不折吉凶;八字交运日已能算到日/时,但未与第三方排盘案例批量对拍</li></ul>
@@ -983,7 +983,7 @@ const LABELS = [
983
983
  [/^dayun\.jiao\./, '起运'],
984
984
  [/^dayun\.toNextJieDays$/, '起运时间'],
985
985
  [/^dayun\.list\.(\d+)\.ganzhi$/, '大运干支'],
986
- [/^dayun\.startAge\./, '起运时间'],
986
+ [/^dayun\.startAge(Exact)?\./, '起运时间'],
987
987
  [/^dayun\./, '大运评分'],
988
988
  [/^liunian\./, '流年'],
989
989
  [/^jieqi\./, '节气边界'],
@@ -4996,6 +4996,229 @@ function classicsText(rows) {
4996
4996
  return { CLASSIC_BOOKS, CLASSICS, classicOf, suiyunClassicOf, classicsFor, classicsText };
4997
4997
  })();
4998
4998
 
4999
+ __mods.structure = (function () {
5000
+ // 八大地支结构(炳祥课堂口径)
5001
+ //
5002
+ // 定位:只做「静态结构 + 宫位权重」的只读标注,不改旺衰、不改喜忌。
5003
+ // 课堂口径来源见 docs/炳祥八字-课程知识内化.md 第 2 节;
5004
+ // 这里把「四个地支落在身强阵营还是身弱阵营」按年支定 A 档(年支那一档记 A,另一档记 B),
5005
+ // 于是八种排布可以写成 AAAA / ABBB / AAAB / AABA / ABAA / AABB / ABAB / ABBA,
5006
+ // 再从「异类那一支的宫位权重」读出静态从格概率:
5007
+ // 年支独异 11 分 → 80% 从;时支独异 16 分 → 50-60% 从;
5008
+ // 日支独异 27 分 → 20% 从;月支独异 36 分 → 99% 不从。
5009
+ //
5010
+ // 注意:这是**静态**概率。三合、三会、六合把某一支「合走」之后,阵营可能整体改写,
5011
+ // 那时要以合化后的阵营重新排结构;课堂原话也是「静态条件之外,生克合化的演化会更多」。
5012
+
5013
+ const STEM_ELEMENT = {
5014
+ 甲: '木', 乙: '木', 丙: '火', 丁: '火', 戊: '土',
5015
+ 己: '土', 庚: '金', 辛: '金', 壬: '水', 癸: '水',
5016
+ };
5017
+ const GENERATES = { 木: '火', 火: '土', 土: '金', 金: '水', 水: '木' };
5018
+
5019
+ /** 干支宫位权重:天干合计 10、地支合计 90(日干为参照点,计 0) */
5020
+ const PILLAR_WEIGHT = {
5021
+ stem: { year: 2, month: 5, day: 0, hour: 3 },
5022
+ branch: { year: 11, month: 36, day: 27, hour: 16 },
5023
+ };
5024
+
5025
+ /** 藏干固定百分比(课堂口径,同一支内合计 100) */
5026
+ const HIDDEN_PCT = {
5027
+ 子: { 癸: 100 },
5028
+ 丑: { 己: 20, 辛: 40, 癸: 40 },
5029
+ 寅: { 甲: 65, 丙: 30, 戊: 5 },
5030
+ 卯: { 乙: 100 },
5031
+ 辰: { 戊: 45, 乙: 30, 癸: 25 },
5032
+ 巳: { 丙: 65, 戊: 20, 庚: 15 },
5033
+ 午: { 丁: 90, 己: 10 },
5034
+ 未: { 己: 55, 丁: 40, 乙: 5 },
5035
+ 申: { 庚: 65, 壬: 30, 戊: 5 },
5036
+ 酉: { 辛: 100 },
5037
+ 戌: { 戊: 55, 辛: 25, 丁: 20 },
5038
+ 亥: { 壬: 70, 甲: 30 },
5039
+ };
5040
+
5041
+ // 得地 / 半得地 / 不得地。数值只作标签与说明,不参与旺衰打分。
5042
+ // 半得地一律不计入身强阵营(课堂:土日主见辰「不能当得地看」;戌对火日主须午戌合/寅午戌才得地)。
5043
+ const SUPPORT = {
5044
+ 木: { 得地: '亥子寅卯', 半: { 辰: 0.5, 未: 0.2 } },
5045
+ 火: { 得地: '寅卯巳午未', 半: { 戌: 0 } },
5046
+ 土: { 得地: '巳午未戌', 半: { 寅: 0.2, 辰: 0.5 } },
5047
+ 金: { 得地: '丑酉申戌辰', 半: { 未: 0.1, 巳: 0.1 } },
5048
+ 水: { 得地: '申亥子丑', 半: { 辰: 0.5 } },
5049
+ };
5050
+
5051
+ const PILLARS = ['year', 'month', 'day', 'hour'];
5052
+ const LABEL = { year: '年', month: '月', day: '日', hour: '时' };
5053
+
5054
+ /** 静态从格概率(%)。null 表示课堂只说「有可能」,未给数字。 */
5055
+ const CONG_PROB = {
5056
+ AAAA: { prob: 99, range: '≈99%', word: '四支同党,基本为真从' },
5057
+ ABBB: { prob: 80, range: '≈80%', word: '年支独异,极易从' },
5058
+ AAAB: { prob: 55, range: '50-60%', word: '时支独异,从与不从各半' },
5059
+ AABA: { prob: 20, range: '≈20%', word: '日支独异,不易从' },
5060
+ ABAA: { prob: 1, range: '≈1%', word: '月支独异,几乎不从' },
5061
+ AABB: { prob: 0, range: '0%', word: '二对二最平衡,无从格' },
5062
+ ABAB: { prob: 0, range: '0%', word: '二对二,无从格' },
5063
+ ABBA: { prob: null, range: '原文未给', word: '二对二,原文只说「有可能从格」' },
5064
+ };
5065
+
5066
+ /** 日主在某一支的得地程度 */
5067
+ function supportOf(dayStem, branch) {
5068
+ const el = STEM_ELEMENT[dayStem];
5069
+ const table = SUPPORT[el];
5070
+ if (!table) return { level: '不得地', weight: 0 };
5071
+ if (table.得地.includes(branch)) return { level: '得地', weight: 1 };
5072
+ const half = table.半[branch];
5073
+ if (half !== undefined) return { level: '半得地', weight: half };
5074
+ return { level: '不得地', weight: 0 };
5075
+ }
5076
+
5077
+ /** 天干属于身强阵营(印比)还是身弱阵营(食伤财官杀) */
5078
+ function stemCamp(dayStem, stem) {
5079
+ const me = STEM_ELEMENT[dayStem];
5080
+ const el = STEM_ELEMENT[stem];
5081
+ if (!me || !el) return 'B';
5082
+ return el === me || GENERATES[el] === me ? 'A' : 'B';
5083
+ }
5084
+
5085
+ /**
5086
+ * 八大地支结构。
5087
+ * @param {object} pillars 四柱(时柱可为 null)
5088
+ * @param {string} dayStem 日干
5089
+ */
5090
+ function branchStructureOf(pillars, dayStem) {
5091
+ const keys = PILLARS.filter((k) => pillars[k] && pillars[k].branch);
5092
+ if (!keys.length) return null;
5093
+
5094
+ const yearCamp = branchCamp(pillars.year.branch, dayStem);
5095
+ const branches = keys.map((k) => {
5096
+ const branch = pillars[k].branch;
5097
+ const sup = supportOf(dayStem, branch);
5098
+ const camp = sup.weight >= 1 ? 'A' : 'B';
5099
+ return {
5100
+ key: k,
5101
+ label: LABEL[k],
5102
+ branch,
5103
+ camp: camp === yearCamp ? 'A' : 'B',
5104
+ support: sup.level,
5105
+ supportWeight: sup.weight,
5106
+ weight: PILLAR_WEIGHT.branch[k],
5107
+ };
5108
+ });
5109
+
5110
+ // 年支那一档记 A;四支不足时(无时辰)只报实际存在的三支,code 相应变短
5111
+ const code = branches.map((b) => b.camp).join('');
5112
+ const prob = CONG_PROB[code] || null;
5113
+
5114
+ const aCamp = supportOf(dayStem, pillars.year.branch).weight >= 1 ? '身强阵营' : '身弱阵营';
5115
+ const bCamp = aCamp === '身强阵营' ? '身弱阵营' : '身强阵营';
5116
+
5117
+ const sum = (camp, field) => branches.filter((b) => b.camp === camp).reduce((n, b) => n + b[field], 0);
5118
+ const branchBal = { A: sum('A', 'weight'), B: sum('B', 'weight') };
5119
+ const branchStrong = aCamp === '身强阵营' ? branchBal.A : branchBal.B;
5120
+ const branchWeak = aCamp === '身强阵营' ? branchBal.B : branchBal.A;
5121
+
5122
+ const stemKeys = ['year', 'month', 'hour'].filter((k) => pillars[k] && pillars[k].stem);
5123
+ const stemBal = { A: 0, B: 0 };
5124
+ for (const k of stemKeys) stemBal[stemCamp(dayStem, pillars[k].stem)] += PILLAR_WEIGHT.stem[k];
5125
+
5126
+ const weakDays = branches.filter((b) => b.support !== '得地');
5127
+ const aCount = branches.filter((b) => b.camp === 'A').length;
5128
+ const bCount = branches.length - aCount;
5129
+ // 异类=人数少的那一档;二对二没有异类
5130
+ const minority = aCount === 0 || bCount === 0 ? null : aCount < bCount ? 'A' : bCount < aCount ? 'B' : null;
5131
+ const odd = minority ? branches.filter((b) => b.camp === minority) : [];
5132
+
5133
+ const balance = {
5134
+ aCamp,
5135
+ branch: branchBal,
5136
+ stem: stemBal,
5137
+ total: { A: branchBal.A + stemBal.A, B: branchBal.B + stemBal.B },
5138
+ };
5139
+
5140
+ const shapeText = !minority
5141
+ ? (aCount === branches.length || bCount === branches.length
5142
+ ? `四支同党(均属${aCamp})`
5143
+ : `二对二:${branches.filter((b) => b.camp === 'A').map((b) => b.label).join('、')}支属${aCamp},`
5144
+ + `${branches.filter((b) => b.camp === 'B').map((b) => b.label).join('、')}支属${bCamp}`)
5145
+ : `异类为${odd.map((b) => `${b.label}支(${b.weight} 分)`).join('、')}`;
5146
+
5147
+ const detail = [
5148
+ `四支${code}(${branches.map((b) => `${b.label}支${b.branch}${b.support}`).join('、')})`,
5149
+ shapeText,
5150
+ `地支 身强${branchStrong} : 身弱${branchWeak},加天干 ${balance.total[aCamp === '身强阵营' ? 'A' : 'B']}:${balance.total[aCamp === '身强阵营' ? 'B' : 'A']}`,
5151
+ ];
5152
+
5153
+ // 没有时柱时概率表不适用:AAAA 之类需要四支齐全才成立
5154
+ const complete = branches.length === 4;
5155
+
5156
+ return {
5157
+ code,
5158
+ complete,
5159
+ aCamp,
5160
+ congProb: complete && prob ? prob.prob : null,
5161
+ congRange: complete && prob ? prob.range : '三柱不判结构概率',
5162
+ word: complete && prob ? prob.word : '时柱暂缺,只列三支结构,不套从格概率',
5163
+ branches,
5164
+ balance,
5165
+ odd: odd.map((b) => ({ key: b.key, label: b.label, branch: b.branch, weight: b.weight })),
5166
+ halfSupported: weakDays.filter((b) => b.support === '半得地').map((b) => `${b.label}支${b.branch}`),
5167
+ detail: detail.join(';'),
5168
+ method: '按年支定 A 档,四支分两营;异类支的宫位权重决定静态从格概率(炳祥课堂口径,非唯一流派)',
5169
+ note: '静态结构。三合/三会/六合把某一支合走时,应以合化后的阵营重排;概率只作提示,不直接断从格。',
5170
+ };
5171
+ }
5172
+
5173
+ function branchCamp(branch, dayStem) {
5174
+ return supportOf(dayStem, branch).weight >= 1 ? 'A' : 'B';
5175
+ }
5176
+
5177
+ /**
5178
+ * 宫位权重的百分比视图(炳祥课程第 2.1 节)。
5179
+ *
5180
+ * 天干合计 10(年 2 / 月 5 / 日 0 / 时 3),地支合计 90(年 11 / 月 36 / 日 27 / 时 16),
5181
+ * 两表相加正好 100,所以「按柱合计」本身就是百分比:年 13%、月 41%、日 27%、时 19%。
5182
+ * 这里只做展示层换算,不改 bazi.js 的旺衰评分,也不参与取格与喜忌。
5183
+ *
5184
+ * 三柱模式(未给出生时刻)时,时柱是正午占位:权重照表列出,但合计只有 81,
5185
+ * 不重新归一化——权重是固定口径,归一化会把占位时柱洗成实有。
5186
+ */
5187
+ function weightPctOf(pillars = {}, { hourUnknown = false } = {}) {
5188
+ const present = PILLARS.filter((k) => pillars[k] && pillars[k].branch);
5189
+ const complete = !hourUnknown && present.length === 4;
5190
+ // 三柱模式:时柱是正午占位,不计入合计;其余缺柱同理
5191
+ const counted = complete ? PILLARS.slice() : present.filter((k) => !(k === 'hour' && hourUnknown));
5192
+ const stem = {};
5193
+ const branch = {};
5194
+ const pct = {};
5195
+ for (const k of PILLARS) {
5196
+ stem[k] = PILLAR_WEIGHT.stem[k];
5197
+ branch[k] = PILLAR_WEIGHT.branch[k];
5198
+ pct[k] = counted.includes(k) ? stem[k] + branch[k] : 0;
5199
+ }
5200
+ const totalStem = counted.reduce((n, k) => n + stem[k], 0);
5201
+ const totalBranch = counted.reduce((n, k) => n + branch[k], 0);
5202
+ const all = totalStem + totalBranch;
5203
+ const rows = counted.map((k) => `${LABEL[k]} ${pct[k]}%(干${stem[k]}+支${branch[k]})`).join('、');
5204
+ const missing = counted.length < 4 ? `;${PILLARS.filter((k) => !counted.includes(k)).map((k) => LABEL[k]).join('、')}柱未计` : '';
5205
+ return {
5206
+ complete,
5207
+ stem,
5208
+ branch,
5209
+ pct,
5210
+ total: { stem: totalStem, branch: totalBranch, all },
5211
+ detail: `宫位权重合计 ${all}:${rows}${missing}`,
5212
+ method: '炳祥课程宫位权重:天干 2/5/0/3、地支 11/36/27/16,合计 100;日干为参照点计 0。只作展示换算,不改旺衰评分',
5213
+ note: complete
5214
+ ? '月令 41% 为四柱之首(课堂称事业宫);日 27%、时 19%、年 13%'
5215
+ : '时柱暂缺,权重表照列,但本盘合计不足 100;不重新归一化',
5216
+ };
5217
+ }
5218
+
5219
+ return { PILLAR_WEIGHT, HIDDEN_PCT, supportOf, branchStructureOf, weightPctOf };
5220
+ })();
5221
+
4999
5222
  __mods.geju = (function () {
5000
5223
  // 八字格局、用神与行运评分
5001
5224
  //
@@ -5135,6 +5358,15 @@ function monthPattern(pillars, dayStem, monthBranch) {
5135
5358
  if (!use) use = hui || base;
5136
5359
  const usedBy = exposedKey ? '透干' : (hui ? '会支' : '本气');
5137
5360
  const exposedPos = exposedKey ? { year: '年', month: '月', hour: '时' }[exposedKey] : null;
5361
+ // 评分元数据:只给下面 patternScoreOf 用,不参与取格本身
5362
+ const metaOf = (c, by, key) => ({
5363
+ stem: c.stem,
5364
+ god: c.god,
5365
+ pos: c.pos,
5366
+ usedBy: by,
5367
+ exposedKey: key || null,
5368
+ exposedPos: key ? { year: '年', month: '月', hour: '时' }[key] : null,
5369
+ });
5138
5370
 
5139
5371
  // 建禄只认日干的禄位;戊土辰月、己土未月这类「本气比肩但不在禄位」的杂气月不再冒称建禄
5140
5372
  if (base.god === '比肩' && LUSHEN_BRANCH[dayStem] === monthBranch) {
@@ -5142,6 +5374,7 @@ function monthPattern(pillars, dayStem, monthBranch) {
5142
5374
  name: '建禄格',
5143
5375
  kind: '月令格',
5144
5376
  evidence: `月令${monthBranch}为日干${dayStem}之禄(本气${base.stem}比肩),身坐禄地`,
5377
+ ...metaOf(base, '本气', null),
5145
5378
  };
5146
5379
  }
5147
5380
  if (base.god === '劫财') {
@@ -5150,15 +5383,17 @@ function monthPattern(pillars, dayStem, monthBranch) {
5150
5383
  name: isYangStem(dayStem) ? '阳刃格' : '月刃格',
5151
5384
  kind: '月令格',
5152
5385
  evidence: `月令${monthBranch}为日干${dayStem}之刃(本气${base.stem}劫财)${isYangStem(dayStem) ? '' : ',阴干统称月刃'}`,
5386
+ ...metaOf(base, '本气', null),
5153
5387
  };
5154
5388
  }
5155
- return { name: '月劫格', kind: '月令格', evidence: `月令${monthBranch}本气${base.stem}为劫财` };
5389
+ return { name: '月劫格', kind: '月令格', evidence: `月令${monthBranch}本气${base.stem}为劫财`, ...metaOf(base, '本气', null) };
5156
5390
  }
5157
5391
  if (usedBy === '本气' && base.god === '比肩') {
5158
5392
  return {
5159
5393
  name: '比肩格',
5160
5394
  kind: '月令格',
5161
5395
  evidence: `月令${monthBranch}藏${hidden.join('')},本气${base.stem}为比肩,但${dayStem}禄在${LUSHEN_BRANCH[dayStem]}、不在${monthBranch},属杂气月比肩当权`,
5396
+ ...metaOf(base, '本气', null),
5162
5397
  };
5163
5398
  }
5164
5399
  // 子平十六:「透乙则用月劫」——杂气月由透干或会支取到劫财时,仍作月劫论
@@ -5168,6 +5403,7 @@ function monthPattern(pillars, dayStem, monthBranch) {
5168
5403
  name: '月劫格',
5169
5404
  kind: '月令格',
5170
5405
  evidence: `月令${monthBranch}藏${hidden.join('')},${use.pos}${use.stem}(劫财)${via},劫财为用,作月劫论`,
5406
+ ...metaOf(use, usedBy, exposedKey),
5171
5407
  };
5172
5408
  }
5173
5409
  const name = `${use.god}格`;
@@ -5179,7 +5415,146 @@ function monthPattern(pillars, dayStem, monthBranch) {
5179
5415
  } else {
5180
5416
  ex = `月令${monthBranch}藏${hidden.join('')},本气${base.stem}(${base.god})未透干,以月令本气取格`;
5181
5417
  }
5182
- return { name, kind: '月令格', evidence: ex };
5418
+ return { name, kind: '月令格', evidence: ex, ...metaOf(use, usedBy, exposedKey) };
5419
+ }
5420
+
5421
+ // ── 成格评分(炳祥高级第 16 课口径)───────────────────────────
5422
+ // 只读评分:基础分按取格档位,再减「透干被合 30」「用神太弱 20」,60 分为及格线。
5423
+ // 不改 name / evidence / geju 三态,也不参与旺衰与喜忌。
5424
+ const ZHUANQI_BRANCHES = ['子', '午', '卯', '酉'];
5425
+ const BASE_BY_TIER = {
5426
+ 专气透: 90,
5427
+ 本气透: 70,
5428
+ 中气透: 50,
5429
+ 余气透: 20,
5430
+ 同五行透: 5,
5431
+ 会支取用: 60,
5432
+ 月令不透: 40,
5433
+ };
5434
+ const HE_PENALTY = 30;
5435
+ const WEAK_PENALTY = 20;
5436
+ const PATTERN_PASS = 60;
5437
+ const OUTER_PATTERNS = ['建禄格', '阳刃格', '月刃格', '月劫格'];
5438
+
5439
+ /** 天干五合:找与 stem 相合的另一干(合而不化也算) */
5440
+ function stemHeWith(stem, pillars) {
5441
+ for (const key of ['year', 'month', 'day', 'hour']) {
5442
+ const p = pillars[key];
5443
+ if (!p || !p.stem || p.stem === stem) continue;
5444
+ if (STEM_HE[stem + p.stem] || STEM_HE[p.stem + stem]) {
5445
+ return { pillar: POS_LABEL[key], key, stem: p.stem };
5446
+ }
5447
+ }
5448
+ return null;
5449
+ }
5450
+
5451
+ /** 用神太弱:无本气通根,且(被天干克 或 全局占比 <18%) */
5452
+ function patternWeakWith(pattern, pillars, wuxing = {}) {
5453
+ const stem = pattern.stem;
5454
+ const el = STEM_ELEMENT[stem];
5455
+ const hasBaseRoot = ['year', 'month', 'day', 'hour'].some((key) => {
5456
+ const p = pillars[key];
5457
+ if (!p) return false;
5458
+ return (HIDDEN[p.branch] || [])[0] === stem;
5459
+ });
5460
+ const total = Object.values(wuxing).reduce((n, v) => n + (Number(v) || 0), 0);
5461
+ const pct = total > 0 ? Math.round(((Number(wuxing[el]) || 0) / total) * 1000) / 10 : 0;
5462
+ const overcome = ['year', 'month', 'day', 'hour'].some((key) => {
5463
+ const p = pillars[key];
5464
+ if (!p || !p.stem || p.stem === stem) return false;
5465
+ const otherEl = STEM_ELEMENT[p.stem];
5466
+ return otherEl && OVERCOMES[otherEl] === el;
5467
+ });
5468
+ const weak = !hasBaseRoot && (pct < 18 || overcome);
5469
+ const reasons = [
5470
+ hasBaseRoot ? `有本气通根(${stem})` : '四支无本气通根',
5471
+ `全局 ${pct}%`,
5472
+ overcome ? '且被天干克' : '',
5473
+ ].filter(Boolean);
5474
+ return {
5475
+ weak,
5476
+ pct,
5477
+ hasBaseRoot,
5478
+ overcome,
5479
+ detail: reasons.join(','),
5480
+ };
5481
+ }
5482
+
5483
+ /**
5484
+ * 月令格成格评分。
5485
+ * @param {object} pattern monthPattern() 的返回(需 stamp / pos / usedBy)
5486
+ * @param {object} pillars 四柱
5487
+ * @param {string} dayStem 日干
5488
+ * @param {string} monthBranch 月支
5489
+ * @param {object} wuxing 五行分值
5490
+ */
5491
+ function patternScoreOf(pattern, pillars, dayStem, monthBranch, wuxing = {}) {
5492
+ if (!pattern) return null;
5493
+ if (pattern.kind !== '月令格' || OUTER_PATTERNS.includes(pattern.name)) {
5494
+ return {
5495
+ applicable: false,
5496
+ base: null,
5497
+ baseLabel: null,
5498
+ deductions: [],
5499
+ score: null,
5500
+ pass: null,
5501
+ grade: null,
5502
+ threshold: PATTERN_PASS,
5503
+ detail: `${pattern.name}属外格(建禄/羊刃/月劫),课程不按正八格的透干档位计成格分,故不套 −30 / −20。`,
5504
+ method: '只评正八格月令格;建禄/羊刃/月劫属外格,不评分',
5505
+ };
5506
+ }
5507
+
5508
+ const zhi = pattern.monthBranch || monthBranch;
5509
+ let baseLabel;
5510
+ if (pattern.usedBy === '透干') {
5511
+ if (ZHUANQI_BRANCHES.includes(zhi) && pattern.pos === '本气') baseLabel = '专气透';
5512
+ else baseLabel = `${pattern.pos}透`;
5513
+ } else if (pattern.usedBy === '会支') {
5514
+ baseLabel = '会支取用';
5515
+ } else {
5516
+ // 月令本气未透:若同五行异阴阳之干透出,按课里「同五行透」档(<10%)计
5517
+ const baseEl = STEM_ELEMENT[pattern.stem];
5518
+ const sameEl = ['year', 'month', 'hour']
5519
+ .map((k) => pillars[k] && pillars[k].stem)
5520
+ .find((s) => s && s !== pattern.stem && STEM_ELEMENT[s] === baseEl);
5521
+ baseLabel = sameEl ? '同五行透' : '月令不透';
5522
+ }
5523
+ const base = BASE_BY_TIER[baseLabel] ?? 40;
5524
+
5525
+ const deductions = [];
5526
+ const he = pattern.usedBy === '透干' ? stemHeWith(pattern.stem, pillars) : null;
5527
+ if (he) {
5528
+ deductions.push({
5529
+ reason: '透干被合',
5530
+ points: HE_PENALTY,
5531
+ detail: `${pattern.stem}与${he.pillar}干${he.stem}五合(合而不化也按被合论)`,
5532
+ });
5533
+ }
5534
+ const weak = patternWeakWith(pattern, pillars, wuxing);
5535
+ if (weak.weak) {
5536
+ deductions.push({ reason: '用神太弱', points: WEAK_PENALTY, detail: weak.detail });
5537
+ }
5538
+
5539
+ const deducted = deductions.reduce((n, d) => n + d.points, 0);
5540
+ const score = Math.max(0, base - deducted);
5541
+ const pass = score >= PATTERN_PASS;
5542
+ const detail = `基础分 ${base}(${baseLabel})`
5543
+ + `${deductions.length ? `,${deductions.map((d) => `${d.reason} −${d.points}(${d.detail})`).join(',')}` : ',无减项'}`
5544
+ + `,成格分 ${score}/100,${pass ? `过 ${PATTERN_PASS} 分线,按课里作成格论` : `不及 ${PATTERN_PASS} 分线,按课里作不成格论`}。`;
5545
+
5546
+ return {
5547
+ applicable: true,
5548
+ base,
5549
+ baseLabel,
5550
+ deductions,
5551
+ score,
5552
+ pass,
5553
+ grade: pass ? '成格' : '不成格',
5554
+ threshold: PATTERN_PASS,
5555
+ detail,
5556
+ method: '基础分按取格档位(专气透 90 / 本气透 70 / 中气透 50 / 余气透 20 / 同五行透 5 / 会支取用 60 / 月令不透 40);透干被合 −30、用神太弱 −20;60 分及格。只读标注,不改取格与既有三态。',
5557
+ };
5183
5558
  }
5184
5559
 
5185
5560
  // ── 特殊格 / 组合 ────────────────────────────────────────────
@@ -5343,6 +5718,170 @@ function tongguanOf(favor = [], avoid = [], wuxing = {}) {
5343
5718
  return null;
5344
5719
  }
5345
5720
 
5721
+ // ── 病药(炳祥高级第 6 课口径)───────────────────────────────
5722
+ // 只做只读标注:病=最强忌神,药=能克忌神的喜神(其次取泄),不改喜忌结论。
5723
+ // 门槛按课里:正格忌神 >35%、从格 >15%;从格能量放大,10% ≈ 正格 30-40%。
5724
+ const BING_THRESHOLD = { 正格: 35, 从格: 15 };
5725
+
5726
+ function bingyaoOf({ dayStem, strength, wuxing = {}, yongshen = {}, geju = [] }) {
5727
+ const roles = elementRoles(dayStem);
5728
+ const roleName = (el) => (el === roles.me ? '比劫' : el === roles.inMe ? '印'
5729
+ : el === roles.shi ? '食伤' : el === roles.cai ? '财' : '官杀');
5730
+ const w = (el) => Math.round((Number(wuxing[el]) || 0) * 10) / 10;
5731
+ const total = Object.values(wuxing).reduce((n, v) => n + (Number(v) || 0), 0);
5732
+ const pctOf = (el) => (total > 0 ? Math.round((w(el) / total) * 1000) / 10 : 0);
5733
+ const desc = (x) => `${x.element}(${x.role}·${x.pct}%)`;
5734
+
5735
+ const cong = (geju || []).find((g) => g.kind === '从格');
5736
+ const threshold = cong ? BING_THRESHOLD.从格 : BING_THRESHOLD.正格;
5737
+
5738
+ // 从格的喜忌与扶抑相反。现有 yongshenOf 只按旺衰给扶抑喜忌,没有吃 geju,
5739
+ // 这里在病药层单列一份反转后的喜忌,避免把从格的喜神当忌神;不改 yongshen 本身。
5740
+ let favorEls = yongshen.favor || [];
5741
+ let avoidEls = yongshen.avoid || [];
5742
+ let source = '扶抑喜忌';
5743
+ if (cong) {
5744
+ // 按从格类型分:从财/从杀忌印比;从儿忌印与官杀(比劫生食伤不忌);从强忌财官食伤。
5745
+ if (cong.name === '从强格') {
5746
+ favorEls = [roles.inMe, roles.me];
5747
+ avoidEls = [roles.cai, roles.guan, roles.shi];
5748
+ } else if (cong.name === '从儿格') {
5749
+ favorEls = [roles.shi, roles.cai];
5750
+ avoidEls = [roles.inMe, roles.guan];
5751
+ } else if (cong.name === '从杀格') {
5752
+ favorEls = [roles.guan, roles.cai];
5753
+ avoidEls = [roles.me, roles.inMe];
5754
+ } else {
5755
+ favorEls = [roles.cai, roles.guan, roles.shi];
5756
+ avoidEls = [roles.me, roles.inMe];
5757
+ }
5758
+ source = '从格反转';
5759
+ }
5760
+
5761
+ const sick = avoidEls
5762
+ .map((el) => ({ element: el, role: roleName(el), pct: pctOf(el) }))
5763
+ .sort((a, b) => b.pct - a.pct)[0] || null;
5764
+
5765
+ const base = {
5766
+ threshold,
5767
+ isCong: !!cong,
5768
+ congName: cong ? cong.name : null,
5769
+ favorSource: source,
5770
+ sick: sick || null,
5771
+ remedy: null,
5772
+ level: '无病',
5773
+ method: '病=最强忌神;正格 >35%、从格 >15% 才算病;从格先按喜忌反转取忌;药优先取克忌神的喜神,其次取泄;只作标注,不改喜忌',
5774
+ };
5775
+
5776
+ if (!sick || sick.pct <= threshold) {
5777
+ return {
5778
+ ...base,
5779
+ detail: sick
5780
+ ? `忌神最重为${desc(sick)},未过${cong ? '从格' : '正格'} ${threshold}% 门槛,按炳祥口径作无病论。`
5781
+ : `本盘无忌神可论,按炳祥口径作无病论。`,
5782
+ };
5783
+ }
5784
+
5785
+ const favor = favorEls
5786
+ .map((el) => ({ element: el, role: roleName(el), pct: pctOf(el) }))
5787
+ .filter((x) => x.pct > 0)
5788
+ .sort((a, b) => b.pct - a.pct);
5789
+ const over = (a, b) => OVERCOMES[a] === b; // a 克 b
5790
+
5791
+ let remedy = null;
5792
+ let mode = null;
5793
+ let note = '';
5794
+
5795
+ if (sick.role === '印') {
5796
+ // 印为忌:财克印最优,但财力须 ≥ 食伤的 50%;不足则只能用食伤硬抗(安慰剂)。
5797
+ const cai = favor.find((f) => f.role === '财');
5798
+ const shi = favor.find((f) => f.role === '食伤');
5799
+ if (cai && pctOf(roles.cai) >= pctOf(roles.shi) * 0.5) {
5800
+ remedy = cai;
5801
+ mode = '财克印';
5802
+ } else if (shi && pctOf(roles.shi) >= 1) {
5803
+ remedy = shi;
5804
+ mode = '食伤硬抗(安慰剂)';
5805
+ note = `财力${pctOf(roles.cai)}% 不足食伤的 50%(食伤${pctOf(roles.shi)}%),按课里只能以食伤硬抗。`;
5806
+ } else {
5807
+ note = `财、食伤都不足以制印(财${pctOf(roles.cai)}%、食伤${pctOf(roles.shi)}%),按课里属有病无药。`;
5808
+ }
5809
+ } else {
5810
+ // 克 > 泄:先找克忌神的喜神,再退而取「忌神所生」的喜神(泄其势)。
5811
+ const ke = favor.find((f) => over(f.element, sick.element));
5812
+ if (ke) {
5813
+ remedy = ke;
5814
+ mode = '克';
5815
+ } else {
5816
+ const xie = favor.find((f) => GENERATES[sick.element] === f.element);
5817
+ if (xie) {
5818
+ remedy = xie;
5819
+ mode = '泄';
5820
+ note = `喜神中无克${sick.element}者,退取${xie.element}泄其势(课里「克 > 泄」,泄力次之)。`;
5821
+ }
5822
+ }
5823
+ }
5824
+
5825
+ const level = remedy ? '有病有药' : '有病无药';
5826
+ const detail = [
5827
+ `病为${desc(sick)},已过${cong ? `从格(${cong.name})` : '正格'} ${threshold}% 门槛。`,
5828
+ remedy
5829
+ ? `药取${desc(remedy)},以「${mode}」制病${remedy.pct < sick.pct ? `;药力弱于病(${remedy.pct}% < ${sick.pct}%)` : ''}。`
5830
+ : `喜神中无可制之药,按炳祥口径属有病无药。`,
5831
+ note,
5832
+ ].filter(Boolean).join('');
5833
+
5834
+ return { ...base, level, remedy, mode, detail };
5835
+ }
5836
+
5837
+ // ── 闲神(炳祥高级第 9 课口径)───────────────────────────────
5838
+ // 狭义闲神=食伤与官杀中较弱的那一个;4% 最佳、<10% 合格、>=10% 显忌。
5839
+ // 显性(该五行透干)×3 只用于文案排序,不改分值,也不参与旺衰/喜忌。
5840
+ function xianshenOf({ dayStem, wuxing = {}, pillars = {}, yongshen = {} }) {
5841
+ const roles = elementRoles(dayStem);
5842
+ const w = (el) => Math.round((Number(wuxing[el]) || 0) * 10) / 10;
5843
+ const total = Object.values(wuxing).reduce((n, v) => n + (Number(v) || 0), 0);
5844
+ const pctOf = (el) => (total > 0 ? Math.round((w(el) / total) * 1000) / 10 : 0);
5845
+
5846
+ const candidates = [
5847
+ { role: '食伤', element: roles.shi },
5848
+ { role: '官杀', element: roles.guan },
5849
+ ].map((x) => ({ ...x, pct: pctOf(x.element) }));
5850
+ const idle = candidates.sort((a, b) => a.pct - b.pct)[0];
5851
+ const band = idle.pct <= 4 ? '最佳' : idle.pct < 10 ? '合格' : '显忌';
5852
+
5853
+ const stems = ['year', 'month', 'day', 'hour']
5854
+ .map((k) => pillars[k] && pillars[k].stem)
5855
+ .filter(Boolean);
5856
+ const visible = stems.some((s) => STEM_ELEMENT[s] === idle.element);
5857
+ const favorRoles = yongshen.favorRoles || [];
5858
+ const avoidRoles = yongshen.avoidRoles || [];
5859
+ const stance = favorRoles.includes(idle.role) ? '喜' : avoidRoles.includes(idle.role) ? '忌' : '中性';
5860
+
5861
+ const level = band === '显忌' ? '闲神显忌' : band === '最佳' ? '闲神得位' : '闲神合格';
5862
+ const detail = [
5863
+ `狭义闲神取${idle.element}(${idle.role},全局 ${idle.pct}%),是食伤与官杀中较弱的一个。`,
5864
+ band === '最佳'
5865
+ ? '4% 上下,正是课里说的最佳区间。'
5866
+ : band === '合格'
5867
+ ? '不足 10%,按课里算合格,不作显忌。'
5868
+ : '超过 10%,课里按忌神论:不是大凶,是别扭、乱使劲、干了很多事没结果。',
5869
+ visible ? `此神透干(显性),按课里「显性 ×3」在文案里优先提示;分值不改。` : '此神未透干,属暗闲神,影响更轻。',
5870
+ `在现有喜忌里为${stance}。`,
5871
+ ].join('');
5872
+
5873
+ return {
5874
+ idle,
5875
+ band,
5876
+ level,
5877
+ visible,
5878
+ stance,
5879
+ displayWeight: Math.round(idle.pct * (visible ? 3 : 1) * 10) / 10,
5880
+ detail,
5881
+ method: '闲神=食伤与官杀中较弱者;4% 最佳 / <10% 合格 / >=10% 显忌;显性 ×3 只作文案排序,不改分值与喜忌',
5882
+ };
5883
+ }
5884
+
5346
5885
  // ── 用神 / 喜忌 ──────────────────────────────────────────────
5347
5886
 
5348
5887
 
@@ -5545,21 +6084,36 @@ function scoreLuck(ganzhi, frame) {
5545
6084
  function analyzeBaziFrame({ pillars, dayStem, monthBranch, strength, wuxing }) {
5546
6085
  const gods = godStats(pillars, dayStem);
5547
6086
  const month = monthPattern(pillars, dayStem, monthBranch);
6087
+ // 成格评分:只给月令格挂分,外格返回 applicable:false;随后续 specialPatterns 一起回传
6088
+ const patternScore = patternScoreOf(month, pillars, dayStem, monthBranch, wuxing);
6089
+ if (patternScore && patternScore.applicable) {
6090
+ month.score = patternScore.score;
6091
+ month.scoreDetail = patternScore;
6092
+ }
5548
6093
  const special = specialPatterns(pillars, dayStem, monthBranch, strength, wuxing, gods);
5549
6094
  const geju = [month, ...special];
5550
6095
  const yongshen = yongshenOf(dayStem, monthBranch, strength, wuxing, Object.values(pillars).map((p) => p.branch));
6096
+ // 病药:只读标注,复用上面的喜忌,不改结论
6097
+ const bingyao = bingyaoOf({ dayStem, strength, wuxing, yongshen, geju });
6098
+ // 闲神:只读标注
6099
+ const xianshen = xianshenOf({ dayStem, wuxing, pillars, yongshen });
5551
6100
  return {
5552
6101
  geju,
5553
6102
  primary: month,
5554
6103
  primaryName: month.name,
5555
6104
  godStats: gods,
5556
6105
  yongshen,
6106
+ bingyao,
6107
+ xianshen,
6108
+ patternScore,
5557
6109
  dayStem,
5558
6110
  monthBranch,
6111
+ // 八大地支结构:静态结构 + 宫位权重,仅作标注,不参与取格与喜忌
6112
+ structure: strength.branchStructure || null,
5559
6113
  };
5560
6114
  }
5561
6115
 
5562
- return { tenGod, elementRoles, tongguanOf, scoreLuck, analyzeBaziFrame };
6116
+ return { tenGod, elementRoles, patternScoreOf, tongguanOf, bingyaoOf, xianshenOf, scoreLuck, analyzeBaziFrame };
5563
6117
  })();
5564
6118
 
5565
6119
  __mods.bazi = (function () {
@@ -5573,6 +6127,7 @@ const { bool } = (__mods.bool || {});
5573
6127
  const { nayinOf } = (__mods.nayin || {});
5574
6128
  const { SANHE } = (__mods.sanhe || {});
5575
6129
  const { analyzeBaziFrame, scoreLuck } = (__mods.geju || {});
6130
+ const { branchStructureOf, weightPctOf } = (__mods.structure || {});
5576
6131
 
5577
6132
  // 地支藏干(本气 / 中气 / 余气)
5578
6133
  // 巳的顺序是「丙庚戊」而不是「丙戊庚」:庚长生于巳,是中气;戊是辰月余气,排末位。
@@ -5708,7 +6263,38 @@ function rootedWeightOf(pillars, el, factor) {
5708
6263
  return w;
5709
6264
  }
5710
6265
 
5711
- /** 干支关系:五合、相冲、相克;六合、三合半合、三会半会拱会、冲、害、破、刑 */
6266
+ // ── 暗合(盲派/现代命理的补充定义)───────────────────────────
6267
+ // 子平正法只有天干五合;暗合只作取象与风水参考,不参与旺衰与格局。
6268
+ // 通合:亥午、寅丑(藏干双合);禄合:卯申、午亥、巳子;午亥与通合重叠时只报通合。
6269
+ // 干支暗合取课里明列的六组;自合只取辰(戊癸)。
6270
+ const ANHE_TONG = [['亥', '午'], ['寅', '丑']];
6271
+ const ANHE_LU = [['卯', '申'], ['午', '亥'], ['巳', '子']];
6272
+ const ANHE_GANZHI = new Set(['甲午', '丁亥', '戊子', '辛巳', '壬午', '癸巳']);
6273
+ const ANHE_ZIHE = new Set(['辰']);
6274
+
6275
+ function anheOf(pillars, keys) {
6276
+ const out = [];
6277
+ const branches = keys.map((k) => pillars[k].branch);
6278
+ const has = (a, b) => branches.includes(a) && branches.includes(b);
6279
+ const seen = new Set();
6280
+ const push = (text) => { if (!seen.has(text)) { seen.add(text); out.push(text); } };
6281
+
6282
+ for (const [a, b] of ANHE_TONG) if (has(a, b)) push(`${a}${b}通合(藏干双合)`);
6283
+ for (const [a, b] of ANHE_LU) {
6284
+ if (!has(a, b)) continue;
6285
+ if (seen.has(`${a}${b}通合(藏干双合)`) || seen.has(`${b}${a}通合(藏干双合)`)) continue;
6286
+ push(`${a}${b}禄合`);
6287
+ }
6288
+ for (const k of keys) {
6289
+ const pl = pillars[k];
6290
+ const gz = pl.ganzhi || `${pl.stem}${pl.branch}`;
6291
+ if (ANHE_GANZHI.has(gz)) push(`${gz}干支暗合`);
6292
+ if (ANHE_ZIHE.has(pl.branch)) push(`${gz}自合`);
6293
+ }
6294
+ return out;
6295
+ }
6296
+
6297
+ /** 干支关系:五合、相冲、相克;六合、三合半合、三会半会拱会、冲、害、破、刑;暗合另列 */
5712
6298
  function buildRelations(pillars, keys = ['year', 'month', 'day', 'hour']) {
5713
6299
  const stems = keys.map((k) => pillars[k].stem);
5714
6300
  const branches = keys.map((k) => pillars[k].branch);
@@ -5789,7 +6375,12 @@ function buildRelations(pillars, keys = ['year', 'month', 'day', 'hour']) {
5789
6375
  }
5790
6376
  return out;
5791
6377
  };
5792
- return { stems: uniq(stemOut), branches: uniq(branchOut) };
6378
+ return {
6379
+ stems: uniq(stemOut),
6380
+ branches: uniq(branchOut),
6381
+ anhe: anheOf(pillars, keys),
6382
+ anheNote: '暗合只作取象与风水参考,不参与旺衰与格局;只出现一对时按课里可忽略',
6383
+ };
5793
6384
  }
5794
6385
 
5795
6386
  /** 十神:以日干为我 */
@@ -5968,6 +6559,15 @@ function buildBazi(input) {
5968
6559
  // 四舍五入到 12 个月时必须进位,否则显示「X 岁 12 个月起运」
5969
6560
  if (startAgeMonths >= 12) { startAgeMonths -= 12; startAgeYears += 1; }
5970
6561
 
6562
+ // 并列的截断口径:年/月取整后,余数继续往下拆。1 月 = 0.25 日 = 6 时,
6563
+ // 所以月内余数 ×30 得「日」、日余 ×24 得「时」——与 startAge 的四舍五入同源、不互相覆盖。
6564
+ const exactYears = Math.floor(totalMonths / 12);
6565
+ const exactRemMonths = totalMonths - exactYears * 12;
6566
+ const exactMonths = Math.floor(exactRemMonths);
6567
+ const exactRemDays = (exactRemMonths - exactMonths) * 30;
6568
+ const exactDays = Math.floor(exactRemDays);
6569
+ const exactHours = Math.floor((exactRemDays - exactDays) * 24);
6570
+
5971
6571
  // 交运:三日折一年。
5972
6572
  // 古法三条换算是同一比例的三种说法——3 日折 1 年、1 日折 4 个月、1 时辰折 10 日:
5973
6573
  // 把「出生 → 起运那一侧的节令」的真实间隔按 365.2422/3(≈121.7474)倍放大,
@@ -6134,6 +6734,11 @@ function buildBazi(input) {
6134
6734
  },
6135
6735
  };
6136
6736
 
6737
+ // 八大地支结构(炳祥课堂口径):只读标注,不参与上面的旺衰打分
6738
+ strength.branchStructure = branchStructureOf(pillars, dayStem);
6739
+ // 宫位权重百分比视图:纯展示换算,与上面的评分口径并列,不改分值
6740
+ strength.weightPct = weightPctOf(pillars, { hourUnknown });
6741
+
6137
6742
  // ── 格局 / 用神 / 行运 ─────────────────────────────────────
6138
6743
  const frame = analyzeBaziFrame({ pillars, dayStem, monthBranch, strength, wuxing });
6139
6744
 
@@ -6292,6 +6897,10 @@ function buildBazi(input) {
6292
6897
  direction: forward ? '顺行' : '逆行',
6293
6898
  rule: `${isYangYear ? '阳' : '阴'}年${gender === 'male' ? '男' : '女'}${forward ? '顺排' : '逆排'}`,
6294
6899
  startAge: { years: startAgeYears, months: startAgeMonths },
6900
+ startAgeExact: {
6901
+ years: exactYears, months: exactMonths, days: exactDays, hours: exactHours,
6902
+ caliber: '截断到年月日时',
6903
+ },
6295
6904
  toNextJieDays: Math.round(spanDays * 100) / 100,
6296
6905
  // 交运时刻(日/时辰级):上方 startAge 是四舍五入到月的旧字段,两者同源、不互相覆盖
6297
6906
  jiao: {
@@ -6373,6 +6982,20 @@ function buildBazi(input) {
6373
6982
  // 旺衰与格局:内部仍按正午时柱跑(否则没有可比的基准),但必须说清这是占位值,
6374
6983
  // 不能写成「时柱不参与任何判定」——那与 strength/frame 实际用了时柱相矛盾
6375
6984
  out.strength.precision = 'three-pillars';
6985
+ // 结构同此:第四支是正午占位,不套从格概率,免得把编出来的时支说成实有
6986
+ if (out.strength.branchStructure) {
6987
+ const bs = out.strength.branchStructure;
6988
+ bs.placeholderHour = true;
6989
+ bs.congProb = null;
6990
+ bs.congRange = '三柱不判结构概率';
6991
+ bs.word = '时柱暂缺,第四支为正午占位,不套从格概率';
6992
+ bs.note = '时柱暂缺:第四支为占位值,只列结构形态,不据此断从格;补上出生时刻后可能改变';
6993
+ bs.detail = `${bs.detail}(时支为占位值)`;
6994
+ }
6995
+ if (out.strength.weightPct) {
6996
+ out.strength.weightPct.placeholderHour = true;
6997
+ out.strength.weightPct.note = '时柱暂缺:时柱权重不计入合计(本盘 81%),不重新归一化;补上出生时刻后再按 100% 看';
6998
+ }
6376
6999
  out.notes = [
6377
7000
  '时柱暂缺:未提供出生时刻,时柱不对外给出,也不计入神煞与干支关系',
6378
7001
  '旺衰、格局、用神、调候暂以正午时柱估算,补上出生时刻后可能改变',
@@ -14614,6 +15237,15 @@ const JU_NUMBERS_MAP = {
14614
15237
  寒露: '693', 立冬: '693', 处暑: '147', 霜降: '582', 小雪: '582', 大雪: '471',
14615
15238
  };
14616
15239
 
15240
+ /** 供测试与文档引用:二十四节气三元局数的只读视图(B14 与《奇门遁甲元灵经》卷一逐格对拍) */
15241
+ const QIMEN_JU_TABLE = Object.freeze({ ...JU_NUMBERS_MAP });
15242
+
15243
+ /** 供测试与文档引用:九星八门定宫的只读视图(B14 与元灵经卷一、秘笈总序逐宫对拍) */
15244
+ const QIMEN_BASE_TABLES = Object.freeze({
15245
+ stars: Object.freeze({ ...BASIC_STARS }),
15246
+ gates: Object.freeze({ ...BASIC_GATES }),
15247
+ });
15248
+
14617
15249
  // ── 历法适配:把本插件的时间轴转成奇门引擎要的 snapshot ──
14618
15250
  const xunOf = (gz) => {
14619
15251
  const idx = indexOfGz(gz);
@@ -15186,7 +15818,7 @@ function buildQimen(input) {
15186
15818
 
15187
15819
 
15188
15820
 
15189
- return { buildSnapshot, wuxingRelation, gatePalaceRelation, stemPalaceRelation, jiXingOf, ruMuOf, liuYiRuMuOf, QIMEN_CONDITION_TABLES, monthState, monthElementOf, groupByState, QIMEN_STATE_TABLES, xunShouLiuYi, buildQimen };
15821
+ return { QIMEN_JU_TABLE, QIMEN_BASE_TABLES, buildSnapshot, wuxingRelation, gatePalaceRelation, stemPalaceRelation, jiXingOf, ruMuOf, liuYiRuMuOf, QIMEN_CONDITION_TABLES, monthState, monthElementOf, groupByState, QIMEN_STATE_TABLES, xunShouLiuYi, buildQimen };
15190
15822
  })();
15191
15823
 
15192
15824
  __mods['qimen-interpret'] = (function () {
@@ -19258,36 +19890,36 @@ const KNOWLEDGE = [
19258
19890
  system: 'qimen', dims: ['overall'],
19259
19891
  gist: '冬至后阳遁、夏至后阴遁,局数由节气与三元定。',
19260
19892
  detail: '一年分阴阳两遁,各九局;局数取决于当前节气与上中下三元(符头定元)。取局流派有拆补、超神接气、置闰三种,同一时刻可能排出不同局数——这不是算错,是流派差异。',
19261
- source: '《烟波钓叟歌》;拆补与置闰见《奇门遁甲统宗》',
19893
+ source: '《烟波钓叟歌》;拆补与置闰见《奇门遁甲统宗》;符头定三元与二十四节气局数见《奇门遁甲元灵经》卷一;超神接气与阳遁仪顺奇逆见《奇门遁甲秘笈大全》总序',
19262
19894
  status: 'variant',
19263
- note: '三种取局法在节气交接前后差异最明显,本插件同时实现三种,可在参数里指定。',
19895
+ note: '三种取局法在节气交接前后差异最明显,本插件同时实现三种,可在参数里指定。元灵经卷一「阴阳各局」的二十四节气三元局数与引擎表逐格相符(24/24),三元符头「甲己干加子午卯酉为上元」亦与引擎定局口径同;秘笈总序「符速节迟…用超神之法,节先符后…行节气之方」正是超神与接气两名的由来。',
19264
19896
  },
19265
19897
  {
19266
19898
  id: 'qimen-jixing',
19267
19899
  system: 'qimen', dims: ['overall', 'work'],
19268
19900
  gist: '六仪落刑宫叫击刑,是宫位条件不是判决。',
19269
19901
  detail: '六仪按所配地支相刑:甲子戊落震三(子刑卯)、甲戌己落坤二(戌刑未)、甲申庚落艮八(申刑寅)、甲午辛落离九(午自刑)、甲辰壬落巽四(辰自刑)、甲寅癸落巽四(寅刑巳)。天盘六仪落到自己那一宫即击刑,取象是受制、掣肘、旧账翻出来,多用来量这个符号本身使不使得上力。',
19270
- source: '《烟波钓叟歌》刑格注;《奇门遁甲统宗》',
19902
+ source: '《烟波钓叟歌》刑格注;《奇门遁甲统宗》;六仪配旬首见《奇门遁甲元灵经》卷一,落宫表见《奇门遁甲秘笈大全》卷十五·六仪刑击格',
19271
19903
  status: 'variant',
19272
- note: '有流派只论天盘六仪击刑,也有把地盘一并算的;本插件只判天盘,且只作宫位条件,不自动断用神受制。',
19904
+ note: '有流派只论天盘六仪击刑,也有把地盘一并算的;本插件只判天盘,且只作宫位条件,不自动断用神受制。秘笈卷十五「甲子戊直符加三宫,甲戌己值符加二宫,甲申庚加八宫,甲午辛加九宫,甲辰壬加四宫,甲寅癸值符加四宫」与引擎六格逐一相符。',
19273
19905
  },
19274
19906
  {
19275
19907
  id: 'qimen-rumu',
19276
19908
  system: 'qimen', dims: ['overall'],
19277
19909
  gist: '天盘干落墓宫叫入墓:三奇与六仪各按五行墓库判。',
19278
19910
  detail: '按五行墓库推,乙、丁两个阴干从《玄机赋》逆行取墓说:乙墓戌(乾六)、丙墓戌(乾六)、丁墓丑(艮八);六仪中戊墓戌(乾六)、己庚墓丑(艮八)、辛壬墓辰(巽四)、癸墓未(坤二)。天盘干落到自己的墓宫即入墓。取象是收束、藏起来、事情压住不动;好坏要看所问之事——问收藏、问了结,入墓未必是坏事。',
19279
- source: '《奇门遁甲统宗》三奇入墓条;阴干逆行取墓见其中「玄机赋」;六仪入墓见《奇门遁甲秘笈大全》卷十五;五行墓库见《五行大义》',
19911
+ source: '《奇门遁甲统宗》三奇入墓条;阴干逆行取墓见其中「玄机赋」;三奇入墓歌见《奇门遁甲秘笈大全》卷十五(同卷时墓格只戊、壬、丙三句与本盘相符,辛、乙两句相异);五行墓库见《五行大义》',
19280
19912
  status: 'variant',
19281
- note: '各家对入墓范围说法不一:有只论三奇,也有把六仪、八门、九星一并论墓的;本插件判天盘三奇与六仪,八门、九星暂不入墓。墓宫取法同样有异说——通行另有一说按五行墓库直取(乙 木墓未、丁 火墓戌),本盘依《玄机赋》阴干逆行说(乙墓戌、丁墓丑),与引擎 qimen.js 的 RU_MU 表同源。',
19913
+ note: '各家对入墓范围说法不一:有只论三奇,也有把六仪、八门、九星一并论墓的;本插件判天盘三奇与六仪,八门、九星暂不入墓。墓宫取法同样有异说——通行另有一说按五行墓库直取(乙 木墓未、丁 火墓戌),本盘依《玄机赋》阴干逆行说(乙墓戌、丁墓丑),与引擎 qimen.js 的 RU_MU 表同源。秘笈卷十五「三奇入墓歌」作乙丙临乾、丁临艮,与本盘三奇同;但同卷「时墓格」作辛丑墓艮、乙未墓坤,与本盘辛墓辰巽、乙墓戌乾不同,「奇墓格」又作乙到临坤——一书之内三说并存,照录并列,不拿它改引擎表。',
19282
19914
  },
19283
19915
  {
19284
19916
  id: 'qimen-ganying',
19285
19917
  system: 'qimen', dims: ['overall', 'work'],
19286
19918
  gist: '十干克应看天盘干加地盘干:同宫两干相遇,先取成象,再与门星神合看。',
19287
19919
  detail: '十干克应把天盘干与地盘干的组合收成 100 组,每组一个格名与一段取象。例如甲加丙「青龙返首」主大吉大利,甲加庚「值符飞宫」主吉事不成,乙加辛「青龙逃走」主失财逃亡。它回答的是「这两股气碰在一起像什么」,不单独回答「事情成不成」;同一组落在不同门、星、神与旺衰下,轻重会变。',
19288
- source: '《奇门十干应克》通行 100 组表;《奇门遁甲元灵经》卷二「天盘加地盘吉凶」存甲、乙、丙三组异文',
19920
+ source: '《奇门十干应克》通行 100 组表;《奇门遁甲元灵经》卷二「天盘加地盘吉凶」存甲、乙、丙三组异文;格名与取象另见《奇门遁甲秘笈大全》总序',
19289
19921
  status: 'variant',
19290
- note: '100 组表各家措辞不一,本插件取通行表;元灵经只存三组且文字不同,两本并列、不合并。十干克应只作取象,不自动折吉凶。',
19922
+ note: '100 组表各家措辞不一,本插件取通行表;元灵经只存三组(各 9 条,三组都缺「加戊」,页面到丙加癸为止)且文字不同,两本并列、不合并。元灵经甲加甲「吉凶不定,惟看门如何。门吉则吉,门凶则凶」正是本卡「先取成象、再与门星神合看」的原文依据;同格异文如青龙返首(总序作「反首」)、乙加辛青龙逃走三处断语各别(财物废坠/主财失逃亡/奴仆拐带六畜皆伤)。已录原文只证这几组与这一层口径,不证 100 组表全文。十干克应只作取象,不自动折吉凶。',
19291
19923
  },
19292
19924
  {
19293
19925
  id: 'qimen-wangshuai',
@@ -19302,9 +19934,9 @@ const KNOWLEDGE = [
19302
19934
  system: 'qimen', dims: ['overall', 'work'],
19303
19935
  gist: '旺衰是助力,不单独定吉凶:门旺而宫克门仍受制。',
19304
19936
  detail: '月令旺衰只回答「这个符号自身有多少气」,不回答「事情成不成」。取象时要和宫位关系叠起来看:门旺但同宫门克宫(门迫),力量被宫位掣肘;门囚但宫生门,仍得宫助。星同理,旺星落宫若被克,也难全其用。',
19305
- source: '《奇门遁甲统宗》;《烟波钓叟歌》门宫生克注',
19937
+ source: '《奇门遁甲统宗》;《烟波钓叟歌》门宫生克注;「门尅宫为迫,宫尅门为制,门生宫为和,宫生门为义」见《奇门遁甲秘笈大全》卷十五·迫制和义格,八门迫宫见同卷门迫歌;休门到离为迫见《奇门遁甲元灵经》卷二·八门值事',
19306
19938
  status: 'variant',
19307
- note: '有流派按时令而非月令论门星旺衰,也有以落宫五行当令者;本插件统一按月支五行判,并在解读里明确只作强度参考。',
19939
+ note: '有流派按时令而非月令论门星旺衰,也有以落宫五行当令者;本插件统一按月支五行判,并在解读里明确只作强度参考。门宫四类关系(迫/制/和/义)与引擎 gatePalaceRelation 一一对应,门迫歌八格全是门克宫、逐格对拍相符;古籍在迫制之后直接下吉凶(「吉门被迫吉不就,凶门被迫祸重重」),本插件只取落宫条件,不自动折吉凶。',
19308
19940
  },
19309
19941
  {
19310
19942
  id: 'qimen-gan-shengke',
@@ -19924,6 +20556,22 @@ const CITATION_BOOKS = {
19924
20556
  author: '清·官修(页首未署撰人)',
19925
20557
  base: 'https://www.luckclub.cn/qimen/007/',
19926
20558
  },
20559
+ // ── B14 新增书目(2026-11-08):把覆盖表里「只有书名」的三项升级成有原文
20560
+ yichuan: {
20561
+ name: '易传',
20562
+ author: '佚名(战国至秦汉解易论文集,本页未署撰人)',
20563
+ base: 'https://www.luckclub.cn/yijing/002/', // 本站只存系辞上下、说卦、序卦、杂卦五篇,彖象文言未收
20564
+ },
20565
+ yuanling: {
20566
+ name: '奇门遁甲元灵经',
20567
+ author: '清·隐溪居士(序末自署光绪九年癸未)',
20568
+ base: 'https://www.luckclub.cn/qimen/005/',
20569
+ },
20570
+ miji: {
20571
+ name: '奇门遁甲秘笈大全',
20572
+ author: '旧题汉·诸葛亮撰、明·刘伯温辑(分类页所载,正文未署)',
20573
+ base: 'https://www.luckclub.cn/qimen/003/', // 又名《金函奇门遁甲秘笈全书》《奇门大全》;页内「干」即乾、「直符」即值符
20574
+ },
19927
20575
  };
19928
20576
 
19929
20577
  // 引文定位表:id / 书名 / 卷章 / 链接。原文照录与本站自撰白话在 citations-fuwen.js。
@@ -20941,6 +21589,109 @@ const CITATIONS = [
20941
21589
  chapter: '卷下 集说篇',
20942
21590
  url: 'https://www.luckclub.cn/daliuren/003/004/',
20943
21591
  },
21592
+ // ── B14:奇门两本「只有书名」升级为有原文(2026-11-08,逐句过底本子串)
21593
+ // 这 16 条不是泛泛补书史:每一条都对得上引擎已有的一张表或一层判定,且逐格对拍过——
21594
+ // 元灵经卷一 24 节气三元局数 == JU_NUMBERS_MAP(24/24);三元符头 == 引擎定局说明;
21595
+ // 卷一六仪配旬首 == XUN_SHOU_TO_FULL_MAP;卷二「惟看门如何」正是克应卡「不单独断吉凶」的原文依据;
21596
+ // 秘笈卷十五六仪刑击格 == JI_XING(6/6);门迫歌八格全是门克宫;迫制和义格 == gatePalaceRelation 前四类;
21597
+ // 三奇入墓歌乙丙临乾丁临艮 == RU_MU;时墓格只戊壬丙三句相符、辛乙两句相异,照实并列不代改。
21598
+ // 易传十篇与本站判定层对不上(方位表只在 fengshui.js,而地相无知识卡),全部走附文库只入索引页。
21599
+ {
21600
+ id: 'yl-yinyang',
21601
+ book: 'yuanling',
21602
+ chapter: '卷一·阴阳遁',
21603
+ url: 'https://www.luckclub.cn/qimen/005/004/',
21604
+ },
21605
+ {
21606
+ id: 'yl-jushu',
21607
+ book: 'yuanling',
21608
+ chapter: '卷一·阴阳各局(附一卦管三节)',
21609
+ url: 'https://www.luckclub.cn/qimen/005/004/',
21610
+ },
21611
+ {
21612
+ id: 'yl-futou',
21613
+ book: 'yuanling',
21614
+ chapter: '卷一·三元符头',
21615
+ url: 'https://www.luckclub.cn/qimen/005/004/',
21616
+ },
21617
+ {
21618
+ id: 'yl-liuyi',
21619
+ book: 'yuanling',
21620
+ chapter: '卷一·六仪',
21621
+ url: 'https://www.luckclub.cn/qimen/005/004/',
21622
+ },
21623
+ {
21624
+ id: 'yl-ganying-jia',
21625
+ book: 'yuanling',
21626
+ chapter: '卷二·天盘加地盘吉凶',
21627
+ url: 'https://www.luckclub.cn/qimen/005/005/',
21628
+ },
21629
+ {
21630
+ id: 'yl-ganying-bing',
21631
+ book: 'yuanling',
21632
+ chapter: '卷二·天盘加地盘吉凶',
21633
+ url: 'https://www.luckclub.cn/qimen/005/005/',
21634
+ },
21635
+ {
21636
+ id: 'yl-ganying-yixin',
21637
+ book: 'yuanling',
21638
+ chapter: '卷二·天盘加地盘吉凶',
21639
+ url: 'https://www.luckclub.cn/qimen/005/005/',
21640
+ },
21641
+ {
21642
+ id: 'yl-bamen',
21643
+ book: 'yuanling',
21644
+ chapter: '卷二·八门值事',
21645
+ url: 'https://www.luckclub.cn/qimen/005/005/',
21646
+ },
21647
+ {
21648
+ id: 'mj-jiuxing',
21649
+ book: 'miji',
21650
+ chapter: '卷十五·六仪刑击格',
21651
+ url: 'https://www.luckclub.cn/qimen/003/015/',
21652
+ },
21653
+ {
21654
+ id: 'mj-menpo',
21655
+ book: 'miji',
21656
+ chapter: '卷十五·门迫歌',
21657
+ url: 'https://www.luckclub.cn/qimen/003/015/',
21658
+ },
21659
+ {
21660
+ id: 'mj-pozhi',
21661
+ book: 'miji',
21662
+ chapter: '卷十五·迫制和义格',
21663
+ url: 'https://www.luckclub.cn/qimen/003/015/',
21664
+ },
21665
+ {
21666
+ id: 'mj-rumu',
21667
+ book: 'miji',
21668
+ chapter: '卷十五·三奇入墓歌',
21669
+ url: 'https://www.luckclub.cn/qimen/003/015/',
21670
+ },
21671
+ {
21672
+ id: 'mj-shimu',
21673
+ book: 'miji',
21674
+ chapter: '卷十五·时墓格',
21675
+ url: 'https://www.luckclub.cn/qimen/003/015/',
21676
+ },
21677
+ {
21678
+ id: 'mj-ganying',
21679
+ book: 'miji',
21680
+ chapter: '总序',
21681
+ url: 'https://www.luckclub.cn/qimen/003/001/',
21682
+ },
21683
+ {
21684
+ id: 'mj-futou',
21685
+ book: 'miji',
21686
+ chapter: '总序',
21687
+ url: 'https://www.luckclub.cn/qimen/003/001/',
21688
+ },
21689
+ {
21690
+ id: 'mj-yinyang',
21691
+ book: 'miji',
21692
+ chapter: '总序',
21693
+ url: 'https://www.luckclub.cn/qimen/003/001/',
21694
+ },
20944
21695
  ];
20945
21696
 
20946
21697
  const BOOK_OF = {
@@ -21045,13 +21796,18 @@ const CARD_CITATIONS = {
21045
21796
  // ── 其他体系
21046
21797
  'meihua-tiyong': { refs: ['mh-tiyong', 'mh-tiyong-shengke', 'mh-dongjing'] },
21047
21798
  'daliuren-sike': { refs: ['dl-jigong', 'dl-zeike', 'rty-sike', 'rzn-rushi', 'rzn-richen', 'rg-tigang', 'b13-rty-sike', 'b13-rty-jiuke'] },
21048
- 'qimen-yinyang': { refs: ['qm-yinyang', 'qmf-yinyang', 'ydq-liuyi'] },
21049
- 'qimen-jixing': { refs: ['qm-jixing'] },
21050
- 'qimen-rumu': { refs: ['qm-rumu'] },
21799
+ 'qimen-yinyang': { refs: ['qm-yinyang', 'qmf-yinyang', 'ydq-liuyi', 'yl-yinyang', 'yl-jushu', 'yl-futou', 'mj-futou', 'mj-yinyang'] },
21800
+ 'qimen-jixing': { refs: ['qm-jixing', 'yl-liuyi', 'mj-jiuxing'] },
21801
+ 'qimen-rumu': { refs: ['qm-rumu', 'mj-rumu', 'mj-shimu'] },
21051
21802
  'qimen-wangshuai': { refs: ['qm-wangshuai'] },
21052
- 'qimen-wangshuai-yong': { refs: ['qm-men-gong'] },
21803
+ 'qimen-wangshuai-yong': { refs: ['qm-men-gong', 'yl-bamen', 'mj-menpo', 'mj-pozhi'] },
21053
21804
  'qimen-gan-shengke': { status: 'general', book: '奇门遁甲统宗', chapter: '卷十二·玄机赋(下)', reason: '底本有「奇仪与日干」生克条,未见单列「干与落宫」生克条;干宫取象为通行读法,不拿十神条文冒充' },
21054
- 'qimen-ganying': { status: 'general', book: '奇门十干应克 / 奇门遁甲元灵经', chapter: '通行 100 组表 / 卷二·天盘加地盘吉凶', reason: '100 组为通行表汇编,元灵经只存甲、乙、丙三组,非单条原文' },
21805
+ // B14:原为 general(「100 组表非单条原文」)。元灵经卷二「天盘加地盘吉凶」与秘笈总序录到原文后改 refs,
21806
+ // 但 refs 只证「先取成象、再与门星神合看」这一层口径与甲丙/乙辛等组的格名异文,不证通行 100 组表全文。
21807
+ 'qimen-ganying': {
21808
+ refs: ['yl-ganying-jia', 'yl-ganying-bing', 'yl-ganying-yixin', 'mj-ganying'],
21809
+ note: '元灵经卷二「天盘加地盘吉凶」只存天盘甲、乙、丙三组(各 9 条,三组都缺「加戊」,页面到「丙加地盘癸」为止,丁以下七组未收),秘笈总序另举六组格名;已录原文只证「先取成象、再与门星神合看」这一层口径与这几组的格名异文,不证通行 100 组表全文,其余七十馀组仍取通行表汇编、无单条原文。三处同格异文(青龙返首/反首、青龙逃走的三种断语)并列,不合并。',
21810
+ },
21055
21811
  'tarot-orientation': { status: 'general', book: '韦特塔罗', chapter: '逆位读法', reason: '韦特体系无中文古籍原文,逆位读法属近代流派' },
21056
21812
  'tarot-correspondence': { status: 'general', book: 'Liber 777 一脉的公开对应表', chapter: '小阿卡纳 2-10 的旬位与十源质', reason: '属近代西方神秘学对应表,无中文古籍原文;本插件按三处独立公开资料互核后取数字牌旬位,宫廷牌两派映射冲突故不配星座' },
21057
21813
  };
@@ -21612,7 +22368,7 @@ function baziInterpret(r) {
21612
22368
  `**用神**:喜${join(favor) || '—'}(${join(ys.favorRoles || []) || '—'}),忌${join(avoid) || '—'}(${join(ys.avoidRoles || []) || '—'})。${neutral.length ? `(${join(neutral.map((n) => n.element))} 近零,按中性偏忌看)` : ''}${frameToneOf(level, favorRolesByWeight)}`,
21613
22369
  `**格局**:${primary}(${pick(frame.primary, 'evidence', '')})${(Array.isArray(frame.geju) ? frame.geju : []).filter((g) => g.name && g.name !== primary).length
21614
22370
  ? `,另有${frame.geju.map((g) => g.name).filter((n) => n && n !== primary).join('、')}`
21615
- : ''}。`,
22371
+ : ''}${frame.patternScore && frame.patternScore.applicable ? `。成格评分 ${frame.patternScore.score}/100(${frame.patternScore.grade})` : ''}。`,
21616
22372
  ].join('\n');
21617
22373
 
21618
22374
  const portraitText = [
@@ -21770,20 +22526,60 @@ function baziInterpret(r) {
21770
22526
  }] : []),
21771
22527
  {
21772
22528
  key: 'geju', label: '格局依据',
21773
- text: (Array.isArray(frame.geju) ? frame.geju : []).map((g) =>
21774
- `${g.name}(${g.kind}${g.status ? `·${g.status}` : ''}):${g.evidence}${Array.isArray(g.breaks) && g.breaks.length ? `;破:${g.breaks.join(';')}` : ''}`).join(';') || '未取到格局',
22529
+ text: ((Array.isArray(frame.geju) ? frame.geju : []).map((g) =>
22530
+ `${g.name}(${g.kind}${g.status ? `·${g.status}` : ''}):${g.evidence}${Array.isArray(g.breaks) && g.breaks.length ? `;破:${g.breaks.join(';')}` : ''}`).join(';') || '未取到格局')
22531
+ + (frame.patternScore ? `\n成格评分:${frame.patternScore.detail}` : ''),
21775
22532
  },
22533
+ ...(frame.bingyao ? [{
22534
+ key: 'bingyao', label: '病药',
22535
+ text: `【${frame.bingyao.level}】${frame.bingyao.detail}\n口径:${frame.bingyao.method}`,
22536
+ }] : []),
22537
+ ...(frame.xianshen ? [{
22538
+ key: 'xianshen', label: '闲神',
22539
+ text: `【${frame.xianshen.level}】${frame.xianshen.detail}\n口径:${frame.xianshen.method}`,
22540
+ }] : []),
22541
+ (() => {
22542
+ const ss = r.shensha;
22543
+ const cols = { year: '年', month: '月', day: '日', hour: '时' };
22544
+ if (!ss || !Array.isArray(ss.groups) || !ss.groups.length) {
22545
+ return {
22546
+ key: 'shensha', label: '神煞',
22547
+ text: '本盘未见常用神煞。按炳祥课里的口径,神煞是枝叶,只作锦上添花,不单独定吉凶;真正的吉凶仍看格局、旺衰与行运。',
22548
+ };
22549
+ }
22550
+ const names = Array.isArray(ss.names) ? ss.names : [];
22551
+ const rows = ss.groups.map((g) => `${g.cat}:${(g.items || []).map((it) => {
22552
+ const where = (it.pillars || []).map((k) => cols[k] || k).join('、');
22553
+ return `${it.name}${where ? `(${where})` : ''}`;
22554
+ }).join('、')}`).join(';');
22555
+ const core = ['驿马', '羊刃', '桃花', '华盖'].filter((n) => names.includes(n));
22556
+ const hasTianyi = names.includes('天乙贵人');
22557
+ return {
22558
+ key: 'shensha', label: '神煞',
22559
+ text: `命中神煞:${rows}。\n`
22560
+ + '按炳祥课里的口径,真正拿来取象的只有驿马、羊刃、桃花、华盖四颗'
22561
+ + `${core.length ? `,本盘见 ${core.join('、')}` : ',本盘这四颗都未见'}`
22562
+ + ';其余一律只作锦上添花。'
22563
+ + (hasTianyi
22564
+ ? '天乙贵人尤其是添头:课里给的口径是「无贵人概率 5/6⁴ < 50%,单独断贵人准确率 <30%」,不能拿来定吉凶。'
22565
+ : '天乙贵人即使出现也只是添头:课里统计其单独断贵人准确率 <30%,不能拿来定吉凶。')
22566
+ + '\n神煞永远是枝叶:它只提示「像不像」,不决定「成不成」。吉凶仍以格局、旺衰、喜忌与行运为主,神煞不参与本盘的旺衰与格局判定。',
22567
+ };
22568
+ })(),
21776
22569
  ...(Array.isArray(r.classics) && r.classics.length ? [{
21777
22570
  key: 'classics', label: '古籍原文',
21778
22571
  text: r.classics.map((e) => `《${CLASSIC_BOOKS[e.book].name}·${e.chapter}》「${e.quote}」——${e.plain}`).join('\n'),
21779
22572
  }] : []),
21780
22573
  {
21781
22574
  key: 'quant', label: '量化口径',
21782
- text: `本报告的量化只到「档位」:事业看十神权重(${topName} ${top[0]?.[1] ?? '—'})、财富看财星权重(${groups['财'] ?? 0})、感情看配偶星权重(${spouseKey} ${groups[spouseKey] ?? 0});大运/流年用「大吉 / 吉 / 平 / 忌」四档。不换算金额、不给健康诊断——那需要地域、家庭、行业与体检数据,命盘本身推不出来。`,
22575
+ text: `本报告的量化只到「档位」:事业看十神权重(${topName} ${top[0]?.[1] ?? '—'})、财富看财星权重(${groups['财'] ?? 0})、感情看配偶星权重(${spouseKey} ${groups[spouseKey] ?? 0});大运/流年用「大吉 / 吉 / 平 / 忌」四档。不换算金额、不给健康诊断——那需要地域、家庭、行业与体检数据,命盘本身推不出来。`
22576
+ + (r.strength?.weightPct
22577
+ ? `\n宫位权重(炳祥课里干 2/5/0/3、支 11/36/27/16 的百分比视图):${r.strength.weightPct.detail}。这组数只说明四柱各占多少,不改上面的旺衰评分。`
22578
+ : ''),
21783
22579
  },
21784
22580
  {
21785
22581
  key: 'limits', label: '未纳入',
21786
- text: '本盘没有计算:流月与流日、神煞的加权轻重、地支藏干的动态引化(合冲后再论)。取用按「调候优先、扶抑校验」;调候由月令与全局寒暖燥湿判定,并按《穷通宝鉴》120 格给出用神顺序(整理表口径,原文摘句照录,异文处已标 note);各派取法仍有分歧;真太阳时未含历史时区与夏令时。把这些补上会改变"强弱"的边际判断,所以这里只给方向,不下断语。',
22582
+ text: '本盘没有计算:流月与流日、神煞的分值折算(解读侧只按课里口径作降权提示,不折成分值)、地支藏干的动态引化(合冲后再论)。取用按「调候优先、扶抑校验」;调候由月令与全局寒暖燥湿判定,并按《穷通宝鉴》120 格给出用神顺序(整理表口径,原文摘句照录,异文处已标 note);各派取法仍有分歧;真太阳时未含历史时区与夏令时。把这些补上会改变"强弱"的边际判断,所以这里只给方向,不下断语。',
21787
22583
  },
21788
22584
  ];
21789
22585
 
@@ -28339,7 +29135,7 @@ return { interpret, DIRECTIONS, DIRECTION_DEFAULT, BRIGHTNESS, flowOf, parseDate
28339
29135
  })();
28340
29136
 
28341
29137
  window.Engine = __mods.index;
28342
- window.__MP_VER = "0.62.4";
29138
+ window.__MP_VER = "0.62.5";
28343
29139
  </script>
28344
29140
  <script>
28345
29141
  // 两个 UI 共用的表单规则:宿主面板(src/app.js)与独立页(src/web-ui.js)。