diff --git a/app/index.html b/app/index.html index 4ac2313..db6984f 100644 --- a/app/index.html +++ b/app/index.html @@ -106,6 +106,6 @@ route(); - + diff --git a/app/js/extras.js b/app/js/extras.js index 3981276..7b9f1ea 100644 --- a/app/js/extras.js +++ b/app/js/extras.js @@ -218,8 +218,11 @@ const h = jq._hist[jq._hist.length - 1]; if (!h || h.type !== 'move' || !h.tr) return null; const target = h.tr, targetC = h.tc; - const mine = jq.cells[target] ? jq.cells[target] : h.fp; - if (!mine) return null; + // 目的地必须是【你方当前存活的子】才有风险可言: + // - 同归于尽(目标格为空) → 无子可吃,不提示 + // - 你方进攻子阵亡(敌方幸存占格) → 不是"你的子",不提示 + const mine = jq.cells[target] && jq.cells[target][targetC]; + if (!mine || mine.owner !== 'r') return null; const myKind = mine.kind, myFace = (window.FACE || {})[myKind] || KIND_LBL[myKind] || myKind; const threats = []; for (let r = 0; r < jq.R; r++) for (let c = 0; c < jq.C; c++) {