fix(yogas): lunar and solar yogas count only the five true planets; retire duplicate rules (upstream 2dd6062a)

bvr_002..004 (Sunaphaa/Anaphaa/Duradhara) and bvr_016..018 (Vesi/Vosi/
Ubhayachara) take upstream yinduzhanxing 2dd6062a's logic (Mars..Saturn
only). kemadruma_yoga also ignores the nodes (product decision: classical
definition; upstream still counts them). The six lunar/solar duplicates of
upstream's RETIRED_RULE_IDS are retired; upstream's four other retirements
are out of scope. TASK-upstream-sync4-20261002 T5.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
Jesse_Chen
2026-10-02 13:53:02 +08:00
co-authored by Claude Opus 5.5
parent 42d1582f4c
commit f3ed950982
4 changed files with 180 additions and 38 deletions
+116 -36
View File
@@ -1305,7 +1305,7 @@
"category": "chandra",
"logic": {
"type": "custom",
"expr": "\n# PyJHora/BVR-5: no planets other than Sun in 1st/2nd/12th from Moon,\n# and no planets other than Moon in quadrants from Lagna.\nif 'Moon' not in ctx.planets:\n False\nelse:\n moon_h = house_of('Moon')\n moon_zone = {moon_h, ((moon_h - 1 + 1) % 12) + 1, ((moon_h - 1 + 11) % 12) + 1}\n ky1 = all(p in ['Moon', 'Sun'] for p, info in ctx.planets.items() if info.get('house') in moon_zone)\n ky2 = all(p == 'Moon' for p, info in ctx.planets.items() if info.get('house') in [1, 4, 7, 10])\n ky1 and ky2\n",
"expr": "\n# PyJHora/BVR-5: none of the five true planets (Mars..Saturn) in 1st/2nd/12th from Moon;\n# the Sun and the nodes do not count (sync4 T5, BPHS / Raman 300 Combinations no. 5),\n# and no planets other than Moon in quadrants from Lagna.\nif 'Moon' not in ctx.planets:\n False\nelse:\n moon_h = house_of('Moon')\n moon_zone = {moon_h, ((moon_h - 1 + 1) % 12) + 1, ((moon_h - 1 + 11) % 12) + 1}\n ky1 = all(p in ['Moon', 'Sun', 'Rahu', 'Ketu'] for p, info in ctx.planets.items() if info.get('house') in moon_zone)\n ky2 = all(p == 'Moon' for p, info in ctx.planets.items() if info.get('house') in [1, 4, 7, 10])\n ky1 and ky2\n",
"combo_template": "月亮1/2/12宫仅日月,且Lagna角宫仅月亮",
"combo_template_en": "Only the Sun and Moon in the 1st/2nd/12th from the Moon, and only the Moon in the Kendras from the Lagna"
},
@@ -9880,16 +9880,21 @@
"category": "surya",
"logic": {
"type": "has_planet_in_house_from",
"planets": "all",
"planets": {
"role": "set",
"planets": [
"Mars",
"Mercury",
"Jupiter",
"Venus",
"Saturn"
]
},
"from": "Sun",
"houses": [
2
],
"exclude": [
"Moon"
],
"combo_template": "{planets}在太阳的第2宫",
"combo_template_en": "{planets} in the 2nd from the Sun"
"combo_template": "{planets}在太阳的第2宫"
},
"effects": [
"太阳后方有行星支持",
@@ -9917,16 +9922,21 @@
"category": "surya",
"logic": {
"type": "has_planet_in_house_from",
"planets": "all",
"planets": {
"role": "set",
"planets": [
"Mars",
"Mercury",
"Jupiter",
"Venus",
"Saturn"
]
},
"from": "Sun",
"houses": [
12
],
"exclude": [
"Moon"
],
"combo_template": "{planets}在太阳的第12宫",
"combo_template_en": "{planets} in the 12th from the Sun"
"combo_template": "{planets}在太阳的第12宫"
},
"effects": [
"太阳前方有行星铺垫",
@@ -9959,29 +9969,39 @@
"conditions": [
{
"type": "has_planet_in_house_from",
"planets": "all",
"planets": {
"role": "set",
"planets": [
"Mars",
"Mercury",
"Jupiter",
"Venus",
"Saturn"
]
},
"from": "Sun",
"houses": [
2
],
"exclude": [
"Moon"
],
"combo_template": "{planets}在太阳的第2宫",
"combo_template_en": "{planets} in the 2nd from the Sun"
"combo_template": "{planets}在太阳的第2宫"
},
{
"type": "has_planet_in_house_from",
"planets": "all",
"planets": {
"role": "set",
"planets": [
"Mars",
"Mercury",
"Jupiter",
"Venus",
"Saturn"
]
},
"from": "Sun",
"houses": [
12
],
"exclude": [
"Moon"
],
"combo_template": "{planets}在太阳的第12宫",
"combo_template_en": "{planets} in the 12th from the Sun"
"combo_template": "{planets}在太阳的第12宫"
}
]
},
@@ -10010,10 +10030,22 @@
"bvr_id": "BVR-2",
"category": "chandra",
"logic": {
"type": "custom",
"expr": "\n# PyJHora/BVR-2 Sunapha: target 2nd from Moon has at least one planet and Sun is absent.\nmoon_h = house_of('Moon')\nif moon_h is None:\n False\nelse:\n target = ((moon_h - 1 + 1) % 12) + 1\n ps = occupants(target)\n bool(ps) and 'Sun' not in ps\n",
"combo_template": "{planets}在月亮的第2宫",
"combo_template_en": "{planets} in the 2nd from the Moon"
"type": "has_planet_in_house_from",
"planets": {
"role": "set",
"planets": [
"Mars",
"Mercury",
"Jupiter",
"Venus",
"Saturn"
]
},
"from": "Moon",
"houses": [
2
],
"combo_template": "{planets}在月亮的第2宫"
},
"effects": [
"自力更生",
@@ -10042,10 +10074,22 @@
"bvr_id": "BVR-3",
"category": "chandra",
"logic": {
"type": "custom",
"expr": "\n# PyJHora/BVR-3 Anapha: target 12th from Moon has at least one planet and Sun is absent.\nmoon_h = house_of('Moon')\nif moon_h is None:\n False\nelse:\n target = ((moon_h - 1 + 11) % 12) + 1\n ps = occupants(target)\n bool(ps) and 'Sun' not in ps\n",
"combo_template": "{planets}在月亮的第12宫",
"combo_template_en": "{planets} in the 12th from the Moon"
"type": "has_planet_in_house_from",
"planets": {
"role": "set",
"planets": [
"Mars",
"Mercury",
"Jupiter",
"Venus",
"Saturn"
]
},
"from": "Moon",
"houses": [
12
],
"combo_template": "{planets}在月亮的第12宫"
},
"effects": [
"心智有背景支持",
@@ -10074,9 +10118,45 @@
"bvr_id": "BVR-4",
"category": "chandra",
"logic": {
"type": "custom",
"expr": "\n# PyJHora/BVR-4 Duradhara: both Sunapha and Anapha conditions are true.\nmoon_h = house_of('Moon')\nif moon_h is None:\n False\nelse:\n h2 = ((moon_h - 1 + 1) % 12) + 1\n h12 = ((moon_h - 1 + 11) % 12) + 1\n ps2 = occupants(h2)\n ps12 = occupants(h12)\n bool(ps2) and 'Sun' not in ps2 and bool(ps12) and 'Sun' not in ps12\n",
"combo_template": "PyJHora Chandra yoga logic"
"type": "and",
"conditions": [
{
"type": "has_planet_in_house_from",
"planets": {
"role": "set",
"planets": [
"Mars",
"Mercury",
"Jupiter",
"Venus",
"Saturn"
]
},
"from": "Moon",
"houses": [
2
],
"combo_template": "{planets}在月亮的第2宫"
},
{
"type": "has_planet_in_house_from",
"planets": {
"role": "set",
"planets": [
"Mars",
"Mercury",
"Jupiter",
"Venus",
"Saturn"
]
},
"from": "Moon",
"houses": [
12
],
"combo_template": "{planets}在月亮的第12宫"
}
]
},
"effects": [
"月亮前后均有支撑",