<html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>双人·运兵车·仅己方倒地判定</title> <style> * { box-sizing: border-box; user-select: none; } body { background: #1a2a32; min-height: 100vh; display: flex; justify-content: center; align-items: center; font-family: 'Segoe UI', Roboto, system-ui, sans-serif; margin: 0; padding: 16px; } .game-container { background: #2a3f4a; padding: 24px 24px 30px; border-radius: 42px; box-shadow: 0 20px 30px rgba(0,0,0,0.6); } .header { display: flex; justify-content: space-between; align-items: center; color: #f0e6d0; padding: 0 12px 20px 12px; font-weight: bold; text-shadow: 2px 2px 0 #1a2a32; } .player-panel { display: flex; gap: 36px; background: #17242b; padding: 12px 32px; border-radius: 60px; box-shadow: inset 0 -3px 0 #0f1a1f; } .player-info { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; } .blue .badge { background: #3b7dbd; box-shadow: 0 0 0 2px #7ab0e6; } .red .badge { background: #c44b4b; box-shadow: 0 0 0 2px #f29b9b; } .badge { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; color: white; } .funds { background: #0f1f26; padding: 6px 18px; border-radius: 40px; font-family: monospace; font-size: 1.8rem; color: #ffd966; box-shadow: inset 0 -3px 0 #071117; } .victory-points { background: #2d2010; padding: 4px 16px; border-radius: 30px; font-size: 1.4rem; color: #faca7e; font-weight: 700; margin-left: 10px; border: 1px solid #b58947; } .turn-indicator { background: #dca54c; color: #1d2b32; padding: 8px 28px; border-radius: 40px; font-size: 1.4rem; font-weight: 800; letter-spacing: 1px; box-shadow: 0 6px 0 #8f6530; } .board-wrapper { display: flex; justify-content: center; background: #3f555f; padding: 24px; border-radius: 48px; box-shadow: inset 0 -6px 0 #26373f; } .grid { display: grid; grid-template-columns: repeat(18, 34px); grid-template-rows: repeat(16, 34px); gap: 3px; background: #56717e; padding: 10px; border-radius: 24px; box-shadow: 0 0 0 4px #8faebd, inset 0 0 0 2px #2b404a; } .cell { background: #b9cfda; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; box-shadow: inset 0 -3px 0 #7f97a3; transition: 0.1s ease; cursor: pointer; color: #1f2f38; position: relative; } .cell.blue-unit { background: #7bb3e0; box-shadow: inset 0 -3px 0 #346fa0, 0 0 0 2px #1f4b7a; color: #0a2940; } .cell.red-unit { background: #e08484; box-shadow: inset 0 -3px 0 #aa4a4a, 0 0 0 2px #852e2e; color: #3d1515; } .cell.highlight { background: #fee684; box-shadow: 0 0 0 3px #ffbb2e, inset 0 -3px 0 #c28b30; transform: scale(1.02); cursor: pointer; } .cell.blue-unit.highlight, .cell.red-unit.highlight { filter: brightness(1.2); box-shadow: 0 0 0 4px gold; } .cell.blue-unit.defeated, .cell.red-unit.defeated { opacity: 0.5; filter: grayscale(0.6); } .cell.blue-unit.defeated::before, .cell.red-unit.defeated::before { content: "💫"; position: absolute; font-size: 20px; opacity: 0.8; z-index: 10; } /* 据点样式 */ .cell.outpost { background: #c2b28b; box-shadow: inset 0 -3px 0 #8f7a5c, 0 0 0 2px #dbb15c; position: relative; } .cell.outpost::after { content: "⚑"; position: absolute; top: 0px; right: 2px; font-size: 12px; color: #4a3a1a; opacity: 0.9; } .cell.outpost.blue-unit { background: #7bb3e0; box-shadow: inset 0 -3px 0 #346fa0, 0 0 0 2px #1f4b7a; } .cell.outpost.red-unit { background: #e08484; box-shadow: inset 0 -3px 0 #aa4a4a, 0 0 0 2px #852e2e; } .cell.outpost.blue-unit::after, .cell.outpost.red-unit::after { content: "⚑"; color: gold; text-shadow: 0 0 2px black; }
.unit-emoji {
font-size: 1.5rem;
line-height: 1;
filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.3));
}
.move-cost-badge {
position: absolute;
top: -2px;
right: -4px;
background: #222;
color: white;
border-radius: 20px;
font-size: 0.7rem;
font-weight: bold;
padding: 2px 5px;
border: 1px solid gold;
background: #3f280e;
z-index: 5;
}
.attack-range-badge {
position: absolute;
bottom: -2px;
right: -4px;
background: #8b0000;
color: white;
border-radius: 20px;
font-size: 0.7rem;
font-weight: bold;
padding: 2px 5px;
border: 1px solid orange;
z-index: 5;
}
.footer {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 20px;
color: #e0d7c0;
}
.info {
background: #1a2f38;
padding: 12px 24px;
border-radius: 30px;
font-size: 1.1rem;
display: flex;
gap: 20px;
flex-wrap: wrap;
}
.info span {
color: #fdd47e;
font-weight: 600;
}
.btn {
background: #c5a156;
border: none;
padding: 10px 32px;
border-radius: 40px;
font-weight: 800;
font-size: 1.3rem;
color: #202d34;
box-shadow: 0 6px 0 #7b5d31;
cursor: pointer;
transition: 0.06s linear;
}
.btn:active {
transform: translateY(4px);
box-shadow: 0 2px 0 #7b5d31;
}
.btn:disabled {
opacity: 0.4;
transform: translateY(2px);
box-shadow: 0 4px 0 #7b5d31;
pointer-events: none;
}
.victory-banner {
background: #ca933a;
color: #212121;
font-size: 1.8rem;
font-weight: 800;
padding: 12px 32px;
border-radius: 60px;
text-align: center;
margin-bottom: 16px;
border: 3px solid gold;
}
.status-message {
background: #2f1e2e;
color: #ffb6b6;
padding: 4px 16px;
border-radius: 30px;
font-size: 1rem;
margin-left: 10px;
}
</style>
</head> <body> <div class="game-container"> <div class="header"> <div class="player-panel"> <div class="player-info blue"> <span class="badge">⚔️</span> <span>蓝方</span> <span id="blueFunds" class="funds">0</span> <span id="blueVP" class="victory-points">0</span> </div> <div class="player-info red"> <span class="badge">⚔️</span> <span>红方</span> <span id="redFunds" class="funds">0</span> <span id="redVP" class="victory-points">0</span> </div> </div> <div id="turnDisplay" class="turn-indicator">蓝方回合</div> </div>
<div id="victoryMessage" class="victory-banner" style="display: none;">🏆 胜利 🏆</div>
<div class="board-wrapper">
<div id="chessboard" class="grid"></div>
</div>
<div class="footer">
<div class="info">
<div>⚡ 移动: 1/3/5... <span id="moveCountDisplay">0</span></div>
<div>💰 生产(8费): 点击空格➕ | 新兵⏳当回合不可移动</div>
<div>⚔️ 攻击(1费): 点击敌方单位 | 概率 2/(距离+1)</div>
<div><span id="selectedInfo"></span></div>
</div>
<button id="endTurnBtn" class="btn">结束回合</button>
</div>
</body> </html>