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.
@@ -1,546 +1,559 @@
1
- // 古籍原文库:《子平真诠》《滴天髓》《三命通会》里与「格局取用」「十神喜忌」「寒暖燥湿」直接相关的条目。
2
- // 三命通会另收专旺五格与弃命从财/从煞七篇——这是三书里仅有的「专旺 / 从格」可整段照录的专章。
3
- // 十神篇里正财、偏财分开立章,故两格各取本格一条;七杀没有单列专章,取卷五「官煞去留杂论」。
4
- // 原文照录(公共版权:清·沈孝瞻《子平真诠》、明·京图《滴天髓》、明·万民英《三命通会》通行本),仅供文化研究与参考。
5
- // 出处以中华典藏网在线本为准(逐条给 url),异文处不合并、不改写;plain 是本站自撰白话,不是原文。
6
-
7
- export const CLASSIC_BOOKS = {
8
- ziping: { name: '子平真诠', author: '清·沈孝瞻', base: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/' },
9
- ditian: { name: '滴天髓', author: '明·京图(通行本)', base: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/' },
10
- sanming: { name: '三命通会', author: '明·万民英', base: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/' },
11
- };
12
-
13
- export const CLASSICS = [
14
- {
15
- id: 'zp-yongshen',
16
- book: 'ziping',
17
- chapter: '八、论用神',
18
- scene: '用神',
19
- tags: [],
20
- quote: '八字用神,专求月令,以日干配月令地支,而生克不同,格局分焉。财官印食,此用神之善而顺用之者也;煞伤劫刃,用神之不善而逆用之者也。',
21
- plain: '用神从月令里找:财、官、印、食四吉神顺用(生之护之),煞、伤、劫、刃四凶神逆用(制之化之)。',
22
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53628.html',
23
- },
24
- {
25
- id: 'zp-zhenguan',
26
- book: 'ziping',
27
- chapter: '三十一、论正官',
28
- scene: '格局',
29
- tags: ['正官'],
30
- quote: '以刑冲破害为忌,则以生之护之为喜矣。存其喜而去其忌则贵,而贵之中又有高低者,何也?',
31
- plain: '正官格最忌刑冲破害,喜财生官、印护官;去忌存喜才谈得上贵,贵的层次还要看财印是否并透、有无伤官七煞混杂。',
32
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53651.html',
33
- },
34
- {
35
- id: 'zp-cai',
36
- book: 'ziping',
37
- chapter: '三十三、论财',
38
- scene: '格局',
39
- tags: ['财', '正财', '偏财'],
40
- quote: '财为我克,使用之物也,以能生官,所以为美。为财帛,为妻妾,为才能,为驿马,皆财类也。',
41
- plain: '财是我所克、能为我用之物,因能生官而美;它同时代表钱财、配偶、才能、走动,不只「钱」一项。',
42
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53653.html',
43
- },
44
- {
45
- id: 'zp-yin',
46
- book: 'ziping',
47
- chapter: '三十五、论印绶',
48
- scene: '格局',
49
- tags: ['印'],
50
- quote: '印绶喜其生身,正偏同为美格,故财与印不分偏正,同为一格而论之。',
51
- plain: '印能生身,正印偏印都算美格,不分偏正而论;印格的关键在身印强弱与官杀、食伤、财的配合。',
52
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53655.html',
53
- },
54
- {
55
- id: 'zp-shishen',
56
- book: 'ziping',
57
- chapter: '三十七、论食神',
58
- scene: '格局',
59
- tags: ['食神'],
60
- quote: '食神本属泄气,以其能生正财,所以喜之。故食神生财,美格也。财要有根,不必偏正叠出,如身强食旺而财透,大贵之格。',
61
- plain: '食神本是泄气,可贵在能生财;食神生财要财有根,身强、食旺、财透三者齐,格局才大。',
62
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53657.html',
63
- },
64
- {
65
- id: 'zp-pianguan',
66
- book: 'ziping',
67
- chapter: '三十九、论偏官',
68
- scene: '格局',
69
- tags: ['七杀', '偏官'],
70
- quote: '煞以攻身,似非美物,百大贵之格,多存七煞。盖控制得宜,煞为我用,如大英雄大豪杰,似难驾驭,而处之有方,则惊天动地之功,忽焉而就。',
71
- plain: '七煞攻身,看着不美,但大贵之格多有七煞——能控制住就为我所用,像驾驭豪杰,处之有方就能成大事。',
72
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53659.html',
73
- },
74
- {
75
- id: 'zp-shangguan',
76
- book: 'ziping',
77
- chapter: '四十一、论伤官',
78
- scene: '格局',
79
- tags: ['伤官'],
80
- quote: '伤官虽非吉神,实为秀气,故文人学士,多于伤官格内得之。而夏木见水,冬金见火,则又为秀之尤秀者也。',
81
- plain: '伤官不是吉神,却是秀气所在,文人多出伤官格;夏木得水、冬金得火,是秀气里更秀的两种。',
82
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53661.html',
83
- },
84
- {
85
- id: 'zp-yangren',
86
- book: 'ziping',
87
- chapter: '四十三、论阳刃',
88
- scene: '格局',
89
- tags: ['劫财', '阳刃'],
90
- quote: '阳刃者,劫我正财之神,乃正财之七煞也。禄前一位,惟五阳有之,故为阳刃。不曰劫而曰刃,劫之甚也。刃宜伏制,官煞皆宜,财印相随,尤为贵显。',
91
- plain: '阳刃是劫财之极(只有五阳干有),宜用官煞制伏;财印相随而不相碍,格局更显。',
92
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53663.html',
93
- },
94
- {
95
- id: 'zp-lujie',
96
- book: 'ziping',
97
- chapter: '四十五、论建禄月劫',
98
- scene: '格局',
99
- tags: ['比肩', '建禄', '月劫'],
100
- quote: '故建禄与月劫,可同一格,不必加分,皆以透干支,别取财官煞食为用。',
101
- plain: '建禄、月劫同看一格,月令本身不算用神,要另看透出的财官煞食取用。',
102
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53665.html',
103
- },
104
- {
105
- id: 'zp-qihou',
106
- book: 'ziping',
107
- chapter: '十四、论用神配气候得失',
108
- scene: '调候',
109
- tags: [],
110
- quote: '论命惟以月令用神为主,然亦须配气候而互参之。譬如英雄豪杰,生得其时,自然事半功倍;遭时不顺,虽有奇才,成功不易。',
111
- plain: '月令用神为主,但必须配气候参看;同样的格局,生在得时的气候里事半功倍,逆着气候就费劲。',
112
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53634.html',
113
- },
114
- {
115
- id: 'zp-chengbai',
116
- book: 'ziping',
117
- chapter: '九、论用神成败救应',
118
- scene: '格局',
119
- tags: [],
120
- quote: '成中有败,必是带忌;败中有成,全凭救应。',
121
- plain: '成格不等于一路顺:成中带忌(官逢财又逢伤、官被合之类)就打了折;败格也未必无救——印来解伤、合来清煞,败中还能转成。',
122
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53629.html',
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
- },
134
- {
135
- id: 'zp-bianhua',
136
- book: 'ziping',
137
- chapter: '十、论用神变化',
138
- scene: '格局',
139
- tags: [],
140
- quote: '故若丁生亥月,本为正官,支全卯未,则化为印。己生申月,本属伤官。藏庚透壬,则化为财。凡此之类皆用神之变化也。',
141
- plain: '用神本从月令取,但月令藏干不一:丁生亥月本为正官,支会卯未就化为印;己生申月本属伤官,庚藏壬透就化为财。起点相同,合化一变,取用也跟着变(原文只说变化之由,不断定某盘必化)。',
142
- url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53630.html',
143
- },
144
- {
145
- id: 'dt-hannuan',
146
- book: 'ditian',
147
- chapter: '通神论·寒暖',
148
- scene: '调候',
149
- tags: [],
150
- quote: '天道有寒暖,生育万物,人道行之,不可过也。',
151
- plain: '天有寒暖才能生养万物,人命里寒暖也不能过——过寒过热都要调。',
152
- url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
153
- },
154
- {
155
- id: 'dt-zaoshi',
156
- book: 'ditian',
157
- chapter: '通神论·燥湿',
158
- scene: '调候',
159
- tags: [],
160
- quote: '地道有燥湿,生成品汇,人道得之,不可偏也。',
161
- plain: '地有燥湿才有品类生成,人命得燥湿之气也不能偏。',
162
- url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
163
- },
164
- {
165
- id: 'dt-shuaiwang',
166
- book: 'ditian',
167
- chapter: '通神论·衰旺',
168
- scene: '调候',
169
- tags: [],
170
- quote: '能知旺衰之真机,其于三命之奥,思过半矣。',
171
- plain: '真正看懂旺衰的机关,命理之奥就过了一半——旺衰不是数个数,要看真机。',
172
- url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
173
- },
174
- {
175
- id: 'dt-zhonghe',
176
- book: 'ditian',
177
- chapter: '通神论·中和',
178
- scene: '调候',
179
- tags: [],
180
- quote: '既识中和之正理,而于五行之妙,有全能焉。',
181
- plain: '懂得中和的道理,五行的妙处就都在其中了。',
182
- url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
183
- },
184
- {
185
- id: 'dt-guansha',
186
- book: 'ditian',
187
- chapter: '通神论·官杀',
188
- scene: '十神',
189
- tags: ['正官', '七杀'],
190
- quote: '官杀混杂来问我,有可有不可。',
191
- plain: '官杀混杂不是一律不好,要看能不能去留取清。',
192
- url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
193
- },
194
- {
195
- id: 'dt-shangguan',
196
- book: 'ditian',
197
- chapter: '通神论·伤官',
198
- scene: '十神',
199
- tags: ['伤官'],
200
- quote: '伤官见官最难辨,可见不可见。',
201
- plain: '伤官见官是最难分辨的一条:有的能见,有的不能见,不能一句「伤官见官为祸百端」了事。',
202
- url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
203
- },
204
- {
205
- id: 'dt-yueling',
206
- book: 'ditian',
207
- chapter: '通神论·月令',
208
- scene: '用神',
209
- tags: [],
210
- quote: '月令乃提纲之府,譬之宅也,人元为用事之神,宅之定向也,不可以不卜。',
211
- plain: '月令像宅子,藏干是用事之神,像宅子的朝向,必须细看。',
212
- url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
213
- },
214
- {
215
- id: 'dt-tiyong',
216
- book: 'ditian',
217
- chapter: '通神论·体用',
218
- scene: '用神',
219
- tags: [],
220
- quote: '道有体用,不可以一端论也,要在扶之抑之得其宜。',
221
- plain: '体用不能只看一头,关键是扶抑得宜。',
222
- url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
223
- },
224
- {
225
- id: 'dt-jingshen',
226
- book: 'ditian',
227
- chapter: '通神论·精神',
228
- scene: '用神',
229
- tags: [],
230
- quote: '人有精神,不可以一偏求也,要在损之益之得其中。',
231
- plain: '看精神不能偏执一端,要在损益之间求其中。',
232
- url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
233
- },
234
- {
235
- id: 'dt-tongguan',
236
- book: 'ditian',
237
- chapter: '通神论·通关',
238
- scene: '用神',
239
- tags: [],
240
- quote: '关内有织女,关外有牛郎,此关若通也,相邀入洞房。',
241
- plain: '两股力隔着一道关相望:一边织女、一边牛郎,中间若有一行能把两边接上(一方生它、它再生另一方),对峙就化成相生。原文只给取象,哪一行为关要按五行生克定。',
242
- url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
243
- },
244
- // —— 三命通会(明·万民英):同一组十神,子平真诠说「怎么用」,三命通会说「怎么取、怕什么」。
245
- // 两书并列取用,按同一 tag 各取一条对照读,不合并、不裁定谁对。
246
- {
247
- id: 'smt-zhenguan',
248
- book: 'sanming',
249
- chapter: '卷五·论正官',
250
- scene: '格局',
251
- tags: ['正官'],
252
- quote: '正官者,乃甲见辛、乙见庚之例。阴阳配合,相制有用,成其道也。故正官为六格之首,止许一位,多则不宜。',
253
- plain: '正官取「克我而阴阳相配」,有制而能成用;六格以正官居首,只宜一位,多见就杂。',
254
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7582.html',
255
- },
256
- {
257
- id: 'smt-zhengcai',
258
- book: 'sanming',
259
- chapter: '卷六·论正财',
260
- scene: '格局',
261
- tags: ['财', '正财'],
262
- quote: '正财者,乃甲见己、乙见戊之例。受我克制,为我之妻,譬人娶妻,妻赍财嫁我,我必精神康强,而后可享用,若衰微不振,虽妻财丰厚,但能目视,终不得用。',
263
- plain: '正财是我克制之物,古人以「娶妻带财」作比:自身精神康强才受用得起,身弱不振,财再厚也只是看着。',
264
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7645.html',
265
- },
266
- {
267
- id: 'smt-piancai',
268
- book: 'sanming',
269
- chapter: '卷六·论偏财',
270
- scene: '格局',
271
- tags: ['财', '偏财'],
272
- quote: '何谓偏财?乃甲见戊、乙见己之例。非妻所带,乃众人之财也。切忌有姊妹兄弟分夺,柱无官星,祸患百出。',
273
- plain: '偏财取「我克而阴阳不同」:不是妻家带来的私财,而是众人之财,宜流通不宜独占。原文最忌比肩劫财来分夺,又说柱中无官星则多事(旧说的重话照录,本插件只记原文、不作断语)。',
274
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7650.html',
275
- },
276
- {
277
- id: 'smt-yinshou',
278
- book: 'sanming',
279
- chapter: '卷六·论印绶',
280
- scene: '格局',
281
- tags: ['印'],
282
- quote: '印绶者,乃五行生我之名。如甲乙在亥子月,丙丁在寅卯月之类,乃我气之源,为生气,为父母,能护我官星,使无伤克',
283
- plain: '印是生我之气,像源头与父母:它能护住官星,使官不受伤克;反过来说,印重就怕财来破。',
284
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7655.html',
285
- },
286
- {
287
- id: 'smt-shishen',
288
- book: 'sanming',
289
- chapter: '卷六·论食神',
290
- scene: '格局',
291
- tags: ['食神'],
292
- quote: '凡命遇财煞之地,食神旺相,煞被食制,不敢为祸,财被食生,充裕不竭,故食神一名寿星,一名爵星,良有以也。',
293
- plain: '食神旺,一头制煞、一头生财:煞被制住不敢为祸,财被生起不至枯竭;所以食神又叫寿星、爵星。',
294
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7663.html',
295
- },
296
- {
297
- id: 'smt-shangguan',
298
- book: 'sanming',
299
- chapter: '卷六·论伤官',
300
- scene: '格局',
301
- tags: ['伤官'],
302
- quote: '伤官虽凶,乃我所生,自家之物,伤尽则能生财,财旺则能生官,造化展转有情。',
303
- plain: '伤官虽称凶,却是我自己生出来的:伤尽(柱中不见官星)反能生财,财旺再生官,辗转还是有情。',
304
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7662.html',
305
- },
306
- {
307
- id: 'smt-yangren',
308
- book: 'sanming',
309
- chapter: '卷六·论阳刃',
310
- scene: '格局',
311
- tags: ['阳刃', '劫财'],
312
- quote: '阳者,阴阳之阳,刃者,刀刃之刃,即禄前一位,言旺越其分,故险。',
313
- plain: '阳刃指禄前一位,旺过了本分,所以险;甲丙戊庚壬五阳干才有刃,阴干见伤官同论。',
314
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7671.html',
315
- },
316
- {
317
- id: 'smt-jianlu',
318
- book: 'sanming',
319
- chapter: '卷六·论建禄',
320
- scene: '格局',
321
- tags: ['建禄', '比肩', '月劫'],
322
- quote: '凡命月令建禄,难招祖业,必主平生见财不聚,却病少寿长,行运再见比肩,克妻妨父损子',
323
- plain: '月令建禄是日主临官之地,身旺而财官难取:古说难承祖业、见财不聚,但病少寿长;再走比肩运,古书说克妻妨父损子(属于旧说的重话,本插件只记原文、不作断语)。',
324
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7672.html',
325
- },
326
- // 此本三命通会没有单列的「论偏官」章,七煞与正官混见的情形收在卷五「官煞去留杂论」;
327
- // 七杀格的三命对照取这一篇,章名照录,不改写成「论偏官」。
328
- {
329
- id: 'smt-guansha-liu',
330
- book: 'sanming',
331
- chapter: '卷五·官煞去留杂论',
332
- scene: '格局',
333
- tags: ['七杀', '偏官'],
334
- quote: '凡看去留,要详柱中官煞孰重孰轻,天干透者易去,月支所藏者难去,须伤官食神去官煞之物众而有力,方才去得。',
335
- plain: '官煞混见时先比谁重谁轻:天干透出的容易去,月支藏着的难去;用来去官煞的伤官食神要成众、有根有力,才真去得掉。七杀格遇正官混杂,就按这一篇看取舍。',
336
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7599.html',
337
- },
338
- // —— 三命通会 · 专旺五格与弃命从格:单章原文,专供「专旺格 / 从格」直接在结果里读。
339
- // 原文的条件比「身强」二字细:要局全、要带印或带火炼金、要防冲刑死绝。照录不分拆。
340
- {
341
- id: 'smt-quzhi',
342
- book: 'sanming',
343
- chapter: '卷六·曲直',
344
- scene: '格局',
345
- tags: ['曲直格', '专旺'],
346
- quote: '甲乙日得亥卯未局,柱中须有亥字带印为入格,若无亥有卯,止是木之本气,却要见金土为贵,既无亥字,又无金土,则木不秀不实,难以言贵。',
347
- plain: '曲直格要木局成方(亥卯未)且带亥字为印,才算入格;只有卯、没有亥,只是木的本气,得另见金土才谈得上贵;两样都没有,木虽旺而无成,难称贵格。',
348
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7630.html',
349
- },
350
- {
351
- id: 'smt-yanshang',
352
- book: 'sanming',
353
- chapter: '卷六·炎上',
354
- scene: '格局',
355
- tags: ['炎上格', '专旺'],
356
- quote: '丙丁日遇寅午戌局,柱中须有寅字带印为入格,无寅止是九流近贵之命,若火自旺,无亥水相济,不贵。喜东北方运,忌见辰丑戊己,晦火光明,多主眼疾,或患风气,柱有木制成贵,忌水金乡,怕冲。',
357
- plain: '炎上格要火局成方(寅午戌)且带寅字为印才入格;无寅只是偏贵的命。火自旺还要一点水相济,过燥不贵;行运喜东北、忌湿土晦火,也怕冲。原文另带「多主眼疾」一句,属于旧说,本插件只记原文、不作健康判断。',
358
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7631.html',
359
- },
360
- {
361
- id: 'smt-congge',
362
- book: 'sanming',
363
- chapter: '卷六·从革',
364
- scene: '格局',
365
- tags: ['从革格', '专旺'],
366
- quote: '庚辛日见巳酉丑局,须带丙丁巳午一二位方成其器,但不可火多。如辛巳、辛酉、辛丑三日不喜五月生,被火所伤,宜八月或水土养育食神印绶为吉。',
367
- plain: '从革格是金局成方(巳酉丑),但金要火炼才成器:须带丙丁或巳午一二位,火又不能多。辛巳、辛酉、辛丑三日出身在五月(火旺)被伤,原文说宜八月或水土养育。',
368
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7632.html',
369
- },
370
- {
371
- id: 'smt-runxia',
372
- book: 'sanming',
373
- chapter: '卷六·润下',
374
- scene: '格局',
375
- tags: ['润下格', '专旺'],
376
- quote: '壬癸日见申子辰全,忌引卯巳死绝之地,三刑四冲之乡,死绝则不流,冲刑则横流,岁运同。或曰水太泛须柱有土神一两位制之,得成堤岸,既有土怕会木为凶,如有木伤土要金印救解,终是一生成败。',
377
- plain: '润下格是水局三合全(申子辰),最忌卯巳死绝与三刑四冲:死绝水不流,冲刑水横流,行运也一样看。水太泛要一两位土作堤,有土又怕木来破堤,木伤土再用金印解救——原文把成败条件摊开讲。',
378
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7633.html',
379
- },
380
- {
381
- id: 'smt-jiasi',
382
- book: 'sanming',
383
- chapter: '卷六·稼穑',
384
- scene: '格局',
385
- tags: ['稼穑格', '专旺'],
386
- quote: '赋云:戊己忻逢四季,乃为稼穑之名。是戊己生逢季月,喜见木为官,止得一木为妙,木多则土虚,主虚诈为破家不仁之人。',
387
- plain: '稼穑格取戊己生于四季月(辰戌丑未)。原文说喜见一木为官,木多则土虚;后半对木多之人的评语是旧说的重话,本插件只照录条件、不拿来评价人。',
388
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7634.html',
389
- },
390
- {
391
- id: 'smt-congsha',
392
- book: 'sanming',
393
- chapter: '卷五·弃命从煞',
394
- scene: '格局',
395
- tags: ['从杀格'],
396
- quote: '《独步》云:弃命从煞,须要会煞从财,忌煞从煞。盖言从煞格,以煞神太重,身无所归,不得已从之,要行煞旺及财乡,四柱无一点比肩印绶方论,如遇运扶身旺,与煞为敌,从煞不专,故为祸患。',
397
- plain: '从煞格是煞太重、日主无所归才「弃命」相从:条件是四柱没有一点比肩印绶扶身,行运喜煞旺与财乡;一旦走扶身之运,与煞为敌,就从得不专。本插件只作结构说明,不据此断寿夭。',
398
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7598.html',
399
- },
400
- {
401
- id: 'smt-congcai',
402
- book: 'sanming',
403
- chapter: '卷六·弃命从财',
404
- scene: '格局',
405
- tags: ['从财格'],
406
- quote: '《独步》云:弃命从财,须要会财,若逢根气,命损无猜。假如丁生酉月,柱多庚辛,日干无气,只得弃命相从,运入北方财官旺地,乃为入格,南行灾。',
407
- plain: '从财格要财会成局、日干无气;一见根气就破格,原文用「命损无猜」这种重话写明。以丁生酉月、柱多庚辛为例:只能弃命相从,行北方财官旺地为入格,南行则灾。',
408
- url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7652.html',
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
-
426
- const BY_ID = CLASSICS.reduce((m, e) => { m[e.id] = e; return m; }, {});
427
-
428
- // 格局名 → tags 键(本引擎的格局名都带「格」)
429
- const GEJU_KEY = {
430
- 正官格: '正官',
431
- 七杀格: '七杀',
432
- 偏官格: '偏官',
433
- 正财格: '正财',
434
- 偏财格: '偏财',
435
- 正印格: '印',
436
- 偏印格: '印',
437
- 食神格: '食神',
438
- 伤官格: '伤官',
439
- 阳刃格: '阳刃',
440
- 月劫格: '月劫',
441
- 建禄格: '建禄',
442
- };
443
-
444
- // 特殊结构 → 三命通会单章:专旺五格与弃命从财/从煞。
445
- // 从儿(食伤)、从强(印/比劫)三书里没有可整段照录的专章,故不登记、不硬凑。
446
- const SPECIAL_CLASSIC = {
447
- 曲直格: 'smt-quzhi',
448
- 炎上格: 'smt-yanshang',
449
- 从革格: 'smt-congge',
450
- 润下格: 'smt-runxia',
451
- 稼穑格: 'smt-jiasi',
452
- 从财格: 'smt-congcai',
453
- 从杀格: 'smt-congsha',
454
- };
455
-
456
- export function classicOf(id) {
457
- return BY_ID[id] || null;
458
- }
459
-
460
- // 岁运提示的原文:盘面出现岁运并临 / 运年反吟 / 流年伏吟反吟时随该节给出,不占五条上限。
461
- // 没有信号就不给——这段原文讲的正是冲克,没冲没克时挂出来只会误导。
462
- export function suiyunClassicOf(r) {
463
- const liunian = r && Array.isArray(r.liunian) ? r.liunian : [];
464
- const hit = liunian.some((l) => l && l.suiyun && Array.isArray(l.suiyun.signals) && l.suiyun.signals.length);
465
- return hit ? classicOf('smt-suiyun') : null;
466
- }
467
-
468
- function tagOf(gejuName) {
469
- const name = String(gejuName || '');
470
- if (GEJU_KEY[name]) return GEJU_KEY[name];
471
- const bare = name.replace(/格$/, '');
472
- return GEJU_KEY[bare + '格'] || bare;
473
- }
474
-
475
- // 同一 tag 各书取一条:子平真诠在前(讲怎么用),三命通会紧随作对照(讲怎么取、怕什么)
476
- function pick(tag, book) {
477
- return CLASSICS.find((e) => e.scene === '格局' && e.tags.includes(tag) && (!book || e.book === book)) || null;
478
- }
479
-
480
- // 章节名去掉卷次/序号与开头的「论」,避免 why 里拼成「论论财」
481
- function chapterTitle(e) {
482
- return e.chapter.replace(/^.*[、·]/, '').replace(/^论/, '');
483
- }
484
-
485
- // 根据一张八字结果挑原文:特殊结构(专旺/从格)先取单章,再月令格(子平真诠 + 三命通会对照),
486
- // 再调候(寒暖/燥湿),最后「用神总纲」一位按盘四选一:有化气格取论用神变化、辰戌丑未月取论杂气如何取用、
487
- // 见组合取论用神成败救应、其余取通用总纲;去重、限量。
488
- export function classicsFor(r, limit = 5) {
489
- if (!r) return [];
490
- const out = [];
491
- const seen = new Set();
492
- const push = (entry, why) => {
493
- if (!entry || seen.has(entry.id) || out.length >= limit) return;
494
- seen.add(entry.id);
495
- out.push({ ...entry, why });
496
- };
497
- const gejuList = Array.isArray(r.geju) ? r.geju : (r.frame && Array.isArray(r.frame.geju) ? r.frame.geju : []);
498
- // 专旺或从格是这张盘的定义性结构,先占位;命中的单章原文在 5 条上限里不被气候/总纲挤掉。
499
- for (const g of gejuList) {
500
- const entry = g && SPECIAL_CLASSIC[g.name] ? classicOf(SPECIAL_CLASSIC[g.name]) : null;
501
- if (entry) push(entry, `本盘列有「${g.name}」,故取${CLASSIC_BOOKS[entry.book].name}「${chapterTitle(entry)}」一条`);
502
- }
503
- for (const g of gejuList) {
504
- if (!g || (g.kind && g.kind !== '月令格')) continue;
505
- const tag = tagOf(g.name);
506
- const primary = pick(tag, 'ziping') || pick(tag);
507
- if (primary) push(primary, `你的月令格局是「${g.name}」,故取${CLASSIC_BOOKS[primary.book].name}「${chapterTitle(primary)}」一条`);
508
- const alt = CLASSICS.find((e) => e.scene === '格局' && e.tags.includes(tag) && (!primary || e.book !== primary.book));
509
- if (alt) push(alt, `同是「${g.name}」,${CLASSIC_BOOKS[alt.book].name}「${chapterTitle(alt)}」另有取法,可对照读`);
510
- }
511
- const cli = r.climate || (r.frame && r.frame.yongshen && (r.frame.yongshen.climate || r.frame.yongshen.tiaohou));
512
- const tg = r.frame && r.frame.yongshen && r.frame.yongshen.tongguan;
513
- const tgEntry = tg && tg.usable ? classicOf('dt-tongguan') : null;
514
- if (cli && cli.kind && cli.kind !== '平和') {
515
- const cold = !!(cli.cold || cli.kind.indexOf('寒') >= 0);
516
- const hot = !!(cli.hot || cli.kind.indexOf('热') >= 0);
517
- push(classicOf(cold ? 'dt-hannuan' : 'dt-zaoshi'), `本盘气候判为「${cli.kind}」,故取${CLASSIC_BOOKS.ditian.name}寒暖燥湿一条`);
518
- // 「用神配气候」是泛论;有可通的通关结构时把这一位让给具体的通关,气候本身仍由寒暖/燥湿条承担
519
- if (!tgEntry) push(classicOf('zp-qihou'), '气候与月令用神要互参,故取子平真诠「用神配气候」一条');
520
- if (hot) push(classicOf('dt-hannuan'), '本盘偏热,寒暖一条正对');
521
- }
522
- if (tgEntry) {
523
- push(tgEntry, `本盘忌${tg.foe}克用${tg.use},局中${tg.bridge}${tg.weight}分可作通关,故取${CLASSIC_BOOKS.ditian.name}「通关」一条`);
524
- }
525
- // 用神总纲位只放一条,按盘四选一:化气看「变化」、四墓杂气看「杂气取用」、有组合看「成败救应」,
526
- // 都没有才回到四吉四凶总纲。不另加位次,是因为格局两条 + 气候两条正好占满 5 条上限。
527
- const huagi = gejuList.find((g) => g && g.kind === '化气格');
528
- const combo = gejuList.find((g) => g && g.kind === '组合');
529
- const monthBranch = r.monthBranch || (r.frame && r.frame.monthBranch) || (r.pillars && r.pillars.month && r.pillars.month.branch);
530
- const zaMonth = ['辰', '未', '戌', '丑'].includes(monthBranch);
531
- if (huagi) {
532
- push(classicOf('zp-bianhua'), `本盘列有「${huagi.name}」:用神由月令合化而变,总纲一位改取${CLASSIC_BOOKS.ziping.name}论用神变化`);
533
- } else if (zaMonth) {
534
- push(classicOf('zp-zaji'), `月令${monthBranch}属四墓杂气,取用先看透干、再看会支,总纲一位取${CLASSIC_BOOKS.ziping.name}论杂气如何取用`);
535
- } else if (combo) {
536
- push(classicOf('zp-chengbai'), `本盘另有「${combo.name}」组合:成格还要看带忌与救应,总纲一位改取${CLASSIC_BOOKS.ziping.name}论用神成败救应`);
537
- } else {
538
- push(classicOf('zp-yongshen'), '用神从月令取、四吉顺用四凶逆用,是通用总纲');
539
- }
540
- return out;
541
- }
542
-
543
- export function classicsText(rows) {
544
- if (!rows || !rows.length) return '';
545
- return rows.map((e) => `《${CLASSIC_BOOKS[e.book].name}·${e.chapter}》「${e.quote}」`).join('\n');
546
- }
1
+ // 古籍原文库:《子平真诠》《滴天髓》《三命通会》里与「格局取用」「十神喜忌」「寒暖燥湿」直接相关的条目。
2
+ // 三命通会另收专旺五格与弃命从财/从煞七篇——这是三书里仅有的「专旺 / 从格」可整段照录的专章。
3
+ // 十神篇里正财、偏财分开立章,故两格各取本格一条;七杀没有单列专章,取卷五「官煞去留杂论」。
4
+ // 原文照录(公共版权:清·沈孝瞻《子平真诠》、明·京图《滴天髓》、明·万民英《三命通会》通行本),仅供文化研究与参考。
5
+ // 出处以中华典藏网在线本为准(逐条给 url),异文处不合并、不改写;plain 是本站自撰白话,不是原文。
6
+
7
+ export const CLASSIC_BOOKS = {
8
+ ziping: { name: '子平真诠', author: '清·沈孝瞻', base: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/' },
9
+ ditian: { name: '滴天髓', author: '明·京图(通行本)', base: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/' },
10
+ sanming: { name: '三命通会', author: '明·万民英', base: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/' },
11
+ };
12
+
13
+ export const CLASSICS = [
14
+ {
15
+ id: 'zp-yongshen',
16
+ book: 'ziping',
17
+ chapter: '八、论用神',
18
+ scene: '用神',
19
+ tags: [],
20
+ quote: '八字用神,专求月令,以日干配月令地支,而生克不同,格局分焉。财官印食,此用神之善而顺用之者也;煞伤劫刃,用神之不善而逆用之者也。',
21
+ plain: '用神从月令里找:财、官、印、食四吉神顺用(生之护之),煞、伤、劫、刃四凶神逆用(制之化之)。',
22
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53628.html',
23
+ },
24
+ {
25
+ id: 'zp-zhenguan',
26
+ book: 'ziping',
27
+ chapter: '三十一、论正官',
28
+ scene: '格局',
29
+ tags: ['正官'],
30
+ quote: '以刑冲破害为忌,则以生之护之为喜矣。存其喜而去其忌则贵,而贵之中又有高低者,何也?',
31
+ plain: '正官格最忌刑冲破害,喜财生官、印护官;去忌存喜才谈得上贵,贵的层次还要看财印是否并透、有无伤官七煞混杂。',
32
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53651.html',
33
+ },
34
+ {
35
+ id: 'zp-cai',
36
+ book: 'ziping',
37
+ chapter: '三十三、论财',
38
+ scene: '格局',
39
+ tags: ['财', '正财', '偏财'],
40
+ quote: '财为我克,使用之物也,以能生官,所以为美。为财帛,为妻妾,为才能,为驿马,皆财类也。',
41
+ plain: '财是我所克、能为我用之物,因能生官而美;它同时代表钱财、配偶、才能、走动,不只「钱」一项。',
42
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53653.html',
43
+ },
44
+ {
45
+ id: 'zp-yin',
46
+ book: 'ziping',
47
+ chapter: '三十五、论印绶',
48
+ scene: '格局',
49
+ tags: ['印'],
50
+ quote: '印绶喜其生身,正偏同为美格,故财与印不分偏正,同为一格而论之。',
51
+ plain: '印能生身,正印偏印都算美格,不分偏正而论;印格的关键在身印强弱与官杀、食伤、财的配合。',
52
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53655.html',
53
+ },
54
+ {
55
+ id: 'zp-shishen',
56
+ book: 'ziping',
57
+ chapter: '三十七、论食神',
58
+ scene: '格局',
59
+ tags: ['食神'],
60
+ quote: '食神本属泄气,以其能生正财,所以喜之。故食神生财,美格也。财要有根,不必偏正叠出,如身强食旺而财透,大贵之格。',
61
+ plain: '食神本是泄气,可贵在能生财;食神生财要财有根,身强、食旺、财透三者齐,格局才大。',
62
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53657.html',
63
+ },
64
+ {
65
+ id: 'zp-pianguan',
66
+ book: 'ziping',
67
+ chapter: '三十九、论偏官',
68
+ scene: '格局',
69
+ tags: ['七杀', '偏官'],
70
+ quote: '煞以攻身,似非美物,百大贵之格,多存七煞。盖控制得宜,煞为我用,如大英雄大豪杰,似难驾驭,而处之有方,则惊天动地之功,忽焉而就。',
71
+ plain: '七煞攻身,看着不美,但大贵之格多有七煞——能控制住就为我所用,像驾驭豪杰,处之有方就能成大事。',
72
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53659.html',
73
+ },
74
+ {
75
+ id: 'zp-shangguan',
76
+ book: 'ziping',
77
+ chapter: '四十一、论伤官',
78
+ scene: '格局',
79
+ tags: ['伤官'],
80
+ quote: '伤官虽非吉神,实为秀气,故文人学士,多于伤官格内得之。而夏木见水,冬金见火,则又为秀之尤秀者也。',
81
+ plain: '伤官不是吉神,却是秀气所在,文人多出伤官格;夏木得水、冬金得火,是秀气里更秀的两种。',
82
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53661.html',
83
+ },
84
+ {
85
+ id: 'zp-yangren',
86
+ book: 'ziping',
87
+ chapter: '四十三、论阳刃',
88
+ scene: '格局',
89
+ tags: ['劫财', '阳刃'],
90
+ quote: '阳刃者,劫我正财之神,乃正财之七煞也。禄前一位,惟五阳有之,故为阳刃。不曰劫而曰刃,劫之甚也。刃宜伏制,官煞皆宜,财印相随,尤为贵显。',
91
+ plain: '阳刃是劫财之极(只有五阳干有),宜用官煞制伏;财印相随而不相碍,格局更显。',
92
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53663.html',
93
+ },
94
+ {
95
+ id: 'zp-lujie',
96
+ book: 'ziping',
97
+ chapter: '四十五、论建禄月劫',
98
+ scene: '格局',
99
+ tags: ['比肩', '建禄', '月劫'],
100
+ quote: '故建禄与月劫,可同一格,不必加分,皆以透干支,别取财官煞食为用。',
101
+ plain: '建禄、月劫同看一格,月令本身不算用神,要另看透出的财官煞食取用。',
102
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53665.html',
103
+ },
104
+ {
105
+ id: 'zp-qihou',
106
+ book: 'ziping',
107
+ chapter: '十四、论用神配气候得失',
108
+ scene: '调候',
109
+ tags: [],
110
+ quote: '论命惟以月令用神为主,然亦须配气候而互参之。譬如英雄豪杰,生得其时,自然事半功倍;遭时不顺,虽有奇才,成功不易。',
111
+ plain: '月令用神为主,但必须配气候参看;同样的格局,生在得时的气候里事半功倍,逆着气候就费劲。',
112
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53634.html',
113
+ },
114
+ {
115
+ id: 'zp-chengbai',
116
+ book: 'ziping',
117
+ chapter: '九、论用神成败救应',
118
+ scene: '格局',
119
+ tags: [],
120
+ quote: '成中有败,必是带忌;败中有成,全凭救应。',
121
+ plain: '成格不等于一路顺:成中带忌(官逢财又逢伤、官被合之类)就打了折;败格也未必无救——印来解伤、合来清煞,败中还能转成。',
122
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53629.html',
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
+ },
134
+ {
135
+ id: 'zp-bianhua',
136
+ book: 'ziping',
137
+ chapter: '十、论用神变化',
138
+ scene: '格局',
139
+ tags: [],
140
+ quote: '故若丁生亥月,本为正官,支全卯未,则化为印。己生申月,本属伤官。藏庚透壬,则化为财。凡此之类皆用神之变化也。',
141
+ plain: '用神本从月令取,但月令藏干不一:丁生亥月本为正官,支会卯未就化为印;己生申月本属伤官,庚藏壬透就化为财。起点相同,合化一变,取用也跟着变(原文只说变化之由,不断定某盘必化)。',
142
+ url: 'https://www.diancang.xyz/xuanxuewushu/zipingzhenquan/53630.html',
143
+ },
144
+ {
145
+ id: 'dt-hannuan',
146
+ book: 'ditian',
147
+ chapter: '通神论·寒暖',
148
+ scene: '调候',
149
+ tags: [],
150
+ quote: '天道有寒暖,生育万物,人道行之,不可过也。',
151
+ plain: '天有寒暖才能生养万物,人命里寒暖也不能过——过寒过热都要调。',
152
+ url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
153
+ },
154
+ {
155
+ id: 'dt-zaoshi',
156
+ book: 'ditian',
157
+ chapter: '通神论·燥湿',
158
+ scene: '调候',
159
+ tags: [],
160
+ quote: '地道有燥湿,生成品汇,人道得之,不可偏也。',
161
+ plain: '地有燥湿才有品类生成,人命得燥湿之气也不能偏。',
162
+ url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
163
+ },
164
+ {
165
+ id: 'dt-shuaiwang',
166
+ book: 'ditian',
167
+ chapter: '通神论·衰旺',
168
+ scene: '调候',
169
+ tags: [],
170
+ quote: '能知旺衰之真机,其于三命之奥,思过半矣。',
171
+ plain: '真正看懂旺衰的机关,命理之奥就过了一半——旺衰不是数个数,要看真机。',
172
+ url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
173
+ },
174
+ {
175
+ id: 'dt-zhonghe',
176
+ book: 'ditian',
177
+ chapter: '通神论·中和',
178
+ scene: '调候',
179
+ tags: [],
180
+ quote: '既识中和之正理,而于五行之妙,有全能焉。',
181
+ plain: '懂得中和的道理,五行的妙处就都在其中了。',
182
+ url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
183
+ },
184
+ {
185
+ id: 'dt-guansha',
186
+ book: 'ditian',
187
+ chapter: '通神论·官杀',
188
+ scene: '十神',
189
+ tags: ['正官', '七杀'],
190
+ quote: '官杀混杂来问我,有可有不可。',
191
+ plain: '官杀混杂不是一律不好,要看能不能去留取清。',
192
+ url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
193
+ },
194
+ {
195
+ id: 'dt-shangguan',
196
+ book: 'ditian',
197
+ chapter: '通神论·伤官',
198
+ scene: '十神',
199
+ tags: ['伤官'],
200
+ quote: '伤官见官最难辨,可见不可见。',
201
+ plain: '伤官见官是最难分辨的一条:有的能见,有的不能见,不能一句「伤官见官为祸百端」了事。',
202
+ url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
203
+ },
204
+ {
205
+ id: 'dt-yueling',
206
+ book: 'ditian',
207
+ chapter: '通神论·月令',
208
+ scene: '用神',
209
+ tags: [],
210
+ quote: '月令乃提纲之府,譬之宅也,人元为用事之神,宅之定向也,不可以不卜。',
211
+ plain: '月令像宅子,藏干是用事之神,像宅子的朝向,必须细看。',
212
+ url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
213
+ },
214
+ {
215
+ id: 'dt-tiyong',
216
+ book: 'ditian',
217
+ chapter: '通神论·体用',
218
+ scene: '用神',
219
+ tags: [],
220
+ quote: '道有体用,不可以一端论也,要在扶之抑之得其宜。',
221
+ plain: '体用不能只看一头,关键是扶抑得宜。',
222
+ url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
223
+ },
224
+ {
225
+ id: 'dt-jingshen',
226
+ book: 'ditian',
227
+ chapter: '通神论·精神',
228
+ scene: '用神',
229
+ tags: [],
230
+ quote: '人有精神,不可以一偏求也,要在损之益之得其中。',
231
+ plain: '看精神不能偏执一端,要在损益之间求其中。',
232
+ url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
233
+ },
234
+ {
235
+ id: 'dt-tongguan',
236
+ book: 'ditian',
237
+ chapter: '通神论·通关',
238
+ scene: '用神',
239
+ tags: [],
240
+ quote: '关内有织女,关外有牛郎,此关若通也,相邀入洞房。',
241
+ plain: '两股力隔着一道关相望:一边织女、一边牛郎,中间若有一行能把两边接上(一方生它、它再生另一方),对峙就化成相生。原文只给取象,哪一行为关要按五行生克定。',
242
+ url: 'https://www.diancang.xyz/xuanxuewushu/ditiansui/153091.html',
243
+ },
244
+ // —— 三命通会(明·万民英):同一组十神,子平真诠说「怎么用」,三命通会说「怎么取、怕什么」。
245
+ // 两书并列取用,按同一 tag 各取一条对照读,不合并、不裁定谁对。
246
+ {
247
+ id: 'smt-zhenguan',
248
+ book: 'sanming',
249
+ chapter: '卷五·论正官',
250
+ scene: '格局',
251
+ tags: ['正官'],
252
+ quote: '正官者,乃甲见辛、乙见庚之例。阴阳配合,相制有用,成其道也。故正官为六格之首,止许一位,多则不宜。',
253
+ plain: '正官取「克我而阴阳相配」,有制而能成用;六格以正官居首,只宜一位,多见就杂。',
254
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7582.html',
255
+ },
256
+ {
257
+ id: 'smt-zhengcai',
258
+ book: 'sanming',
259
+ chapter: '卷六·论正财',
260
+ scene: '格局',
261
+ tags: ['财', '正财'],
262
+ quote: '正财者,乃甲见己、乙见戊之例。受我克制,为我之妻,譬人娶妻,妻赍财嫁我,我必精神康强,而后可享用,若衰微不振,虽妻财丰厚,但能目视,终不得用。',
263
+ plain: '正财是我克制之物,古人以「娶妻带财」作比:自身精神康强才受用得起,身弱不振,财再厚也只是看着。',
264
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7645.html',
265
+ },
266
+ {
267
+ id: 'smt-piancai',
268
+ book: 'sanming',
269
+ chapter: '卷六·论偏财',
270
+ scene: '格局',
271
+ tags: ['财', '偏财'],
272
+ quote: '何谓偏财?乃甲见戊、乙见己之例。非妻所带,乃众人之财也。切忌有姊妹兄弟分夺,柱无官星,祸患百出。',
273
+ plain: '偏财取「我克而阴阳不同」:不是妻家带来的私财,而是众人之财,宜流通不宜独占。原文最忌比肩劫财来分夺,又说柱中无官星则多事(旧说的重话照录,本插件只记原文、不作断语)。',
274
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7650.html',
275
+ },
276
+ {
277
+ id: 'smt-yinshou',
278
+ book: 'sanming',
279
+ chapter: '卷六·论印绶',
280
+ scene: '格局',
281
+ tags: ['印'],
282
+ quote: '印绶者,乃五行生我之名。如甲乙在亥子月,丙丁在寅卯月之类,乃我气之源,为生气,为父母,能护我官星,使无伤克',
283
+ plain: '印是生我之气,像源头与父母:它能护住官星,使官不受伤克;反过来说,印重就怕财来破。',
284
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7655.html',
285
+ },
286
+ {
287
+ id: 'smt-shishen',
288
+ book: 'sanming',
289
+ chapter: '卷六·论食神',
290
+ scene: '格局',
291
+ tags: ['食神'],
292
+ quote: '凡命遇财煞之地,食神旺相,煞被食制,不敢为祸,财被食生,充裕不竭,故食神一名寿星,一名爵星,良有以也。',
293
+ plain: '食神旺,一头制煞、一头生财:煞被制住不敢为祸,财被生起不至枯竭;所以食神又叫寿星、爵星。',
294
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7663.html',
295
+ },
296
+ {
297
+ id: 'smt-shangguan',
298
+ book: 'sanming',
299
+ chapter: '卷六·论伤官',
300
+ scene: '格局',
301
+ tags: ['伤官'],
302
+ quote: '伤官虽凶,乃我所生,自家之物,伤尽则能生财,财旺则能生官,造化展转有情。',
303
+ plain: '伤官虽称凶,却是我自己生出来的:伤尽(柱中不见官星)反能生财,财旺再生官,辗转还是有情。',
304
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7662.html',
305
+ },
306
+ {
307
+ id: 'smt-yangren',
308
+ book: 'sanming',
309
+ chapter: '卷六·论阳刃',
310
+ scene: '格局',
311
+ tags: ['阳刃', '劫财'],
312
+ quote: '阳者,阴阳之阳,刃者,刀刃之刃,即禄前一位,言旺越其分,故险。',
313
+ plain: '阳刃指禄前一位,旺过了本分,所以险;甲丙戊庚壬五阳干才有刃,阴干见伤官同论。',
314
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7671.html',
315
+ },
316
+ {
317
+ id: 'smt-jianlu',
318
+ book: 'sanming',
319
+ chapter: '卷六·论建禄',
320
+ scene: '格局',
321
+ tags: ['建禄', '比肩', '月劫'],
322
+ quote: '凡命月令建禄,难招祖业,必主平生见财不聚,却病少寿长,行运再见比肩,克妻妨父损子',
323
+ plain: '月令建禄是日主临官之地,身旺而财官难取:古说难承祖业、见财不聚,但病少寿长;再走比肩运,古书说克妻妨父损子(属于旧说的重话,本插件只记原文、不作断语)。',
324
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7672.html',
325
+ },
326
+ // 此本三命通会没有单列的「论偏官」章,七煞与正官混见的情形收在卷五「官煞去留杂论」;
327
+ // 七杀格的三命对照取这一篇,章名照录,不改写成「论偏官」。
328
+ {
329
+ id: 'smt-guansha-liu',
330
+ book: 'sanming',
331
+ chapter: '卷五·官煞去留杂论',
332
+ scene: '格局',
333
+ tags: ['七杀', '偏官'],
334
+ quote: '凡看去留,要详柱中官煞孰重孰轻,天干透者易去,月支所藏者难去,须伤官食神去官煞之物众而有力,方才去得。',
335
+ plain: '官煞混见时先比谁重谁轻:天干透出的容易去,月支藏着的难去;用来去官煞的伤官食神要成众、有根有力,才真去得掉。七杀格遇正官混杂,就按这一篇看取舍。',
336
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7599.html',
337
+ },
338
+ // —— 三命通会 · 专旺五格与弃命从格:单章原文,专供「专旺格 / 从格」直接在结果里读。
339
+ // 原文的条件比「身强」二字细:要局全、要带印或带火炼金、要防冲刑死绝。照录不分拆。
340
+ {
341
+ id: 'smt-quzhi',
342
+ book: 'sanming',
343
+ chapter: '卷六·曲直',
344
+ scene: '格局',
345
+ tags: ['曲直格', '专旺'],
346
+ quote: '甲乙日得亥卯未局,柱中须有亥字带印为入格,若无亥有卯,止是木之本气,却要见金土为贵,既无亥字,又无金土,则木不秀不实,难以言贵。',
347
+ plain: '曲直格要木局成方(亥卯未)且带亥字为印,才算入格;只有卯、没有亥,只是木的本气,得另见金土才谈得上贵;两样都没有,木虽旺而无成,难称贵格。',
348
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7630.html',
349
+ },
350
+ {
351
+ id: 'smt-yanshang',
352
+ book: 'sanming',
353
+ chapter: '卷六·炎上',
354
+ scene: '格局',
355
+ tags: ['炎上格', '专旺'],
356
+ quote: '丙丁日遇寅午戌局,柱中须有寅字带印为入格,无寅止是九流近贵之命,若火自旺,无亥水相济,不贵。喜东北方运,忌见辰丑戊己,晦火光明,多主眼疾,或患风气,柱有木制成贵,忌水金乡,怕冲。',
357
+ plain: '炎上格要火局成方(寅午戌)且带寅字为印才入格;无寅只是偏贵的命。火自旺还要一点水相济,过燥不贵;行运喜东北、忌湿土晦火,也怕冲。原文另带「多主眼疾」一句,属于旧说,本插件只记原文、不作健康判断。',
358
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7631.html',
359
+ },
360
+ {
361
+ id: 'smt-congge',
362
+ book: 'sanming',
363
+ chapter: '卷六·从革',
364
+ scene: '格局',
365
+ tags: ['从革格', '专旺'],
366
+ quote: '庚辛日见巳酉丑局,须带丙丁巳午一二位方成其器,但不可火多。如辛巳、辛酉、辛丑三日不喜五月生,被火所伤,宜八月或水土养育食神印绶为吉。',
367
+ plain: '从革格是金局成方(巳酉丑),但金要火炼才成器:须带丙丁或巳午一二位,火又不能多。辛巳、辛酉、辛丑三日出身在五月(火旺)被伤,原文说宜八月或水土养育。',
368
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7632.html',
369
+ },
370
+ {
371
+ id: 'smt-runxia',
372
+ book: 'sanming',
373
+ chapter: '卷六·润下',
374
+ scene: '格局',
375
+ tags: ['润下格', '专旺'],
376
+ quote: '壬癸日见申子辰全,忌引卯巳死绝之地,三刑四冲之乡,死绝则不流,冲刑则横流,岁运同。或曰水太泛须柱有土神一两位制之,得成堤岸,既有土怕会木为凶,如有木伤土要金印救解,终是一生成败。',
377
+ plain: '润下格是水局三合全(申子辰),最忌卯巳死绝与三刑四冲:死绝水不流,冲刑水横流,行运也一样看。水太泛要一两位土作堤,有土又怕木来破堤,木伤土再用金印解救——原文把成败条件摊开讲。',
378
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7633.html',
379
+ },
380
+ {
381
+ id: 'smt-jiasi',
382
+ book: 'sanming',
383
+ chapter: '卷六·稼穑',
384
+ scene: '格局',
385
+ tags: ['稼穑格', '专旺'],
386
+ quote: '赋云:戊己忻逢四季,乃为稼穑之名。是戊己生逢季月,喜见木为官,止得一木为妙,木多则土虚,主虚诈为破家不仁之人。',
387
+ plain: '稼穑格取戊己生于四季月(辰戌丑未)。原文说喜见一木为官,木多则土虚;后半对木多之人的评语是旧说的重话,本插件只照录条件、不拿来评价人。',
388
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7634.html',
389
+ },
390
+ {
391
+ id: 'smt-congsha',
392
+ book: 'sanming',
393
+ chapter: '卷五·弃命从煞',
394
+ scene: '格局',
395
+ tags: ['从杀格'],
396
+ quote: '《独步》云:弃命从煞,须要会煞从财,忌煞从煞。盖言从煞格,以煞神太重,身无所归,不得已从之,要行煞旺及财乡,四柱无一点比肩印绶方论,如遇运扶身旺,与煞为敌,从煞不专,故为祸患。',
397
+ plain: '从煞格是煞太重、日主无所归才「弃命」相从:条件是四柱没有一点比肩印绶扶身,行运喜煞旺与财乡;一旦走扶身之运,与煞为敌,就从得不专。本插件只作结构说明,不据此断寿夭。',
398
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7598.html',
399
+ },
400
+ {
401
+ id: 'smt-congcai',
402
+ book: 'sanming',
403
+ chapter: '卷六·弃命从财',
404
+ scene: '格局',
405
+ tags: ['从财格'],
406
+ quote: '《独步》云:弃命从财,须要会财,若逢根气,命损无猜。假如丁生酉月,柱多庚辛,日干无气,只得弃命相从,运入北方财官旺地,乃为入格,南行灾。',
407
+ plain: '从财格要财会成局、日干无气;一见根气就破格,原文用「命损无猜」这种重话写明。以丁生酉月、柱多庚辛为例:只能弃命相从,行北方财官旺地为入格,南行则灾。',
408
+ url: 'https://www.diancang.xyz/xuanxuewushu/sanmingtonghui/7652.html',
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
+ },
437
+ ];
438
+
439
+ const BY_ID = CLASSICS.reduce((m, e) => { m[e.id] = e; return m; }, {});
440
+
441
+ // 格局名 → tags 键(本引擎的格局名都带「格」)
442
+ const GEJU_KEY = {
443
+ 正官格: '正官',
444
+ 七杀格: '七杀',
445
+ 偏官格: '偏官',
446
+ 正财格: '正财',
447
+ 偏财格: '偏财',
448
+ 正印格: '印',
449
+ 偏印格: '印',
450
+ 食神格: '食神',
451
+ 伤官格: '伤官',
452
+ 阳刃格: '阳刃',
453
+ 月劫格: '月劫',
454
+ 建禄格: '建禄',
455
+ };
456
+
457
+ // 特殊结构 → 三命通会单章:专旺五格与弃命从财/从煞。
458
+ // 从儿(食伤)、从强(印/比劫)三书里没有可整段照录的专章,故不登记、不硬凑。
459
+ const SPECIAL_CLASSIC = {
460
+ 曲直格: 'smt-quzhi',
461
+ 炎上格: 'smt-yanshang',
462
+ 从革格: 'smt-congge',
463
+ 润下格: 'smt-runxia',
464
+ 稼穑格: 'smt-jiasi',
465
+ 从财格: 'smt-congcai',
466
+ 从杀格: 'smt-congsha',
467
+ };
468
+
469
+ export function classicOf(id) {
470
+ return BY_ID[id] || null;
471
+ }
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
+
481
+ function tagOf(gejuName) {
482
+ const name = String(gejuName || '');
483
+ if (GEJU_KEY[name]) return GEJU_KEY[name];
484
+ const bare = name.replace(/格$/, '');
485
+ return GEJU_KEY[bare + '格'] || bare;
486
+ }
487
+
488
+ // 同一 tag 各书取一条:子平真诠在前(讲怎么用),三命通会紧随作对照(讲怎么取、怕什么)
489
+ function pick(tag, book) {
490
+ return CLASSICS.find((e) => e.scene === '格局' && e.tags.includes(tag) && (!book || e.book === book)) || null;
491
+ }
492
+
493
+ // 章节名去掉卷次/序号与开头的「论」,避免 why 里拼成「论论财」
494
+ function chapterTitle(e) {
495
+ return e.chapter.replace(/^.*[、·]/, '').replace(/^论/, '');
496
+ }
497
+
498
+ // 根据一张八字结果挑原文:特殊结构(专旺/从格)先取单章,再月令格(子平真诠 + 三命通会对照),
499
+ // 再调候(寒暖/燥湿),最后「用神总纲」一位按盘四选一:有化气格取论用神变化、辰戌丑未月取论杂气如何取用、
500
+ // 见组合取论用神成败救应、其余取通用总纲;去重、限量。
501
+ export function classicsFor(r, limit = 5) {
502
+ if (!r) return [];
503
+ const out = [];
504
+ const seen = new Set();
505
+ const push = (entry, why) => {
506
+ if (!entry || seen.has(entry.id) || out.length >= limit) return;
507
+ seen.add(entry.id);
508
+ out.push({ ...entry, why });
509
+ };
510
+ const gejuList = Array.isArray(r.geju) ? r.geju : (r.frame && Array.isArray(r.frame.geju) ? r.frame.geju : []);
511
+ // 专旺或从格是这张盘的定义性结构,先占位;命中的单章原文在 5 条上限里不被气候/总纲挤掉。
512
+ for (const g of gejuList) {
513
+ const entry = g && SPECIAL_CLASSIC[g.name] ? classicOf(SPECIAL_CLASSIC[g.name]) : null;
514
+ if (entry) push(entry, `本盘列有「${g.name}」,故取${CLASSIC_BOOKS[entry.book].name}「${chapterTitle(entry)}」一条`);
515
+ }
516
+ for (const g of gejuList) {
517
+ if (!g || (g.kind && g.kind !== '月令格')) continue;
518
+ const tag = tagOf(g.name);
519
+ const primary = pick(tag, 'ziping') || pick(tag);
520
+ if (primary) push(primary, `你的月令格局是「${g.name}」,故取${CLASSIC_BOOKS[primary.book].name}「${chapterTitle(primary)}」一条`);
521
+ const alt = CLASSICS.find((e) => e.scene === '格局' && e.tags.includes(tag) && (!primary || e.book !== primary.book));
522
+ if (alt) push(alt, `同是「${g.name}」,${CLASSIC_BOOKS[alt.book].name}「${chapterTitle(alt)}」另有取法,可对照读`);
523
+ }
524
+ const cli = r.climate || (r.frame && r.frame.yongshen && (r.frame.yongshen.climate || r.frame.yongshen.tiaohou));
525
+ const tg = r.frame && r.frame.yongshen && r.frame.yongshen.tongguan;
526
+ const tgEntry = tg && tg.usable ? classicOf('dt-tongguan') : null;
527
+ if (cli && cli.kind && cli.kind !== '平和') {
528
+ const cold = !!(cli.cold || cli.kind.indexOf('寒') >= 0);
529
+ const hot = !!(cli.hot || cli.kind.indexOf('热') >= 0);
530
+ push(classicOf(cold ? 'dt-hannuan' : 'dt-zaoshi'), `本盘气候判为「${cli.kind}」,故取${CLASSIC_BOOKS.ditian.name}寒暖燥湿一条`);
531
+ // 「用神配气候」是泛论;有可通的通关结构时把这一位让给具体的通关,气候本身仍由寒暖/燥湿条承担
532
+ if (!tgEntry) push(classicOf('zp-qihou'), '气候与月令用神要互参,故取子平真诠「用神配气候」一条');
533
+ if (hot) push(classicOf('dt-hannuan'), '本盘偏热,寒暖一条正对');
534
+ }
535
+ if (tgEntry) {
536
+ push(tgEntry, `本盘忌${tg.foe}克用${tg.use},局中${tg.bridge}${tg.weight}分可作通关,故取${CLASSIC_BOOKS.ditian.name}「通关」一条`);
537
+ }
538
+ // 用神总纲位只放一条,按盘四选一:化气看「变化」、四墓杂气看「杂气取用」、有组合看「成败救应」,
539
+ // 都没有才回到四吉四凶总纲。不另加位次,是因为格局两条 + 气候两条正好占满 5 条上限。
540
+ const huagi = gejuList.find((g) => g && g.kind === '化气格');
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);
544
+ if (huagi) {
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}论杂气如何取用`);
548
+ } else if (combo) {
549
+ push(classicOf('zp-chengbai'), `本盘另有「${combo.name}」组合:成格还要看带忌与救应,总纲一位改取${CLASSIC_BOOKS.ziping.name}论用神成败救应`);
550
+ } else {
551
+ push(classicOf('zp-yongshen'), '用神从月令取、四吉顺用四凶逆用,是通用总纲');
552
+ }
553
+ return out;
554
+ }
555
+
556
+ export function classicsText(rows) {
557
+ if (!rows || !rows.length) return '';
558
+ return rows.map((e) => `《${CLASSIC_BOOKS[e.book].name}·${e.chapter}》「${e.quote}」`).join('\n');
559
+ }