dsh-metaphysics 0.46.5 → 0.50.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.
- package/CHANGELOG.md +148 -0
- package/README.md +18 -11
- package/client.js +1075 -78
- package/docs/assets/dsh-metaphysics-group.jpg +0 -0
- package/engine/almanac.js +7 -6
- package/engine/bazi.js +73 -1
- package/engine/classics.js +53 -3
- package/engine/crosscheck.js +29 -3
- package/engine/diff.js +301 -197
- package/engine/geju.js +78 -14
- package/engine/index.js +112 -10
- package/engine/interpret-knowledge.js +19 -10
- package/engine/interpret-plain.js +19 -3
- package/engine/interpret.js +46 -6
- package/engine/liuyao.js +100 -0
- package/index.js +12 -2
- package/package.json +2 -2
- package//345/221/275/347/220/206/346/216/222/347/233/230.html +1082 -99
- package/docs/assets/dsh-metaphysics-group.png +0 -0
|
Binary file
|
package/engine/almanac.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
// 提供:农历日期、年/月/日干支(年按立春界,另列春节界生肖)、节气、建除十二神、
|
|
4
4
|
// 冲煞(冲什么生肖 / 煞在何方)、财神与喜神方位、建除简表宜忌、每日一卦。
|
|
5
5
|
//
|
|
6
|
-
// 诚实边界:本插件不依赖 lunar-javascript
|
|
7
|
-
//
|
|
8
|
-
//
|
|
6
|
+
// 诚实边界:本插件不依赖 lunar-javascript;逐日全量吉神凶煞与彭祖百忌未收录——
|
|
7
|
+
// 输出里如实标注「未收录」,不臆造。值日十二神、二十八宿、胎神、吉神方位按通行表收录
|
|
8
|
+
// (见返回值的 scope)。宜忌只按「建除十二神」通行简表给出(传统择日的第一层判据),
|
|
9
|
+
// 不是逐日全量黄历。
|
|
9
10
|
import { solarToLunar } from './lunar.js';
|
|
10
11
|
import { nayinOf } from './nayin.js';
|
|
11
12
|
import {
|
|
@@ -110,7 +111,7 @@ export function tianShenOf(branch, anchorBranch) {
|
|
|
110
111
|
return { name, type, luck: type === '黄道' ? '吉' : '凶' };
|
|
111
112
|
}
|
|
112
113
|
|
|
113
|
-
/** 二十八宿:值日宿按「日支 +
|
|
114
|
+
/** 二十八宿:值日宿按「日支 + 星期」轮转(四组各七宿)。宿名按通行「宿·五行·动物」写法(壁水貐、胃土雉)。 */
|
|
114
115
|
export const MANSIONS = {
|
|
115
116
|
角: { luck: '吉', zheng: '木', animal: '蛟', gong: '东' }, 亢: { luck: '凶', zheng: '金', animal: '龙', gong: '东' },
|
|
116
117
|
氐: { luck: '凶', zheng: '土', animal: '貉', gong: '东' }, 房: { luck: '吉', zheng: '日', animal: '兔', gong: '东' },
|
|
@@ -118,9 +119,9 @@ export const MANSIONS = {
|
|
|
118
119
|
箕: { luck: '吉', zheng: '水', animal: '豹', gong: '东' }, 斗: { luck: '吉', zheng: '木', animal: '獬', gong: '北' },
|
|
119
120
|
牛: { luck: '凶', zheng: '金', animal: '牛', gong: '北' }, 女: { luck: '凶', zheng: '土', animal: '蝠', gong: '北' },
|
|
120
121
|
虚: { luck: '凶', zheng: '日', animal: '鼠', gong: '北' }, 危: { luck: '凶', zheng: '月', animal: '燕', gong: '北' },
|
|
121
|
-
室: { luck: '吉', zheng: '火', animal: '猪', gong: '北' }, 壁: { luck: '吉', zheng: '水', animal: '
|
|
122
|
+
室: { luck: '吉', zheng: '火', animal: '猪', gong: '北' }, 壁: { luck: '吉', zheng: '水', animal: '貐', gong: '北' },
|
|
122
123
|
奎: { luck: '凶', zheng: '木', animal: '狼', gong: '西' }, 娄: { luck: '吉', zheng: '金', animal: '狗', gong: '西' },
|
|
123
|
-
胃: { luck: '吉', zheng: '土', animal: '
|
|
124
|
+
胃: { luck: '吉', zheng: '土', animal: '雉', gong: '西' }, 昴: { luck: '凶', zheng: '日', animal: '鸡', gong: '西' },
|
|
124
125
|
毕: { luck: '吉', zheng: '月', animal: '乌', gong: '西' }, 觜: { luck: '凶', zheng: '火', animal: '猴', gong: '西' },
|
|
125
126
|
参: { luck: '吉', zheng: '水', animal: '猿', gong: '西' }, 井: { luck: '吉', zheng: '木', animal: '犴', gong: '南' },
|
|
126
127
|
鬼: { luck: '凶', zheng: '金', animal: '羊', gong: '南' }, 柳: { luck: '凶', zheng: '土', animal: '獐', gong: '南' },
|
package/engine/bazi.js
CHANGED
|
@@ -28,6 +28,24 @@ export const HIDDEN_STEMS = {
|
|
|
28
28
|
亥: ['壬', '甲'],
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
// 人元司权的 30 日表:余气 → 中气 → 本气,按「节」当日起算。
|
|
32
|
+
// 各家对日数分法不一(另有 7/7/16、9/3/18 等),这里固定通行 30 日表;
|
|
33
|
+
// 只作解释层的一层细节,不参与取格。亥月的余气戊不在本柱藏干表中,两表各照原样。
|
|
34
|
+
export const RENYUAN_TABLE = {
|
|
35
|
+
寅: [['戊', 7], ['丙', 7], ['甲', 16]],
|
|
36
|
+
卯: [['甲', 10], ['乙', 20]],
|
|
37
|
+
辰: [['乙', 9], ['癸', 3], ['戊', 18]],
|
|
38
|
+
巳: [['戊', 5], ['庚', 9], ['丙', 16]],
|
|
39
|
+
午: [['丙', 10], ['己', 9], ['丁', 11]],
|
|
40
|
+
未: [['丁', 9], ['乙', 3], ['己', 18]],
|
|
41
|
+
申: [['戊', 7], ['壬', 3], ['庚', 20]],
|
|
42
|
+
酉: [['庚', 10], ['辛', 20]],
|
|
43
|
+
戌: [['辛', 9], ['丁', 3], ['戊', 18]],
|
|
44
|
+
亥: [['戊', 7], ['甲', 5], ['壬', 18]],
|
|
45
|
+
子: [['壬', 10], ['癸', 20]],
|
|
46
|
+
丑: [['癸', 9], ['辛', 3], ['己', 18]],
|
|
47
|
+
};
|
|
48
|
+
|
|
31
49
|
export const STEM_ELEMENT = {
|
|
32
50
|
甲: '木', 乙: '木', 丙: '火', 丁: '火', 戊: '土',
|
|
33
51
|
己: '土', 庚: '金', 辛: '金', 壬: '水', 癸: '水',
|
|
@@ -204,6 +222,45 @@ export function applyTrueSolar(jd, longitude) {
|
|
|
204
222
|
};
|
|
205
223
|
}
|
|
206
224
|
|
|
225
|
+
/**
|
|
226
|
+
* 人元司权:生在本月第几日、哪一藏干当权。
|
|
227
|
+
* 日数按「节令日」与出生日的日差计,节当日为第 1 日;固定 30 日表,
|
|
228
|
+
* 第 31 日以后不再硬分摊,按本气算并标 beyond。
|
|
229
|
+
* @param {string} monthBranch 月支(寅…丑)
|
|
230
|
+
* @param {number} birthJdn 出生日的儒略日数(含真太阳时修正后的日)
|
|
231
|
+
* @param {number} termJd 本月「节」的儒略日
|
|
232
|
+
*/
|
|
233
|
+
export function renyuanOf(monthBranch, birthJdn, termJd) {
|
|
234
|
+
const table = RENYUAN_TABLE[monthBranch];
|
|
235
|
+
if (!table) return null;
|
|
236
|
+
const segments = [];
|
|
237
|
+
let from = 1;
|
|
238
|
+
for (const [stem, days] of table) {
|
|
239
|
+
segments.push({ stem, element: STEM_ELEMENT[stem], from, to: from + days - 1 });
|
|
240
|
+
from += days;
|
|
241
|
+
}
|
|
242
|
+
const tableDays = from - 1;
|
|
243
|
+
const day = Math.max(1, Math.floor(birthJdn) - Math.floor(termJd + 0.5) + 1);
|
|
244
|
+
const beyond = day > tableDays;
|
|
245
|
+
const idx = beyond ? segments.length - 1 : segments.findIndex((s) => day >= s.from && day <= s.to);
|
|
246
|
+
const seg = segments[idx] || segments[segments.length - 1];
|
|
247
|
+
const next = segments[idx + 1] || null;
|
|
248
|
+
return {
|
|
249
|
+
month: monthBranch,
|
|
250
|
+
day,
|
|
251
|
+
tableDays,
|
|
252
|
+
segments,
|
|
253
|
+
active: seg.stem,
|
|
254
|
+
activeElement: seg.element,
|
|
255
|
+
segment: { from: seg.from, to: seg.to },
|
|
256
|
+
next: next ? { stem: next.stem, element: next.element, from: next.from, inDays: next.from - day } : null,
|
|
257
|
+
// 司权表与本柱藏干表口径不同:亥月的余气戊只出现在司权表里
|
|
258
|
+
inHidden: (HIDDEN_STEMS[monthBranch] || []).includes(seg.stem),
|
|
259
|
+
beyond,
|
|
260
|
+
note: '人元司权按「节」当日起算,节当日为第 1 日,日差用本盘所用时刻(含真太阳时)所在日计;本插件固定 30 日表(余气 → 中气 → 本气),第 31 日以后按本气算。只作解释层的一层细节,不改取格。',
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
|
|
207
264
|
/**
|
|
208
265
|
* 排四柱八字
|
|
209
266
|
* @param {object} input { year,month,day,hour,minute, gender:'male'|'female', longitude?, lateZi?:boolean, trueSolar?:boolean }
|
|
@@ -490,6 +547,16 @@ export function buildBazi(input) {
|
|
|
490
547
|
} else if (tianKeDiChong(w.ganzhi, l.ganzhi)) {
|
|
491
548
|
signals.push({ type: '运年反吟', target: `第${w.step}步大运`, detail: `大运${w.ganzhi}与流年${l.ganzhi}天克地冲` });
|
|
492
549
|
}
|
|
550
|
+
// 大运与本命四柱的伏吟/反吟:整步大运都在,逐年列出,不按流年另算一次
|
|
551
|
+
for (const key of ['year', 'month', 'day', 'hour']) {
|
|
552
|
+
const g = pillars[key].ganzhi;
|
|
553
|
+
if (!g) continue;
|
|
554
|
+
if (w.ganzhi === g) {
|
|
555
|
+
signals.push({ type: '大运伏吟', target: `第${w.step}步大运·${NATAL_LABEL[key]}`, detail: `大运${w.ganzhi}与${NATAL_LABEL[key]}同干支` });
|
|
556
|
+
} else if (tianKeDiChong(w.ganzhi, g)) {
|
|
557
|
+
signals.push({ type: '大运反吟', target: `第${w.step}步大运·${NATAL_LABEL[key]}`, detail: `大运${w.ganzhi}与${NATAL_LABEL[key]}${g}天克地冲` });
|
|
558
|
+
}
|
|
559
|
+
}
|
|
493
560
|
}
|
|
494
561
|
for (const key of ['year', 'month', 'day', 'hour']) {
|
|
495
562
|
const g = pillars[key].ganzhi;
|
|
@@ -503,7 +570,7 @@ export function buildBazi(input) {
|
|
|
503
570
|
l.suiyun = {
|
|
504
571
|
dayun: active.map((w) => ({ step: w.step, ganzhi: w.ganzhi })),
|
|
505
572
|
signals,
|
|
506
|
-
note: '
|
|
573
|
+
note: '只标干支重复与天克地冲这类变动信号,不判吉凶;大运按该年立春到次年立春的区间取,交运落在年内时前后两步并列;大运与本命四柱的伏吟/反吟整步大运都在,逐年重复列出',
|
|
507
574
|
};
|
|
508
575
|
}
|
|
509
576
|
|
|
@@ -526,6 +593,10 @@ export function buildBazi(input) {
|
|
|
526
593
|
const bodyStemIdx = (yinStem + ((bodyIdx - 2 + 12) % 12)) % 10;
|
|
527
594
|
const shengong = ganzhiName(sexagenaryIndex(bodyStemIdx, bodyIdx));
|
|
528
595
|
|
|
596
|
+
// 人元司权:按节令到出生日的日差定当权藏干(节当日为第 1 日)
|
|
597
|
+
const renyuan = renyuanOf(BRANCHES[monthBranchIdx], jdnBase, prevJieTerm.jd);
|
|
598
|
+
if (renyuan) renyuan.term = { name: prevJieTerm.name, time: formatJd(prevJieTerm.jd) };
|
|
599
|
+
|
|
529
600
|
return {
|
|
530
601
|
system: 'bazi',
|
|
531
602
|
relations: buildRelations(pillars),
|
|
@@ -558,6 +629,7 @@ export function buildBazi(input) {
|
|
|
558
629
|
// 与 NAOJ 历要项对拍实测节气最多偏 13.5 分钟,20 分钟留出余量。
|
|
559
630
|
nearBoundaryMinutes: Math.round(Math.min(jd - prevJieTerm.jd, nextJieTerm.jd - jd) * 1440),
|
|
560
631
|
},
|
|
632
|
+
renyuan,
|
|
561
633
|
pillars,
|
|
562
634
|
dayMaster: { stem: dayStem, element: STEM_ELEMENT[dayStem], yinYang: isYangStem(dayStem) ? '阳' : '阴' },
|
|
563
635
|
wuxing,
|
package/engine/classics.js
CHANGED
|
@@ -121,6 +121,16 @@ export const CLASSICS = [
|
|
|
121
121
|
plain: '成格不等于一路顺:成中带忌(官逢财又逢伤、官被合之类)就打了折;败格也未必无救——印来解伤、合来清煞,败中还能转成。',
|
|
122
122
|
url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53629.html',
|
|
123
123
|
},
|
|
124
|
+
{
|
|
125
|
+
id: 'zp-zaji',
|
|
126
|
+
book: 'ziping',
|
|
127
|
+
chapter: '十六、论杂气如何取用',
|
|
128
|
+
scene: '用神',
|
|
129
|
+
tags: [],
|
|
130
|
+
quote: '何谓透干?如甲生辰月,透戊则用偏财,透癸则用正印,透乙则用月劫是也。何谓会支?如甲生辰月,逢申与子会局,则用水印是也。一透则一用,兼透则兼用,透而又会,则透与会并用。',
|
|
131
|
+
plain: '四墓(辰戌丑未)所藏不止一气,所以叫杂气:取用先看哪一藏干透到天干,透一个用一个;没有透干,再看地支有没有与月支会成三合局,会成什么局就取局中那一气。透干与会支同时成立时两样并用。原文对「兼透」只给原则,没有给取舍次序。',
|
|
132
|
+
url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53636.html',
|
|
133
|
+
},
|
|
124
134
|
{
|
|
125
135
|
id: 'zp-bianhua',
|
|
126
136
|
book: 'ziping',
|
|
@@ -397,6 +407,33 @@ export const CLASSICS = [
|
|
|
397
407
|
plain: '从财格要财会成局、日干无气;一见根气就破格,原文用「命损无猜」这种重话写明。以丁生酉月、柱多庚辛为例:只能弃命相从,行北方财官旺地为入格,南行则灾。',
|
|
398
408
|
url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7652.html',
|
|
399
409
|
},
|
|
410
|
+
// —— 三命通会 · 总论岁运:岁运提示一节的原文出处。
|
|
411
|
+
// 原文的「返吟 / 伏吟」按「岁运与日柱相对 / 岁运压日」说,与本插件「干支相同为伏吟、天克地冲为反吟」
|
|
412
|
+
// 不是同一套定义;口径照本插件,原文照录不改写,两者在 plain 里并列说明。
|
|
413
|
+
// 这一条不进五条上限的取条表:它只在盘面有岁运信号时随「岁运提示」一起出现。
|
|
414
|
+
{
|
|
415
|
+
id: 'smt-suiyun',
|
|
416
|
+
book: 'sanming',
|
|
417
|
+
chapter: '卷二·总论岁运',
|
|
418
|
+
scene: '岁运',
|
|
419
|
+
tags: [],
|
|
420
|
+
quote: '行运以生月为运元,最怕行运与太岁冲克,若岁运冲月必祸;若岁运与日相对,谓之返吟,岁运压日,谓之伏吟,二者不利六亲,非横破财,不为吉兆。',
|
|
421
|
+
plain: '大运以生月为起点,最怕与流年(太岁)冲克:原文说岁运冲月为祸,又把「岁运与日柱相对」叫返吟、「岁运压日」叫伏吟。这两句是按「对日柱」说的,与本插件「干支相同为伏吟、天克地冲为反吟」不是同一套定义(本插件取后者);末句「不利六亲、破财」是旧说的重话,只作变动提示,不作断语。',
|
|
422
|
+
url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7539.html',
|
|
423
|
+
},
|
|
424
|
+
// —— 三命通会 · 卷二 · 论人元司事:人元司权一节的原文出处。
|
|
425
|
+
// 此本的日数分法与本插件采用的通行 30 日表不同(寅月作 5/5/20、卯月作 7/23,本插件作 7/7/16 与 10/20),
|
|
426
|
+
// 两表各照原样并列,不改判。与「总论岁运」一样,不进五条上限的取条表:只在人元司权一节随结果出现。
|
|
427
|
+
{
|
|
428
|
+
id: 'smt-renyuan',
|
|
429
|
+
book: 'sanming',
|
|
430
|
+
chapter: '卷二·论人元司事',
|
|
431
|
+
scene: '人元',
|
|
432
|
+
tags: [],
|
|
433
|
+
quote: '故支吕所藏者主命,谓之人元,名为司事之神,以命术言之为月令。如正月建寅,寅中有艮土用事五日,丙火长生五日,甲木二十日;二月建卯,卯中有甲木用事七日,乙木二十三日;',
|
|
434
|
+
plain: '地支所藏为「人元」,按月令分日轮值。三命通会这一本给的是另一套日数:寅月艮土(戊土)五日、丙火五日、甲木二十日,卯月甲七日、乙二十三日。它与本插件采用的通行 30 日表(寅月戊7丙7甲16,即 7/7/16;卯月甲10乙20,即 10/20)不是同一套分法;两表各照原样并列,本插件仍按通行表给「第几日谁当权」,不改取格。',
|
|
435
|
+
url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7529.html',
|
|
436
|
+
},
|
|
400
437
|
];
|
|
401
438
|
|
|
402
439
|
const BY_ID = CLASSICS.reduce((m, e) => { m[e.id] = e; return m; }, {});
|
|
@@ -433,6 +470,14 @@ export function classicOf(id) {
|
|
|
433
470
|
return BY_ID[id] || null;
|
|
434
471
|
}
|
|
435
472
|
|
|
473
|
+
// 岁运提示的原文:盘面出现岁运并临 / 运年反吟 / 流年伏吟反吟时随该节给出,不占五条上限。
|
|
474
|
+
// 没有信号就不给——这段原文讲的正是冲克,没冲没克时挂出来只会误导。
|
|
475
|
+
export function suiyunClassicOf(r) {
|
|
476
|
+
const liunian = r && Array.isArray(r.liunian) ? r.liunian : [];
|
|
477
|
+
const hit = liunian.some((l) => l && l.suiyun && Array.isArray(l.suiyun.signals) && l.suiyun.signals.length);
|
|
478
|
+
return hit ? classicOf('smt-suiyun') : null;
|
|
479
|
+
}
|
|
480
|
+
|
|
436
481
|
function tagOf(gejuName) {
|
|
437
482
|
const name = String(gejuName || '');
|
|
438
483
|
if (GEJU_KEY[name]) return GEJU_KEY[name];
|
|
@@ -451,7 +496,8 @@ function chapterTitle(e) {
|
|
|
451
496
|
}
|
|
452
497
|
|
|
453
498
|
// 根据一张八字结果挑原文:特殊结构(专旺/从格)先取单章,再月令格(子平真诠 + 三命通会对照),
|
|
454
|
-
//
|
|
499
|
+
// 再调候(寒暖/燥湿),最后「用神总纲」一位按盘四选一:有化气格取论用神变化、辰戌丑未月取论杂气如何取用、
|
|
500
|
+
// 见组合取论用神成败救应、其余取通用总纲;去重、限量。
|
|
455
501
|
export function classicsFor(r, limit = 5) {
|
|
456
502
|
if (!r) return [];
|
|
457
503
|
const out = [];
|
|
@@ -489,12 +535,16 @@ export function classicsFor(r, limit = 5) {
|
|
|
489
535
|
if (tgEntry) {
|
|
490
536
|
push(tgEntry, `本盘忌${tg.foe}克用${tg.use},局中${tg.bridge}${tg.weight}分可作通关,故取${CLASSIC_BOOKS.ditian.name}「通关」一条`);
|
|
491
537
|
}
|
|
492
|
-
//
|
|
493
|
-
//
|
|
538
|
+
// 用神总纲位只放一条,按盘四选一:化气看「变化」、四墓杂气看「杂气取用」、有组合看「成败救应」,
|
|
539
|
+
// 都没有才回到四吉四凶总纲。不另加位次,是因为格局两条 + 气候两条正好占满 5 条上限。
|
|
494
540
|
const huagi = gejuList.find((g) => g && g.kind === '化气格');
|
|
495
541
|
const combo = gejuList.find((g) => g && g.kind === '组合');
|
|
542
|
+
const monthBranch = r.monthBranch || (r.frame && r.frame.monthBranch) || (r.pillars && r.pillars.month && r.pillars.month.branch);
|
|
543
|
+
const zaMonth = ['辰', '未', '戌', '丑'].includes(monthBranch);
|
|
496
544
|
if (huagi) {
|
|
497
545
|
push(classicOf('zp-bianhua'), `本盘列有「${huagi.name}」:用神由月令合化而变,总纲一位改取${CLASSIC_BOOKS.ziping.name}论用神变化`);
|
|
546
|
+
} else if (zaMonth) {
|
|
547
|
+
push(classicOf('zp-zaji'), `月令${monthBranch}属四墓杂气,取用先看透干、再看会支,总纲一位取${CLASSIC_BOOKS.ziping.name}论杂气如何取用`);
|
|
498
548
|
} else if (combo) {
|
|
499
549
|
push(classicOf('zp-chengbai'), `本盘另有「${combo.name}」组合:成格还要看带忌与救应,总纲一位改取${CLASSIC_BOOKS.ziping.name}论用神成败救应`);
|
|
500
550
|
} else {
|
package/engine/crosscheck.js
CHANGED
|
@@ -106,16 +106,33 @@ export function crossCheck(bazi, zw) {
|
|
|
106
106
|
const bad = ['忌', '大忌'];
|
|
107
107
|
const baziGood = good.includes(t);
|
|
108
108
|
const baziBad = bad.includes(t);
|
|
109
|
+
const baziKnown = t !== '—';
|
|
109
110
|
const ziweiHeavy = sha >= 2;
|
|
111
|
+
const ziweiKnown = !!d;
|
|
110
112
|
let stance = '有张力';
|
|
111
|
-
let note = '
|
|
112
|
-
if (
|
|
113
|
+
let note = '';
|
|
114
|
+
if (!baziKnown || !ziweiKnown) {
|
|
115
|
+
// 一边没取到就谈不上「同向 / 有张力」——只并列现有的一侧,并写清缺的是哪边
|
|
116
|
+
stance = '互补';
|
|
117
|
+
const missing = !baziKnown && !ziweiKnown
|
|
118
|
+
? '八字当前大运与紫微当前大限都没取到'
|
|
119
|
+
: !baziKnown
|
|
120
|
+
? `八字当前大运未取到(${t}),只有紫微一侧可参考`
|
|
121
|
+
: '紫微当前大限未取到,只有八字一侧可参考';
|
|
122
|
+
note = `${missing}:这一项只作提醒,不下两边对照的结论`;
|
|
123
|
+
} else if (baziGood && ziweiHeavy) {
|
|
124
|
+
note = '八字这边顺、紫微大限煞星偏多:大方向可参考八字,具体动作按紫微标出的位置收一收';
|
|
125
|
+
} else if (baziBad && !ziweiHeavy) {
|
|
126
|
+
note = '八字这边偏紧、紫微大限没见到明显煞星:先按八字收着走,紫微一侧的平静不等于没有压力';
|
|
127
|
+
} else if (!baziGood && !baziBad && ziweiHeavy) {
|
|
128
|
+
note = '八字大运为平、紫微大限煞星偏多:只把紫微这一侧当作提醒,不据此判断阶段好坏';
|
|
129
|
+
} else {
|
|
113
130
|
stance = '同向';
|
|
114
131
|
note = '两边对当前阶段的松紧判断接近';
|
|
115
132
|
}
|
|
116
133
|
push('rhythm', '当前节奏',
|
|
117
134
|
`大运档位 ${t}`,
|
|
118
|
-
|
|
135
|
+
d ? `大限在${d.palace}${sha ? `;煞星 ${sha} 颗` : ';无煞星'}` : '大限未取到',
|
|
119
136
|
stance, note);
|
|
120
137
|
}
|
|
121
138
|
|
|
@@ -131,3 +148,12 @@ export function crossText(cross) {
|
|
|
131
148
|
.map((i) => `· ${i.label}:八字——${i.bazi};紫微——${i.ziwei};判断:${i.stance}(${i.note})`)
|
|
132
149
|
.join('\n');
|
|
133
150
|
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 交叉验证分节。文本给 Markdown/工具输出,items 给面板画对照卡——
|
|
154
|
+
* 同一份数据两个去处,免得面板再去拆文本。
|
|
155
|
+
*/
|
|
156
|
+
export function crossSection(cross) {
|
|
157
|
+
const items = cross && Array.isArray(cross.items) ? cross.items : [];
|
|
158
|
+
return { key: 'crossSystem', label: '八字 × 紫微 交叉验证', text: crossText(cross), items };
|
|
159
|
+
}
|