dsh-metaphysics 0.50.1 → 0.55.0

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.
package/engine/bazi.js CHANGED
@@ -93,7 +93,8 @@ export function buildRelations(pillars) {
93
93
  const b = stems[j];
94
94
  if (a === b) continue;
95
95
  const he = STEM_HE[a + b] || STEM_HE[b + a];
96
- if (he) { stemOut.push({ text: `${a}${b}合化${he}`, rank: 0 }); continue; }
96
+ // 五合只是「有合」;是否真化要看月令、化神与争合妒合,不在这一层断言
97
+ if (he) { stemOut.push({ text: `${a}${b}合(化${he}待定)`, rank: 0 }); continue; }
97
98
  if (hasPair(STEM_CHONG_PAIRS, a, b)) { stemOut.push({ text: `${a}${b}相冲`, rank: 1 }); continue; }
98
99
  const ea = STEM_ELEMENT[a];
99
100
  const eb = STEM_ELEMENT[b];
@@ -547,6 +548,16 @@ export function buildBazi(input) {
547
548
  } else if (tianKeDiChong(w.ganzhi, l.ganzhi)) {
548
549
  signals.push({ type: '运年反吟', target: `第${w.step}步大运`, detail: `大运${w.ganzhi}与流年${l.ganzhi}天克地冲` });
549
550
  }
551
+ // 大运与本命四柱的伏吟/反吟:整步大运都在,逐年列出,不按流年另算一次
552
+ for (const key of ['year', 'month', 'day', 'hour']) {
553
+ const g = pillars[key].ganzhi;
554
+ if (!g) continue;
555
+ if (w.ganzhi === g) {
556
+ signals.push({ type: '大运伏吟', target: `第${w.step}步大运·${NATAL_LABEL[key]}`, detail: `大运${w.ganzhi}与${NATAL_LABEL[key]}同干支` });
557
+ } else if (tianKeDiChong(w.ganzhi, g)) {
558
+ signals.push({ type: '大运反吟', target: `第${w.step}步大运·${NATAL_LABEL[key]}`, detail: `大运${w.ganzhi}与${NATAL_LABEL[key]}${g}天克地冲` });
559
+ }
560
+ }
550
561
  }
551
562
  for (const key of ['year', 'month', 'day', 'hour']) {
552
563
  const g = pillars[key].ganzhi;
@@ -560,7 +571,7 @@ export function buildBazi(input) {
560
571
  l.suiyun = {
561
572
  dayun: active.map((w) => ({ step: w.step, ganzhi: w.ganzhi })),
562
573
  signals,
563
- note: '只标干支重复与天克地冲这类变动信号,不判吉凶;大运按该年立春到次年立春的区间取,交运落在年内时前后两步并列',
574
+ note: '只标干支重复与天克地冲这类变动信号,不判吉凶;大运按该年立春到次年立春的区间取,交运落在年内时前后两步并列;大运与本命四柱的伏吟/反吟整步大运都在,逐年重复列出',
564
575
  };
565
576
  }
566
577