Upload 2 files
Browse files- js/admin.js +11 -11
- js/game.js +15 -16
js/admin.js
CHANGED
|
@@ -664,17 +664,17 @@ function runSimulation() {
|
|
| 664 |
// 城池沙盤校準器 (Map & Castle Sandbox Calibrator)
|
| 665 |
// -------------------------------------------------------------
|
| 666 |
const MAP_TOWNS_DEF = [
|
| 667 |
-
{ id: 'b1',
|
| 668 |
-
{ id: 'b9',
|
| 669 |
-
{ id: 'b2',
|
| 670 |
-
{ id: 'b4',
|
| 671 |
-
{ id: 'b7',
|
| 672 |
-
{ id: 'b3',
|
| 673 |
-
{ id: 'b5',
|
| 674 |
-
{ id: 'b6',
|
| 675 |
-
{ id: 'b8',
|
| 676 |
-
{ id: 'b10',
|
| 677 |
-
{ id: 'tianji', name: '天機閣',
|
| 678 |
];
|
| 679 |
|
| 680 |
let mapLayoutData = null;
|
|
|
|
| 664 |
// 城池沙盤校準器 (Map & Castle Sandbox Calibrator)
|
| 665 |
// -------------------------------------------------------------
|
| 666 |
const MAP_TOWNS_DEF = [
|
| 667 |
+
{ id: 'b1', name: '景陽瓷都', icon: '🏺', specialty: '初始門戶・瓷器商道', defX: 27.8, defY: 70.7, defSize: 166 },
|
| 668 |
+
{ id: 'b9', name: '柴桑水寨', icon: '⚓', specialty: '左翼水軍・江灣重鎮', defX: 18.1, defY: 62.1, defSize: 174 },
|
| 669 |
+
{ id: 'b2', name: '平原稻鄉', icon: '🌾', specialty: '萬頃良田・天下糧倉', defX: 37.7, defY: 78.9, defSize: 167 },
|
| 670 |
+
{ id: 'b4', name: '百草藥谷', icon: '🌿', specialty: '靈草仙葩・金丹聖境', defX: 62.1, defY: 79.0, defSize: 174 },
|
| 671 |
+
{ id: 'b7', name: '塞外天馬', icon: '🐎', specialty: '神駿鐵騎・奔雷塞北', defX: 71.8, defY: 70.6, defSize: 171 },
|
| 672 |
+
{ id: 'b3', name: '神兵鐵城', icon: '⚔️', specialty: '中央梯田・百辟神兵', defX: 50.5, defY: 48.5, defSize: 169 },
|
| 673 |
+
{ id: 'b5', name: '蜀錦絲城', icon: '👘', specialty: '雲錦天絲・蜀道要衝', defX: 59.9, defY: 42.2, defSize: 173 },
|
| 674 |
+
{ id: 'b6', name: '崑崙玉塞', icon: '⛏️', specialty: '極東奇礦・金玉靈峰', defX: 81.6, defY: 62.2, defSize: 172 },
|
| 675 |
+
{ id: 'b8', name: '軍機策府', icon: '🏫', specialty: '天臺奇謀・九州文韜', defX: 67.5, defY: 34.7, defSize: 172 },
|
| 676 |
+
{ id: 'b10', name: '霸業王城', icon: '🏰', specialty: '皇極九五・天下歸心', defX: 52.0, defY: 22.0, defSize: 140 },
|
| 677 |
+
{ id: 'tianji', name: '天機閣', icon: '🏯', specialty: '急速快答・軍備寶箱', defX: 34.5, defY: 29.7, defSize: 154 },
|
| 678 |
];
|
| 679 |
|
| 680 |
let mapLayoutData = null;
|
js/game.js
CHANGED
|
@@ -302,19 +302,19 @@ let isMapDragging = false;
|
|
| 302 |
let mapDragStartX = 0, mapDragStartY = 0, mapScrollStartX = 0, mapScrollStartY = 0;
|
| 303 |
let mapHasDragged = false;
|
| 304 |
|
| 305 |
-
// 10 大特色名都在
|
| 306 |
const MAP_POS = {
|
| 307 |
-
b1:
|
| 308 |
-
b9:
|
| 309 |
-
b2:
|
| 310 |
-
b4:
|
| 311 |
-
b7:
|
| 312 |
-
b3:
|
| 313 |
-
b5:
|
| 314 |
-
b6:
|
| 315 |
-
b8:
|
| 316 |
-
b10:
|
| 317 |
-
tianji: { x:
|
| 318 |
};
|
| 319 |
|
| 320 |
// 戰略行軍補給網絡連線(由四周外圍向內層層遞進,直通山巔)
|
|
@@ -417,7 +417,7 @@ function initMapDrag() {
|
|
| 417 |
function focusTownOnMap(bid, smooth = true) {
|
| 418 |
selectedTownId = bid;
|
| 419 |
const wrap = $('#territoryMapWrap');
|
| 420 |
-
const pos =
|
| 421 |
if (wrap && pos) {
|
| 422 |
const mapW = 1400;
|
| 423 |
const mapH = 1400 * (9 / 16);
|
|
@@ -442,9 +442,8 @@ function getTownLayout(bid) {
|
|
| 442 |
if (parsed[bid]) return parsed[bid];
|
| 443 |
}
|
| 444 |
} catch (e) {}
|
| 445 |
-
const def = MAP_POS[bid] || { x: 50, y: 50 };
|
| 446 |
-
|
| 447 |
-
return { x: def.x, y: def.y, size: defSize };
|
| 448 |
}
|
| 449 |
|
| 450 |
function renderMapRoutes() {
|
|
|
|
| 302 |
let mapDragStartX = 0, mapDragStartY = 0, mapScrollStartX = 0, mapScrollStartY = 0;
|
| 303 |
let mapHasDragged = false;
|
| 304 |
|
| 305 |
+
// 10 大特色名都與天機閣在沙盤大地圖上的精確座標定位與微縮手辦尺寸(由校準器校準導出)
|
| 306 |
const MAP_POS = {
|
| 307 |
+
b1: { x: 27.8, y: 70.7, size: 166 }, // 景陽瓷都
|
| 308 |
+
b9: { x: 18.1, y: 62.1, size: 174 }, // 柴桑水寨
|
| 309 |
+
b2: { x: 37.7, y: 78.9, size: 167 }, // 平原稻鄉
|
| 310 |
+
b4: { x: 62.1, y: 79.0, size: 174 }, // 百草藥谷
|
| 311 |
+
b7: { x: 71.8, y: 70.6, size: 171 }, // 塞外天馬
|
| 312 |
+
b3: { x: 50.5, y: 48.5, size: 169 }, // 神兵鐵城
|
| 313 |
+
b5: { x: 59.9, y: 42.2, size: 173 }, // 蜀錦絲城
|
| 314 |
+
b6: { x: 81.6, y: 62.2, size: 172 }, // 崑崙玉塞
|
| 315 |
+
b8: { x: 67.5, y: 34.7, size: 172 }, // 軍機策府
|
| 316 |
+
b10: { x: 52.0, y: 22.0, size: 140 }, // 霸業王城
|
| 317 |
+
tianji: { x: 34.5, y: 29.7, size: 154 }, // 天機閣
|
| 318 |
};
|
| 319 |
|
| 320 |
// 戰略行軍補給網絡連線(由四周外圍向內層層遞進,直通山巔)
|
|
|
|
| 417 |
function focusTownOnMap(bid, smooth = true) {
|
| 418 |
selectedTownId = bid;
|
| 419 |
const wrap = $('#territoryMapWrap');
|
| 420 |
+
const pos = getTownLayout(bid);
|
| 421 |
if (wrap && pos) {
|
| 422 |
const mapW = 1400;
|
| 423 |
const mapH = 1400 * (9 / 16);
|
|
|
|
| 442 |
if (parsed[bid]) return parsed[bid];
|
| 443 |
}
|
| 444 |
} catch (e) {}
|
| 445 |
+
const def = MAP_POS[bid] || { x: 50, y: 50, size: 120 };
|
| 446 |
+
return { x: def.x, y: def.y, size: def.size || 120 };
|
|
|
|
| 447 |
}
|
| 448 |
|
| 449 |
function renderMapRoutes() {
|