Upload 1633 files
Browse files- .gitattributes +26 -0
- assets/boss_bg_arena.jpg +3 -0
- assets/boss_taotie.jpg +3 -0
- assets/boss_taotie.png +3 -0
- boss-test.html +2091 -0
- css/game.css +194 -0
- docs/art-style-guide.md +4 -4
- docs/map-conquest-design.md +8 -8
- index.html +6 -6
- js/admin.js +2 -2
- js/announcements.js +167 -0
- js/config.js +6 -6
- js/game.js +36 -34
- scratch/boss_grid.png +3 -0
- scratch/eye_markers_test1.png +3 -0
- scratch/eye_markers_test2.png +3 -0
- scratch/eye_markers_test3.png +3 -0
- scratch/face_region.png +3 -0
- scratch/head_full.png +3 -0
- scratch/test_syntax.js +602 -0
- screenshots/01_戰略沙盤全景_領地軍略.png +3 -0
- screenshots/02_軍機策驗_想變強躲不掉考試.png +3 -0
- screenshots/03_真實學生瘋狂刷題紀錄_滿分洗版.png +3 -0
- screenshots/04_全軍共拓_班級合作每週軍餉.png +3 -0
- screenshots/05_群英金榜_產量與軍餉排行.png +3 -0
- screenshots/06_教師後台_測驗派送與進度控管.png +3 -0
- screenshots/07_教師後台_城池沙盤校準與路線.png +3 -0
- screenshots/08_教師後台_全班進度與個別題庫指派.png +3 -0
- screenshots/game_class_tab_1792494579167.png +3 -0
- screenshots/game_quiz_tab_1792494569186.png +3 -0
- screenshots/game_rank_tab_1792494588134.png +3 -0
- screenshots/game_territory_map_1792494562359.png +3 -0
- screenshots/student_game_page_1792494403951.png +3 -0
- screenshots/teacher_admin_dashboard_1792494391842.png +3 -0
- screenshots/teacher_quiz_dispatch_1792494509650.png +3 -0
- screenshots/teacher_quiz_records_1792494519910.png +3 -0
- screenshots/teacher_territory_calibrator_1792494514316.png +3 -0
- teacher.html +1 -1
- tools/__pycache__/cutout_rembg.cpython-313.pyc +0 -0
- tools/alpha-reset.js +1 -1
- tools/cutout_rembg.py +27 -0
.gitattributes
CHANGED
|
@@ -87,3 +87,29 @@ assets/stage_7.png filter=lfs diff=lfs merge=lfs -text
|
|
| 87 |
assets/stage_8.jpg filter=lfs diff=lfs merge=lfs -text
|
| 88 |
assets/stage_8.png filter=lfs diff=lfs merge=lfs -text
|
| 89 |
assets/test_b1_trans.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
assets/stage_8.jpg filter=lfs diff=lfs merge=lfs -text
|
| 88 |
assets/stage_8.png filter=lfs diff=lfs merge=lfs -text
|
| 89 |
assets/test_b1_trans.png filter=lfs diff=lfs merge=lfs -text
|
| 90 |
+
assets/boss_bg_arena.jpg filter=lfs diff=lfs merge=lfs -text
|
| 91 |
+
assets/boss_taotie.jpg filter=lfs diff=lfs merge=lfs -text
|
| 92 |
+
assets/boss_taotie.png filter=lfs diff=lfs merge=lfs -text
|
| 93 |
+
scratch/boss_grid.png filter=lfs diff=lfs merge=lfs -text
|
| 94 |
+
scratch/eye_markers_test1.png filter=lfs diff=lfs merge=lfs -text
|
| 95 |
+
scratch/eye_markers_test2.png filter=lfs diff=lfs merge=lfs -text
|
| 96 |
+
scratch/eye_markers_test3.png filter=lfs diff=lfs merge=lfs -text
|
| 97 |
+
scratch/face_region.png filter=lfs diff=lfs merge=lfs -text
|
| 98 |
+
scratch/head_full.png filter=lfs diff=lfs merge=lfs -text
|
| 99 |
+
screenshots/01_戰略沙盤全景_領地軍略.png filter=lfs diff=lfs merge=lfs -text
|
| 100 |
+
screenshots/02_軍機策驗_想變強躲不掉考試.png filter=lfs diff=lfs merge=lfs -text
|
| 101 |
+
screenshots/03_真實學生瘋狂刷題紀錄_滿分洗版.png filter=lfs diff=lfs merge=lfs -text
|
| 102 |
+
screenshots/04_全軍共拓_班級合作每週軍餉.png filter=lfs diff=lfs merge=lfs -text
|
| 103 |
+
screenshots/05_群英金榜_產量與軍餉排行.png filter=lfs diff=lfs merge=lfs -text
|
| 104 |
+
screenshots/06_教師後台_測驗派送與進度控管.png filter=lfs diff=lfs merge=lfs -text
|
| 105 |
+
screenshots/07_教師後台_城池沙盤校準與路線.png filter=lfs diff=lfs merge=lfs -text
|
| 106 |
+
screenshots/08_教師後台_全班進度與個別題庫指派.png filter=lfs diff=lfs merge=lfs -text
|
| 107 |
+
screenshots/game_class_tab_1792494579167.png filter=lfs diff=lfs merge=lfs -text
|
| 108 |
+
screenshots/game_quiz_tab_1792494569186.png filter=lfs diff=lfs merge=lfs -text
|
| 109 |
+
screenshots/game_rank_tab_1792494588134.png filter=lfs diff=lfs merge=lfs -text
|
| 110 |
+
screenshots/game_territory_map_1792494562359.png filter=lfs diff=lfs merge=lfs -text
|
| 111 |
+
screenshots/student_game_page_1792494403951.png filter=lfs diff=lfs merge=lfs -text
|
| 112 |
+
screenshots/teacher_admin_dashboard_1792494391842.png filter=lfs diff=lfs merge=lfs -text
|
| 113 |
+
screenshots/teacher_quiz_dispatch_1792494509650.png filter=lfs diff=lfs merge=lfs -text
|
| 114 |
+
screenshots/teacher_quiz_records_1792494519910.png filter=lfs diff=lfs merge=lfs -text
|
| 115 |
+
screenshots/teacher_territory_calibrator_1792494514316.png filter=lfs diff=lfs merge=lfs -text
|
assets/boss_bg_arena.jpg
ADDED
|
Git LFS Details
|
assets/boss_taotie.jpg
ADDED
|
Git LFS Details
|
assets/boss_taotie.png
ADDED
|
Git LFS Details
|
boss-test.html
ADDED
|
@@ -0,0 +1,2091 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh-TW">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
| 6 |
+
<title>上古・饕餮 討伐戰|世界王測試頁</title>
|
| 7 |
+
<meta name="description" content="世界王上古・饕餮討伐戰獨立測試頁:Boss 介紹、討伐獎勵與全螢幕答題戰鬥。">
|
| 8 |
+
<link rel="stylesheet" href="css/base.css">
|
| 9 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 10 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 11 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&family=Noto+Sans+TC:wght@400;500;700;900&display=swap" rel="stylesheet">
|
| 12 |
+
<style>
|
| 13 |
+
:root {
|
| 14 |
+
--gold: #f5c451;
|
| 15 |
+
--gold-deep: #d98a14;
|
| 16 |
+
--glass-bg: rgba(255, 255, 255, 0.10);
|
| 17 |
+
--glass-line: rgba(255, 255, 255, 0.28);
|
| 18 |
+
--glass-hi: rgba(255, 255, 255, 0.18);
|
| 19 |
+
}
|
| 20 |
+
* { box-sizing: border-box; }
|
| 21 |
+
html, body {
|
| 22 |
+
margin: 0;
|
| 23 |
+
height: 100%;
|
| 24 |
+
background: #07080d;
|
| 25 |
+
color: #f8fafc;
|
| 26 |
+
font-family: 'Inter', 'Noto Sans TC', sans-serif;
|
| 27 |
+
user-select: none;
|
| 28 |
+
overflow: hidden;
|
| 29 |
+
}
|
| 30 |
+
.hidden { display: none !important; }
|
| 31 |
+
|
| 32 |
+
/* ========== 測試控制列(僅測試用,可收合) ========== */
|
| 33 |
+
.debug-bar {
|
| 34 |
+
position: fixed;
|
| 35 |
+
left: 10px;
|
| 36 |
+
bottom: 10px;
|
| 37 |
+
z-index: 3000;
|
| 38 |
+
background: rgba(10, 10, 16, 0.88);
|
| 39 |
+
backdrop-filter: blur(8px);
|
| 40 |
+
border: 1px solid rgba(245, 196, 81, 0.35);
|
| 41 |
+
border-radius: 12px;
|
| 42 |
+
padding: 6px 8px;
|
| 43 |
+
display: flex;
|
| 44 |
+
gap: 5px;
|
| 45 |
+
flex-wrap: wrap;
|
| 46 |
+
align-items: center;
|
| 47 |
+
max-width: 560px;
|
| 48 |
+
font-size: 11px;
|
| 49 |
+
color: #cbd5e1;
|
| 50 |
+
}
|
| 51 |
+
.debug-bar.collapsed > :not(.debug-toggle) { display: none; }
|
| 52 |
+
.debug-btn {
|
| 53 |
+
background: #1e1a24;
|
| 54 |
+
color: #fde68a;
|
| 55 |
+
border: 1px solid #6b4a12;
|
| 56 |
+
padding: 4px 8px;
|
| 57 |
+
border-radius: 6px;
|
| 58 |
+
font-size: 11px;
|
| 59 |
+
font-weight: 700;
|
| 60 |
+
cursor: pointer;
|
| 61 |
+
transition: background 0.15s, transform 0.15s;
|
| 62 |
+
}
|
| 63 |
+
.debug-btn:hover { background: #6b4a12; color: #fff; transform: translateY(-1px); }
|
| 64 |
+
|
| 65 |
+
/* ========== 共用背景 ========== */
|
| 66 |
+
.scene {
|
| 67 |
+
position: fixed;
|
| 68 |
+
inset: 0;
|
| 69 |
+
overflow: hidden;
|
| 70 |
+
}
|
| 71 |
+
.scene-bg {
|
| 72 |
+
position: absolute;
|
| 73 |
+
inset: 0;
|
| 74 |
+
background: url('assets/boss_bg_arena.jpg') center / cover no-repeat;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
/* =====================================================
|
| 78 |
+
第一頁:Boss 介紹
|
| 79 |
+
===================================================== */
|
| 80 |
+
#screenIntro .scene-bg {
|
| 81 |
+
filter: blur(6px) brightness(0.45) saturate(1.1);
|
| 82 |
+
transform: scale(1.06);
|
| 83 |
+
}
|
| 84 |
+
.intro-wrap {
|
| 85 |
+
position: relative;
|
| 86 |
+
z-index: 2;
|
| 87 |
+
height: 100%;
|
| 88 |
+
display: flex;
|
| 89 |
+
align-items: center;
|
| 90 |
+
justify-content: center;
|
| 91 |
+
padding: 20px;
|
| 92 |
+
overflow-y: auto;
|
| 93 |
+
}
|
| 94 |
+
.intro-card {
|
| 95 |
+
width: 100%;
|
| 96 |
+
max-width: 1040px;
|
| 97 |
+
display: grid;
|
| 98 |
+
grid-template-columns: 1fr 1.1fr;
|
| 99 |
+
gap: 28px;
|
| 100 |
+
background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
|
| 101 |
+
backdrop-filter: blur(18px) saturate(1.2);
|
| 102 |
+
-webkit-backdrop-filter: blur(18px) saturate(1.2);
|
| 103 |
+
border: 1px solid var(--glass-line);
|
| 104 |
+
border-radius: 24px;
|
| 105 |
+
padding: 26px;
|
| 106 |
+
box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 1px 0 var(--glass-hi);
|
| 107 |
+
animation: cardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
|
| 108 |
+
}
|
| 109 |
+
@keyframes cardIn {
|
| 110 |
+
from { opacity: 0; transform: translateY(18px) scale(0.98); }
|
| 111 |
+
to { opacity: 1; transform: none; }
|
| 112 |
+
}
|
| 113 |
+
.intro-portrait {
|
| 114 |
+
position: relative;
|
| 115 |
+
border-radius: 18px;
|
| 116 |
+
background:
|
| 117 |
+
radial-gradient(circle at 50% 55%, rgba(168, 85, 247, 0.45), transparent 62%),
|
| 118 |
+
url('assets/boss_bg_arena.jpg') center / cover no-repeat;
|
| 119 |
+
border: 1px solid rgba(245, 196, 81, 0.35);
|
| 120 |
+
overflow: hidden;
|
| 121 |
+
display: flex;
|
| 122 |
+
align-items: flex-end;
|
| 123 |
+
justify-content: center;
|
| 124 |
+
min-height: 380px;
|
| 125 |
+
box-shadow: inset 0 0 60px rgba(0,0,0,0.6);
|
| 126 |
+
}
|
| 127 |
+
.intro-portrait::after {
|
| 128 |
+
content: '';
|
| 129 |
+
position: absolute;
|
| 130 |
+
inset: 0;
|
| 131 |
+
background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.55));
|
| 132 |
+
pointer-events: none;
|
| 133 |
+
}
|
| 134 |
+
.intro-portrait img {
|
| 135 |
+
position: relative;
|
| 136 |
+
z-index: 1;
|
| 137 |
+
width: 100%;
|
| 138 |
+
max-height: 400px;
|
| 139 |
+
object-fit: contain;
|
| 140 |
+
filter: drop-shadow(0 16px 26px rgba(0,0,0,0.85));
|
| 141 |
+
animation: idleFloat 3.8s ease-in-out infinite;
|
| 142 |
+
}
|
| 143 |
+
.intro-info {
|
| 144 |
+
display: flex;
|
| 145 |
+
flex-direction: column;
|
| 146 |
+
gap: 16px;
|
| 147 |
+
min-width: 0;
|
| 148 |
+
}
|
| 149 |
+
.boss-title {
|
| 150 |
+
margin: 0;
|
| 151 |
+
font-size: 40px;
|
| 152 |
+
font-weight: 900;
|
| 153 |
+
letter-spacing: 4px;
|
| 154 |
+
background: linear-gradient(180deg, #fff 20%, #fde68a 60%, #f59e0b);
|
| 155 |
+
-webkit-background-clip: text;
|
| 156 |
+
background-clip: text;
|
| 157 |
+
-webkit-text-fill-color: transparent;
|
| 158 |
+
filter: drop-shadow(0 3px 10px rgba(0,0,0,0.6));
|
| 159 |
+
}
|
| 160 |
+
.boss-desc {
|
| 161 |
+
margin: 0;
|
| 162 |
+
font-size: 14px;
|
| 163 |
+
line-height: 1.8;
|
| 164 |
+
color: #e2e8f0;
|
| 165 |
+
}
|
| 166 |
+
.class-progress {
|
| 167 |
+
display: flex;
|
| 168 |
+
flex-direction: column;
|
| 169 |
+
gap: 6px;
|
| 170 |
+
font-size: 12px;
|
| 171 |
+
color: #cbd5e1;
|
| 172 |
+
}
|
| 173 |
+
.class-progress-row {
|
| 174 |
+
display: flex;
|
| 175 |
+
justify-content: space-between;
|
| 176 |
+
font-weight: 700;
|
| 177 |
+
}
|
| 178 |
+
.mini-hp {
|
| 179 |
+
height: 8px;
|
| 180 |
+
border-radius: 99px;
|
| 181 |
+
background: rgba(0,0,0,0.45);
|
| 182 |
+
overflow: hidden;
|
| 183 |
+
border: 1px solid rgba(255,255,255,0.15);
|
| 184 |
+
}
|
| 185 |
+
.mini-hp > div {
|
| 186 |
+
height: 100%;
|
| 187 |
+
background: linear-gradient(90deg, #ef4444, #f97316, #eab308);
|
| 188 |
+
transition: width 0.4s;
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
.reward-box {
|
| 192 |
+
background: rgba(0, 0, 0, 0.28);
|
| 193 |
+
border: 1px solid rgba(245, 196, 81, 0.3);
|
| 194 |
+
border-radius: 16px;
|
| 195 |
+
padding: 14px 16px;
|
| 196 |
+
}
|
| 197 |
+
.reward-head {
|
| 198 |
+
display: flex;
|
| 199 |
+
justify-content: space-between;
|
| 200 |
+
align-items: baseline;
|
| 201 |
+
gap: 8px;
|
| 202 |
+
margin-bottom: 10px;
|
| 203 |
+
flex-wrap: wrap;
|
| 204 |
+
}
|
| 205 |
+
.reward-head h2 {
|
| 206 |
+
margin: 0;
|
| 207 |
+
font-size: 16px;
|
| 208 |
+
font-weight: 900;
|
| 209 |
+
color: var(--gold);
|
| 210 |
+
letter-spacing: 1px;
|
| 211 |
+
}
|
| 212 |
+
.reward-head span {
|
| 213 |
+
font-size: 11px;
|
| 214 |
+
color: #94a3b8;
|
| 215 |
+
}
|
| 216 |
+
.reward-list {
|
| 217 |
+
display: grid;
|
| 218 |
+
grid-template-columns: 1fr 1fr;
|
| 219 |
+
gap: 8px;
|
| 220 |
+
}
|
| 221 |
+
.reward-item {
|
| 222 |
+
display: flex;
|
| 223 |
+
align-items: center;
|
| 224 |
+
gap: 10px;
|
| 225 |
+
background: rgba(255,255,255,0.06);
|
| 226 |
+
border: 1px solid rgba(255,255,255,0.12);
|
| 227 |
+
border-radius: 12px;
|
| 228 |
+
padding: 9px 12px;
|
| 229 |
+
transition: transform 0.2s, border-color 0.2s, background 0.2s;
|
| 230 |
+
}
|
| 231 |
+
.reward-item:hover {
|
| 232 |
+
transform: translateY(-2px);
|
| 233 |
+
border-color: rgba(245, 196, 81, 0.6);
|
| 234 |
+
background: rgba(245, 196, 81, 0.10);
|
| 235 |
+
}
|
| 236 |
+
.reward-item.mvp {
|
| 237 |
+
grid-column: 1 / -1;
|
| 238 |
+
border-color: rgba(239, 68, 68, 0.4);
|
| 239 |
+
background: rgba(239, 68, 68, 0.10);
|
| 240 |
+
}
|
| 241 |
+
.reward-ico { font-size: 22px; flex-shrink: 0; }
|
| 242 |
+
.reward-name { font-size: 13px; font-weight: 800; color: #fef3c7; }
|
| 243 |
+
.reward-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }
|
| 244 |
+
.reward-qual {
|
| 245 |
+
margin-top: 10px;
|
| 246 |
+
font-size: 12px;
|
| 247 |
+
font-weight: 700;
|
| 248 |
+
color: #fca5a5;
|
| 249 |
+
}
|
| 250 |
+
.reward-qual.ok { color: #86efac; }
|
| 251 |
+
|
| 252 |
+
.btn-start {
|
| 253 |
+
position: relative;
|
| 254 |
+
overflow: hidden;
|
| 255 |
+
width: 100%;
|
| 256 |
+
min-height: 58px;
|
| 257 |
+
border: none;
|
| 258 |
+
border-radius: 16px;
|
| 259 |
+
font-size: 20px;
|
| 260 |
+
font-weight: 900;
|
| 261 |
+
letter-spacing: 4px;
|
| 262 |
+
color: #2a1500;
|
| 263 |
+
background: linear-gradient(180deg, #ffe08a, #f5b323 55%, #d98a14);
|
| 264 |
+
box-shadow: 0 10px 30px rgba(245, 179, 35, 0.45), inset 0 2px 0 rgba(255,255,255,0.6);
|
| 265 |
+
cursor: pointer;
|
| 266 |
+
transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
|
| 267 |
+
}
|
| 268 |
+
.btn-start::before {
|
| 269 |
+
content: '';
|
| 270 |
+
position: absolute;
|
| 271 |
+
top: 0; left: -60%;
|
| 272 |
+
width: 40%; height: 100%;
|
| 273 |
+
background: linear-gradient(100deg, transparent, rgba(255,255,255,0.65), transparent);
|
| 274 |
+
transform: skewX(-20deg);
|
| 275 |
+
animation: shine 2.8s infinite;
|
| 276 |
+
}
|
| 277 |
+
@keyframes shine {
|
| 278 |
+
0% { left: -60%; }
|
| 279 |
+
60%, 100% { left: 130%; }
|
| 280 |
+
}
|
| 281 |
+
.btn-start:hover:not(:disabled) {
|
| 282 |
+
transform: translateY(-2px) scale(1.01);
|
| 283 |
+
box-shadow: 0 14px 38px rgba(245, 179, 35, 0.6), inset 0 2px 0 rgba(255,255,255,0.6);
|
| 284 |
+
}
|
| 285 |
+
.btn-start:active:not(:disabled) { transform: scale(0.98); }
|
| 286 |
+
.btn-start:disabled {
|
| 287 |
+
cursor: not-allowed;
|
| 288 |
+
color: #94a3b8;
|
| 289 |
+
background: linear-gradient(180deg, #475569, #334155);
|
| 290 |
+
box-shadow: none;
|
| 291 |
+
}
|
| 292 |
+
.btn-start:disabled::before { display: none; }
|
| 293 |
+
|
| 294 |
+
/* =====================================================
|
| 295 |
+
第二頁:全螢幕戰鬥
|
| 296 |
+
===================================================== */
|
| 297 |
+
#screenBattle {
|
| 298 |
+
display: flex;
|
| 299 |
+
flex-direction: column;
|
| 300 |
+
}
|
| 301 |
+
#screenBattle .scene-bg {
|
| 302 |
+
filter: brightness(0.95) contrast(1.05);
|
| 303 |
+
}
|
| 304 |
+
.battle-hud {
|
| 305 |
+
position: relative;
|
| 306 |
+
z-index: 20;
|
| 307 |
+
margin: 12px 14px 0;
|
| 308 |
+
padding: 10px 18px 12px;
|
| 309 |
+
border-radius: 16px;
|
| 310 |
+
background: rgba(10, 8, 16, 0.62);
|
| 311 |
+
backdrop-filter: blur(12px);
|
| 312 |
+
-webkit-backdrop-filter: blur(12px);
|
| 313 |
+
border: 1px solid rgba(255,255,255,0.16);
|
| 314 |
+
box-shadow: 0 8px 24px rgba(0,0,0,0.45);
|
| 315 |
+
}
|
| 316 |
+
.hud-row {
|
| 317 |
+
display: flex;
|
| 318 |
+
justify-content: space-between;
|
| 319 |
+
align-items: center;
|
| 320 |
+
gap: 10px;
|
| 321 |
+
margin-bottom: 8px;
|
| 322 |
+
}
|
| 323 |
+
.hud-name {
|
| 324 |
+
font-size: 20px;
|
| 325 |
+
font-weight: 900;
|
| 326 |
+
letter-spacing: 3px;
|
| 327 |
+
color: #fff;
|
| 328 |
+
text-shadow: 0 2px 8px rgba(0,0,0,0.7);
|
| 329 |
+
}
|
| 330 |
+
.hud-hp-text {
|
| 331 |
+
font-size: 15px;
|
| 332 |
+
font-weight: 800;
|
| 333 |
+
color: #fca5a5;
|
| 334 |
+
font-variant-numeric: tabular-nums;
|
| 335 |
+
}
|
| 336 |
+
.hp-bar-outer {
|
| 337 |
+
height: 20px;
|
| 338 |
+
background: rgba(0,0,0,0.6);
|
| 339 |
+
border-radius: 99px;
|
| 340 |
+
overflow: hidden;
|
| 341 |
+
border: 1.5px solid rgba(245, 196, 81, 0.5);
|
| 342 |
+
box-shadow: inset 0 2px 6px rgba(0,0,0,0.8);
|
| 343 |
+
}
|
| 344 |
+
.hp-bar-inner {
|
| 345 |
+
height: 100%;
|
| 346 |
+
background: linear-gradient(90deg, #ef4444, #f97316, #eab308);
|
| 347 |
+
border-radius: 99px;
|
| 348 |
+
transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
|
| 349 |
+
box-shadow: 0 0 14px rgba(239, 68, 68, 0.8);
|
| 350 |
+
}
|
| 351 |
+
.hp-bar-inner.low {
|
| 352 |
+
background: linear-gradient(90deg, #b91c1c, #ef4444);
|
| 353 |
+
animation: hpPulse 1.2s infinite;
|
| 354 |
+
}
|
| 355 |
+
@keyframes hpPulse { 50% { opacity: 0.6; } }
|
| 356 |
+
|
| 357 |
+
.battle-stage {
|
| 358 |
+
position: relative;
|
| 359 |
+
z-index: 10;
|
| 360 |
+
flex: 1;
|
| 361 |
+
min-height: 0;
|
| 362 |
+
display: flex;
|
| 363 |
+
align-items: flex-end;
|
| 364 |
+
justify-content: center;
|
| 365 |
+
pointer-events: none;
|
| 366 |
+
}
|
| 367 |
+
.boss-sprite {
|
| 368 |
+
height: 100%;
|
| 369 |
+
max-height: 100%;
|
| 370 |
+
max-width: 92vw;
|
| 371 |
+
object-fit: contain;
|
| 372 |
+
margin-bottom: -40px; /* 讓 Boss 微微壓在題目卡後方,增加層次 */
|
| 373 |
+
filter: drop-shadow(0 18px 28px rgba(0,0,0,0.85)) drop-shadow(0 0 28px rgba(168, 85, 247, 0.45));
|
| 374 |
+
animation: idleFloat 3.8s ease-in-out infinite;
|
| 375 |
+
transition: filter 0.35s ease, transform 0.25s ease;
|
| 376 |
+
}
|
| 377 |
+
@keyframes idleFloat {
|
| 378 |
+
0%, 100% { transform: translateY(0); }
|
| 379 |
+
50% { transform: translateY(-10px); }
|
| 380 |
+
}
|
| 381 |
+
.boss-sprite.hit {
|
| 382 |
+
animation: bossHit 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
| 383 |
+
filter: drop-shadow(0 0 35px #ef4444) brightness(1.5);
|
| 384 |
+
}
|
| 385 |
+
@keyframes bossHit {
|
| 386 |
+
10%, 90% { transform: translate3d(-8px, 0, 0) scale(0.97); }
|
| 387 |
+
20%, 80% { transform: translate3d(10px, -4px, 0) scale(1.03); }
|
| 388 |
+
30%, 50%, 70% { transform: translate3d(-12px, 4px, 0); }
|
| 389 |
+
40%, 60% { transform: translate3d(12px, 0, 0); }
|
| 390 |
+
}
|
| 391 |
+
.boss-sprite.crit-hit {
|
| 392 |
+
animation: bossCrit 0.85s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
| 393 |
+
filter: drop-shadow(0 0 60px #f59e0b) drop-shadow(0 0 30px #ef4444) brightness(2);
|
| 394 |
+
}
|
| 395 |
+
@keyframes bossCrit {
|
| 396 |
+
15% { transform: scale(1.18) rotate(7deg) translateY(-20px); }
|
| 397 |
+
35% { transform: scale(0.88) rotate(-6deg) translateY(12px); }
|
| 398 |
+
55% { transform: scale(1.08) rotate(3deg); }
|
| 399 |
+
75% { transform: scale(0.97) rotate(-1deg); }
|
| 400 |
+
100% { transform: none; }
|
| 401 |
+
}
|
| 402 |
+
|
| 403 |
+
/* 浮動傷害 */
|
| 404 |
+
.floating-dmg-box {
|
| 405 |
+
position: absolute;
|
| 406 |
+
top: 38%;
|
| 407 |
+
left: 50%;
|
| 408 |
+
transform: translate(-50%, -50%);
|
| 409 |
+
z-index: 60;
|
| 410 |
+
pointer-events: none;
|
| 411 |
+
width: 100%;
|
| 412 |
+
display: flex;
|
| 413 |
+
justify-content: center;
|
| 414 |
+
}
|
| 415 |
+
.dmg-normal {
|
| 416 |
+
font-size: 48px;
|
| 417 |
+
font-weight: 900;
|
| 418 |
+
color: #ff6b6b;
|
| 419 |
+
text-shadow: 0 4px 14px rgba(0,0,0,0.9), 0 0 14px rgba(239, 68, 68, 0.8);
|
| 420 |
+
animation: dmgUp 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
|
| 421 |
+
}
|
| 422 |
+
.dmg-notice {
|
| 423 |
+
font-size: 26px;
|
| 424 |
+
color: #fde68a;
|
| 425 |
+
}
|
| 426 |
+
@keyframes dmgUp {
|
| 427 |
+
0% { opacity: 0; transform: translateY(0) scale(0.6); }
|
| 428 |
+
20% { opacity: 1; transform: translateY(-25px) scale(1.2); }
|
| 429 |
+
80% { opacity: 1; transform: translateY(-50px) scale(1); }
|
| 430 |
+
100% { opacity: 0; transform: translateY(-75px) scale(0.8); }
|
| 431 |
+
}
|
| 432 |
+
.dmg-crit {
|
| 433 |
+
text-align: center;
|
| 434 |
+
font-size: 68px;
|
| 435 |
+
font-weight: 900;
|
| 436 |
+
line-height: 1.1;
|
| 437 |
+
background: linear-gradient(180deg, #fff 15%, #fef08a 45%, #f59e0b 80%, #b45309);
|
| 438 |
+
-webkit-background-clip: text;
|
| 439 |
+
background-clip: text;
|
| 440 |
+
-webkit-text-fill-color: transparent;
|
| 441 |
+
filter: drop-shadow(0 0 18px rgba(245, 158, 11, 0.9)) drop-shadow(0 6px 12px rgba(0,0,0,0.9));
|
| 442 |
+
animation: dmgCrit 1.35s cubic-bezier(0.17, 0.89, 0.32, 1.28) forwards;
|
| 443 |
+
}
|
| 444 |
+
.dmg-crit small {
|
| 445 |
+
display: block;
|
| 446 |
+
font-size: 26px;
|
| 447 |
+
letter-spacing: 3px;
|
| 448 |
+
margin-top: 4px;
|
| 449 |
+
}
|
| 450 |
+
@keyframes dmgCrit {
|
| 451 |
+
0% { opacity: 0; transform: scale(0.2) rotate(-14deg); }
|
| 452 |
+
15% { opacity: 1; transform: scale(1.45) rotate(4deg); }
|
| 453 |
+
30% { transform: scale(1.1) rotate(-3deg); }
|
| 454 |
+
75% { opacity: 1; transform: scale(1) translateY(-30px); }
|
| 455 |
+
100% { opacity: 0; transform: scale(0.8) translateY(-70px); }
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
/* 暴擊特效 */
|
| 459 |
+
.screen-flash {
|
| 460 |
+
position: fixed;
|
| 461 |
+
inset: 0;
|
| 462 |
+
z-index: 2500;
|
| 463 |
+
pointer-events: none;
|
| 464 |
+
opacity: 0;
|
| 465 |
+
background: radial-gradient(circle, rgba(254, 240, 138, 0.9), rgba(245, 158, 11, 0.6) 45%, rgba(239, 68, 68, 0.4) 85%, transparent);
|
| 466 |
+
}
|
| 467 |
+
.screen-flash.active { animation: flash 0.4s ease-out forwards; }
|
| 468 |
+
@keyframes flash { 15% { opacity: 1; } 100% { opacity: 0; } }
|
| 469 |
+
.speed-lines {
|
| 470 |
+
position: absolute;
|
| 471 |
+
inset: -20%;
|
| 472 |
+
z-index: 15;
|
| 473 |
+
pointer-events: none;
|
| 474 |
+
opacity: 0;
|
| 475 |
+
background: repeating-conic-gradient(from 0deg at 50% 55%, rgba(254, 240, 138, 0.28) 0deg 6deg, transparent 6deg 18deg);
|
| 476 |
+
}
|
| 477 |
+
.speed-lines.active { animation: lines 0.6s ease-out forwards; }
|
| 478 |
+
@keyframes lines {
|
| 479 |
+
0% { opacity: 0; transform: scale(0.8); }
|
| 480 |
+
20% { opacity: 1; transform: scale(1.05) rotate(4deg); }
|
| 481 |
+
100% { opacity: 0; transform: scale(1.3) rotate(12deg); }
|
| 482 |
+
}
|
| 483 |
+
.slash {
|
| 484 |
+
position: absolute;
|
| 485 |
+
top: 45%;
|
| 486 |
+
left: 50%;
|
| 487 |
+
width: 130%;
|
| 488 |
+
height: 8px;
|
| 489 |
+
z-index: 25;
|
| 490 |
+
pointer-events: none;
|
| 491 |
+
background: linear-gradient(90deg, transparent, #fff 25%, #fef08a 50%, #f59e0b 75%, transparent);
|
| 492 |
+
box-shadow: 0 0 25px #f59e0b, 0 0 45px #fff;
|
| 493 |
+
transform: translate(-50%, -50%) rotate(-30deg) scaleX(0);
|
| 494 |
+
}
|
| 495 |
+
.slash.active { animation: slash 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
|
| 496 |
+
@keyframes slash {
|
| 497 |
+
40% { transform: translate(-50%, -50%) rotate(-30deg) scaleX(1.2); opacity: 1; }
|
| 498 |
+
100% { transform: translate(-50%, -50%) rotate(-30deg) scaleX(1.4); opacity: 0; }
|
| 499 |
+
}
|
| 500 |
+
.heavy-shake { animation: heavyShake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
|
| 501 |
+
@keyframes heavyShake {
|
| 502 |
+
10% { transform: translate(-14px, -10px) rotate(-1deg); }
|
| 503 |
+
20% { transform: translate(16px, 12px) rotate(1.5deg); }
|
| 504 |
+
30% { transform: translate(-18px, 8px) rotate(-1deg); }
|
| 505 |
+
40% { transform: translate(14px, -8px) rotate(1deg); }
|
| 506 |
+
50% { transform: translate(-10px, 6px); }
|
| 507 |
+
60% { transform: translate(8px, -4px); }
|
| 508 |
+
80% { transform: translate(-4px, 2px); }
|
| 509 |
+
100% { transform: none; }
|
| 510 |
+
}
|
| 511 |
+
|
| 512 |
+
/* ========== 玻璃鏡面題目卡 ========== */
|
| 513 |
+
.glass-card {
|
| 514 |
+
position: relative;
|
| 515 |
+
z-index: 30;
|
| 516 |
+
width: calc(100% - 28px);
|
| 517 |
+
max-width: 820px;
|
| 518 |
+
margin: 0 auto 14px;
|
| 519 |
+
padding: 14px 18px 16px;
|
| 520 |
+
border-radius: 22px;
|
| 521 |
+
background: linear-gradient(140deg, rgba(255,255,255,0.20), rgba(255,255,255,0.06) 45%, rgba(255,255,255,0.10));
|
| 522 |
+
backdrop-filter: blur(22px) saturate(1.4);
|
| 523 |
+
-webkit-backdrop-filter: blur(22px) saturate(1.4);
|
| 524 |
+
border: 1px solid var(--glass-line);
|
| 525 |
+
box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.45), inset 0 -1px 0 rgba(255,255,255,0.08);
|
| 526 |
+
overflow: hidden;
|
| 527 |
+
}
|
| 528 |
+
/* 鏡面高光 */
|
| 529 |
+
.glass-card::before {
|
| 530 |
+
content: '';
|
| 531 |
+
position: absolute;
|
| 532 |
+
top: 0; left: 0; right: 0;
|
| 533 |
+
height: 45%;
|
| 534 |
+
background: linear-gradient(180deg, rgba(255,255,255,0.16), transparent);
|
| 535 |
+
pointer-events: none;
|
| 536 |
+
}
|
| 537 |
+
.q-meta {
|
| 538 |
+
position: relative;
|
| 539 |
+
display: flex;
|
| 540 |
+
justify-content: space-between;
|
| 541 |
+
align-items: center;
|
| 542 |
+
gap: 8px;
|
| 543 |
+
margin-bottom: 10px;
|
| 544 |
+
font-size: 12px;
|
| 545 |
+
color: rgba(255,255,255,0.75);
|
| 546 |
+
}
|
| 547 |
+
.q-badge {
|
| 548 |
+
font-weight: 800;
|
| 549 |
+
padding: 3px 10px;
|
| 550 |
+
border-radius: 99px;
|
| 551 |
+
background: rgba(239, 68, 68, 0.25);
|
| 552 |
+
border: 1px solid rgba(252, 165, 165, 0.55);
|
| 553 |
+
color: #fecaca;
|
| 554 |
+
}
|
| 555 |
+
.q-badge.charge {
|
| 556 |
+
background: rgba(245, 196, 81, 0.28);
|
| 557 |
+
border-color: rgba(253, 230, 138, 0.7);
|
| 558 |
+
color: #fef3c7;
|
| 559 |
+
box-shadow: 0 0 12px rgba(245, 196, 81, 0.5);
|
| 560 |
+
}
|
| 561 |
+
.q-meta .crit-hint.buff { color: #fde68a; font-weight: 800; }
|
| 562 |
+
.q-stem {
|
| 563 |
+
position: relative;
|
| 564 |
+
font-size: 17px;
|
| 565 |
+
font-weight: 700;
|
| 566 |
+
line-height: 1.5;
|
| 567 |
+
color: #fff;
|
| 568 |
+
text-shadow: 0 1px 6px rgba(0,0,0,0.5);
|
| 569 |
+
padding: 12px 16px;
|
| 570 |
+
margin-bottom: 12px;
|
| 571 |
+
border-radius: 14px;
|
| 572 |
+
background: rgba(0,0,0,0.22);
|
| 573 |
+
border: 1px solid rgba(255,255,255,0.14);
|
| 574 |
+
}
|
| 575 |
+
.q-stem .tag { font-size: 12px; color: rgba(255,255,255,0.55); margin-left: 6px; font-weight: 500; }
|
| 576 |
+
.q-stem .charge-tag { color: #fde68a; font-weight: 900; margin-right: 4px; }
|
| 577 |
+
.options-grid {
|
| 578 |
+
position: relative;
|
| 579 |
+
display: grid;
|
| 580 |
+
grid-template-columns: 1fr 1fr;
|
| 581 |
+
gap: 10px;
|
| 582 |
+
}
|
| 583 |
+
.opt-btn {
|
| 584 |
+
display: flex;
|
| 585 |
+
align-items: center;
|
| 586 |
+
gap: 10px;
|
| 587 |
+
min-height: 50px;
|
| 588 |
+
padding: 10px 14px;
|
| 589 |
+
border-radius: 14px;
|
| 590 |
+
font-family: inherit;
|
| 591 |
+
font-size: 15px;
|
| 592 |
+
font-weight: 600;
|
| 593 |
+
color: #fff;
|
| 594 |
+
text-align: left;
|
| 595 |
+
cursor: pointer;
|
| 596 |
+
background: rgba(255,255,255,0.10);
|
| 597 |
+
border: 1px solid rgba(255,255,255,0.25);
|
| 598 |
+
box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
|
| 599 |
+
transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
|
| 600 |
+
touch-action: manipulation;
|
| 601 |
+
}
|
| 602 |
+
.opt-btn:hover:not(:disabled) {
|
| 603 |
+
transform: translateY(-2px);
|
| 604 |
+
background: rgba(255,255,255,0.20);
|
| 605 |
+
border-color: rgba(253, 230, 138, 0.8);
|
| 606 |
+
box-shadow: 0 8px 20px rgba(0,0,0,0.3), 0 0 16px rgba(245, 196, 81, 0.3), inset 0 1px 0 rgba(255,255,255,0.3);
|
| 607 |
+
}
|
| 608 |
+
.opt-btn:active:not(:disabled) { transform: scale(0.98); }
|
| 609 |
+
.opt-btn:disabled { cursor: default; }
|
| 610 |
+
.opt-btn .opt-tag {
|
| 611 |
+
display: inline-flex;
|
| 612 |
+
align-items: center;
|
| 613 |
+
justify-content: center;
|
| 614 |
+
width: 28px;
|
| 615 |
+
height: 28px;
|
| 616 |
+
border-radius: 8px;
|
| 617 |
+
flex-shrink: 0;
|
| 618 |
+
font-size: 13px;
|
| 619 |
+
font-weight: 900;
|
| 620 |
+
color: #fef3c7;
|
| 621 |
+
background: rgba(0,0,0,0.3);
|
| 622 |
+
border: 1px solid rgba(255,255,255,0.25);
|
| 623 |
+
}
|
| 624 |
+
.opt-btn.correct {
|
| 625 |
+
background: rgba(16, 185, 129, 0.38);
|
| 626 |
+
border-color: #6ee7b7;
|
| 627 |
+
box-shadow: 0 0 20px rgba(16, 185, 129, 0.55);
|
| 628 |
+
}
|
| 629 |
+
.opt-btn.wrong {
|
| 630 |
+
background: rgba(239, 68, 68, 0.38);
|
| 631 |
+
border-color: #fca5a5;
|
| 632 |
+
}
|
| 633 |
+
.opt-btn.dim { opacity: 0.5; }
|
| 634 |
+
.requeue-notice {
|
| 635 |
+
position: relative;
|
| 636 |
+
margin-top: 10px;
|
| 637 |
+
padding: 7px 12px;
|
| 638 |
+
border-radius: 10px;
|
| 639 |
+
font-size: 12px;
|
| 640 |
+
font-weight: 700;
|
| 641 |
+
color: #fde68a;
|
| 642 |
+
background: rgba(245, 158, 11, 0.18);
|
| 643 |
+
border: 1px solid rgba(245, 196, 81, 0.45);
|
| 644 |
+
}
|
| 645 |
+
|
| 646 |
+
/* ========== 結算彈窗 ========== */
|
| 647 |
+
.modal-overlay {
|
| 648 |
+
position: fixed;
|
| 649 |
+
inset: 0;
|
| 650 |
+
z-index: 2000;
|
| 651 |
+
display: flex;
|
| 652 |
+
align-items: center;
|
| 653 |
+
justify-content: center;
|
| 654 |
+
padding: 16px;
|
| 655 |
+
background: rgba(0,0,0,0.6);
|
| 656 |
+
backdrop-filter: blur(6px);
|
| 657 |
+
}
|
| 658 |
+
.modal-card {
|
| 659 |
+
width: 100%;
|
| 660 |
+
max-width: 440px;
|
| 661 |
+
text-align: center;
|
| 662 |
+
padding: 24px;
|
| 663 |
+
border-radius: 22px;
|
| 664 |
+
background: linear-gradient(140deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
|
| 665 |
+
backdrop-filter: blur(20px);
|
| 666 |
+
-webkit-backdrop-filter: blur(20px);
|
| 667 |
+
border: 1px solid var(--glass-line);
|
| 668 |
+
box-shadow: 0 25px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.4);
|
| 669 |
+
animation: cardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
|
| 670 |
+
}
|
| 671 |
+
.modal-card h2 { margin: 6px 0 14px; font-size: 22px; color: var(--gold); letter-spacing: 2px; }
|
| 672 |
+
.res-rows {
|
| 673 |
+
text-align: left;
|
| 674 |
+
font-size: 14px;
|
| 675 |
+
background: rgba(0,0,0,0.25);
|
| 676 |
+
border: 1px solid rgba(255,255,255,0.12);
|
| 677 |
+
border-radius: 14px;
|
| 678 |
+
padding: 12px 16px;
|
| 679 |
+
margin-bottom: 14px;
|
| 680 |
+
}
|
| 681 |
+
.res-rows div { display: flex; justify-content: space-between; padding: 4px 0; }
|
| 682 |
+
.tail-kill {
|
| 683 |
+
margin-bottom: 14px;
|
| 684 |
+
padding: 10px;
|
| 685 |
+
border-radius: 12px;
|
| 686 |
+
font-weight: 800;
|
| 687 |
+
color: #fecaca;
|
| 688 |
+
background: rgba(239, 68, 68, 0.2);
|
| 689 |
+
border: 1px solid rgba(252, 165, 165, 0.5);
|
| 690 |
+
}
|
| 691 |
+
.btn-modal {
|
| 692 |
+
width: 100%;
|
| 693 |
+
min-height: 48px;
|
| 694 |
+
border: none;
|
| 695 |
+
border-radius: 14px;
|
| 696 |
+
font-family: inherit;
|
| 697 |
+
font-size: 16px;
|
| 698 |
+
font-weight: 900;
|
| 699 |
+
letter-spacing: 2px;
|
| 700 |
+
color: #2a1500;
|
| 701 |
+
cursor: pointer;
|
| 702 |
+
background: linear-gradient(180deg, #ffe08a, #f5b323 55%, #d98a14);
|
| 703 |
+
transition: transform 0.15s;
|
| 704 |
+
}
|
| 705 |
+
.btn-modal:hover { transform: translateY(-2px); }
|
| 706 |
+
|
| 707 |
+
/* ========== 手機版 ========== */
|
| 708 |
+
@media (max-width: 760px) {
|
| 709 |
+
.intro-card { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
|
| 710 |
+
.intro-portrait { min-height: 240px; }
|
| 711 |
+
.intro-portrait img { max-height: 260px; }
|
| 712 |
+
.boss-title { font-size: 30px; }
|
| 713 |
+
.reward-list { grid-template-columns: 1fr; }
|
| 714 |
+
html, body { overflow: auto; }
|
| 715 |
+
#screenIntro { position: absolute; min-height: 100%; }
|
| 716 |
+
.hud-name { font-size: 16px; }
|
| 717 |
+
.q-stem { font-size: 15px; }
|
| 718 |
+
.options-grid { grid-template-columns: 1fr; gap: 8px; }
|
| 719 |
+
.opt-btn { min-height: 46px; font-size: 14px; }
|
| 720 |
+
.boss-sprite { margin-bottom: -20px; }
|
| 721 |
+
.dmg-crit { font-size: 44px; }
|
| 722 |
+
}
|
| 723 |
+
|
| 724 |
+
/* ========== 版本更新公告模版 ========== */
|
| 725 |
+
.patch-modal-wrap {
|
| 726 |
+
position: relative;
|
| 727 |
+
border-radius: 20px;
|
| 728 |
+
overflow: hidden;
|
| 729 |
+
border: 1.5px solid rgba(245, 196, 81, 0.45);
|
| 730 |
+
box-shadow: 0 25px 70px rgba(0,0,0,0.8), 0 0 40px rgba(168, 85, 247, 0.25);
|
| 731 |
+
background: #090a10;
|
| 732 |
+
max-width: 520px;
|
| 733 |
+
width: 100%;
|
| 734 |
+
color: #fff;
|
| 735 |
+
animation: cardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
|
| 736 |
+
text-align: left;
|
| 737 |
+
}
|
| 738 |
+
.patch-stage {
|
| 739 |
+
position: relative;
|
| 740 |
+
width: 100%;
|
| 741 |
+
height: 220px;
|
| 742 |
+
overflow: hidden;
|
| 743 |
+
background: url('assets/boss_bg_arena.jpg') center / cover no-repeat;
|
| 744 |
+
display: flex;
|
| 745 |
+
align-items: flex-end;
|
| 746 |
+
justify-content: center;
|
| 747 |
+
}
|
| 748 |
+
.patch-stage::after {
|
| 749 |
+
content: '';
|
| 750 |
+
position: absolute;
|
| 751 |
+
inset: 0;
|
| 752 |
+
background: linear-gradient(180deg, rgba(9, 10, 16, 0.15) 0%, rgba(9, 10, 16, 0.95) 90%);
|
| 753 |
+
pointer-events: none;
|
| 754 |
+
}
|
| 755 |
+
.patch-silhouette-wrap {
|
| 756 |
+
position: relative;
|
| 757 |
+
z-index: 2;
|
| 758 |
+
width: 100%;
|
| 759 |
+
height: 100%;
|
| 760 |
+
display: flex;
|
| 761 |
+
align-items: flex-end;
|
| 762 |
+
justify-content: center;
|
| 763 |
+
}
|
| 764 |
+
.patch-silhouette-box {
|
| 765 |
+
position: relative;
|
| 766 |
+
display: inline-block;
|
| 767 |
+
line-height: 0;
|
| 768 |
+
animation: silhouettePulse 3.5s ease-in-out infinite alternate;
|
| 769 |
+
transform-origin: center bottom;
|
| 770 |
+
}
|
| 771 |
+
.patch-silhouette-img.is-silhouette {
|
| 772 |
+
height: 200px;
|
| 773 |
+
width: 200px;
|
| 774 |
+
object-fit: contain;
|
| 775 |
+
filter: brightness(0) drop-shadow(0 0 16px rgba(245, 196, 81, 0.95)) drop-shadow(0 0 35px rgba(168, 85, 247, 0.8));
|
| 776 |
+
display: block;
|
| 777 |
+
}
|
| 778 |
+
@keyframes silhouettePulse {
|
| 779 |
+
0% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 12px rgba(245, 196, 81, 0.7)) drop-shadow(0 0 25px rgba(168, 85, 247, 0.6)); }
|
| 780 |
+
100% { transform: scale(1.025) translateY(-4px); filter: drop-shadow(0 0 22px rgba(245, 196, 81, 1)) drop-shadow(0 0 45px rgba(239, 68, 68, 0.75)); }
|
| 781 |
+
}
|
| 782 |
+
.silhouette-eye {
|
| 783 |
+
position: absolute;
|
| 784 |
+
border-radius: 50%;
|
| 785 |
+
background: radial-gradient(circle, #fff 15%, #fef08a 45%, #f59e0b 85%);
|
| 786 |
+
box-shadow: 0 0 8px #f59e0b, 0 0 18px #ef4444;
|
| 787 |
+
z-index: 5;
|
| 788 |
+
pointer-events: none;
|
| 789 |
+
transform: translate(-50%, -50%) rotate(var(--eye-rot, 0deg));
|
| 790 |
+
transform-origin: center center;
|
| 791 |
+
animation: eyeBlink 4s infinite ease-in-out;
|
| 792 |
+
}
|
| 793 |
+
.eye-left {
|
| 794 |
+
left: var(--eye-l-x, 24.5%);
|
| 795 |
+
top: var(--eye-l-y, 48.1%);
|
| 796 |
+
width: var(--eye-l-w, 9px);
|
| 797 |
+
height: var(--eye-l-h, 6px);
|
| 798 |
+
--eye-rot: var(--eye-l-rot, 14deg);
|
| 799 |
+
}
|
| 800 |
+
.eye-right {
|
| 801 |
+
left: var(--eye-r-x, 37.7%);
|
| 802 |
+
top: var(--eye-r-y, 44.5%);
|
| 803 |
+
width: var(--eye-r-w, 11px);
|
| 804 |
+
height: var(--eye-r-h, 8px);
|
| 805 |
+
--eye-rot: var(--eye-r-rot, -6deg);
|
| 806 |
+
}
|
| 807 |
+
@keyframes eyeBlink {
|
| 808 |
+
0%, 90%, 100% {
|
| 809 |
+
opacity: 1;
|
| 810 |
+
transform: translate(-50%, -50%) rotate(var(--eye-rot, 0deg)) scale(1, 1);
|
| 811 |
+
}
|
| 812 |
+
93%, 95% {
|
| 813 |
+
opacity: 0.15;
|
| 814 |
+
transform: translate(-50%, -50%) rotate(var(--eye-rot, 0deg)) scale(1, 0.1);
|
| 815 |
+
}
|
| 816 |
+
}
|
| 817 |
+
|
| 818 |
+
/* 眼睛定位與校準工具 (Eyes Calibrator) 專屬樣式 */
|
| 819 |
+
.calibrator-modal {
|
| 820 |
+
width: 94%;
|
| 821 |
+
max-width: 820px;
|
| 822 |
+
max-height: 92vh;
|
| 823 |
+
background: #0f172a;
|
| 824 |
+
border: 1px solid rgba(245, 196, 81, 0.4);
|
| 825 |
+
border-radius: 18px;
|
| 826 |
+
box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 196, 81, 0.2);
|
| 827 |
+
display: flex;
|
| 828 |
+
flex-direction: column;
|
| 829 |
+
overflow: hidden;
|
| 830 |
+
animation: modalPop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
|
| 831 |
+
}
|
| 832 |
+
.calibrator-header {
|
| 833 |
+
padding: 14px 20px;
|
| 834 |
+
background: linear-gradient(90deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
|
| 835 |
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
| 836 |
+
display: flex;
|
| 837 |
+
justify-content: space-between;
|
| 838 |
+
align-items: center;
|
| 839 |
+
}
|
| 840 |
+
.calibrator-header h3 {
|
| 841 |
+
margin: 0;
|
| 842 |
+
font-size: 16px;
|
| 843 |
+
color: #fde68a;
|
| 844 |
+
display: flex;
|
| 845 |
+
align-items: center;
|
| 846 |
+
gap: 8px;
|
| 847 |
+
}
|
| 848 |
+
.calibrator-body {
|
| 849 |
+
padding: 16px;
|
| 850 |
+
overflow-y: auto;
|
| 851 |
+
display: grid;
|
| 852 |
+
grid-template-columns: 290px 1fr;
|
| 853 |
+
gap: 20px;
|
| 854 |
+
}
|
| 855 |
+
@media (max-width: 720px) {
|
| 856 |
+
.calibrator-body {
|
| 857 |
+
grid-template-columns: 1fr;
|
| 858 |
+
}
|
| 859 |
+
}
|
| 860 |
+
.calibrator-preview-col {
|
| 861 |
+
display: flex;
|
| 862 |
+
flex-direction: column;
|
| 863 |
+
align-items: center;
|
| 864 |
+
gap: 12px;
|
| 865 |
+
}
|
| 866 |
+
.calibrator-stage-wrap {
|
| 867 |
+
width: 270px;
|
| 868 |
+
height: 270px;
|
| 869 |
+
background: radial-gradient(circle, #1e293b 0%, #090d16 100%);
|
| 870 |
+
border: 2px dashed rgba(245, 196, 81, 0.35);
|
| 871 |
+
border-radius: 14px;
|
| 872 |
+
position: relative;
|
| 873 |
+
overflow: hidden;
|
| 874 |
+
display: flex;
|
| 875 |
+
align-items: center;
|
| 876 |
+
justify-content: center;
|
| 877 |
+
user-select: none;
|
| 878 |
+
}
|
| 879 |
+
.cal-underlay-img {
|
| 880 |
+
position: absolute;
|
| 881 |
+
width: 250px;
|
| 882 |
+
height: 250px;
|
| 883 |
+
object-fit: contain;
|
| 884 |
+
pointer-events: none;
|
| 885 |
+
transition: opacity 0.2s ease;
|
| 886 |
+
}
|
| 887 |
+
.cal-silhouette-img {
|
| 888 |
+
position: absolute;
|
| 889 |
+
width: 250px;
|
| 890 |
+
height: 250px;
|
| 891 |
+
object-fit: contain;
|
| 892 |
+
filter: brightness(0) drop-shadow(0 0 12px rgba(245, 196, 81, 0.9)) drop-shadow(0 0 25px rgba(168, 85, 247, 0.7));
|
| 893 |
+
pointer-events: none;
|
| 894 |
+
transition: opacity 0.2s ease;
|
| 895 |
+
}
|
| 896 |
+
.cal-box {
|
| 897 |
+
width: 250px;
|
| 898 |
+
height: 250px;
|
| 899 |
+
position: relative;
|
| 900 |
+
}
|
| 901 |
+
.cal-eye {
|
| 902 |
+
position: absolute;
|
| 903 |
+
border-radius: 50%;
|
| 904 |
+
background: radial-gradient(circle, #fff 15%, #fef08a 45%, #f59e0b 85%);
|
| 905 |
+
box-shadow: 0 0 8px #f59e0b, 0 0 18px #ef4444;
|
| 906 |
+
pointer-events: none;
|
| 907 |
+
z-index: 10;
|
| 908 |
+
transform: translate(-50%, -50%);
|
| 909 |
+
}
|
| 910 |
+
/* 拖曳握把 */
|
| 911 |
+
.cal-handle {
|
| 912 |
+
position: absolute;
|
| 913 |
+
width: 24px;
|
| 914 |
+
height: 24px;
|
| 915 |
+
border-radius: 50%;
|
| 916 |
+
border: 2px solid #fff;
|
| 917 |
+
transform: translate(-50%, -50%);
|
| 918 |
+
cursor: grab;
|
| 919 |
+
z-index: 20;
|
| 920 |
+
display: flex;
|
| 921 |
+
align-items: center;
|
| 922 |
+
justify-content: center;
|
| 923 |
+
font-size: 11px;
|
| 924 |
+
font-weight: 900;
|
| 925 |
+
color: #fff;
|
| 926 |
+
box-shadow: 0 2px 8px rgba(0,0,0,0.8);
|
| 927 |
+
touch-action: none;
|
| 928 |
+
}
|
| 929 |
+
.cal-handle:active {
|
| 930 |
+
cursor: grabbing;
|
| 931 |
+
transform: translate(-50%, -50%) scale(1.15);
|
| 932 |
+
}
|
| 933 |
+
.cal-handle.handle-l {
|
| 934 |
+
background: rgba(16, 185, 129, 0.85);
|
| 935 |
+
box-shadow: 0 0 10px #10b981;
|
| 936 |
+
}
|
| 937 |
+
.cal-handle.handle-r {
|
| 938 |
+
background: rgba(14, 165, 233, 0.85);
|
| 939 |
+
box-shadow: 0 0 10px #0ea5e9;
|
| 940 |
+
}
|
| 941 |
+
.cal-mode-pills {
|
| 942 |
+
display: flex;
|
| 943 |
+
gap: 6px;
|
| 944 |
+
width: 100%;
|
| 945 |
+
justify-content: center;
|
| 946 |
+
}
|
| 947 |
+
.cal-pill-btn {
|
| 948 |
+
padding: 5px 10px;
|
| 949 |
+
font-size: 12px;
|
| 950 |
+
background: rgba(255, 255, 255, 0.08);
|
| 951 |
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
| 952 |
+
color: #cbd5e1;
|
| 953 |
+
border-radius: 6px;
|
| 954 |
+
cursor: pointer;
|
| 955 |
+
font-weight: 700;
|
| 956 |
+
transition: all 0.15s;
|
| 957 |
+
}
|
| 958 |
+
.cal-pill-btn.active {
|
| 959 |
+
background: #d97706;
|
| 960 |
+
border-color: #f59e0b;
|
| 961 |
+
color: #fff;
|
| 962 |
+
box-shadow: 0 0 10px rgba(217, 119, 6, 0.4);
|
| 963 |
+
}
|
| 964 |
+
.cal-controls-col {
|
| 965 |
+
display: flex;
|
| 966 |
+
flex-direction: column;
|
| 967 |
+
gap: 12px;
|
| 968 |
+
}
|
| 969 |
+
.cal-card-group {
|
| 970 |
+
display: grid;
|
| 971 |
+
grid-template-columns: 1fr 1fr;
|
| 972 |
+
gap: 10px;
|
| 973 |
+
}
|
| 974 |
+
.cal-eye-card {
|
| 975 |
+
background: rgba(255, 255, 255, 0.04);
|
| 976 |
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
| 977 |
+
border-radius: 10px;
|
| 978 |
+
padding: 10px;
|
| 979 |
+
}
|
| 980 |
+
.cal-card-title {
|
| 981 |
+
font-size: 13px;
|
| 982 |
+
font-weight: 800;
|
| 983 |
+
margin-bottom: 8px;
|
| 984 |
+
display: flex;
|
| 985 |
+
align-items: center;
|
| 986 |
+
gap: 6px;
|
| 987 |
+
}
|
| 988 |
+
.cal-field {
|
| 989 |
+
margin-bottom: 6px;
|
| 990 |
+
font-size: 12px;
|
| 991 |
+
color: #94a3b8;
|
| 992 |
+
}
|
| 993 |
+
.cal-field label {
|
| 994 |
+
display: flex;
|
| 995 |
+
justify-content: space-between;
|
| 996 |
+
margin-bottom: 2px;
|
| 997 |
+
}
|
| 998 |
+
.cal-field label b {
|
| 999 |
+
color: #fde68a;
|
| 1000 |
+
}
|
| 1001 |
+
.cal-field input[type="range"] {
|
| 1002 |
+
width: 100%;
|
| 1003 |
+
accent-color: #f59e0b;
|
| 1004 |
+
cursor: pointer;
|
| 1005 |
+
}
|
| 1006 |
+
.cal-json-box {
|
| 1007 |
+
background: #020617;
|
| 1008 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 1009 |
+
border-radius: 8px;
|
| 1010 |
+
padding: 8px 12px;
|
| 1011 |
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
| 1012 |
+
font-size: 11px;
|
| 1013 |
+
color: #4ade80;
|
| 1014 |
+
max-height: 120px;
|
| 1015 |
+
overflow-y: auto;
|
| 1016 |
+
white-space: pre-wrap;
|
| 1017 |
+
word-break: break-all;
|
| 1018 |
+
}
|
| 1019 |
+
.cal-actions {
|
| 1020 |
+
display: flex;
|
| 1021 |
+
gap: 8px;
|
| 1022 |
+
flex-wrap: wrap;
|
| 1023 |
+
}
|
| 1024 |
+
.cal-act-btn {
|
| 1025 |
+
flex: 1;
|
| 1026 |
+
padding: 8px 12px;
|
| 1027 |
+
font-size: 12px;
|
| 1028 |
+
font-weight: 800;
|
| 1029 |
+
border-radius: 8px;
|
| 1030 |
+
border: none;
|
| 1031 |
+
cursor: pointer;
|
| 1032 |
+
display: inline-flex;
|
| 1033 |
+
align-items: center;
|
| 1034 |
+
justify-content: center;
|
| 1035 |
+
gap: 6px;
|
| 1036 |
+
transition: transform 0.15s, box-shadow 0.15s;
|
| 1037 |
+
}
|
| 1038 |
+
.cal-btn-copy {
|
| 1039 |
+
background: linear-gradient(135deg, #15803d, #22c55e);
|
| 1040 |
+
color: #fff;
|
| 1041 |
+
}
|
| 1042 |
+
.cal-btn-copy:hover {
|
| 1043 |
+
box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
|
| 1044 |
+
transform: translateY(-1px);
|
| 1045 |
+
}
|
| 1046 |
+
.cal-btn-apply {
|
| 1047 |
+
background: linear-gradient(135deg, #b45309, #f59e0b);
|
| 1048 |
+
color: #fff;
|
| 1049 |
+
}
|
| 1050 |
+
.cal-btn-apply:hover {
|
| 1051 |
+
box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
|
| 1052 |
+
transform: translateY(-1px);
|
| 1053 |
+
}
|
| 1054 |
+
.cal-btn-reset {
|
| 1055 |
+
background: rgba(255, 255, 255, 0.1);
|
| 1056 |
+
color: #cbd5e1;
|
| 1057 |
+
flex: 0 0 auto;
|
| 1058 |
+
}
|
| 1059 |
+
.patch-body {
|
| 1060 |
+
position: relative;
|
| 1061 |
+
z-index: 3;
|
| 1062 |
+
padding: 0 20px 20px;
|
| 1063 |
+
background: #090a10;
|
| 1064 |
+
}
|
| 1065 |
+
.patch-badge-pill {
|
| 1066 |
+
display: inline-flex;
|
| 1067 |
+
align-items: center;
|
| 1068 |
+
gap: 6px;
|
| 1069 |
+
background: linear-gradient(135deg, #b45309, #d97706);
|
| 1070 |
+
color: #fff;
|
| 1071 |
+
font-size: 11px;
|
| 1072 |
+
font-weight: 900;
|
| 1073 |
+
padding: 3px 12px;
|
| 1074 |
+
border-radius: 99px;
|
| 1075 |
+
letter-spacing: 1px;
|
| 1076 |
+
box-shadow: 0 2px 10px rgba(217, 119, 6, 0.4);
|
| 1077 |
+
}
|
| 1078 |
+
.patch-title {
|
| 1079 |
+
margin: 6px 0 4px 0;
|
| 1080 |
+
font-size: 22px;
|
| 1081 |
+
font-weight: 900;
|
| 1082 |
+
letter-spacing: 2px;
|
| 1083 |
+
background: linear-gradient(180deg, #fff 20%, #fde68a 65%, #f59e0b 100%);
|
| 1084 |
+
-webkit-background-clip: text;
|
| 1085 |
+
background-clip: text;
|
| 1086 |
+
-webkit-text-fill-color: transparent;
|
| 1087 |
+
}
|
| 1088 |
+
.patch-subtitle {
|
| 1089 |
+
margin: 0 0 12px 0;
|
| 1090 |
+
font-size: 13px;
|
| 1091 |
+
font-weight: 700;
|
| 1092 |
+
color: #fca5a5;
|
| 1093 |
+
letter-spacing: 0.5px;
|
| 1094 |
+
}
|
| 1095 |
+
.patch-lore-box {
|
| 1096 |
+
background: rgba(255, 255, 255, 0.05);
|
| 1097 |
+
border: 1px solid rgba(245, 196, 81, 0.25);
|
| 1098 |
+
border-left: 4px solid #f59e0b;
|
| 1099 |
+
border-radius: 12px;
|
| 1100 |
+
padding: 10px 14px;
|
| 1101 |
+
font-size: 13px;
|
| 1102 |
+
line-height: 1.65;
|
| 1103 |
+
color: #e2e8f0;
|
| 1104 |
+
margin-bottom: 12px;
|
| 1105 |
+
}
|
| 1106 |
+
.patch-features-grid {
|
| 1107 |
+
display: flex;
|
| 1108 |
+
flex-direction: column;
|
| 1109 |
+
gap: 8px;
|
| 1110 |
+
margin-bottom: 16px;
|
| 1111 |
+
}
|
| 1112 |
+
.patch-feat-item {
|
| 1113 |
+
display: flex;
|
| 1114 |
+
align-items: flex-start;
|
| 1115 |
+
gap: 10px;
|
| 1116 |
+
background: rgba(255, 255, 255, 0.04);
|
| 1117 |
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
| 1118 |
+
border-radius: 10px;
|
| 1119 |
+
padding: 8px 12px;
|
| 1120 |
+
}
|
| 1121 |
+
.patch-feat-icon {
|
| 1122 |
+
font-size: 18px;
|
| 1123 |
+
line-height: 1;
|
| 1124 |
+
flex-shrink: 0;
|
| 1125 |
+
margin-top: 2px;
|
| 1126 |
+
}
|
| 1127 |
+
.patch-feat-tit {
|
| 1128 |
+
font-size: 13px;
|
| 1129 |
+
font-weight: 800;
|
| 1130 |
+
color: #fef3c7;
|
| 1131 |
+
}
|
| 1132 |
+
.patch-feat-sub {
|
| 1133 |
+
font-size: 11px;
|
| 1134 |
+
color: #cbd5e1;
|
| 1135 |
+
margin-top: 2px;
|
| 1136 |
+
line-height: 1.35;
|
| 1137 |
+
}
|
| 1138 |
+
.patch-btn-confirm {
|
| 1139 |
+
width: 100%;
|
| 1140 |
+
min-height: 46px;
|
| 1141 |
+
border: none;
|
| 1142 |
+
border-radius: 14px;
|
| 1143 |
+
font-family: inherit;
|
| 1144 |
+
font-size: 16px;
|
| 1145 |
+
font-weight: 900;
|
| 1146 |
+
letter-spacing: 2px;
|
| 1147 |
+
color: #2a1500;
|
| 1148 |
+
background: linear-gradient(180deg, #ffe08a, #f5b323 55%, #d98a14);
|
| 1149 |
+
cursor: pointer;
|
| 1150 |
+
box-shadow: 0 8px 24px rgba(245, 179, 35, 0.4);
|
| 1151 |
+
transition: transform 0.15s, box-shadow 0.15s;
|
| 1152 |
+
}
|
| 1153 |
+
.patch-btn-confirm:hover {
|
| 1154 |
+
transform: translateY(-2px);
|
| 1155 |
+
box-shadow: 0 12px 30px rgba(245, 179, 35, 0.55);
|
| 1156 |
+
}
|
| 1157 |
+
</style>
|
| 1158 |
+
</head>
|
| 1159 |
+
<body>
|
| 1160 |
+
|
| 1161 |
+
<div class="screen-flash" id="flashOverlay"></div>
|
| 1162 |
+
|
| 1163 |
+
<!-- ===================== 第一頁:Boss 介紹 ===================== -->
|
| 1164 |
+
<section class="scene" id="screenIntro">
|
| 1165 |
+
<div class="scene-bg"></div>
|
| 1166 |
+
<div class="intro-wrap">
|
| 1167 |
+
<div class="intro-card">
|
| 1168 |
+
<div class="intro-portrait">
|
| 1169 |
+
<img src="assets/boss_taotie.png" alt="上古・饕餮">
|
| 1170 |
+
</div>
|
| 1171 |
+
|
| 1172 |
+
<div class="intro-info">
|
| 1173 |
+
<h1 class="boss-title">上古・饕餮</h1>
|
| 1174 |
+
<div style="display:inline-flex; align-items:center; gap:6px; background:rgba(245,158,11,0.15); border:1px solid rgba(245,158,11,0.4); border-radius:6px; padding:3px 10px; font-size:12px; color:#fde68a; font-weight:700; margin-bottom:10px;">
|
| 1175 |
+
🏛️ 解鎖門檻:完成第三單元(51-75)的軍機策驗後開放
|
| 1176 |
+
</div>
|
| 1177 |
+
<p class="boss-desc">
|
| 1178 |
+
貪食萬物的太古凶獸,自封印中甦醒,盤踞在雲海之上的八卦古壇。
|
| 1179 |
+
牠以學子們的「錯題」為食——答錯越多,牠就越強大。
|
| 1180 |
+
唯有全班齊心,親手克服自己的弱點題,才能將牠重新封印!
|
| 1181 |
+
</p>
|
| 1182 |
+
|
| 1183 |
+
<div class="class-progress">
|
| 1184 |
+
<div class="class-progress-row">
|
| 1185 |
+
<span>全班討伐進度</span>
|
| 1186 |
+
<span id="introHpText">500 / 500 HP</span>
|
| 1187 |
+
</div>
|
| 1188 |
+
<div class="mini-hp"><div id="introHpBar" style="width:100%"></div></div>
|
| 1189 |
+
</div>
|
| 1190 |
+
|
| 1191 |
+
<div class="reward-box">
|
| 1192 |
+
<div class="reward-head">
|
| 1193 |
+
<h2>討伐成功獎勵</h2>
|
| 1194 |
+
<span>擊破封印後全員發放</span>
|
| 1195 |
+
</div>
|
| 1196 |
+
<div class="reward-list">
|
| 1197 |
+
<div class="reward-item">
|
| 1198 |
+
<span class="reward-ico">🌾</span>
|
| 1199 |
+
<div>
|
| 1200 |
+
<div class="reward-name">1 小時產量包 ×2</div>
|
| 1201 |
+
<div class="reward-sub">依個人當下產能補給</div>
|
| 1202 |
+
</div>
|
| 1203 |
+
</div>
|
| 1204 |
+
<div class="reward-item">
|
| 1205 |
+
<span class="reward-ico">🧧</span>
|
| 1206 |
+
<div>
|
| 1207 |
+
<div class="reward-name">兵符 ×0.5</div>
|
| 1208 |
+
<div class="reward-sub">累積滿 1 即為一枚完整兵符</div>
|
| 1209 |
+
</div>
|
| 1210 |
+
</div>
|
| 1211 |
+
<div class="reward-item">
|
| 1212 |
+
<span class="reward-ico">📜</span>
|
| 1213 |
+
<div>
|
| 1214 |
+
<div class="reward-name">錦囊包 ×1</div>
|
| 1215 |
+
<div class="reward-sub">偷看卷+刪去卷各 1 張</div>
|
| 1216 |
+
</div>
|
| 1217 |
+
</div>
|
| 1218 |
+
<div class="reward-item">
|
| 1219 |
+
<span class="reward-ico">🏅</span>
|
| 1220 |
+
<div>
|
| 1221 |
+
<div class="reward-name">個人稱號</div>
|
| 1222 |
+
<div class="reward-sub">【平妖勇士】</div>
|
| 1223 |
+
</div>
|
| 1224 |
+
</div>
|
| 1225 |
+
<div class="reward-item mvp">
|
| 1226 |
+
<span class="reward-ico">⚔️</span>
|
| 1227 |
+
<div>
|
| 1228 |
+
<div class="reward-name">MVP/最後一擊加碼:兵符 ×1</div>
|
| 1229 |
+
<div class="reward-sub">傷害第一【破魔先鋒】・最後一擊【斬魔將軍】</div>
|
| 1230 |
+
</div>
|
| 1231 |
+
</div>
|
| 1232 |
+
</div>
|
| 1233 |
+
<div class="reward-qual" id="introQual">領獎資格:個人累計傷害 0 / 5</div>
|
| 1234 |
+
</div>
|
| 1235 |
+
|
| 1236 |
+
<button class="btn-start" id="btnStart" type="button">開始討伐(3/3)</button>
|
| 1237 |
+
</div>
|
| 1238 |
+
</div>
|
| 1239 |
+
</div>
|
| 1240 |
+
</section>
|
| 1241 |
+
|
| 1242 |
+
<!-- ===================== 第二頁:全螢幕戰鬥 ===================== -->
|
| 1243 |
+
<section class="scene hidden" id="screenBattle">
|
| 1244 |
+
<div class="scene-bg"></div>
|
| 1245 |
+
<div class="speed-lines" id="speedLines"></div>
|
| 1246 |
+
<div class="slash" id="slashFx"></div>
|
| 1247 |
+
|
| 1248 |
+
<header class="battle-hud">
|
| 1249 |
+
<div class="hud-row">
|
| 1250 |
+
<span class="hud-name">上古・饕餮</span>
|
| 1251 |
+
<span class="hud-hp-text" id="hpText">500 / 500 HP (100.0%)</span>
|
| 1252 |
+
</div>
|
| 1253 |
+
<div class="hp-bar-outer"><div class="hp-bar-inner" id="hpBar" style="width:100%"></div></div>
|
| 1254 |
+
</header>
|
| 1255 |
+
|
| 1256 |
+
<div class="battle-stage">
|
| 1257 |
+
<img src="assets/boss_taotie.png" class="boss-sprite" id="bossSprite" alt="上古・饕餮">
|
| 1258 |
+
<div class="floating-dmg-box" id="floatingDmgBox"></div>
|
| 1259 |
+
</div>
|
| 1260 |
+
|
| 1261 |
+
<div class="glass-card" id="glassCard">
|
| 1262 |
+
<div class="q-meta">
|
| 1263 |
+
<div style="display:flex; align-items:center; gap:8px;">
|
| 1264 |
+
<span class="q-badge" id="qBadge">攻擊回合 1/5</span>
|
| 1265 |
+
<span id="qQueue">待精熟:5 題</span>
|
| 1266 |
+
</div>
|
| 1267 |
+
<span class="crit-hint" id="qCrit">暴擊率 15%</span>
|
| 1268 |
+
</div>
|
| 1269 |
+
<div class="q-stem" id="qStem">載入中…</div>
|
| 1270 |
+
<div class="options-grid" id="optContainer"></div>
|
| 1271 |
+
<div class="requeue-notice hidden" id="requeueNotice">🔄 本題已揭示正解,移到隊伍最後,稍後再挑戰一次!</div>
|
| 1272 |
+
</div>
|
| 1273 |
+
</section>
|
| 1274 |
+
|
| 1275 |
+
<!-- ===================== 結算彈窗 ===================== -->
|
| 1276 |
+
<div class="modal-overlay hidden" id="modalResult">
|
| 1277 |
+
<div class="modal-card">
|
| 1278 |
+
<div style="font-size:44px;" id="resIcon">🎉</div>
|
| 1279 |
+
<h2 id="resTitle">本場討伐完成</h2>
|
| 1280 |
+
<div class="res-rows">
|
| 1281 |
+
<div><span>本場造成傷害</span><b id="resDmg" style="color:#fca5a5;">+0 HP</b></div>
|
| 1282 |
+
<div><span>饕餮剩餘血量</span><b id="resBossHp">500 / 500</b></div>
|
| 1283 |
+
<div><span>個人累計傷害</span><b id="resMyDmg">0 HP</b></div>
|
| 1284 |
+
<div><span>領獎資格</span><b id="resQual">未達標</b></div>
|
| 1285 |
+
</div>
|
| 1286 |
+
<div class="tail-kill hidden" id="tailKill">⚔️ 最後一擊!獲得【斬魔將軍】與兵符 ×1</div>
|
| 1287 |
+
<button class="btn-modal" id="btnModalClose" type="button">返回</button>
|
| 1288 |
+
</div>
|
| 1289 |
+
</div>
|
| 1290 |
+
|
| 1291 |
+
<!-- ===================== 版本更新公告彈窗(模版展示) ===================== -->
|
| 1292 |
+
<div class="modal-overlay hidden" id="modalPatch">
|
| 1293 |
+
<div class="patch-modal-wrap">
|
| 1294 |
+
<!-- 頂部視覺舞台:帥氣背景 + 神秘 Boss 剪影 -->
|
| 1295 |
+
<div class="patch-stage">
|
| 1296 |
+
<div class="patch-silhouette-wrap">
|
| 1297 |
+
<div class="patch-silhouette-box" id="patchSilhouetteBox">
|
| 1298 |
+
<img src="assets/boss_taotie.png" class="patch-silhouette-img is-silhouette" alt="神秘 Boss 剪影">
|
| 1299 |
+
<div class="silhouette-eye eye-left" id="modalEyeLeft"></div>
|
| 1300 |
+
<div class="silhouette-eye eye-right" id="modalEyeRight"></div>
|
| 1301 |
+
</div>
|
| 1302 |
+
</div>
|
| 1303 |
+
</div>
|
| 1304 |
+
|
| 1305 |
+
<!-- 下方訊息內容 -->
|
| 1306 |
+
<div class="patch-body">
|
| 1307 |
+
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:8px;">
|
| 1308 |
+
<span class="patch-badge-pill">🔥 史詩版本預告・即將解鎖</span>
|
| 1309 |
+
<span style="font-size:11px; color:#cbd5e1; font-weight:700;">v2.5 全新篇章</span>
|
| 1310 |
+
</div>
|
| 1311 |
+
|
| 1312 |
+
<h2 class="patch-title">太古凶神・即將破印</h2>
|
| 1313 |
+
<div class="patch-subtitle">第三單元完成後,全班跨界世界 Boss 挑戰震撼降臨!</div>
|
| 1314 |
+
|
| 1315 |
+
<div class="patch-lore-box">
|
| 1316 |
+
混沌初開,太古凶獸【饕餮】即將破印吞食天地!牠盤踞於太古雷雲八卦神壇之上,以學子們的「錯題弱點」為食……唯有全班同袍齊心完成第三單元考驗,親手克服自身的弱點難題,方能啟動八卦封印大陣,合力將其重新封印!
|
| 1317 |
+
</div>
|
| 1318 |
+
|
| 1319 |
+
<div class="patch-features-grid">
|
| 1320 |
+
<div class="patch-feat-item">
|
| 1321 |
+
<span class="patch-feat-icon">🏛️</span>
|
| 1322 |
+
<div>
|
| 1323 |
+
<div class="patch-feat-tit">世界 Boss 解鎖門檻</div>
|
| 1324 |
+
<div class="patch-feat-sub">完成第三單元(51-75)的軍機策驗後開放</div>
|
| 1325 |
+
</div>
|
| 1326 |
+
</div>
|
| 1327 |
+
<div class="patch-feat-item">
|
| 1328 |
+
<span class="patch-feat-icon">⚔️</span>
|
| 1329 |
+
<div>
|
| 1330 |
+
<div class="patch-feat-tit">全班共伐 500 HP 巨獸</div>
|
| 1331 |
+
<div class="patch-feat-sub">全班共享同一血條!每人每日 3 次出征機會,答對弱點題造成重創與暴擊!</div>
|
| 1332 |
+
</div>
|
| 1333 |
+
</div>
|
| 1334 |
+
<div class="patch-feat-item">
|
| 1335 |
+
<span class="patch-feat-icon">🌾</span>
|
| 1336 |
+
<div>
|
| 1337 |
+
<div class="patch-feat-tit">神獸寶庫全班瓜分</div>
|
| 1338 |
+
<div class="patch-feat-sub">封印擊破後全員獲贈「1 小時產量包 ×2」與「兵符」!輸出 MVP 與最後一擊更享有專屬榮譽稱號!</div>
|
| 1339 |
+
</div>
|
| 1340 |
+
</div>
|
| 1341 |
+
</div>
|
| 1342 |
+
|
| 1343 |
+
<button class="patch-btn-confirm" id="btnDismissPatch" type="button">
|
| 1344 |
+
⚔️ 研讀軍策・整軍備戰
|
| 1345 |
+
</button>
|
| 1346 |
+
</div>
|
| 1347 |
+
</div>
|
| 1348 |
+
</div>
|
| 1349 |
+
|
| 1350 |
+
<!-- ===================== 眼睛定位微調校準工具 (Eyes Calibrator) ===================== -->
|
| 1351 |
+
<div class="modal-overlay hidden" id="modalCalibrator" style="z-index: 9999;">
|
| 1352 |
+
<div class="calibrator-modal">
|
| 1353 |
+
<div class="calibrator-header">
|
| 1354 |
+
<h3>👁️ 饕餮剪影雙眼特效定位器 <span style="font-size:11px; font-weight:normal; color:#94a3b8;">(支援拖曳、原圖透視與 JSON 匯出)</span></h3>
|
| 1355 |
+
<button class="debug-btn" id="btnCloseCalibrator" type="button" style="padding:4px 10px; background:rgba(255,255,255,0.1); color:#fff;">✕ 關閉</button>
|
| 1356 |
+
</div>
|
| 1357 |
+
|
| 1358 |
+
<div class="calibrator-body">
|
| 1359 |
+
<!-- 左欄:視覺舞台(支援拖曳握把) -->
|
| 1360 |
+
<div class="calibrator-preview-col">
|
| 1361 |
+
<div class="calibrator-stage-wrap" id="calStageWrap">
|
| 1362 |
+
<!-- 底層:原圖(可透視比對眼眶) -->
|
| 1363 |
+
<img src="assets/boss_taotie.png" class="cal-underlay-img" id="calUnderlay" alt="饕餮原圖">
|
| 1364 |
+
<!-- 剪影層 -->
|
| 1365 |
+
<img src="assets/boss_taotie.png" class="cal-silhouette-img" id="calSilhouette" alt="饕餮剪影">
|
| 1366 |
+
|
| 1367 |
+
<!-- 眼睛與拖曳錨點容器 -->
|
| 1368 |
+
<div class="cal-box" id="calBox">
|
| 1369 |
+
<!-- 左眼 (畫面左側) -->
|
| 1370 |
+
<div class="cal-eye" id="calEyeL"></div>
|
| 1371 |
+
<div class="cal-handle handle-l" id="calHandleL" title="拖曳調整左眼位置">L</div>
|
| 1372 |
+
|
| 1373 |
+
<!-- 右眼 (畫面右側) -->
|
| 1374 |
+
<div class="cal-eye" id="calEyeR"></div>
|
| 1375 |
+
<div class="cal-handle handle-r" id="calHandleR" title="拖曳調整右眼位置">R</div>
|
| 1376 |
+
</div>
|
| 1377 |
+
</div>
|
| 1378 |
+
|
| 1379 |
+
<!-- 模式切換與輔助開關 -->
|
| 1380 |
+
<div class="cal-mode-pills">
|
| 1381 |
+
<button class="cal-pill-btn active" id="btnModeSil" type="button">純剪影</button>
|
| 1382 |
+
<button class="cal-pill-btn" id="btnModeOverlay" type="button">50% 透視疊加</button>
|
| 1383 |
+
<button class="cal-pill-btn" id="btnModeOrig" type="button">純原圖</button>
|
| 1384 |
+
</div>
|
| 1385 |
+
<div style="display:flex; gap:12px; font-size:12px; color:#cbd5e1;">
|
| 1386 |
+
<label style="display:flex; align-items:center; gap:4px; cursor:pointer;">
|
| 1387 |
+
<input type="checkbox" id="chkCalBlink" checked> 眨眼動畫
|
| 1388 |
+
</label>
|
| 1389 |
+
<label style="display:flex; align-items:center; gap:4px; cursor:pointer;">
|
| 1390 |
+
<input type="checkbox" id="chkCalPulse"> 呼吸浮動
|
| 1391 |
+
</label>
|
| 1392 |
+
</div>
|
| 1393 |
+
<div style="font-size:11px; color:#94a3b8; text-align:center;">
|
| 1394 |
+
💡 提示:在上方畫布中<b>直接按住 L / R 圓點拖曳</b>,即可精準對齊饕餮眼眶!
|
| 1395 |
+
</div>
|
| 1396 |
+
</div>
|
| 1397 |
+
|
| 1398 |
+
<!-- 右欄:數值微調與 JSON 區塊 -->
|
| 1399 |
+
<div class="cal-controls-col">
|
| 1400 |
+
<div class="cal-card-group">
|
| 1401 |
+
<!-- 左眼卡片 -->
|
| 1402 |
+
<div class="cal-eye-card">
|
| 1403 |
+
<div class="cal-card-title" style="color:#34d399;">🟢 左眼 (綠 L 標)</div>
|
| 1404 |
+
<div class="cal-field">
|
| 1405 |
+
<label>X 橫向位置 <b id="valLX">24.5%</b></label>
|
| 1406 |
+
<input type="range" id="rangeLX" min="5" max="60" step="0.1" value="24.5">
|
| 1407 |
+
</div>
|
| 1408 |
+
<div class="cal-field">
|
| 1409 |
+
<label>Y 垂直高度 <b id="valLY">48.1%</b></label>
|
| 1410 |
+
<input type="range" id="rangeLY" min="20" max="80" step="0.1" value="48.1">
|
| 1411 |
+
</div>
|
| 1412 |
+
<div class="cal-field">
|
| 1413 |
+
<label>寬度 W <b id="valLW">9px</b></label>
|
| 1414 |
+
<input type="range" id="rangeLW" min="4" max="22" step="1" value="9">
|
| 1415 |
+
</div>
|
| 1416 |
+
<div class="cal-field">
|
| 1417 |
+
<label>高度 H <b id="valLH">6px</b></label>
|
| 1418 |
+
<input type="range" id="rangeLH" min="4" max="22" step="1" value="6">
|
| 1419 |
+
</div>
|
| 1420 |
+
<div class="cal-field">
|
| 1421 |
+
<label>旋轉角度 <b id="valLRot">14°</b></label>
|
| 1422 |
+
<input type="range" id="rangeLRot" min="-45" max="45" step="1" value="14">
|
| 1423 |
+
</div>
|
| 1424 |
+
</div>
|
| 1425 |
+
|
| 1426 |
+
<!-- 右眼卡片 -->
|
| 1427 |
+
<div class="cal-eye-card">
|
| 1428 |
+
<div class="cal-card-title" style="color:#38bdf8;">🔵 右眼 (藍 R 標)</div>
|
| 1429 |
+
<div class="cal-field">
|
| 1430 |
+
<label>X 橫向位置 <b id="valRX">37.7%</b></label>
|
| 1431 |
+
<input type="range" id="rangeRX" min="15" max="70" step="0.1" value="37.7">
|
| 1432 |
+
</div>
|
| 1433 |
+
<div class="cal-field">
|
| 1434 |
+
<label>Y 垂直高度 <b id="valRY">44.5%</b></label>
|
| 1435 |
+
<input type="range" id="rangeRY" min="20" max="80" step="0.1" value="44.5">
|
| 1436 |
+
</div>
|
| 1437 |
+
<div class="cal-field">
|
| 1438 |
+
<label>寬度 W <b id="valRW">11px</b></label>
|
| 1439 |
+
<input type="range" id="rangeRW" min="4" max="22" step="1" value="11">
|
| 1440 |
+
</div>
|
| 1441 |
+
<div class="cal-field">
|
| 1442 |
+
<label>高度 H <b id="valRH">8px</b></label>
|
| 1443 |
+
<input type="range" id="rangeRH" min="4" max="22" step="1" value="8">
|
| 1444 |
+
</div>
|
| 1445 |
+
<div class="cal-field">
|
| 1446 |
+
<label>旋轉角度 <b id="valRRot">-6°</b></label>
|
| 1447 |
+
<input type="range" id="rangeRRot" min="-45" max="45" step="1" value="-6">
|
| 1448 |
+
</div>
|
| 1449 |
+
</div>
|
| 1450 |
+
</div>
|
| 1451 |
+
|
| 1452 |
+
<!-- JSON 產出框 -->
|
| 1453 |
+
<div>
|
| 1454 |
+
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:4px;">
|
| 1455 |
+
<span style="font-size:12px; font-weight:700; color:#e2e8f0;">即時座標 JSON(可直接回傳給我)</span>
|
| 1456 |
+
<span id="copyToast" style="font-size:11px; color:#4ade80; display:none;">已複製到剪貼簿!</span>
|
| 1457 |
+
</div>
|
| 1458 |
+
<pre class="cal-json-box" id="jsonOutput"></pre>
|
| 1459 |
+
</div>
|
| 1460 |
+
|
| 1461 |
+
<!-- 動作按鈕 -->
|
| 1462 |
+
<div class="cal-actions">
|
| 1463 |
+
<button class="cal-act-btn cal-btn-copy" id="btnCopyJson" type="button">📋 複製 JSON 座標</button>
|
| 1464 |
+
<button class="cal-act-btn cal-btn-apply" id="btnApplyToPatch" type="button">🚀 套用至預告公告</button>
|
| 1465 |
+
<button class="cal-act-btn cal-btn-reset" id="btnResetCal" type="button" title="還原精準預設值">🔄 重設</button>
|
| 1466 |
+
</div>
|
| 1467 |
+
</div>
|
| 1468 |
+
</div>
|
| 1469 |
+
</div>
|
| 1470 |
+
</div>
|
| 1471 |
+
|
| 1472 |
+
<!-- ===================== 測試控制列 ===================== -->
|
| 1473 |
+
<div class="debug-bar collapsed" id="debugBar">
|
| 1474 |
+
<button class="debug-btn debug-toggle" id="btnDebugToggle" type="button">🛠️ 測試</button>
|
| 1475 |
+
<button class="debug-btn" id="btnOpenEyeCalibrator" type="button" style="background:#4338ca;color:#fef08a;">👁️ 眼睛定位微調器</button>
|
| 1476 |
+
<button class="debug-btn" id="btnPreviewPatch" type="button" style="background:#78350f;color:#fef08a;">📜 預覽週五更新公告</button>
|
| 1477 |
+
<span>錯題:</span>
|
| 1478 |
+
<button class="debug-btn" data-mistakes="2" type="button">2</button>
|
| 1479 |
+
<button class="debug-btn" data-mistakes="18" type="button">18(+1集氣)</button>
|
| 1480 |
+
<button class="debug-btn" data-mistakes="28" type="button">28(+2)</button>
|
| 1481 |
+
<button class="debug-btn" data-mistakes="36" type="button">36(+3)</button>
|
| 1482 |
+
<span>血量:</span>
|
| 1483 |
+
<button class="debug-btn" data-hp="10" type="button">剩10</button>
|
| 1484 |
+
<button class="debug-btn" data-hp="500" type="button">滿血</button>
|
| 1485 |
+
<button class="debug-btn" id="btnReset" type="button" style="background:#166534;color:#fff;">重置</button>
|
| 1486 |
+
</div>
|
| 1487 |
+
|
| 1488 |
+
<script>
|
| 1489 |
+
// ==========================================
|
| 1490 |
+
// 1. 狀態
|
| 1491 |
+
// ==========================================
|
| 1492 |
+
const BOSS_MAX_HP = 500;
|
| 1493 |
+
const MAX_ORDERS = 3;
|
| 1494 |
+
const QUAL_DMG = 5;
|
| 1495 |
+
let bossHp = BOSS_MAX_HP;
|
| 1496 |
+
let ordersLeft = MAX_ORDERS;
|
| 1497 |
+
let myTotalDamage = 0;
|
| 1498 |
+
let simulatedMistakeCount = 28;
|
| 1499 |
+
|
| 1500 |
+
let inBattle = false;
|
| 1501 |
+
let currentQueue = [];
|
| 1502 |
+
let clearedAttacks = 0;
|
| 1503 |
+
let currentRoundDamage = 0;
|
| 1504 |
+
let hasChargeBuff = false;
|
| 1505 |
+
let canClick = false;
|
| 1506 |
+
let pendingTimer = null;
|
| 1507 |
+
|
| 1508 |
+
const MOCK_QUESTION_POOL = [
|
| 1509 |
+
{ q: '在室內配線工程中,下列何種情況必須加裝漏電斷路器?', o: ['客廳一般照明插座', '浴室及戶外潮濕處之插座回路', '乾燥天花板內之通風機', '神明桌供電回路'], a: 'B', tag: '室內配線' },
|
| 1510 |
+
{ q: '低壓單相三線式 110/220V 供電系統中,中性線之顏色原則為何?', o: ['黑色', '紅色', '綠色', '白色或淺灰色'], a: 'D', tag: '室內配線' },
|
| 1511 |
+
{ q: '依據勞動基準法,下列何者不屬於可以合法扣除工資之事由?', o: ['依法提繳之勞保自付額', '公司逕行扣除之遲到罰款', '勞工同意代扣之福利金', '所得稅扣繳稅款'], a: 'B', tag: '勞動權益' },
|
| 1512 |
+
{ q: '烘焙麵包時,酵母發酵最適宜的溫度範圍約為?', o: ['10 ~ 15 ℃', '28 ~ 38 ℃', '55 ~ 65 ℃', '80 ~ 90 ℃'], a: 'B', tag: '烘焙基礎' },
|
| 1513 |
+
{ q: '使用三用電表測量電阻前,最關鍵的歸零校正步驟為何?', o: ['將兩表筆開路', '兩表筆短路並調整歸零鈕', '切換至最大電壓檔', '拆下電表電池'], a: 'B', tag: '儀表測量' },
|
| 1514 |
+
{ q: '下列何種滅火器最適合撲滅電氣火災(C 類火災)?', o: ['泡沫滅火器', '水柱滅火器', '二氧化碳滅火器', '酸鹼滅火器'], a: 'C', tag: '工安常識' },
|
| 1515 |
+
{ q: '促銷策略「買一送一」主要是刺激消費者的何種心理?', o: ['品牌忠誠度', '知覺價值與即時誘因', '品質信任感', '尊榮奢華感'], a: 'B', tag: '商業概論' },
|
| 1516 |
+
{ q: '麵粉筋度主要取決於何種成分之含量?', o: ['碳水化合物', '蛋白質', '脂質', '粗纖維'], a: 'B', tag: '餐旅烘焙' },
|
| 1517 |
+
];
|
| 1518 |
+
|
| 1519 |
+
const $ = (id) => document.getElementById(id);
|
| 1520 |
+
|
| 1521 |
+
// ==========================================
|
| 1522 |
+
// 2. 音效
|
| 1523 |
+
// ==========================================
|
| 1524 |
+
let audioCtx = null;
|
| 1525 |
+
function playBeep(freq, type, duration, gainVal) {
|
| 1526 |
+
try {
|
| 1527 |
+
if (!audioCtx) audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
| 1528 |
+
if (audioCtx.state === 'suspended') audioCtx.resume();
|
| 1529 |
+
const osc = audioCtx.createOscillator();
|
| 1530 |
+
const gain = audioCtx.createGain();
|
| 1531 |
+
osc.type = type;
|
| 1532 |
+
osc.frequency.setValueAtTime(freq, audioCtx.currentTime);
|
| 1533 |
+
gain.gain.setValueAtTime(gainVal, audioCtx.currentTime);
|
| 1534 |
+
gain.gain.exponentialRampToValueAtTime(0.0001, audioCtx.currentTime + duration);
|
| 1535 |
+
osc.connect(gain);
|
| 1536 |
+
gain.connect(audioCtx.destination);
|
| 1537 |
+
osc.start();
|
| 1538 |
+
osc.stop(audioCtx.currentTime + duration);
|
| 1539 |
+
} catch (e) { /* 音效失敗不影響遊戲 */ }
|
| 1540 |
+
}
|
| 1541 |
+
const soundCorrect = () => { playBeep(523, 'triangle', 0.1, 0.15); setTimeout(() => playBeep(659, 'triangle', 0.15, 0.15), 80); };
|
| 1542 |
+
const soundWrong = () => playBeep(220, 'sine', 0.25, 0.2);
|
| 1543 |
+
const soundCrit = () => {
|
| 1544 |
+
playBeep(140, 'sawtooth', 0.45, 0.4);
|
| 1545 |
+
playBeep(280, 'sawtooth', 0.3, 0.3);
|
| 1546 |
+
setTimeout(() => playBeep(587, 'sine', 0.25, 0.3), 50);
|
| 1547 |
+
setTimeout(() => playBeep(987, 'triangle', 0.45, 0.3), 110);
|
| 1548 |
+
};
|
| 1549 |
+
|
| 1550 |
+
// ==========================================
|
| 1551 |
+
// 3. 畫面切換
|
| 1552 |
+
// ==========================================
|
| 1553 |
+
function showIntro() {
|
| 1554 |
+
inBattle = false;
|
| 1555 |
+
canClick = false;
|
| 1556 |
+
clearTimeout(pendingTimer);
|
| 1557 |
+
$('screenBattle').classList.add('hidden');
|
| 1558 |
+
$('screenIntro').classList.remove('hidden');
|
| 1559 |
+
renderIntro();
|
| 1560 |
+
}
|
| 1561 |
+
|
| 1562 |
+
function showBattle() {
|
| 1563 |
+
inBattle = true;
|
| 1564 |
+
$('screenIntro').classList.add('hidden');
|
| 1565 |
+
$('screenBattle').classList.remove('hidden');
|
| 1566 |
+
updateHpUI();
|
| 1567 |
+
}
|
| 1568 |
+
|
| 1569 |
+
function renderIntro() {
|
| 1570 |
+
const pct = (bossHp / BOSS_MAX_HP) * 100;
|
| 1571 |
+
$('introHpText').textContent = `${bossHp} / ${BOSS_MAX_HP} HP`;
|
| 1572 |
+
$('introHpBar').style.width = `${pct}%`;
|
| 1573 |
+
|
| 1574 |
+
const qual = $('introQual');
|
| 1575 |
+
if (myTotalDamage >= QUAL_DMG) {
|
| 1576 |
+
qual.textContent = `✅ 已取得領獎資格(個人累計傷害 ${myTotalDamage})`;
|
| 1577 |
+
qual.classList.add('ok');
|
| 1578 |
+
} else {
|
| 1579 |
+
qual.textContent = `領獎資格:個人累計傷害 ${myTotalDamage} / ${QUAL_DMG}`;
|
| 1580 |
+
qual.classList.remove('ok');
|
| 1581 |
+
}
|
| 1582 |
+
|
| 1583 |
+
const btn = $('btnStart');
|
| 1584 |
+
if (bossHp <= 0) {
|
| 1585 |
+
btn.disabled = true;
|
| 1586 |
+
btn.textContent = '饕餮已被封印';
|
| 1587 |
+
} else if (ordersLeft <= 0) {
|
| 1588 |
+
btn.disabled = true;
|
| 1589 |
+
btn.textContent = '今日討伐次數已用完(0/3)';
|
| 1590 |
+
} else {
|
| 1591 |
+
btn.disabled = false;
|
| 1592 |
+
btn.textContent = `開始討伐(${ordersLeft}/${MAX_ORDERS})`;
|
| 1593 |
+
}
|
| 1594 |
+
}
|
| 1595 |
+
|
| 1596 |
+
// ==========================================
|
| 1597 |
+
// 4. 戰鬥流程
|
| 1598 |
+
// ==========================================
|
| 1599 |
+
function startNewCombat() {
|
| 1600 |
+
if (inBattle || ordersLeft <= 0 || bossHp <= 0) return;
|
| 1601 |
+
|
| 1602 |
+
clearedAttacks = 0;
|
| 1603 |
+
currentRoundDamage = 0;
|
| 1604 |
+
hasChargeBuff = false;
|
| 1605 |
+
$('requeueNotice').classList.add('hidden');
|
| 1606 |
+
|
| 1607 |
+
let chargeCount = 0;
|
| 1608 |
+
if (simulatedMistakeCount >= 35) chargeCount = 3;
|
| 1609 |
+
else if (simulatedMistakeCount >= 25) chargeCount = 2;
|
| 1610 |
+
else if (simulatedMistakeCount >= 15) chargeCount = 1;
|
| 1611 |
+
|
| 1612 |
+
const queue = shuffle([...MOCK_QUESTION_POOL]).slice(0, 5).map(q => ({ ...q, isCharge: false }));
|
| 1613 |
+
const extra = shuffle([...MOCK_QUESTION_POOL]);
|
| 1614 |
+
if (chargeCount >= 1) queue.splice(2, 0, { ...extra[0], isCharge: true });
|
| 1615 |
+
if (chargeCount >= 2) queue.splice(4, 0, { ...extra[1], isCharge: true });
|
| 1616 |
+
if (chargeCount >= 3) queue.splice(1, 0, { ...extra[2], isCharge: true });
|
| 1617 |
+
|
| 1618 |
+
currentQueue = queue;
|
| 1619 |
+
showBattle();
|
| 1620 |
+
renderCurrentQuestion();
|
| 1621 |
+
}
|
| 1622 |
+
|
| 1623 |
+
function renderCurrentQuestion() {
|
| 1624 |
+
if (!inBattle) return;
|
| 1625 |
+
if (currentQueue.length === 0 || clearedAttacks >= 5 || bossHp <= 0) {
|
| 1626 |
+
finishCombat();
|
| 1627 |
+
return;
|
| 1628 |
+
}
|
| 1629 |
+
const q = currentQueue[0];
|
| 1630 |
+
if (!q || !Array.isArray(q.o)) { finishCombat(); return; }
|
| 1631 |
+
|
| 1632 |
+
const badge = $('qBadge');
|
| 1633 |
+
if (q.isCharge) {
|
| 1634 |
+
badge.className = 'q-badge charge';
|
| 1635 |
+
badge.textContent = '⚡ 集氣試煉';
|
| 1636 |
+
} else {
|
| 1637 |
+
badge.className = 'q-badge';
|
| 1638 |
+
badge.textContent = `攻擊回合 ${clearedAttacks + 1}/5`;
|
| 1639 |
+
}
|
| 1640 |
+
$('qQueue').textContent = `待精熟:${currentQueue.length} 題`;
|
| 1641 |
+
const crit = $('qCrit');
|
| 1642 |
+
crit.textContent = hasChargeBuff ? '⚡ 暴擊率 40%' : '暴擊率 15%';
|
| 1643 |
+
crit.classList.toggle('buff', hasChargeBuff);
|
| 1644 |
+
|
| 1645 |
+
$('qStem').innerHTML =
|
| 1646 |
+
(q.isCharge ? '<span class="charge-tag">【集氣】</span>' : '') +
|
| 1647 |
+
escapeHtml(q.q) +
|
| 1648 |
+
`<span class="tag">(${escapeHtml(q.tag || '')})</span>`;
|
| 1649 |
+
|
| 1650 |
+
$('optContainer').innerHTML = q.o.map((opt, i) => {
|
| 1651 |
+
const label = String.fromCharCode(65 + i);
|
| 1652 |
+
return `<button class="opt-btn" type="button" data-label="${label}">
|
| 1653 |
+
<span class="opt-tag">${label}</span><span>${escapeHtml(opt)}</span>
|
| 1654 |
+
</button>`;
|
| 1655 |
+
}).join('');
|
| 1656 |
+
|
| 1657 |
+
canClick = true;
|
| 1658 |
+
}
|
| 1659 |
+
|
| 1660 |
+
function handleAnswer(selected) {
|
| 1661 |
+
if (!inBattle || !canClick) return;
|
| 1662 |
+
canClick = false;
|
| 1663 |
+
|
| 1664 |
+
const q = currentQueue[0];
|
| 1665 |
+
const isCorrect = selected === q.a;
|
| 1666 |
+
|
| 1667 |
+
document.querySelectorAll('#optContainer .opt-btn').forEach(b => {
|
| 1668 |
+
b.disabled = true;
|
| 1669 |
+
const l = b.dataset.label;
|
| 1670 |
+
if (l === q.a) b.classList.add('correct');
|
| 1671 |
+
else if (l === selected) b.classList.add('wrong');
|
| 1672 |
+
else b.classList.add('dim');
|
| 1673 |
+
});
|
| 1674 |
+
|
| 1675 |
+
if (isCorrect) {
|
| 1676 |
+
$('requeueNotice').classList.add('hidden');
|
| 1677 |
+
if (q.isCharge) {
|
| 1678 |
+
soundCorrect();
|
| 1679 |
+
hasChargeBuff = true;
|
| 1680 |
+
showFloat('⚡ 集氣成功!下一擊暴擊率 40%', 'notice');
|
| 1681 |
+
currentQueue.shift();
|
| 1682 |
+
pendingTimer = setTimeout(renderCurrentQuestion, 900);
|
| 1683 |
+
} else {
|
| 1684 |
+
clearedAttacks++;
|
| 1685 |
+
const isCrit = Math.random() < (hasChargeBuff ? 0.40 : 0.15);
|
| 1686 |
+
const dmg = isCrit ? 2 : 1;
|
| 1687 |
+
currentRoundDamage += dmg;
|
| 1688 |
+
hasChargeBuff = false;
|
| 1689 |
+
applyDamage(dmg, isCrit);
|
| 1690 |
+
currentQueue.shift();
|
| 1691 |
+
pendingTimer = setTimeout(renderCurrentQuestion, isCrit ? 1400 : 750);
|
| 1692 |
+
}
|
| 1693 |
+
} else {
|
| 1694 |
+
soundWrong();
|
| 1695 |
+
if (q.isCharge) {
|
| 1696 |
+
hasChargeBuff = false;
|
| 1697 |
+
showFloat('集氣失敗…', 'notice');
|
| 1698 |
+
currentQueue.shift();
|
| 1699 |
+
pendingTimer = setTimeout(renderCurrentQuestion, 1100);
|
| 1700 |
+
} else {
|
| 1701 |
+
$('requeueNotice').classList.remove('hidden');
|
| 1702 |
+
currentQueue.push(currentQueue.shift());
|
| 1703 |
+
pendingTimer = setTimeout(renderCurrentQuestion, 1400);
|
| 1704 |
+
}
|
| 1705 |
+
}
|
| 1706 |
+
}
|
| 1707 |
+
|
| 1708 |
+
function restartAnim(el, cls) {
|
| 1709 |
+
el.classList.remove(cls);
|
| 1710 |
+
void el.offsetWidth;
|
| 1711 |
+
el.classList.add(cls);
|
| 1712 |
+
}
|
| 1713 |
+
|
| 1714 |
+
function applyDamage(dmg, isCrit) {
|
| 1715 |
+
bossHp = Math.max(0, bossHp - dmg);
|
| 1716 |
+
myTotalDamage += dmg;
|
| 1717 |
+
updateHpUI();
|
| 1718 |
+
|
| 1719 |
+
const sprite = $('bossSprite');
|
| 1720 |
+
if (sprite._hitTimer) {
|
| 1721 |
+
clearTimeout(sprite._hitTimer);
|
| 1722 |
+
sprite._hitTimer = null;
|
| 1723 |
+
}
|
| 1724 |
+
sprite.classList.remove('hit', 'crit-hit');
|
| 1725 |
+
void sprite.offsetWidth;
|
| 1726 |
+
|
| 1727 |
+
if (isCrit) {
|
| 1728 |
+
soundCrit();
|
| 1729 |
+
restartAnim($('flashOverlay'), 'active');
|
| 1730 |
+
restartAnim($('speedLines'), 'active');
|
| 1731 |
+
restartAnim($('slashFx'), 'active');
|
| 1732 |
+
restartAnim($('screenBattle'), 'heavy-shake');
|
| 1733 |
+
sprite.classList.add('crit-hit');
|
| 1734 |
+
showFloat(dmg, 'crit');
|
| 1735 |
+
|
| 1736 |
+
// 暴擊動畫時長 850ms,結束後自動移除 crit-hit,透過 CSS transition 平滑恢復正常光彩
|
| 1737 |
+
sprite._hitTimer = setTimeout(() => {
|
| 1738 |
+
sprite.classList.remove('crit-hit');
|
| 1739 |
+
sprite._hitTimer = null;
|
| 1740 |
+
}, 850);
|
| 1741 |
+
} else {
|
| 1742 |
+
soundCorrect();
|
| 1743 |
+
sprite.classList.add('hit');
|
| 1744 |
+
showFloat(`-${dmg}`, 'normal');
|
| 1745 |
+
|
| 1746 |
+
// 普通受擊動畫時長 400ms,結束後自動移除 hit
|
| 1747 |
+
sprite._hitTimer = setTimeout(() => {
|
| 1748 |
+
sprite.classList.remove('hit');
|
| 1749 |
+
sprite._hitTimer = null;
|
| 1750 |
+
}, 400);
|
| 1751 |
+
}
|
| 1752 |
+
}
|
| 1753 |
+
|
| 1754 |
+
function showFloat(content, kind) {
|
| 1755 |
+
const box = $('floatingDmgBox');
|
| 1756 |
+
box.innerHTML = '';
|
| 1757 |
+
const el = document.createElement('div');
|
| 1758 |
+
if (kind === 'crit') {
|
| 1759 |
+
el.className = 'dmg-crit';
|
| 1760 |
+
el.innerHTML = `CRITICAL!!<small>暴擊 -${content} HP</small>`;
|
| 1761 |
+
} else if (kind === 'notice') {
|
| 1762 |
+
el.className = 'dmg-normal dmg-notice';
|
| 1763 |
+
el.textContent = content;
|
| 1764 |
+
} else {
|
| 1765 |
+
el.className = 'dmg-normal';
|
| 1766 |
+
el.textContent = content;
|
| 1767 |
+
}
|
| 1768 |
+
box.appendChild(el);
|
| 1769 |
+
setTimeout(() => el.remove(), kind === 'crit' ? 1350 : 900);
|
| 1770 |
+
}
|
| 1771 |
+
|
| 1772 |
+
function updateHpUI() {
|
| 1773 |
+
const pct = Math.max(0, (bossHp / BOSS_MAX_HP) * 100);
|
| 1774 |
+
$('hpBar').style.width = `${pct.toFixed(1)}%`;
|
| 1775 |
+
$('hpBar').classList.toggle('low', pct <= 20);
|
| 1776 |
+
$('hpText').textContent = `${bossHp} / ${BOSS_MAX_HP} HP (${pct.toFixed(1)}%)`;
|
| 1777 |
+
}
|
| 1778 |
+
|
| 1779 |
+
function finishCombat() {
|
| 1780 |
+
if (!inBattle) return;
|
| 1781 |
+
canClick = false;
|
| 1782 |
+
ordersLeft = Math.max(0, ordersLeft - 1);
|
| 1783 |
+
|
| 1784 |
+
// 戰鬥結束時確保清除 Boss 任何受擊或暴擊強光
|
| 1785 |
+
const sprite = $('bossSprite');
|
| 1786 |
+
if (sprite) {
|
| 1787 |
+
if (sprite._hitTimer) clearTimeout(sprite._hitTimer);
|
| 1788 |
+
sprite.classList.remove('hit', 'crit-hit');
|
| 1789 |
+
}
|
| 1790 |
+
|
| 1791 |
+
const dead = bossHp <= 0;
|
| 1792 |
+
$('resIcon').textContent = dead ? '🏆' : '🎉';
|
| 1793 |
+
$('resTitle').textContent = dead ? '饕餮已被封印!' : '本場討伐完成';
|
| 1794 |
+
$('resDmg').textContent = `+${currentRoundDamage} HP`;
|
| 1795 |
+
$('resBossHp').textContent = `${bossHp} / ${BOSS_MAX_HP}`;
|
| 1796 |
+
$('resMyDmg').textContent = `${myTotalDamage} HP`;
|
| 1797 |
+
const ok = myTotalDamage >= QUAL_DMG;
|
| 1798 |
+
$('resQual').textContent = ok ? '✅ 已達標' : `尚差 ${QUAL_DMG - myTotalDamage} HP`;
|
| 1799 |
+
$('resQual').style.color = ok ? '#86efac' : '#fde68a';
|
| 1800 |
+
$('tailKill').classList.toggle('hidden', !dead);
|
| 1801 |
+
$('modalResult').classList.remove('hidden');
|
| 1802 |
+
}
|
| 1803 |
+
|
| 1804 |
+
function closeResult() {
|
| 1805 |
+
$('modalResult').classList.add('hidden');
|
| 1806 |
+
showIntro();
|
| 1807 |
+
}
|
| 1808 |
+
|
| 1809 |
+
// ==========================================
|
| 1810 |
+
// 5. 工具
|
| 1811 |
+
// ==========================================
|
| 1812 |
+
function shuffle(arr) {
|
| 1813 |
+
for (let i = arr.length - 1; i > 0; i--) {
|
| 1814 |
+
const j = Math.floor(Math.random() * (i + 1));
|
| 1815 |
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
| 1816 |
+
}
|
| 1817 |
+
return arr;
|
| 1818 |
+
}
|
| 1819 |
+
function escapeHtml(s) {
|
| 1820 |
+
return String(s).replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
| 1821 |
+
}
|
| 1822 |
+
|
| 1823 |
+
function resetAll() {
|
| 1824 |
+
bossHp = BOSS_MAX_HP;
|
| 1825 |
+
ordersLeft = MAX_ORDERS;
|
| 1826 |
+
myTotalDamage = 0;
|
| 1827 |
+
const sprite = $('bossSprite');
|
| 1828 |
+
if (sprite) {
|
| 1829 |
+
if (sprite._hitTimer) clearTimeout(sprite._hitTimer);
|
| 1830 |
+
sprite.classList.remove('hit', 'crit-hit');
|
| 1831 |
+
}
|
| 1832 |
+
$('modalResult').classList.add('hidden');
|
| 1833 |
+
showIntro();
|
| 1834 |
+
}
|
| 1835 |
+
|
| 1836 |
+
// ==========================================
|
| 1837 |
+
// 6. 眼睛定位微調校準器 (Eyes Calibrator) 邏輯
|
| 1838 |
+
// ==========================================
|
| 1839 |
+
const DEFAULT_EYES_CONFIG = {
|
| 1840 |
+
leftEye: { x: 24.5, y: 48.1, width: 9, height: 6, rotate: 14 },
|
| 1841 |
+
rightEye: { x: 37.7, y: 44.5, width: 11, height: 8, rotate: -6 }
|
| 1842 |
+
};
|
| 1843 |
+
|
| 1844 |
+
let calConfig = JSON.parse(JSON.stringify(DEFAULT_EYES_CONFIG));
|
| 1845 |
+
|
| 1846 |
+
function applyConfigToGlobal(cfg) {
|
| 1847 |
+
const root = document.documentElement;
|
| 1848 |
+
root.style.setProperty('--eye-l-x', `${cfg.leftEye.x}%`);
|
| 1849 |
+
root.style.setProperty('--eye-l-y', `${cfg.leftEye.y}%`);
|
| 1850 |
+
root.style.setProperty('--eye-l-w', `${cfg.leftEye.width}px`);
|
| 1851 |
+
root.style.setProperty('--eye-l-h', `${cfg.leftEye.height}px`);
|
| 1852 |
+
root.style.setProperty('--eye-l-rot', `${cfg.leftEye.rotate}deg`);
|
| 1853 |
+
|
| 1854 |
+
root.style.setProperty('--eye-r-x', `${cfg.rightEye.x}%`);
|
| 1855 |
+
root.style.setProperty('--eye-r-y', `${cfg.rightEye.y}%`);
|
| 1856 |
+
root.style.setProperty('--eye-r-w', `${cfg.rightEye.width}px`);
|
| 1857 |
+
root.style.setProperty('--eye-r-h', `${cfg.rightEye.height}px`);
|
| 1858 |
+
root.style.setProperty('--eye-r-rot', `${cfg.rightEye.rotate}deg`);
|
| 1859 |
+
}
|
| 1860 |
+
|
| 1861 |
+
function updateCalibratorUI() {
|
| 1862 |
+
// 1. 更新校準器畫布中的眼睛與握把
|
| 1863 |
+
const eyeL = $('calEyeL');
|
| 1864 |
+
const eyeR = $('calEyeR');
|
| 1865 |
+
const handleL = $('calHandleL');
|
| 1866 |
+
const handleR = $('calHandleR');
|
| 1867 |
+
|
| 1868 |
+
if (eyeL && handleL) {
|
| 1869 |
+
eyeL.style.left = handleL.style.left = `${calConfig.leftEye.x}%`;
|
| 1870 |
+
eyeL.style.top = handleL.style.top = `${calConfig.leftEye.y}%`;
|
| 1871 |
+
eyeL.style.width = `${calConfig.leftEye.width}px`;
|
| 1872 |
+
eyeL.style.height = `${calConfig.leftEye.height}px`;
|
| 1873 |
+
eyeL.style.transform = `translate(-50%, -50%) rotate(${calConfig.leftEye.rotate}deg)`;
|
| 1874 |
+
}
|
| 1875 |
+
|
| 1876 |
+
if (eyeR && handleR) {
|
| 1877 |
+
eyeR.style.left = handleR.style.left = `${calConfig.rightEye.x}%`;
|
| 1878 |
+
eyeR.style.top = handleR.style.top = `${calConfig.rightEye.y}%`;
|
| 1879 |
+
eyeR.style.width = `${calConfig.rightEye.width}px`;
|
| 1880 |
+
eyeR.style.height = `${calConfig.rightEye.height}px`;
|
| 1881 |
+
eyeR.style.transform = `translate(-50%, -50%) rotate(${calConfig.rightEye.rotate}deg)`;
|
| 1882 |
+
}
|
| 1883 |
+
|
| 1884 |
+
// 2. 更新滑桿數值與標籤
|
| 1885 |
+
$('valLX').textContent = `${calConfig.leftEye.x}%`;
|
| 1886 |
+
$('rangeLX').value = calConfig.leftEye.x;
|
| 1887 |
+
$('valLY').textContent = `${calConfig.leftEye.y}%`;
|
| 1888 |
+
$('rangeLY').value = calConfig.leftEye.y;
|
| 1889 |
+
$('valLW').textContent = `${calConfig.leftEye.width}px`;
|
| 1890 |
+
$('rangeLW').value = calConfig.leftEye.width;
|
| 1891 |
+
$('valLH').textContent = `${calConfig.leftEye.height}px`;
|
| 1892 |
+
$('rangeLH').value = calConfig.leftEye.height;
|
| 1893 |
+
$('valLRot').textContent = `${calConfig.leftEye.rotate}°`;
|
| 1894 |
+
$('rangeLRot').value = calConfig.leftEye.rotate;
|
| 1895 |
+
|
| 1896 |
+
$('valRX').textContent = `${calConfig.rightEye.x}%`;
|
| 1897 |
+
$('rangeRX').value = calConfig.rightEye.x;
|
| 1898 |
+
$('valRY').textContent = `${calConfig.rightEye.y}%`;
|
| 1899 |
+
$('rangeRY').value = calConfig.rightEye.y;
|
| 1900 |
+
$('valRW').textContent = `${calConfig.rightEye.width}px`;
|
| 1901 |
+
$('rangeRW').value = calConfig.rightEye.width;
|
| 1902 |
+
$('valRH').textContent = `${calConfig.rightEye.height}px`;
|
| 1903 |
+
$('rangeRH').value = calConfig.rightEye.height;
|
| 1904 |
+
$('valRRot').textContent = `${calConfig.rightEye.rotate}°`;
|
| 1905 |
+
$('rangeRRot').value = calConfig.rightEye.rotate;
|
| 1906 |
+
|
| 1907 |
+
// 3. 更新 JSON 代碼輸出
|
| 1908 |
+
$('jsonOutput').textContent = JSON.stringify(calConfig, null, 2);
|
| 1909 |
+
|
| 1910 |
+
// 4. 同步更新至全域 CSS 變數
|
| 1911 |
+
applyConfigToGlobal(calConfig);
|
| 1912 |
+
}
|
| 1913 |
+
|
| 1914 |
+
function setupDragHandle(handleEl, key) {
|
| 1915 |
+
if (!handleEl) return;
|
| 1916 |
+
let dragging = false;
|
| 1917 |
+
|
| 1918 |
+
handleEl.addEventListener('pointerdown', (e) => {
|
| 1919 |
+
dragging = true;
|
| 1920 |
+
handleEl.setPointerCapture(e.pointerId);
|
| 1921 |
+
e.preventDefault();
|
| 1922 |
+
});
|
| 1923 |
+
|
| 1924 |
+
handleEl.addEventListener('pointermove', (e) => {
|
| 1925 |
+
if (!dragging) return;
|
| 1926 |
+
const box = $('calBox');
|
| 1927 |
+
if (!box) return;
|
| 1928 |
+
const rect = box.getBoundingClientRect();
|
| 1929 |
+
let x = ((e.clientX - rect.left) / rect.width) * 100;
|
| 1930 |
+
let y = ((e.clientY - rect.top) / rect.height) * 100;
|
| 1931 |
+
x = Math.max(0, Math.min(100, Math.round(x * 10) / 10));
|
| 1932 |
+
y = Math.max(0, Math.min(100, Math.round(y * 10) / 10));
|
| 1933 |
+
calConfig[key].x = x;
|
| 1934 |
+
calConfig[key].y = y;
|
| 1935 |
+
updateCalibratorUI();
|
| 1936 |
+
});
|
| 1937 |
+
|
| 1938 |
+
const stopDrag = () => { dragging = false; };
|
| 1939 |
+
handleEl.addEventListener('pointerup', stopDrag);
|
| 1940 |
+
handleEl.addEventListener('pointercancel', stopDrag);
|
| 1941 |
+
}
|
| 1942 |
+
|
| 1943 |
+
function initCalibrator() {
|
| 1944 |
+
setupDragHandle($('calHandleL'), 'leftEye');
|
| 1945 |
+
setupDragHandle($('calHandleR'), 'rightEye');
|
| 1946 |
+
|
| 1947 |
+
// 滑桿監聽
|
| 1948 |
+
const bindRange = (id, fn) => {
|
| 1949 |
+
const el = $(id);
|
| 1950 |
+
if (el) el.addEventListener('input', (e) => { fn(Number(e.target.value)); updateCalibratorUI(); });
|
| 1951 |
+
};
|
| 1952 |
+
|
| 1953 |
+
bindRange('rangeLX', v => calConfig.leftEye.x = v);
|
| 1954 |
+
bindRange('rangeLY', v => calConfig.leftEye.y = v);
|
| 1955 |
+
bindRange('rangeLW', v => calConfig.leftEye.width = v);
|
| 1956 |
+
bindRange('rangeLH', v => calConfig.leftEye.height = v);
|
| 1957 |
+
bindRange('rangeLRot', v => calConfig.leftEye.rotate = v);
|
| 1958 |
+
|
| 1959 |
+
bindRange('rangeRX', v => calConfig.rightEye.x = v);
|
| 1960 |
+
bindRange('rangeRY', v => calConfig.rightEye.y = v);
|
| 1961 |
+
bindRange('rangeRW', v => calConfig.rightEye.width = v);
|
| 1962 |
+
bindRange('rangeRH', v => calConfig.rightEye.height = v);
|
| 1963 |
+
bindRange('rangeRRot', v => calConfig.rightEye.rotate = v);
|
| 1964 |
+
|
| 1965 |
+
// 模式切換按鈕
|
| 1966 |
+
const underlay = $('calUnderlay');
|
| 1967 |
+
const silhouette = $('calSilhouette');
|
| 1968 |
+
const setMode = (mode) => {
|
| 1969 |
+
$('btnModeSil').classList.toggle('active', mode === 'sil');
|
| 1970 |
+
$('btnModeOverlay').classList.toggle('active', mode === 'overlay');
|
| 1971 |
+
$('btnModeOrig').classList.toggle('active', mode === 'orig');
|
| 1972 |
+
|
| 1973 |
+
if (mode === 'sil') {
|
| 1974 |
+
underlay.style.opacity = '0';
|
| 1975 |
+
silhouette.style.opacity = '1';
|
| 1976 |
+
} else if (mode === 'overlay') {
|
| 1977 |
+
underlay.style.opacity = '0.85';
|
| 1978 |
+
silhouette.style.opacity = '0.45';
|
| 1979 |
+
} else if (mode === 'orig') {
|
| 1980 |
+
underlay.style.opacity = '1';
|
| 1981 |
+
silhouette.style.opacity = '0';
|
| 1982 |
+
}
|
| 1983 |
+
};
|
| 1984 |
+
|
| 1985 |
+
$('btnModeSil').addEventListener('click', () => setMode('sil'));
|
| 1986 |
+
$('btnModeOverlay').addEventListener('click', () => setMode('overlay'));
|
| 1987 |
+
$('btnModeOrig').addEventListener('click', () => setMode('orig'));
|
| 1988 |
+
setMode('sil');
|
| 1989 |
+
|
| 1990 |
+
// 動畫切換
|
| 1991 |
+
$('chkCalBlink').addEventListener('change', (e) => {
|
| 1992 |
+
const anim = e.target.checked ? 'eyeBlink 4s infinite ease-in-out' : 'none';
|
| 1993 |
+
$('calEyeL').style.animation = anim;
|
| 1994 |
+
$('calEyeR').style.animation = anim;
|
| 1995 |
+
});
|
| 1996 |
+
|
| 1997 |
+
$('chkCalPulse').addEventListener('change', (e) => {
|
| 1998 |
+
$('calBox').style.animation = e.target.checked ? 'silhouettePulse 3.5s ease-in-out infinite alternate' : 'none';
|
| 1999 |
+
});
|
| 2000 |
+
|
| 2001 |
+
// 複製 JSON
|
| 2002 |
+
$('btnCopyJson').addEventListener('click', () => {
|
| 2003 |
+
const text = JSON.stringify(calConfig, null, 2);
|
| 2004 |
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
| 2005 |
+
navigator.clipboard.writeText(text).then(() => {
|
| 2006 |
+
showCopyToast();
|
| 2007 |
+
}).catch(() => fallbackCopy(text));
|
| 2008 |
+
} else {
|
| 2009 |
+
fallbackCopy(text);
|
| 2010 |
+
}
|
| 2011 |
+
});
|
| 2012 |
+
|
| 2013 |
+
function fallbackCopy(text) {
|
| 2014 |
+
const ta = document.createElement('textarea');
|
| 2015 |
+
ta.value = text;
|
| 2016 |
+
document.body.appendChild(ta);
|
| 2017 |
+
ta.select();
|
| 2018 |
+
document.execCommand('copy');
|
| 2019 |
+
document.body.removeChild(ta);
|
| 2020 |
+
showCopyToast();
|
| 2021 |
+
}
|
| 2022 |
+
|
| 2023 |
+
function showCopyToast() {
|
| 2024 |
+
const t = $('copyToast');
|
| 2025 |
+
t.style.display = 'inline';
|
| 2026 |
+
setTimeout(() => t.style.display = 'none', 2000);
|
| 2027 |
+
}
|
| 2028 |
+
|
| 2029 |
+
// 重設按鈕
|
| 2030 |
+
$('btnResetCal').addEventListener('click', () => {
|
| 2031 |
+
calConfig = JSON.parse(JSON.stringify(DEFAULT_EYES_CONFIG));
|
| 2032 |
+
updateCalibratorUI();
|
| 2033 |
+
});
|
| 2034 |
+
|
| 2035 |
+
// 套用至預告公告
|
| 2036 |
+
$('btnApplyToPatch').addEventListener('click', () => {
|
| 2037 |
+
applyConfigToGlobal(calConfig);
|
| 2038 |
+
$('modalCalibrator').classList.add('hidden');
|
| 2039 |
+
$('modalPatch').classList.remove('hidden');
|
| 2040 |
+
});
|
| 2041 |
+
|
| 2042 |
+
// 開關視窗
|
| 2043 |
+
$('btnOpenEyeCalibrator').addEventListener('click', () => {
|
| 2044 |
+
updateCalibratorUI();
|
| 2045 |
+
$('modalCalibrator').classList.remove('hidden');
|
| 2046 |
+
});
|
| 2047 |
+
$('btnCloseCalibrator').addEventListener('click', () => {
|
| 2048 |
+
$('modalCalibrator').classList.add('hidden');
|
| 2049 |
+
});
|
| 2050 |
+
|
| 2051 |
+
// 初始化 UI 與全域變數
|
| 2052 |
+
updateCalibratorUI();
|
| 2053 |
+
}
|
| 2054 |
+
|
| 2055 |
+
// ==========================================
|
| 2056 |
+
// 7. 事件綁定(只綁一次,使用事件委派)
|
| 2057 |
+
// ==========================================
|
| 2058 |
+
function init() {
|
| 2059 |
+
try {
|
| 2060 |
+
$('btnStart').addEventListener('click', startNewCombat);
|
| 2061 |
+
$('btnModalClose').addEventListener('click', closeResult);
|
| 2062 |
+
$('optContainer').addEventListener('click', (e) => {
|
| 2063 |
+
const btn = e.target.closest('.opt-btn');
|
| 2064 |
+
if (btn && !btn.disabled) handleAnswer(btn.dataset.label);
|
| 2065 |
+
});
|
| 2066 |
+
|
| 2067 |
+
$('btnDebugToggle').addEventListener('click', () => $('debugBar').classList.toggle('collapsed'));
|
| 2068 |
+
$('btnPreviewPatch').addEventListener('click', () => $('modalPatch').classList.remove('hidden'));
|
| 2069 |
+
$('btnDismissPatch').addEventListener('click', () => $('modalPatch').classList.add('hidden'));
|
| 2070 |
+
$('btnReset').addEventListener('click', resetAll);
|
| 2071 |
+
document.querySelectorAll('[data-mistakes]').forEach(b => b.addEventListener('click', () => {
|
| 2072 |
+
simulatedMistakeCount = Number(b.dataset.mistakes) || 0;
|
| 2073 |
+
b.animate([{ transform: 'scale(1.15)' }, { transform: 'scale(1)' }], { duration: 200 });
|
| 2074 |
+
}));
|
| 2075 |
+
document.querySelectorAll('[data-hp]').forEach(b => b.addEventListener('click', () => {
|
| 2076 |
+
bossHp = Number(b.dataset.hp) || BOSS_MAX_HP;
|
| 2077 |
+
updateHpUI();
|
| 2078 |
+
if (!inBattle) renderIntro();
|
| 2079 |
+
}));
|
| 2080 |
+
|
| 2081 |
+
initCalibrator();
|
| 2082 |
+
resetAll();
|
| 2083 |
+
} catch (err) {
|
| 2084 |
+
console.error('[boss-test] init 失敗:', err);
|
| 2085 |
+
}
|
| 2086 |
+
}
|
| 2087 |
+
|
| 2088 |
+
window.addEventListener('DOMContentLoaded', init);
|
| 2089 |
+
</script>
|
| 2090 |
+
</body>
|
| 2091 |
+
</html>
|
css/game.css
CHANGED
|
@@ -1044,5 +1044,199 @@ html[data-theme="dark"] .r-card { background: var(--bg-2); }
|
|
| 1044 |
cursor: not-allowed !important;
|
| 1045 |
}
|
| 1046 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1047 |
|
| 1048 |
|
|
|
|
| 1044 |
cursor: not-allowed !important;
|
| 1045 |
}
|
| 1046 |
|
| 1047 |
+
/* =============================================================
|
| 1048 |
+
版本更新公告系統(可複用模版)
|
| 1049 |
+
============================================================= */
|
| 1050 |
+
.patch-modal-wrap {
|
| 1051 |
+
position: relative;
|
| 1052 |
+
border-radius: 20px;
|
| 1053 |
+
overflow: hidden;
|
| 1054 |
+
border: 1.5px solid rgba(245, 196, 81, 0.45);
|
| 1055 |
+
box-shadow: 0 25px 70px rgba(0,0,0,0.8), 0 0 40px rgba(168, 85, 247, 0.25);
|
| 1056 |
+
background: #090a10;
|
| 1057 |
+
max-width: 540px;
|
| 1058 |
+
margin: -16px -16px -12px;
|
| 1059 |
+
color: #fff;
|
| 1060 |
+
}
|
| 1061 |
+
.patch-stage {
|
| 1062 |
+
position: relative;
|
| 1063 |
+
width: 100%;
|
| 1064 |
+
height: 230px;
|
| 1065 |
+
overflow: hidden;
|
| 1066 |
+
background: url('../assets/boss_bg_arena.jpg') center / cover no-repeat;
|
| 1067 |
+
display: flex;
|
| 1068 |
+
align-items: flex-end;
|
| 1069 |
+
justify-content: center;
|
| 1070 |
+
}
|
| 1071 |
+
.patch-stage::after {
|
| 1072 |
+
content: '';
|
| 1073 |
+
position: absolute;
|
| 1074 |
+
inset: 0;
|
| 1075 |
+
background: linear-gradient(180deg, rgba(9, 10, 16, 0.2) 0%, rgba(9, 10, 16, 0.95) 90%);
|
| 1076 |
+
pointer-events: none;
|
| 1077 |
+
}
|
| 1078 |
+
.patch-silhouette-wrap {
|
| 1079 |
+
position: relative;
|
| 1080 |
+
z-index: 2;
|
| 1081 |
+
width: 100%;
|
| 1082 |
+
height: 100%;
|
| 1083 |
+
display: flex;
|
| 1084 |
+
align-items: flex-end;
|
| 1085 |
+
justify-content: center;
|
| 1086 |
+
}
|
| 1087 |
+
.patch-silhouette-box {
|
| 1088 |
+
position: relative;
|
| 1089 |
+
display: inline-block;
|
| 1090 |
+
line-height: 0;
|
| 1091 |
+
animation: silhouettePulse 3.5s ease-in-out infinite alternate;
|
| 1092 |
+
transform-origin: center bottom;
|
| 1093 |
+
}
|
| 1094 |
+
.patch-silhouette-img.is-silhouette {
|
| 1095 |
+
height: 200px;
|
| 1096 |
+
width: 200px;
|
| 1097 |
+
object-fit: contain;
|
| 1098 |
+
filter: brightness(0) drop-shadow(0 0 16px rgba(245, 196, 81, 0.95)) drop-shadow(0 0 35px rgba(168, 85, 247, 0.8));
|
| 1099 |
+
display: block;
|
| 1100 |
+
}
|
| 1101 |
+
@keyframes silhouettePulse {
|
| 1102 |
+
0% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 12px rgba(245, 196, 81, 0.7)) drop-shadow(0 0 25px rgba(168, 85, 247, 0.6)); }
|
| 1103 |
+
100% { transform: scale(1.025) translateY(-4px); filter: drop-shadow(0 0 22px rgba(245, 196, 81, 1)) drop-shadow(0 0 45px rgba(239, 68, 68, 0.75)); }
|
| 1104 |
+
}
|
| 1105 |
+
.silhouette-eye {
|
| 1106 |
+
position: absolute;
|
| 1107 |
+
border-radius: 50%;
|
| 1108 |
+
background: radial-gradient(circle, #fff 15%, #fef08a 45%, #f59e0b 85%);
|
| 1109 |
+
box-shadow: 0 0 8px #f59e0b, 0 0 18px #ef4444;
|
| 1110 |
+
z-index: 5;
|
| 1111 |
+
pointer-events: none;
|
| 1112 |
+
transform: translate(-50%, -50%) rotate(var(--eye-rot, 0deg));
|
| 1113 |
+
transform-origin: center center;
|
| 1114 |
+
animation: eyeBlink 4s infinite ease-in-out;
|
| 1115 |
+
}
|
| 1116 |
+
.eye-left {
|
| 1117 |
+
left: var(--eye-l-x, 24.5%);
|
| 1118 |
+
top: var(--eye-l-y, 48.1%);
|
| 1119 |
+
width: var(--eye-l-w, 9px);
|
| 1120 |
+
height: var(--eye-l-h, 6px);
|
| 1121 |
+
--eye-rot: var(--eye-l-rot, 14deg);
|
| 1122 |
+
}
|
| 1123 |
+
.eye-right {
|
| 1124 |
+
left: var(--eye-r-x, 37.7%);
|
| 1125 |
+
top: var(--eye-r-y, 44.5%);
|
| 1126 |
+
width: var(--eye-r-w, 11px);
|
| 1127 |
+
height: var(--eye-r-h, 8px);
|
| 1128 |
+
--eye-rot: var(--eye-r-rot, -6deg);
|
| 1129 |
+
}
|
| 1130 |
+
@keyframes eyeBlink {
|
| 1131 |
+
0%, 90%, 100% {
|
| 1132 |
+
opacity: 1;
|
| 1133 |
+
transform: translate(-50%, -50%) rotate(var(--eye-rot, 0deg)) scale(1, 1);
|
| 1134 |
+
}
|
| 1135 |
+
93%, 95% {
|
| 1136 |
+
opacity: 0.15;
|
| 1137 |
+
transform: translate(-50%, -50%) rotate(var(--eye-rot, 0deg)) scale(1, 0.1);
|
| 1138 |
+
}
|
| 1139 |
+
}
|
| 1140 |
+
.patch-body {
|
| 1141 |
+
position: relative;
|
| 1142 |
+
z-index: 3;
|
| 1143 |
+
padding: 0 20px 20px;
|
| 1144 |
+
background: #090a10;
|
| 1145 |
+
text-align: left;
|
| 1146 |
+
}
|
| 1147 |
+
.patch-badge-pill {
|
| 1148 |
+
display: inline-flex;
|
| 1149 |
+
align-items: center;
|
| 1150 |
+
gap: 6px;
|
| 1151 |
+
background: linear-gradient(135deg, #b45309, #d97706);
|
| 1152 |
+
color: #fff;
|
| 1153 |
+
font-size: 11px;
|
| 1154 |
+
font-weight: 900;
|
| 1155 |
+
padding: 3px 12px;
|
| 1156 |
+
border-radius: 99px;
|
| 1157 |
+
letter-spacing: 1px;
|
| 1158 |
+
box-shadow: 0 2px 10px rgba(217, 119, 6, 0.4);
|
| 1159 |
+
}
|
| 1160 |
+
.patch-title {
|
| 1161 |
+
margin: 6px 0 4px 0;
|
| 1162 |
+
font-size: 22px;
|
| 1163 |
+
font-weight: 900;
|
| 1164 |
+
letter-spacing: 2px;
|
| 1165 |
+
background: linear-gradient(180deg, #fff 20%, #fde68a 65%, #f59e0b 100%);
|
| 1166 |
+
-webkit-background-clip: text;
|
| 1167 |
+
background-clip: text;
|
| 1168 |
+
-webkit-text-fill-color: transparent;
|
| 1169 |
+
}
|
| 1170 |
+
.patch-subtitle {
|
| 1171 |
+
margin: 0 0 12px 0;
|
| 1172 |
+
font-size: 13px;
|
| 1173 |
+
font-weight: 700;
|
| 1174 |
+
color: #fca5a5;
|
| 1175 |
+
letter-spacing: 0.5px;
|
| 1176 |
+
}
|
| 1177 |
+
.patch-lore-box {
|
| 1178 |
+
background: rgba(255, 255, 255, 0.05);
|
| 1179 |
+
border: 1px solid rgba(245, 196, 81, 0.25);
|
| 1180 |
+
border-left: 4px solid #f59e0b;
|
| 1181 |
+
border-radius: 12px;
|
| 1182 |
+
padding: 10px 14px;
|
| 1183 |
+
font-size: 13px;
|
| 1184 |
+
line-height: 1.65;
|
| 1185 |
+
color: #e2e8f0;
|
| 1186 |
+
margin-bottom: 12px;
|
| 1187 |
+
}
|
| 1188 |
+
.patch-features-grid {
|
| 1189 |
+
display: flex;
|
| 1190 |
+
flex-direction: column;
|
| 1191 |
+
gap: 8px;
|
| 1192 |
+
margin-bottom: 16px;
|
| 1193 |
+
}
|
| 1194 |
+
.patch-feat-item {
|
| 1195 |
+
display: flex;
|
| 1196 |
+
align-items: flex-start;
|
| 1197 |
+
gap: 10px;
|
| 1198 |
+
background: rgba(255, 255, 255, 0.04);
|
| 1199 |
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
| 1200 |
+
border-radius: 10px;
|
| 1201 |
+
padding: 8px 12px;
|
| 1202 |
+
}
|
| 1203 |
+
.patch-feat-icon {
|
| 1204 |
+
font-size: 18px;
|
| 1205 |
+
line-height: 1;
|
| 1206 |
+
flex-shrink: 0;
|
| 1207 |
+
margin-top: 2px;
|
| 1208 |
+
}
|
| 1209 |
+
.patch-feat-tit {
|
| 1210 |
+
font-size: 13px;
|
| 1211 |
+
font-weight: 800;
|
| 1212 |
+
color: #fef3c7;
|
| 1213 |
+
}
|
| 1214 |
+
.patch-feat-sub {
|
| 1215 |
+
font-size: 11px;
|
| 1216 |
+
color: #cbd5e1;
|
| 1217 |
+
margin-top: 2px;
|
| 1218 |
+
line-height: 1.35;
|
| 1219 |
+
}
|
| 1220 |
+
.patch-btn-confirm {
|
| 1221 |
+
width: 100%;
|
| 1222 |
+
min-height: 46px;
|
| 1223 |
+
border: none;
|
| 1224 |
+
border-radius: 14px;
|
| 1225 |
+
font-family: inherit;
|
| 1226 |
+
font-size: 16px;
|
| 1227 |
+
font-weight: 900;
|
| 1228 |
+
letter-spacing: 2px;
|
| 1229 |
+
color: #2a1500;
|
| 1230 |
+
background: linear-gradient(180deg, #ffe08a, #f5b323 55%, #d98a14);
|
| 1231 |
+
cursor: pointer;
|
| 1232 |
+
box-shadow: 0 8px 24px rgba(245, 179, 35, 0.4);
|
| 1233 |
+
transition: transform 0.15s, box-shadow 0.15s;
|
| 1234 |
+
}
|
| 1235 |
+
.patch-btn-confirm:hover {
|
| 1236 |
+
transform: translateY(-2px);
|
| 1237 |
+
box-shadow: 0 12px 30px rgba(245, 179, 35, 0.55);
|
| 1238 |
+
}
|
| 1239 |
+
|
| 1240 |
+
|
| 1241 |
|
| 1242 |
|
docs/art-style-guide.md
CHANGED
|
@@ -47,14 +47,14 @@
|
|
| 47 |
│ │
|
| 48 |
│ ├─ 未出征收復狀態:
|
| 49 |
│ │ 建築以「灰階半透明鎖定」(CSS: opacity 0.5 + grayscale)呈現
|
| 50 |
-
│ │ 地圖連線為虛線,需滿足前置城鎮收復與
|
| 51 |
│ │
|
| 52 |
-
│ └─ 消耗
|
| 53 |
│ 建築實體化點亮(全彩皮克斯 3D 手辦),特產圖騰激活,開始源源不絕產出糧草!
|
| 54 |
│
|
| 55 |
[ 資源面板與背包 ]
|
| 56 |
├─ 糧草圖示:獨立可愛金穗糧草袋 (`assets/icon_grain.jpg`)
|
| 57 |
-
└─
|
| 58 |
```
|
| 59 |
|
| 60 |
---
|
|
@@ -92,7 +92,7 @@
|
|
| 92 |
---
|
| 93 |
|
| 94 |
## 7. 特殊功能地標設計:【天機閣】(浮空仙島手辦規範)
|
| 95 |
-
- **功能定位**:每日一次限時 60 秒急速快答挑戰,掉落軍糧、
|
| 96 |
- **視覺區隔規範(與 10 大地面城池之差異化)**:
|
| 97 |
- **核心差異**:一般城池為「厚正方形土層切面底座(扎根地面)」;**天機閣為「懸浮在半空中的仙山浮島(Floating Sky Island)」**。
|
| 98 |
- **島底結構**:下方為倒三角錐狀的懸浮仙石與祥雲拖尾,周圍漂浮著數顆散發淡金光暈的微縮小浮石。
|
|
|
|
| 47 |
│ │
|
| 48 |
│ ├─ 未出征收復狀態:
|
| 49 |
│ │ 建築以「灰階半透明鎖定」(CSS: opacity 0.5 + grayscale)呈現
|
| 50 |
+
│ │ 地圖連線為虛線,需滿足前置城鎮收復與兵符/糧草條件方可出征
|
| 51 |
│ │
|
| 52 |
+
│ └─ 消耗兵符出征成功後(名都解鎖):
|
| 53 |
│ 建築實體化點亮(全彩皮克斯 3D 手辦),特產圖騰激活,開始源源不絕產出糧草!
|
| 54 |
│
|
| 55 |
[ 資源面板與背包 ]
|
| 56 |
├─ 糧草圖示:獨立可愛金穗糧草袋 (`assets/icon_grain.jpg`)
|
| 57 |
+
└─ 兵符圖示:獨立可愛小金虎印雕像 (`assets/icon_tally.jpg`)
|
| 58 |
```
|
| 59 |
|
| 60 |
---
|
|
|
|
| 92 |
---
|
| 93 |
|
| 94 |
## 7. 特殊功能地標設計:【天機閣】(浮空仙島手辦規範)
|
| 95 |
+
- **功能定位**:每日一次限時 60 秒急速快答挑戰,掉落軍糧、兵符與戰略卷軸。
|
| 96 |
- **視覺區隔規範(與 10 大地面城池之差異化)**:
|
| 97 |
- **核心差異**:一般城池為「厚正方形土層切面底座(扎根地面)」;**天機閣為「懸浮在半空中的仙山浮島(Floating Sky Island)」**。
|
| 98 |
- **島底結構**:下方為倒三角錐狀的懸浮仙石與祥雲拖尾,周圍漂浮著數顆散發淡金光暈的微縮小浮石。
|
docs/map-conquest-design.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
| 7 |
## 一、 系統演進與修改歷程記錄
|
| 8 |
|
| 9 |
### 1. 概念轉型:從「城鎮經營」到「征伐掠地」
|
| 10 |
-
* **原始架構**:原版設計為傳統放置遊戲(小屋、農田、工坊等小列表),與世界觀中的「調兵
|
| 11 |
* **重構核心**:
|
| 12 |
* 將八大建築全面升級為「**九州十大特色名都**」,各名都擁有專屬特產(青花瓷器、萬頃稻浪、百辟神兵、金丹仙草、雲錦天絲、崑崙奇礦、塞外神駿、九州文韜、巨艦樓船、萬里王畿)。
|
| 13 |
* 引入「**出征收復機制**」:需通過測驗解鎖情報、滿足前置城鎮連通、籌備充足糧草輜重,並頒布小金虎兵符方可出兵收復。
|
|
@@ -37,7 +37,7 @@
|
|
| 37 |
* 顯示當前產量 vs 擴軍預估產量、軍階里程碑進度條。
|
| 38 |
* 支援連續點擊升級(駐防擴軍)與升星(加官進爵),即時扣款刷新,無需關閉重開。
|
| 39 |
* 未收復城池直接顯示出征三項戰備檢驗與一鍵出征大按鈕。
|
| 40 |
-
* **真實資源圖示標準**:費用與標示全面改用高品質獨立素材圖示(`assets/icon_grain.jpg` 糧草袋、`assets/icon_tally.jpg`
|
| 41 |
|
| 42 |
---
|
| 43 |
|
|
@@ -80,7 +80,7 @@
|
|
| 80 |
* **防止連點腳本**:設定常數 `WORK_DAILY_LIMIT = 100`。
|
| 81 |
* **跨日判定機制**:記錄於 `game.workClicksDate` 與 `game.workClicksToday`,若日期不等於今日字串 `todayStr()`,午夜 00:00 自動歸零重設。
|
| 82 |
* **視覺反饋標籤**:催糧按鈕下方常駐顯示「今日巡營剩餘:`X / 100` 次」(剩餘少於 20 次轉為警示色)。
|
| 83 |
-
* **達標鎖定與導流**:滿 100 次後按鈕反灰置灰(`.work-btn.disabled`),點擊跳出提示引導學生前往【📜 軍機策驗】回答題目或複習,獲取大量軍糧與
|
| 84 |
|
| 85 |
### 2. 全軍共拓:每週達標鎖定
|
| 86 |
* **防浪費鎖定**:若主帥本週軍餉累積達標(`ws.currentDone`)且無上週怠惰欠款(`!ws.isSloth`),立即隱藏捐獻按鈕並展現達標榮譽金牌(`#donateLockedNotice`)。
|
|
@@ -172,11 +172,11 @@
|
|
| 172 |
### 3. 三大軍備箱手辦與物資掉落機率公示(開啟前可看機率)
|
| 173 |
依照「命名簡明系統化原則」,統一命名為成套且直觀的**軍備箱**系列。特別照顧答題易卡關的學生,青銅與白銀箱皆給予充足的卷軸支援:
|
| 174 |
|
| 175 |
-
| 寶箱名稱 | 專屬手辦資產 | 達成門檻 | 糧草軍資 |
|
| 176 |
| :--- | :---: | :---: | :---: | :---: | :--- |
|
| 177 |
-
| 🥉 **青銅軍備箱** | `assets/chest_bronze.png` | 答對 **1 ~
|
| 178 |
-
| 🥈 **白銀軍備箱** | `assets/chest_silver.png` | 答對 **
|
| 179 |
-
| 🥇 **黃金軍備箱** | `assets/chest_gold.png` | 答對 **
|
| 180 |
|
| 181 |
* **開啟前機率預覽抽屜**:
|
| 182 |
* 天機閣主介面提供「🎲 查看各軍備箱物資掉落機率公示」展開收合抽屜。
|
|
@@ -185,7 +185,7 @@
|
|
| 185 |
### 4. 開寶箱震撼動畫演出流程
|
| 186 |
1. **寶箱蓄力震動**:點擊開箱後,寶箱手辦開始高頻搖晃(套用 `.rumble`,`@keyframes chestRumble` 動畫,劇烈左右抖動)。
|
| 187 |
2. **金芒爆發旋轉**:震動 1.2 秒後,寶箱後方爆發出璀璨的金色旋轉射線(`.chest-rays`,`@keyframes raysSpin` 金光四射)。
|
| 188 |
-
3. **戰利品升騰彈出**:物資卡片(糧草、
|
| 189 |
4. **一鍵收入軍資**:點擊領取按鈕後,物資正式記入存檔,天機閣狀態即刻刷新為已演武 (1/1) 灰字狀態。
|
| 190 |
|
| 191 |
### 5. 戰略錦囊道具系統(背包與測驗雙向互通)
|
|
|
|
| 7 |
## 一、 系統演進與修改歷程記錄
|
| 8 |
|
| 9 |
### 1. 概念轉型:從「城鎮經營」到「征伐掠地」
|
| 10 |
+
* **原始架構**:原版設計為傳統放置遊戲(小屋、農田、工坊等小列表),與世界觀中的「調兵兵符」、「軍糧輜重」策略割裂。
|
| 11 |
* **重構核心**:
|
| 12 |
* 將八大建築全面升級為「**九州十大特色名都**」,各名都擁有專屬特產(青花瓷器、萬頃稻浪、百辟神兵、金丹仙草、雲錦天絲、崑崙奇礦、塞外神駿、九州文韜、巨艦樓船、萬里王畿)。
|
| 13 |
* 引入「**出征收復機制**」:需通過測驗解鎖情報、滿足前置城鎮連通、籌備充足糧草輜重,並頒布小金虎兵符方可出兵收復。
|
|
|
|
| 37 |
* 顯示當前產量 vs 擴軍預估產量、軍階里程碑進度條。
|
| 38 |
* 支援連續點擊升級(駐防擴軍)與升星(加官進爵),即時扣款刷新,無需關閉重開。
|
| 39 |
* 未收復城池直接顯示出征三項戰備檢驗與一鍵出征大按鈕。
|
| 40 |
+
* **真實資源圖示標準**:費用與標示全面改用高品質獨立素材圖示(`assets/icon_grain.jpg` 糧草袋、`assets/icon_tally.jpg` 兵符),取代純文字 Emoji。
|
| 41 |
|
| 42 |
---
|
| 43 |
|
|
|
|
| 80 |
* **防止連點腳本**:設定常數 `WORK_DAILY_LIMIT = 100`。
|
| 81 |
* **跨日判定機制**:記錄於 `game.workClicksDate` 與 `game.workClicksToday`,若日期不等於今日字串 `todayStr()`,午夜 00:00 自動歸零重設。
|
| 82 |
* **視覺反饋標籤**:催糧按鈕下方常駐顯示「今日巡營剩餘:`X / 100` 次」(剩餘少於 20 次轉為警示色)。
|
| 83 |
+
* **達標鎖定與導流**:滿 100 次後按鈕反灰置灰(`.work-btn.disabled`),點擊跳出提示引導學生前往【📜 軍機策驗】回答題目或複習,獲取大量軍糧與兵符獎勵。
|
| 84 |
|
| 85 |
### 2. 全軍共拓:每週達標鎖定
|
| 86 |
* **防浪費鎖定**:若主帥本週軍餉累積達標(`ws.currentDone`)且無上週怠惰欠款(`!ws.isSloth`),立即隱藏捐獻按鈕並展現達標榮譽金牌(`#donateLockedNotice`)。
|
|
|
|
| 172 |
### 3. 三大軍備箱手辦與物資掉落機率公示(開啟前可看機率)
|
| 173 |
依照「命名簡明系統化原則」,統一命名為成套且直觀的**軍備箱**系列。特別照顧答題易卡關的學生,青銅與白銀箱皆給予充足的卷軸支援:
|
| 174 |
|
| 175 |
+
| 寶箱名稱 | 專屬手辦資產 | 達成門檻 | 糧草軍資 | 兵符 | 戰略錦囊卷軸(核心平衡支援) |
|
| 176 |
| :--- | :---: | :---: | :---: | :---: | :--- |
|
| 177 |
+
| 🥉 **青銅軍備箱** | `assets/chest_bronze.png` | 答對 **1 ~ 7 題** | 5 分鐘掛機產量 (100%) | — | **穩定必得 1 張卷軸 (100%)**<br>(70% 掉落【刪去卷】,30% 掉落【偷看卷】),保障答題易錯學生每天都有救急道具可用! |
|
| 178 |
+
| 🥈 **白銀軍備箱** | `assets/chest_silver.png` | 答對 **8 ~ 14 題** | 15 分鐘掛機產量 (100%) | 20% 機率得 1 枚 | **必得 1~2 張卷軸**<br>(100% 必得【刪去卷】1 張,50% 機率得【偷看卷】1 張) |
|
| 179 |
+
| 🥇 **黃金軍備箱** | `assets/chest_gold.png` | 答對 **15 題以上** | 30 分鐘暴風產量 (100%) | **100% 必得 1~2 枚** | **必得 2~3 張高階卷軸**<br>(100% 得【偷看卷】1~2 張,100% 得【刪去卷】1 張) |
|
| 180 |
|
| 181 |
* **開啟前機率預覽抽屜**:
|
| 182 |
* 天機閣主介面提供「🎲 查看各軍備箱物資掉落機率公示」展開收合抽屜。
|
|
|
|
| 185 |
### 4. 開寶箱震撼動畫演出流程
|
| 186 |
1. **寶箱蓄力震動**:點擊開箱後,寶箱手辦開始高頻搖晃(套用 `.rumble`,`@keyframes chestRumble` 動畫,劇烈左右抖動)。
|
| 187 |
2. **金芒爆發旋轉**:震動 1.2 秒後,寶箱後方爆發出璀璨的金色旋轉射線(`.chest-rays`,`@keyframes raysSpin` 金光四射)。
|
| 188 |
+
3. **戰利品升騰彈出**:物資卡片(糧草、兵符、偷看卷、刪去卷)透過彈簧彈跳動畫(`@keyframes rewardsPop`)依序彈出。
|
| 189 |
4. **一鍵收入軍資**:點擊領取按鈕後,物資正式記入存檔,天機閣狀態即刻刷新為已演武 (1/1) 灰字狀態。
|
| 190 |
|
| 191 |
### 5. 戰略錦囊道具系統(背包與測驗雙向互通)
|
index.html
CHANGED
|
@@ -23,9 +23,9 @@
|
|
| 23 |
<!-- 登入 -->
|
| 24 |
<section id="viewLogin" class="view-center hidden">
|
| 25 |
<div class="login-card card">
|
| 26 |
-
<div class="login-logo"><img src="assets/icon_tally.jpg" class="login-tally-img" alt="
|
| 27 |
<h1 id="gameTitle" class="login-title">攻城掠地・霸業征途</h1>
|
| 28 |
-
<p class="dim login-sub">奪要塞、考試頒
|
| 29 |
<form id="loginForm" class="stack" autocomplete="on">
|
| 30 |
<div class="field">
|
| 31 |
<label for="inCode">軍團/班級代碼</label>
|
|
@@ -59,11 +59,11 @@
|
|
| 59 |
<div class="res-sub num"><span id="valPerSec">0</span> 糧草/秒</div>
|
| 60 |
</div>
|
| 61 |
</div>
|
| 62 |
-
<div class="res res-bp" title="
|
| 63 |
-
<img class="res-thumb" src="assets/icon_tally.jpg" alt="
|
| 64 |
<div>
|
| 65 |
<div class="res-val num" id="valBp">0</div>
|
| 66 |
-
<div class="res-sub" id="lblBp">
|
| 67 |
</div>
|
| 68 |
</div>
|
| 69 |
<div class="res res-mult" title="全軍士氣倍率">
|
|
@@ -171,7 +171,7 @@
|
|
| 171 |
<div class="pane hidden" id="paneQuiz">
|
| 172 |
<div class="card quiz-intro">
|
| 173 |
<h2>📝 測驗:想變強,躲不掉考試</h2>
|
| 174 |
-
<p class="dim">達到 <b>85 分</b> 即通過。分數門檻(85/95/100)各有
|
| 175 |
已通過的範圍每天第一次複習 ≥85 分,還有<b>複習獎勵</b>。範圍越大,解鎖的改變越巨大!</p>
|
| 176 |
<div class="tier-flow" id="tierFlow"></div>
|
| 177 |
</div>
|
|
|
|
| 23 |
<!-- 登入 -->
|
| 24 |
<section id="viewLogin" class="view-center hidden">
|
| 25 |
<div class="login-card card">
|
| 26 |
+
<div class="login-logo"><img src="assets/icon_tally.jpg" class="login-tally-img" alt="兵符"></div>
|
| 27 |
<h1 id="gameTitle" class="login-title">攻城掠地・霸業征途</h1>
|
| 28 |
+
<p class="dim login-sub">奪要塞、考試頒兵符、全班合力平天下!</p>
|
| 29 |
<form id="loginForm" class="stack" autocomplete="on">
|
| 30 |
<div class="field">
|
| 31 |
<label for="inCode">軍團/班級代碼</label>
|
|
|
|
| 59 |
<div class="res-sub num"><span id="valPerSec">0</span> 糧草/秒</div>
|
| 60 |
</div>
|
| 61 |
</div>
|
| 62 |
+
<div class="res res-bp" title="兵符(測驗達標獲得)">
|
| 63 |
+
<img class="res-thumb" src="assets/icon_tally.jpg" alt="兵符">
|
| 64 |
<div>
|
| 65 |
<div class="res-val num" id="valBp">0</div>
|
| 66 |
+
<div class="res-sub" id="lblBp">兵符</div>
|
| 67 |
</div>
|
| 68 |
</div>
|
| 69 |
<div class="res res-mult" title="全軍士氣倍率">
|
|
|
|
| 171 |
<div class="pane hidden" id="paneQuiz">
|
| 172 |
<div class="card quiz-intro">
|
| 173 |
<h2>📝 測驗:想變強,躲不掉考試</h2>
|
| 174 |
+
<p class="dim">達到 <b>85 分</b> 即通過。分數門檻(85/95/100)各有兵符獎勵,只補差額;
|
| 175 |
已通過的範圍每天第一次複習 ≥85 分,還有<b>複習獎勵</b>。範圍越大,解鎖的改變越巨大!</p>
|
| 176 |
<div class="tier-flow" id="tierFlow"></div>
|
| 177 |
</div>
|
js/admin.js
CHANGED
|
@@ -450,7 +450,7 @@ function modalSendGift() {
|
|
| 450 |
<div class="mute" style="margin-bottom:15px">將發送給 <b>${selected.length}</b> 名學生</div>
|
| 451 |
<div class="form-grid">
|
| 452 |
<div><label class="mute">固定糧草數量 🌾</label><input type="number" id="gCoins" class="input" style="width:100%" value="0"></div>
|
| 453 |
-
<div><label class="mute">
|
| 454 |
<div style="grid-column: 1 / -1;">
|
| 455 |
<label class="mute">⏳ 贈送掛機收益時長(小時)</label>
|
| 456 |
<div style="display:flex; gap:8px; align-items:center; margin-top:4px;">
|
|
@@ -598,7 +598,7 @@ async function modalResetPioneer() {
|
|
| 598 |
<div style="background:#fffbeb; border:1.5px solid rgba(217,119,6,0.3); border-radius:12px; padding:12px 16px; margin-bottom:14px; font-size:13px; line-height:1.6; color:#92400e;">
|
| 599 |
<b>⚠️ 結算與重整作業說明:</b><br>
|
| 600 |
1. 系統已自動讀取全班學生目前的每秒產量,並依階梯換算為專屬<b>【偷看卷】</b>與<b>【刪去卷】</b>。<br>
|
| 601 |
-
2. 執行後,全體學生的<b>糧草(15 🌾)、
|
| 602 |
3. 換算獲得的卷軸將直接注入學生個人背包(<code>game.items</code>),可於天機閣或正式測驗隨時調用。<br>
|
| 603 |
4. <b>明日每位學生打開遊戲時,系統會主動彈出「封測先鋒冊封令」展示功勳與獎勵(單次顯示,領取後自動切換至新手 3 步驟圖文指南)</b>。
|
| 604 |
</div>
|
|
|
|
| 450 |
<div class="mute" style="margin-bottom:15px">將發送給 <b>${selected.length}</b> 名學生</div>
|
| 451 |
<div class="form-grid">
|
| 452 |
<div><label class="mute">固定糧草數量 🌾</label><input type="number" id="gCoins" class="input" style="width:100%" value="0"></div>
|
| 453 |
+
<div><label class="mute">兵符數量 🐅</label><input type="number" id="gBp" class="input" style="width:100%" value="0"></div>
|
| 454 |
<div style="grid-column: 1 / -1;">
|
| 455 |
<label class="mute">⏳ 贈送掛機收益時長(小時)</label>
|
| 456 |
<div style="display:flex; gap:8px; align-items:center; margin-top:4px;">
|
|
|
|
| 598 |
<div style="background:#fffbeb; border:1.5px solid rgba(217,119,6,0.3); border-radius:12px; padding:12px 16px; margin-bottom:14px; font-size:13px; line-height:1.6; color:#92400e;">
|
| 599 |
<b>⚠️ 結算與重整作業說明:</b><br>
|
| 600 |
1. 系統已自動讀取全班學生目前的每秒產量,並依階梯換算為專屬<b>【偷看卷】</b>與<b>【刪去卷】</b>。<br>
|
| 601 |
+
2. 執行後,全體學生的<b>糧草(15 🌾)、兵符(0 枚)、城池等級(Lv.0)將重整回開局狀態</b>。<br>
|
| 602 |
3. 換算獲得的卷軸將直接注入學生個人背包(<code>game.items</code>),可於天機閣或正式測驗隨時調用。<br>
|
| 603 |
4. <b>明日每位學生打開遊戲時,系統會主動彈出「封測先鋒冊封令」展示功勳與獎勵(單次顯示,領取後自動切換至新手 3 步驟圖文指南)</b>。
|
| 604 |
</div>
|
js/announcements.js
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* announcements.js
|
| 3 |
+
* 版本更新公告系統(可複用模版)
|
| 4 |
+
* 支援預約生效時間、剪影展示、未讀自動彈出、手動隨時回看。
|
| 5 |
+
*/
|
| 6 |
+
|
| 7 |
+
import { openModal } from './util.js';
|
| 8 |
+
|
| 9 |
+
export const ANNOUNCEMENT_REGISTRY = [
|
| 10 |
+
{
|
| 11 |
+
id: 'update_20261023_worldboss',
|
| 12 |
+
// 預約於本週五 (2026-10-23) 晨光 00:00 自動向全體學生開放彈出
|
| 13 |
+
releaseAt: '2026-10-23T00:00:00+08:00',
|
| 14 |
+
badge: '🔥 史詩版本預告・即將解鎖',
|
| 15 |
+
version: 'v2.5 全新篇章',
|
| 16 |
+
title: '太古凶神・即將破印',
|
| 17 |
+
subtitle: '第三單元完成後,全班跨界世界 Boss 挑戰震撼降臨!',
|
| 18 |
+
bgImage: 'assets/boss_bg_arena.jpg',
|
| 19 |
+
bossImage: 'assets/boss_taotie.png',
|
| 20 |
+
silhouette: true,
|
| 21 |
+
lore: '混沌初開,太古凶獸【饕餮】即將破印吞食天地!牠盤踞於太古雷雲八卦神壇之上,以學子們的「錯題弱點」為食……唯有全班同袍齊心完成第三單元考驗,親手克服自身的弱點難題,方能啟動八卦封印大陣,合力將其重新封印!',
|
| 22 |
+
features: [
|
| 23 |
+
{
|
| 24 |
+
icon: '🏛️',
|
| 25 |
+
title: '世界 Boss 解鎖門檻',
|
| 26 |
+
desc: '完成第三單元(51-75)的軍機策驗後開放'
|
| 27 |
+
},
|
| 28 |
+
{
|
| 29 |
+
icon: '⚔️',
|
| 30 |
+
title: '全班共伐 500 HP 巨獸',
|
| 31 |
+
desc: '全班共享同一血條!每人每日 3 次出征機會,答對弱點題造成重創與暴擊!'
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
icon: '🌾',
|
| 35 |
+
title: '神獸寶庫全班瓜分',
|
| 36 |
+
desc: '封印擊破後全員獲贈「1 小時產量包 ×2」與「兵符」!輸出 MVP 與最後一擊更享有專屬榮譽稱號!'
|
| 37 |
+
}
|
| 38 |
+
],
|
| 39 |
+
ctaText: '⚔️ 研讀軍策・整軍備戰'
|
| 40 |
+
}
|
| 41 |
+
];
|
| 42 |
+
|
| 43 |
+
const SEEN_STORAGE_KEY = 'idle_seen_announcements';
|
| 44 |
+
|
| 45 |
+
/**
|
| 46 |
+
* 取得玩家已看過的公告 ID 清單
|
| 47 |
+
*/
|
| 48 |
+
function getSeenList() {
|
| 49 |
+
try {
|
| 50 |
+
const raw = localStorage.getItem(SEEN_STORAGE_KEY);
|
| 51 |
+
return raw ? JSON.parse(raw) : [];
|
| 52 |
+
} catch (e) {
|
| 53 |
+
return [];
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
/**
|
| 58 |
+
* 標記公告為已讀
|
| 59 |
+
*/
|
| 60 |
+
function markSeen(id) {
|
| 61 |
+
try {
|
| 62 |
+
const list = getSeenList();
|
| 63 |
+
if (!list.includes(id)) {
|
| 64 |
+
list.push(id);
|
| 65 |
+
localStorage.setItem(SEEN_STORAGE_KEY, JSON.stringify(list));
|
| 66 |
+
}
|
| 67 |
+
} catch (e) {
|
| 68 |
+
console.warn('[Announcements] Failed to save seen state:', e);
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
/**
|
| 73 |
+
* 檢查目前是否有符合發布時間且尚未閱讀的公告
|
| 74 |
+
* @param {boolean} force - 若為 true 則忽略發布時間與已讀狀態(供測試/手動點擊使用)
|
| 75 |
+
*/
|
| 76 |
+
export function checkAndShowAnnouncements(force = false) {
|
| 77 |
+
const now = Date.now();
|
| 78 |
+
const seenList = getSeenList();
|
| 79 |
+
|
| 80 |
+
for (const ann of ANNOUNCEMENT_REGISTRY) {
|
| 81 |
+
const releaseTime = new Date(ann.releaseAt).getTime();
|
| 82 |
+
const isReleased = now >= releaseTime;
|
| 83 |
+
const isUnseen = !seenList.includes(ann.id);
|
| 84 |
+
|
| 85 |
+
// 週五觸發檢查:已到發布時間且未讀,或者 force 為 true
|
| 86 |
+
if (force || (isReleased && isUnseen)) {
|
| 87 |
+
showAnnouncementModal(ann.id, force);
|
| 88 |
+
break; // 一次只彈出一則最新的公告
|
| 89 |
+
}
|
| 90 |
+
}
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
/**
|
| 94 |
+
* 彈出指定公告的模態視窗
|
| 95 |
+
* @param {string} id - 公告 ID
|
| 96 |
+
* @param {boolean} isPreview - 是否為預覽模式
|
| 97 |
+
*/
|
| 98 |
+
export function showAnnouncementModal(id, isPreview = false) {
|
| 99 |
+
const ann = ANNOUNCEMENT_REGISTRY.find(a => a.id === id) || ANNOUNCEMENT_REGISTRY[0];
|
| 100 |
+
if (!ann) return;
|
| 101 |
+
|
| 102 |
+
const featuresHtml = (ann.features || []).map(f => `
|
| 103 |
+
<div class="patch-feat-item">
|
| 104 |
+
<span class="patch-feat-icon">${f.icon}</span>
|
| 105 |
+
<div>
|
| 106 |
+
<div class="patch-feat-tit">${f.title}</div>
|
| 107 |
+
<div class="patch-feat-sub">${f.desc}</div>
|
| 108 |
+
</div>
|
| 109 |
+
</div>
|
| 110 |
+
`).join('');
|
| 111 |
+
|
| 112 |
+
const modalHtml = `
|
| 113 |
+
<div class="patch-modal-wrap">
|
| 114 |
+
<!-- 頂部視覺舞台:帥氣背景 + 神秘 Boss 剪影 -->
|
| 115 |
+
<div class="patch-stage">
|
| 116 |
+
<div class="patch-silhouette-wrap">
|
| 117 |
+
<div class="patch-silhouette-box">
|
| 118 |
+
<img src="${ann.bossImage}" class="patch-silhouette-img ${ann.silhouette ? 'is-silhouette' : ''}" alt="神秘 Boss 剪影">
|
| 119 |
+
${ann.silhouette ? `
|
| 120 |
+
<div class="silhouette-eye eye-left"></div>
|
| 121 |
+
<div class="silhouette-eye eye-right"></div>
|
| 122 |
+
` : ''}
|
| 123 |
+
</div>
|
| 124 |
+
</div>
|
| 125 |
+
</div>
|
| 126 |
+
|
| 127 |
+
<!-- 下方訊息內容 -->
|
| 128 |
+
<div class="patch-body">
|
| 129 |
+
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:8px;">
|
| 130 |
+
<span class="patch-badge-pill">${ann.badge}</span>
|
| 131 |
+
<span style="font-size:11px; color:#cbd5e1; font-weight:700;">${ann.version}</span>
|
| 132 |
+
</div>
|
| 133 |
+
|
| 134 |
+
<h2 class="patch-title">${ann.title}</h2>
|
| 135 |
+
<div class="patch-subtitle">${ann.subtitle}</div>
|
| 136 |
+
|
| 137 |
+
<div class="patch-lore-box">
|
| 138 |
+
${ann.lore}
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
<div class="patch-features-grid">
|
| 142 |
+
${featuresHtml}
|
| 143 |
+
</div>
|
| 144 |
+
|
| 145 |
+
<button class="patch-btn-confirm" id="btnDismissPatch">
|
| 146 |
+
${ann.ctaText || '確認了解'}
|
| 147 |
+
</button>
|
| 148 |
+
</div>
|
| 149 |
+
</div>
|
| 150 |
+
`;
|
| 151 |
+
|
| 152 |
+
const m = openModal(modalHtml, { closable: true, wide: false });
|
| 153 |
+
|
| 154 |
+
// 點擊確認或關閉時,標記為已讀(預覽模式不強制作廢已讀紀錄)
|
| 155 |
+
const btn = m.el.querySelector('#btnDismissPatch');
|
| 156 |
+
if (btn) {
|
| 157 |
+
btn.addEventListener('click', () => {
|
| 158 |
+
if (!isPreview) markSeen(ann.id);
|
| 159 |
+
m.close();
|
| 160 |
+
});
|
| 161 |
+
}
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
// 掛載至 window 方便隨時手動呼叫或除錯
|
| 165 |
+
if (typeof window !== 'undefined') {
|
| 166 |
+
window.showVersionUpdateModal = (force = true) => showAnnouncementModal('update_20261023_worldboss', force);
|
| 167 |
+
}
|
js/config.js
CHANGED
|
@@ -14,7 +14,7 @@ export const THEME = {
|
|
| 14 |
|
| 15 |
// ---------- 九州特色城鎮(10大名都特色產業與出征體系) ----------
|
| 16 |
// unlockUnits:通過幾個「25 題單元」測驗開放征討情報
|
| 17 |
-
// tallyCost:出征需要消耗的「
|
| 18 |
// grainCost:出兵所需籌集的「糧草輜重」(須先將初中級城鎮升級才能供應大軍出征)
|
| 19 |
// requires:出征前置城鎮 ID 清單(初中級戰略通路連線)
|
| 20 |
export const BUILDINGS = [
|
|
@@ -176,9 +176,9 @@ export const COST_GROWTH = 1.15; // 每級成本成長率
|
|
| 176 |
export const LEVEL_MILESTONES = [10, 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 300, 350, 400];
|
| 177 |
export const MILESTONE_MULT = 2;
|
| 178 |
|
| 179 |
-
// 星級強化(用
|
| 180 |
-
// →
|
| 181 |
-
export const STAR_COSTS = [1, 2, 3, 5, 8]; // 第 1~5 星所需
|
| 182 |
export const STAR_MULT = 2;
|
| 183 |
export const STAR_BASE_MAX = STAR_COSTS.length; // 「基礎星」數量(顯示用)
|
| 184 |
export const STAR_EXTRA_MULT = 1.5; // 第 6 星起每顆倍率
|
|
@@ -221,8 +221,8 @@ export const LUCKY = {
|
|
| 221 |
};
|
| 222 |
|
| 223 |
// ---------- 測驗分級(25 → 50 → 100 → 200 → 全卷 的質變) ----------
|
| 224 |
-
// thresholds:達到分數門檻時累計可拿到的
|
| 225 |
-
// reviewBonus:已通過後,每天第一次複習 ≥85 分的額外
|
| 226 |
export const PASS_SCORE = 85;
|
| 227 |
export const TIERS = {
|
| 228 |
1: { name: '單元', size: 25, maxQuestions: 25, reward: { 85: 2, 95: 3, 100: 5 }, reviewBonus: 1, desc: '每通過一個單元,攻佔解鎖新要塞' },
|
|
|
|
| 14 |
|
| 15 |
// ---------- 九州特色城鎮(10大名都特色產業與出征體系) ----------
|
| 16 |
// unlockUnits:通過幾個「25 題單元」測驗開放征討情報
|
| 17 |
+
// tallyCost:出征需要消耗的「兵符」數量(高階城鎮需天天複習測驗累積)
|
| 18 |
// grainCost:出兵所需籌集的「糧草輜重」(須先將初中級城鎮升級才能供應大軍出征)
|
| 19 |
// requires:出征前置城鎮 ID 清單(初中級戰略通路連線)
|
| 20 |
export const BUILDINGS = [
|
|
|
|
| 176 |
export const LEVEL_MILESTONES = [10, 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 300, 350, 400];
|
| 177 |
export const MILESTONE_MULT = 2;
|
| 178 |
|
| 179 |
+
// 星級強化(用兵符):第 1~5 星每顆 x2;第 6 星起無上限,每顆 x1.5、成本 x1.6 遞增
|
| 180 |
+
// → 兵符永遠有用途,高分學生能持續領先
|
| 181 |
+
export const STAR_COSTS = [1, 2, 3, 5, 8]; // 第 1~5 星所需兵符
|
| 182 |
export const STAR_MULT = 2;
|
| 183 |
export const STAR_BASE_MAX = STAR_COSTS.length; // 「基礎星」數量(顯示用)
|
| 184 |
export const STAR_EXTRA_MULT = 1.5; // 第 6 星起每顆倍率
|
|
|
|
| 221 |
};
|
| 222 |
|
| 223 |
// ---------- 測驗分級(25 → 50 → 100 → 200 → 全卷 的質變) ----------
|
| 224 |
+
// thresholds:達到分數門檻時累計可拿到的兵符總量(只補差額,不能重複刷)
|
| 225 |
+
// reviewBonus:已通過後,每天第一次複習 ≥85 分的額外兵符
|
| 226 |
export const PASS_SCORE = 85;
|
| 227 |
export const TIERS = {
|
| 228 |
1: { name: '單元', size: 25, maxQuestions: 25, reward: { 85: 2, 95: 3, 100: 5 }, reviewBonus: 1, desc: '每通過一個單元,攻佔解鎖新要塞' },
|
js/game.js
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
| 12 |
} from './engine.js?v=20261019e';
|
| 13 |
import { $, $$, fmt, fmtTime, todayStr, bind, withLoading, toast, openModal, esc, fmtDateTime, shuffle } from './util.js';
|
| 14 |
import { loadBankIndex, buildQuiz, loadBank } from './quiz.js';
|
|
|
|
| 15 |
|
| 16 |
let db, user, student, classInfo = null;
|
| 17 |
let game = null, progress = {}, stats = {};
|
|
@@ -147,6 +148,7 @@ async function loadStudentData() {
|
|
| 147 |
switchTab('build');
|
| 148 |
setTimeout(() => checkClassMilestones(), 600);
|
| 149 |
setTimeout(() => checkAlphaPioneerNotice(), 400);
|
|
|
|
| 150 |
}
|
| 151 |
|
| 152 |
// 存檔:同一時間只會有一個寫入;寫入中又有新請求時,結束後再補存一次(確保最新資料寫入)
|
|
@@ -299,7 +301,7 @@ bind($('#btnWork'), 'pointerdown', (e) => {
|
|
| 299 |
}
|
| 300 |
const ws = getWorkDailyStatus(game);
|
| 301 |
if (ws.isMax) {
|
| 302 |
-
toast('🛑 今日巡營催糧已達 100 次上限!若急需大量糧草與
|
| 303 |
return;
|
| 304 |
}
|
| 305 |
game.workClicksToday = (game.workClicksToday || 0) + 1;
|
|
@@ -461,7 +463,7 @@ function renderMapSpots() {
|
|
| 461 |
stateCls = reqs.ready ? 'ready' : 'ready prep';
|
| 462 |
statusText = reqs.ready ? '⚔️ 可出征' : '🚩 籌備中';
|
| 463 |
iconBadge = '<span class="spot-flag">🚩</span>';
|
| 464 |
-
costBadge = `<span class="spot-tally-cost" title="出征需消耗 ${b.tallyCost}
|
| 465 |
prodText = `收復可得 +${b.baseProd}/秒`;
|
| 466 |
} else {
|
| 467 |
stateCls = 'active' + (ev ? ' evolved' : '');
|
|
@@ -516,7 +518,7 @@ function renderMapSpots() {
|
|
| 516 |
<span>🏯 天機閣</span>
|
| 517 |
<small style="${tianjiDone ? 'color:var(--text-mute); font-weight:700;' : 'color:#059669; font-weight:800;'}">${tianjiDone ? '今日遊玩次數 (1/1)' : '今日遊玩次數 (0/1)'}</small>
|
| 518 |
</div>
|
| 519 |
-
<div class="spot-label-prod" style="${tianjiDone ? 'color:var(--text-mute); background:rgba(0,0,0,0.06);' : 'color:#b45309;'}">${tianjiDone ? '今日已結算・明日 00:00 重設' : '開軍備箱・奪金
|
| 520 |
</div>
|
| 521 |
</div>
|
| 522 |
`;
|
|
@@ -619,7 +621,7 @@ function renderInMapTownPanel() {
|
|
| 619 |
if (!reqs.prereqMet) {
|
| 620 |
blockerReason = `前置連通未足:需先收復 ${reqs.missingPrereqs.join('、')}`;
|
| 621 |
} else if (!reqs.tallyMet) {
|
| 622 |
-
blockerReason = `尚缺 ${reqs.tallyNeed - reqs.tallyHave}
|
| 623 |
} else if (!reqs.grainMet) {
|
| 624 |
blockerReason = `糧草輜重不足,尚差 ${fmt(reqs.grainNeed - reqs.grainHave)}`;
|
| 625 |
}
|
|
@@ -652,7 +654,7 @@ function renderInMapTownPanel() {
|
|
| 652 |
<span class="req-tag">${reqs.prereqMet ? '✔ 已連通' : '❌ 未連通'}</span>
|
| 653 |
</div>` : ''}
|
| 654 |
<div class="req-item ${reqs.tallyMet ? 'met' : 'unmet'}">
|
| 655 |
-
<span><img src="assets/icon_tally.jpg" class="res-mini-icon" alt="
|
| 656 |
<span class="req-tag">${reqs.tallyMet ? '✔ 齊備' : `❌ 缺 ${reqs.tallyNeed - reqs.tallyHave}`}</span>
|
| 657 |
</div>
|
| 658 |
<div class="req-item ${reqs.grainMet ? 'met' : 'unmet'}">
|
|
@@ -661,7 +663,7 @@ function renderInMapTownPanel() {
|
|
| 661 |
</div>
|
| 662 |
</div>
|
| 663 |
<button class="btn-conquer ${canConquerNow ? 'btn-conquer-active' : ''} ${!pauseStatus.allowed ? 'btn-paused' : ''}" id="btnInMapConquer" ${canConquerNow ? '' : 'disabled'} title="${!pauseStatus.allowed ? esc(pauseStatus.reason) : ''}">
|
| 664 |
-
<span>${!pauseStatus.allowed ? '🌙 課後休整中・暫停出征' : (reqs.ready ? '⚔️ 頒布
|
| 665 |
<span class="conquer-sub">${!pauseStatus.allowed ? esc(pauseStatus.reason) : (reqs.ready ? `收復後立刻獲取【${b.specialty}】專屬生產力` : blockerReason)}</span>
|
| 666 |
</button>`;
|
| 667 |
} else {
|
|
@@ -718,7 +720,7 @@ function renderInMapTownPanel() {
|
|
| 718 |
</button>
|
| 719 |
<button class="btn btn-inmap-star ${!pauseStatus.allowed ? 'btn-paused' : ''}" id="btnInMapStar" data-bid="${b.id}" ${canStar ? '' : 'disabled'} title="${!pauseStatus.allowed ? esc(pauseStatus.reason) : `下一星級產量 x${sNext}`}">
|
| 720 |
<span>${!pauseStatus.allowed ? '加官升星 (🌙休整中)' : `加官升星 x${sNext}`}</span>
|
| 721 |
-
<small class="num"><img src="assets/icon_tally.jpg" class="res-mini-icon" alt="
|
| 722 |
</button>
|
| 723 |
</div>`;
|
| 724 |
}
|
|
@@ -794,7 +796,7 @@ function renderInMapTownPanel() {
|
|
| 794 |
renderMapSpots();
|
| 795 |
markDirty();
|
| 796 |
} else {
|
| 797 |
-
toast(`
|
| 798 |
}
|
| 799 |
});
|
| 800 |
}
|
|
@@ -922,15 +924,15 @@ function openBeginnerGuideModal() {
|
|
| 922 |
<div class="beginner-step-card">
|
| 923 |
<div class="step-badge-col">
|
| 924 |
<div class="step-num-badge">3</div>
|
| 925 |
-
<img src="assets/icon_tally.jpg" class="step-icon-img" alt="
|
| 926 |
</div>
|
| 927 |
<div class="step-content">
|
| 928 |
<h3 class="step-title">
|
| 929 |
-
<span>📜 軍機策驗・奪
|
| 930 |
<span class="step-tag">平定天下</span>
|
| 931 |
</h3>
|
| 932 |
<p class="step-desc">
|
| 933 |
-
前往上方<b>【📜 軍機策驗】</b>挑戰題庫,成績達 <b>85 分</b> 即可贏得珍貴的<b>【
|
| 934 |
</p>
|
| 935 |
</div>
|
| 936 |
</div>
|
|
@@ -966,7 +968,7 @@ function updateBeginnerGuideBanner() {
|
|
| 966 |
textEl.innerHTML = `<b>💡 新手指引 Step 1</b>:全軍開局秒產為 0,請先點擊沙盤左上角<b>【🌾 巡營催糧】</b>賺取初始軍糧,再升級<b>【景陽瓷都】</b>開啟自動秒產!`;
|
| 967 |
} else if (capturedCount <= 1 && blueprints === 0) {
|
| 968 |
banner.classList.remove('hidden');
|
| 969 |
-
textEl.innerHTML = `<b>💡 新手指引 Step 2</b>:【景陽瓷都】已開始自動產糧!請點擊上方<b>【📜 軍機策驗】</b>考 85 分奪<b>【
|
| 970 |
} else if (capturedCount < 3) {
|
| 971 |
banner.classList.remove('hidden');
|
| 972 |
textEl.innerHTML = `<b>💡 新手指引 Step 3</b>:恭喜出征順利!持續收復周邊名都並前往<b>【🏛️ 全軍共拓】</b>捐獻軍糧,全班合力解鎖名城奇觀!`;
|
|
@@ -1017,7 +1019,7 @@ function renderBuild() {
|
|
| 1017 |
if (nextGoalEl) {
|
| 1018 |
const readyTown = BUILDINGS.find(b => (game.buildings[b.id]?.lv || 0) === 0 && canConquer(b, game, dState));
|
| 1019 |
if (readyTown) {
|
| 1020 |
-
nextGoalEl.innerHTML = `⚔️ 戰報:<b>【${readyTown.icon} ${readyTown.name}】</b>戰備已齊全,可立即頒發
|
| 1021 |
} else {
|
| 1022 |
// 找一個已開放單元但未出征的城鎮
|
| 1023 |
const openTown = BUILDINGS.find(b => (game.buildings[b.id]?.lv || 0) === 0 && isUnlocked(b, dState));
|
|
@@ -1026,7 +1028,7 @@ function renderBuild() {
|
|
| 1026 |
if (!reqs.prereqMet) {
|
| 1027 |
nextGoalEl.innerHTML = `💡 欲出征<b>【${openTown.name}】</b>,需先收復前置城鎮:<b>${reqs.missingPrereqs.join('、')}</b>!`;
|
| 1028 |
} else if (!reqs.tallyMet) {
|
| 1029 |
-
nextGoalEl.innerHTML = `💡 出征<b>【${openTown.name}】</b>尚缺 <b>${reqs.tallyNeed - reqs.tallyHave}</b> 枚
|
| 1030 |
} else {
|
| 1031 |
nextGoalEl.innerHTML = `💡 出征<b>【${openTown.name}】</b>尚欠糧草輜重!請先駐防升級已收復城鎮,提高每秒糧草產量!`;
|
| 1032 |
}
|
|
@@ -1067,7 +1069,7 @@ function renderBuild() {
|
|
| 1067 |
if (!reqs.prereqMet) {
|
| 1068 |
blockerReason = `需先攻克前置:${reqs.missingPrereqs.join('、')}`;
|
| 1069 |
} else if (!reqs.tallyMet) {
|
| 1070 |
-
blockerReason = `尚
|
| 1071 |
} else if (!reqs.grainMet) {
|
| 1072 |
blockerReason = `糧草輜重不足,尚差 ${fmt(reqs.grainNeed - reqs.grainHave)}`;
|
| 1073 |
}
|
|
@@ -1091,7 +1093,7 @@ function renderBuild() {
|
|
| 1091 |
<span class="req-tag">${reqs.prereqMet ? '✔ 已連通' : '❌ 未連通'}</span>
|
| 1092 |
</div>` : ''}
|
| 1093 |
<div class="req-item ${reqs.tallyMet ? 'met' : 'unmet'}">
|
| 1094 |
-
<span>調兵
|
| 1095 |
<span class="req-tag">${reqs.tallyMet ? '✔ 兵符齊備' : `❌ 還缺 ${reqs.tallyNeed - reqs.tallyHave} 符`}</span>
|
| 1096 |
</div>
|
| 1097 |
<div class="req-item ${reqs.grainMet ? 'met' : 'unmet'}">
|
|
@@ -1100,7 +1102,7 @@ function renderBuild() {
|
|
| 1100 |
</div>
|
| 1101 |
</div>
|
| 1102 |
<button class="btn-conquer ${reqs.ready ? 'btn-conquer-active' : ''}" data-bid="${b.id}" ${reqs.ready ? '' : 'disabled'}>
|
| 1103 |
-
<span>${reqs.ready ? '⚔️ 頒布
|
| 1104 |
<span class="conquer-sub">${reqs.ready ? `收復後立刻獲得 +${b.baseProd} 糧草/秒 生產力` : blockerReason}</span>
|
| 1105 |
</button>
|
| 1106 |
</div>
|
|
@@ -1169,7 +1171,7 @@ function renderBuild() {
|
|
| 1169 |
if (!reqs.prereqMet) {
|
| 1170 |
toast(`前置要塞未連通,需先攻克:${reqs.missingPrereqs.join('、')}!`, 'error');
|
| 1171 |
} else if (!reqs.tallyMet) {
|
| 1172 |
-
toast(`
|
| 1173 |
} else {
|
| 1174 |
toast('糧草儲備不足,請駐防升級已佔領城鎮累積輜重!', 'error');
|
| 1175 |
}
|
|
@@ -1217,7 +1219,7 @@ function renderBuild() {
|
|
| 1217 |
renderBuild();
|
| 1218 |
markDirty();
|
| 1219 |
} else {
|
| 1220 |
-
toast('
|
| 1221 |
}
|
| 1222 |
}));
|
| 1223 |
|
|
@@ -1420,7 +1422,7 @@ async function getTianjiQuestions() {
|
|
| 1420 |
if (!pool || pool.length === 0) {
|
| 1421 |
pool = [
|
| 1422 |
{ q: '在戰略推演中,兵馬未動,何者先行?', o: ['糧草輜重', '金旗帥印', '戰鼓齊鳴', '先鋒部隊'], a: 'A' },
|
| 1423 |
-
{ q: '以下何者為大軍出征收復名都之核心重要憑證?', o: ['免死金牌', '調兵
|
| 1424 |
{ q: '守禦九州要塞時,最關鍵的基礎戰略資源為何?', o: ['軍備糧草', '精美絲綢', '金銀珠寶', '樓船木材'], a: 'A' },
|
| 1425 |
{ q: '哪一座九州名都專門以產出萬頃稻浪、囤積軍糧著稱?', o: ['平原稻鄉', '景陽瓷都', '百草藥谷', '神兵鐵城'], a: 'A' },
|
| 1426 |
{ q: '天機閣每日急速挑戰演武中,初始士氣心為幾顆?', o: ['1 顆心', '2 顆心', '3 顆心', '5 顆心'], a: 'C' },
|
|
@@ -1450,7 +1452,7 @@ function rollChestRewards(chestType, curProd) {
|
|
| 1450 |
} else if (chestType === 'silver') {
|
| 1451 |
// 答對 8 ~ 14 題:
|
| 1452 |
// 🌾 糧草 100%(15分鐘掛機產量)
|
| 1453 |
-
// 🐅
|
| 1454 |
// ✂️ 刪去卷 100% 必得 1 張
|
| 1455 |
// 📜 偷看卷 50% 機率得 1 張
|
| 1456 |
return {
|
|
@@ -1462,7 +1464,7 @@ function rollChestRewards(chestType, curProd) {
|
|
| 1462 |
} else if (chestType === 'gold') {
|
| 1463 |
// 答對 15 題以上:
|
| 1464 |
// 🌾 糧草 100%(30分鐘暴風掛機產量)
|
| 1465 |
-
// 🐅
|
| 1466 |
// 📜 偷看卷 100% 必得 1~2 張
|
| 1467 |
// ✂️ 刪去卷 100% 必得 1 張
|
| 1468 |
return {
|
|
@@ -1535,13 +1537,13 @@ function openTianjiModal() {
|
|
| 1535 |
<img src="assets/chest_silver.png" class="chest-preview-img" alt="白銀軍備箱">
|
| 1536 |
<b style="font-size:13px; color:#334155;">白銀軍備箱</b>
|
| 1537 |
<span class="chest-target-tag tag-silver">答對 8 ~ 14 題</span>
|
| 1538 |
-
<span style="font-size:11px; color:var(--text-mute);">必得刪去+機率
|
| 1539 |
</div>
|
| 1540 |
<div class="chest-preview-card">
|
| 1541 |
<img src="assets/chest_gold.png" class="chest-preview-img" alt="黃金軍備箱">
|
| 1542 |
<b style="font-size:13px; color:#b45309;">黃金軍備箱</b>
|
| 1543 |
<span class="chest-target-tag tag-gold">答對 15 題以��</span>
|
| 1544 |
-
<span style="font-size:11px; color:var(--text-mute);">100% 必得
|
| 1545 |
</div>
|
| 1546 |
</div>
|
| 1547 |
|
|
@@ -1559,7 +1561,7 @@ function openTianjiModal() {
|
|
| 1559 |
<th>答對題數</th>
|
| 1560 |
<th>軍餉糧草</th>
|
| 1561 |
<th>奇策錦囊(卷軸)</th>
|
| 1562 |
-
<th>兵權
|
| 1563 |
</tr>
|
| 1564 |
</thead>
|
| 1565 |
<tbody>
|
|
@@ -1575,14 +1577,14 @@ function openTianjiModal() {
|
|
| 1575 |
<td>8 ~ 14 題</td>
|
| 1576 |
<td>🌾 15 分鐘糧草 (100%)</td>
|
| 1577 |
<td>✂️ 刪去卷 (100%)<br>📜 偷看卷 (50%)</td>
|
| 1578 |
-
<td>🐅
|
| 1579 |
</tr>
|
| 1580 |
<tr>
|
| 1581 |
<td><b style="color:#b45309;">🥇 黃金軍備箱</b></td>
|
| 1582 |
<td>15 題以上</td>
|
| 1583 |
<td>🌾 30 分鐘暴風糧草 (100%)</td>
|
| 1584 |
<td>📜 偷看卷 1~2張 (100%)<br>✂️ 刪去卷 1張 (100%)</td>
|
| 1585 |
-
<td>🐅
|
| 1586 |
</tr>
|
| 1587 |
</tbody>
|
| 1588 |
</table>
|
|
@@ -1996,7 +1998,7 @@ function showChestUnboxModal(modal, correctCount, reason, wrongLogs = []) {
|
|
| 1996 |
<tr><td>🌾 糧草補給 (15分鐘掛機產量)</td><td style="text-align:right;"><b>100%</b></td></tr>
|
| 1997 |
<tr><td>✂️ 刪去卷 (1張)</td><td style="text-align:right;"><b>100%</b></td></tr>
|
| 1998 |
<tr><td>📜 偷看卷 (1張)</td><td style="text-align:right;"><b>50%</b></td></tr>
|
| 1999 |
-
<tr><td>🐅
|
| 2000 |
</tbody>
|
| 2001 |
</table>
|
| 2002 |
` : `
|
|
@@ -2005,7 +2007,7 @@ function showChestUnboxModal(modal, correctCount, reason, wrongLogs = []) {
|
|
| 2005 |
<thead><tr><th>物資項目</th><th style="text-align:right;">掉落機率</th></tr></thead>
|
| 2006 |
<tbody>
|
| 2007 |
<tr><td>🌾 暴風糧草 (30分鐘掛機產量)</td><td style="text-align:right;"><b>100%</b></td></tr>
|
| 2008 |
-
<tr><td>🐅
|
| 2009 |
<tr><td>📜 偷看卷 (1~2張)</td><td style="text-align:right;"><b>100%</b></td></tr>
|
| 2010 |
<tr><td>✂️ 刪去卷 (1張)</td><td style="text-align:right;"><b>100%</b></td></tr>
|
| 2011 |
</tbody>
|
|
@@ -2089,9 +2091,9 @@ function showChestUnboxModal(modal, correctCount, reason, wrongLogs = []) {
|
|
| 2089 |
if (rewards.bp > 0) {
|
| 2090 |
cardsHtml += `
|
| 2091 |
<div class="reward-item-card">
|
| 2092 |
-
<img src="assets/icon_tally.jpg" alt="
|
| 2093 |
<b>+${rewards.bp} 枚</b>
|
| 2094 |
-
<span>
|
| 2095 |
</div>
|
| 2096 |
`;
|
| 2097 |
}
|
|
@@ -2142,7 +2144,7 @@ function showChestUnboxModal(modal, correctCount, reason, wrongLogs = []) {
|
|
| 2142 |
renderBuild();
|
| 2143 |
modal.close();
|
| 2144 |
|
| 2145 |
-
toast(`🎉 軍備已悉數入庫!獲得 +${fmt(rewards.coins)} 糧草${rewards.bp ? `、+${rewards.bp}
|
| 2146 |
});
|
| 2147 |
}, 1200);
|
| 2148 |
};
|
|
@@ -2374,7 +2376,7 @@ window.appStartQuiz = async (rid) => {
|
|
| 2374 |
<div class="center dim">${score >= PASS_SCORE ? '🎉 恭喜達標!' : '💦 再接再厲,達到 85 分才算通過喔'}</div>
|
| 2375 |
<div class="reward-box">
|
| 2376 |
<span class="badge badge-gold">🌾 +${fmt(coins)} 糧草</span>
|
| 2377 |
-
${blueprints > 0 ? `<span class="badge badge-sky">🐅 +${blueprints}
|
| 2378 |
</div>
|
| 2379 |
${coinReduced ? `<p class="center mute">今日此卷已練兵超過 ${QUIZ_COIN_DAILY_FULL} 次,糧草補給降為 25%(換卷或明日重整即恢復全額)</p>` : ''}`;
|
| 2380 |
|
|
@@ -2993,7 +2995,7 @@ window.appClaimGift = async (id) => {
|
|
| 2993 |
game.totalEarned += totalCoinsGained;
|
| 2994 |
}
|
| 2995 |
if (res.bp) game.blueprints += res.bp;
|
| 2996 |
-
toast(`領取成功!${totalCoinsGained > 0 ? `獲得 +${fmt(totalCoinsGained)} 糧草 ` : ''}${res.bp ? `+${res.bp}
|
| 2997 |
save();
|
| 2998 |
renderRes();
|
| 2999 |
myGifts = myGifts.filter(x => x.id !== id);
|
|
|
|
| 12 |
} from './engine.js?v=20261019e';
|
| 13 |
import { $, $$, fmt, fmtTime, todayStr, bind, withLoading, toast, openModal, esc, fmtDateTime, shuffle } from './util.js';
|
| 14 |
import { loadBankIndex, buildQuiz, loadBank } from './quiz.js';
|
| 15 |
+
import { checkAndShowAnnouncements } from './announcements.js';
|
| 16 |
|
| 17 |
let db, user, student, classInfo = null;
|
| 18 |
let game = null, progress = {}, stats = {};
|
|
|
|
| 148 |
switchTab('build');
|
| 149 |
setTimeout(() => checkClassMilestones(), 600);
|
| 150 |
setTimeout(() => checkAlphaPioneerNotice(), 400);
|
| 151 |
+
setTimeout(() => checkAndShowAnnouncements(), 800);
|
| 152 |
}
|
| 153 |
|
| 154 |
// 存檔:同一時間只會有一個寫入;寫入中又有新請求時,結束後再補存一次(確保最新資料寫入)
|
|
|
|
| 301 |
}
|
| 302 |
const ws = getWorkDailyStatus(game);
|
| 303 |
if (ws.isMax) {
|
| 304 |
+
toast('🛑 今日巡營催糧已達 100 次上限!若急需大量糧草與兵符,請前往【📜 軍機策驗】答題或複習獲取豐厚軍資!', 'warn', 4500);
|
| 305 |
return;
|
| 306 |
}
|
| 307 |
game.workClicksToday = (game.workClicksToday || 0) + 1;
|
|
|
|
| 463 |
stateCls = reqs.ready ? 'ready' : 'ready prep';
|
| 464 |
statusText = reqs.ready ? '⚔️ 可出征' : '🚩 籌備中';
|
| 465 |
iconBadge = '<span class="spot-flag">🚩</span>';
|
| 466 |
+
costBadge = `<span class="spot-tally-cost" title="出征需消耗 ${b.tallyCost} 兵符"><img src="assets/icon_tally.jpg" class="res-mini-icon" alt="兵符">${b.tallyCost}</span>`;
|
| 467 |
prodText = `收復可得 +${b.baseProd}/秒`;
|
| 468 |
} else {
|
| 469 |
stateCls = 'active' + (ev ? ' evolved' : '');
|
|
|
|
| 518 |
<span>🏯 天機閣</span>
|
| 519 |
<small style="${tianjiDone ? 'color:var(--text-mute); font-weight:700;' : 'color:#059669; font-weight:800;'}">${tianjiDone ? '今日遊玩次數 (1/1)' : '今日遊玩次數 (0/1)'}</small>
|
| 520 |
</div>
|
| 521 |
+
<div class="spot-label-prod" style="${tianjiDone ? 'color:var(--text-mute); background:rgba(0,0,0,0.06);' : 'color:#b45309;'}">${tianjiDone ? '今日已結算・明日 00:00 重設' : '開軍備箱・奪金兵符'}</div>
|
| 522 |
</div>
|
| 523 |
</div>
|
| 524 |
`;
|
|
|
|
| 621 |
if (!reqs.prereqMet) {
|
| 622 |
blockerReason = `前置連通未足:需先收復 ${reqs.missingPrereqs.join('、')}`;
|
| 623 |
} else if (!reqs.tallyMet) {
|
| 624 |
+
blockerReason = `尚缺 ${reqs.tallyNeed - reqs.tallyHave} 兵符(每日複習測驗可得)`;
|
| 625 |
} else if (!reqs.grainMet) {
|
| 626 |
blockerReason = `糧草輜重不足,尚差 ${fmt(reqs.grainNeed - reqs.grainHave)}`;
|
| 627 |
}
|
|
|
|
| 654 |
<span class="req-tag">${reqs.prereqMet ? '✔ 已連通' : '❌ 未連通'}</span>
|
| 655 |
</div>` : ''}
|
| 656 |
<div class="req-item ${reqs.tallyMet ? 'met' : 'unmet'}">
|
| 657 |
+
<span><img src="assets/icon_tally.jpg" class="res-mini-icon" alt="兵符">調兵兵符:<b>${reqs.tallyNeed} 枚</b>(持有:${reqs.tallyHave})</span>
|
| 658 |
<span class="req-tag">${reqs.tallyMet ? '✔ 齊備' : `❌ 缺 ${reqs.tallyNeed - reqs.tallyHave}`}</span>
|
| 659 |
</div>
|
| 660 |
<div class="req-item ${reqs.grainMet ? 'met' : 'unmet'}">
|
|
|
|
| 663 |
</div>
|
| 664 |
</div>
|
| 665 |
<button class="btn-conquer ${canConquerNow ? 'btn-conquer-active' : ''} ${!pauseStatus.allowed ? 'btn-paused' : ''}" id="btnInMapConquer" ${canConquerNow ? '' : 'disabled'} title="${!pauseStatus.allowed ? esc(pauseStatus.reason) : ''}">
|
| 666 |
+
<span>${!pauseStatus.allowed ? '🌙 課後休整中・暫停出征' : (reqs.ready ? '⚔️ 頒布兵符・立即出兵收復!' : '⚠️ 戰備未足・尚不可出兵')}</span>
|
| 667 |
<span class="conquer-sub">${!pauseStatus.allowed ? esc(pauseStatus.reason) : (reqs.ready ? `收復後立刻獲取【${b.specialty}】專屬生產力` : blockerReason)}</span>
|
| 668 |
</button>`;
|
| 669 |
} else {
|
|
|
|
| 720 |
</button>
|
| 721 |
<button class="btn btn-inmap-star ${!pauseStatus.allowed ? 'btn-paused' : ''}" id="btnInMapStar" data-bid="${b.id}" ${canStar ? '' : 'disabled'} title="${!pauseStatus.allowed ? esc(pauseStatus.reason) : `下一星級產量 x${sNext}`}">
|
| 722 |
<span>${!pauseStatus.allowed ? '加官升星 (🌙休整中)' : `加官升星 x${sNext}`}</span>
|
| 723 |
+
<small class="num"><img src="assets/icon_tally.jpg" class="res-mini-icon" alt="兵符">${sCost}</small>
|
| 724 |
</button>
|
| 725 |
</div>`;
|
| 726 |
}
|
|
|
|
| 796 |
renderMapSpots();
|
| 797 |
markDirty();
|
| 798 |
} else {
|
| 799 |
+
toast(`兵符不足,加官進爵需 ${sCost} 枚!前往軍機策驗考核累積!`, 'error');
|
| 800 |
}
|
| 801 |
});
|
| 802 |
}
|
|
|
|
| 924 |
<div class="beginner-step-card">
|
| 925 |
<div class="step-badge-col">
|
| 926 |
<div class="step-num-badge">3</div>
|
| 927 |
+
<img src="assets/icon_tally.jpg" class="step-icon-img" alt="兵符">
|
| 928 |
</div>
|
| 929 |
<div class="step-content">
|
| 930 |
<h3 class="step-title">
|
| 931 |
+
<span>📜 軍機策驗・奪兵符收復九州</span>
|
| 932 |
<span class="step-tag">平定天下</span>
|
| 933 |
</h3>
|
| 934 |
<p class="step-desc">
|
| 935 |
+
前往上方<b>【📜 軍機策驗】</b>挑戰題庫,成績達 <b>85 分</b> 即可贏得珍貴的<b>【兵符】</b>!消耗兵符即可率軍收復柴桑、平原、百草等十座名都,產量呈幾何倍數暴增!
|
| 936 |
</p>
|
| 937 |
</div>
|
| 938 |
</div>
|
|
|
|
| 968 |
textEl.innerHTML = `<b>💡 新手指引 Step 1</b>:全軍開局秒產為 0,請先點擊沙盤左上角<b>【🌾 巡營催糧】</b>賺取初始軍糧,再升級<b>【景陽瓷都】</b>開啟自動秒產!`;
|
| 969 |
} else if (capturedCount <= 1 && blueprints === 0) {
|
| 970 |
banner.classList.remove('hidden');
|
| 971 |
+
textEl.innerHTML = `<b>💡 新手指引 Step 2</b>:【景陽瓷都】已開始自動產糧!請點擊上方<b>【📜 軍機策驗】</b>考 85 分奪<b>【兵符】</b>,收復更多九州名都!`;
|
| 972 |
} else if (capturedCount < 3) {
|
| 973 |
banner.classList.remove('hidden');
|
| 974 |
textEl.innerHTML = `<b>💡 新手指引 Step 3</b>:恭喜出征順利!持續收復周邊名都並前往<b>【🏛️ 全軍共拓】</b>捐獻軍糧,全班合力解鎖名城奇觀!`;
|
|
|
|
| 1019 |
if (nextGoalEl) {
|
| 1020 |
const readyTown = BUILDINGS.find(b => (game.buildings[b.id]?.lv || 0) === 0 && canConquer(b, game, dState));
|
| 1021 |
if (readyTown) {
|
| 1022 |
+
nextGoalEl.innerHTML = `⚔️ 戰報:<b>【${readyTown.icon} ${readyTown.name}】</b>戰備已齊全,可立即頒發兵符出兵收復!`;
|
| 1023 |
} else {
|
| 1024 |
// 找一個已開放單元但未出征的城鎮
|
| 1025 |
const openTown = BUILDINGS.find(b => (game.buildings[b.id]?.lv || 0) === 0 && isUnlocked(b, dState));
|
|
|
|
| 1028 |
if (!reqs.prereqMet) {
|
| 1029 |
nextGoalEl.innerHTML = `💡 欲出征<b>【${openTown.name}】</b>,需先收復前置城鎮:<b>${reqs.missingPrereqs.join('、')}</b>!`;
|
| 1030 |
} else if (!reqs.tallyMet) {
|
| 1031 |
+
nextGoalEl.innerHTML = `💡 出征<b>【${openTown.name}】</b>尚缺 <b>${reqs.tallyNeed - reqs.tallyHave}</b> 枚兵符!前往<b>軍機策驗</b>考高分或每日複習累積!`;
|
| 1032 |
} else {
|
| 1033 |
nextGoalEl.innerHTML = `💡 出征<b>【${openTown.name}】</b>尚欠糧草輜重!請先駐防升級已收復城鎮,提高每秒糧草產量!`;
|
| 1034 |
}
|
|
|
|
| 1069 |
if (!reqs.prereqMet) {
|
| 1070 |
blockerReason = `需先攻克前置:${reqs.missingPrereqs.join('、')}`;
|
| 1071 |
} else if (!reqs.tallyMet) {
|
| 1072 |
+
blockerReason = `尚缺 ${reqs.tallyNeed - reqs.tallyHave} 兵符(每日複習可得)`;
|
| 1073 |
} else if (!reqs.grainMet) {
|
| 1074 |
blockerReason = `糧草輜重不足,尚差 ${fmt(reqs.grainNeed - reqs.grainHave)}`;
|
| 1075 |
}
|
|
|
|
| 1093 |
<span class="req-tag">${reqs.prereqMet ? '✔ 已連通' : '❌ 未連通'}</span>
|
| 1094 |
</div>` : ''}
|
| 1095 |
<div class="req-item ${reqs.tallyMet ? 'met' : 'unmet'}">
|
| 1096 |
+
<span>調兵兵符:<b>🐅 ${reqs.tallyNeed} 枚</b>(手頭持有:${reqs.tallyHave})</span>
|
| 1097 |
<span class="req-tag">${reqs.tallyMet ? '✔ 兵符齊備' : `❌ 還缺 ${reqs.tallyNeed - reqs.tallyHave} 符`}</span>
|
| 1098 |
</div>
|
| 1099 |
<div class="req-item ${reqs.grainMet ? 'met' : 'unmet'}">
|
|
|
|
| 1102 |
</div>
|
| 1103 |
</div>
|
| 1104 |
<button class="btn-conquer ${reqs.ready ? 'btn-conquer-active' : ''}" data-bid="${b.id}" ${reqs.ready ? '' : 'disabled'}>
|
| 1105 |
+
<span>${reqs.ready ? '⚔️ 頒布兵符・出兵出征!' : '⚠️ 戰備未足・尚不可出兵'}</span>
|
| 1106 |
<span class="conquer-sub">${reqs.ready ? `收復後立刻獲得 +${b.baseProd} 糧草/秒 生產力` : blockerReason}</span>
|
| 1107 |
</button>
|
| 1108 |
</div>
|
|
|
|
| 1171 |
if (!reqs.prereqMet) {
|
| 1172 |
toast(`前置要塞未連通,需先攻克:${reqs.missingPrereqs.join('、')}!`, 'error');
|
| 1173 |
} else if (!reqs.tallyMet) {
|
| 1174 |
+
toast(`兵符不足,還缺 ${reqs.tallyNeed - reqs.tallyHave} 枚!前往軍機策驗複習測驗累積!`, 'error');
|
| 1175 |
} else {
|
| 1176 |
toast('糧草儲備不足,請駐防升級已佔領城鎮累積輜重!', 'error');
|
| 1177 |
}
|
|
|
|
| 1219 |
renderBuild();
|
| 1220 |
markDirty();
|
| 1221 |
} else {
|
| 1222 |
+
toast('兵符不足(前往軍機策驗獲取或每日複習累積!)', 'error');
|
| 1223 |
}
|
| 1224 |
}));
|
| 1225 |
|
|
|
|
| 1422 |
if (!pool || pool.length === 0) {
|
| 1423 |
pool = [
|
| 1424 |
{ q: '在戰略推演中,兵馬未動,何者先行?', o: ['糧草輜重', '金旗帥印', '戰鼓齊鳴', '先鋒部隊'], a: 'A' },
|
| 1425 |
+
{ q: '以下何者為大軍出征收復名都之核心重要憑證?', o: ['免死金牌', '調兵兵符', '兵部官牒', '錦囊妙計'], a: 'B' },
|
| 1426 |
{ q: '守禦九州要塞時,最關鍵的基礎戰略資源為何?', o: ['軍備糧草', '精美絲綢', '金銀珠寶', '樓船木材'], a: 'A' },
|
| 1427 |
{ q: '哪一座九州名都專門以產出萬頃稻浪、囤積軍糧著稱?', o: ['平原稻鄉', '景陽瓷都', '百草藥谷', '神兵鐵城'], a: 'A' },
|
| 1428 |
{ q: '天機閣每日急速挑戰演武中,初始士氣心為幾顆?', o: ['1 顆心', '2 顆心', '3 顆心', '5 顆心'], a: 'C' },
|
|
|
|
| 1452 |
} else if (chestType === 'silver') {
|
| 1453 |
// 答對 8 ~ 14 題:
|
| 1454 |
// 🌾 糧草 100%(15分鐘掛機產量)
|
| 1455 |
+
// 🐅 兵符 20% 機率得 1 枚
|
| 1456 |
// ✂️ 刪去卷 100% 必得 1 張
|
| 1457 |
// 📜 偷看卷 50% 機率得 1 張
|
| 1458 |
return {
|
|
|
|
| 1464 |
} else if (chestType === 'gold') {
|
| 1465 |
// 答對 15 題以上:
|
| 1466 |
// 🌾 糧草 100%(30分鐘暴風掛機產量)
|
| 1467 |
+
// 🐅 兵符 100% 必得 1~2 枚
|
| 1468 |
// 📜 偷看卷 100% 必得 1~2 張
|
| 1469 |
// ✂️ 刪去卷 100% 必得 1 張
|
| 1470 |
return {
|
|
|
|
| 1537 |
<img src="assets/chest_silver.png" class="chest-preview-img" alt="白銀軍備箱">
|
| 1538 |
<b style="font-size:13px; color:#334155;">白銀軍備箱</b>
|
| 1539 |
<span class="chest-target-tag tag-silver">答對 8 ~ 14 題</span>
|
| 1540 |
+
<span style="font-size:11px; color:var(--text-mute);">必得刪去+機率兵符</span>
|
| 1541 |
</div>
|
| 1542 |
<div class="chest-preview-card">
|
| 1543 |
<img src="assets/chest_gold.png" class="chest-preview-img" alt="黃金軍備箱">
|
| 1544 |
<b style="font-size:13px; color:#b45309;">黃金軍備箱</b>
|
| 1545 |
<span class="chest-target-tag tag-gold">答對 15 題以��</span>
|
| 1546 |
+
<span style="font-size:11px; color:var(--text-mute);">100% 必得兵符</span>
|
| 1547 |
</div>
|
| 1548 |
</div>
|
| 1549 |
|
|
|
|
| 1561 |
<th>答對題數</th>
|
| 1562 |
<th>軍餉糧草</th>
|
| 1563 |
<th>奇策錦囊(卷軸)</th>
|
| 1564 |
+
<th>兵權兵符</th>
|
| 1565 |
</tr>
|
| 1566 |
</thead>
|
| 1567 |
<tbody>
|
|
|
|
| 1577 |
<td>8 ~ 14 題</td>
|
| 1578 |
<td>🌾 15 分鐘糧草 (100%)</td>
|
| 1579 |
<td>✂️ 刪去卷 (100%)<br>📜 偷看卷 (50%)</td>
|
| 1580 |
+
<td>🐅 兵符 (20%)</td>
|
| 1581 |
</tr>
|
| 1582 |
<tr>
|
| 1583 |
<td><b style="color:#b45309;">🥇 黃金軍備箱</b></td>
|
| 1584 |
<td>15 題以上</td>
|
| 1585 |
<td>🌾 30 分鐘暴風糧草 (100%)</td>
|
| 1586 |
<td>📜 偷看卷 1~2張 (100%)<br>✂️ 刪去卷 1張 (100%)</td>
|
| 1587 |
+
<td>🐅 兵符 1~2枚 (100%)</td>
|
| 1588 |
</tr>
|
| 1589 |
</tbody>
|
| 1590 |
</table>
|
|
|
|
| 1998 |
<tr><td>🌾 糧草補給 (15分鐘掛機產量)</td><td style="text-align:right;"><b>100%</b></td></tr>
|
| 1999 |
<tr><td>✂️ 刪去卷 (1張)</td><td style="text-align:right;"><b>100%</b></td></tr>
|
| 2000 |
<tr><td>📜 偷看卷 (1張)</td><td style="text-align:right;"><b>50%</b></td></tr>
|
| 2001 |
+
<tr><td>🐅 兵符 (1枚)</td><td style="text-align:right;"><b>20%</b></td></tr>
|
| 2002 |
</tbody>
|
| 2003 |
</table>
|
| 2004 |
` : `
|
|
|
|
| 2007 |
<thead><tr><th>物資項目</th><th style="text-align:right;">掉落機率</th></tr></thead>
|
| 2008 |
<tbody>
|
| 2009 |
<tr><td>🌾 暴風糧草 (30分鐘掛機產量)</td><td style="text-align:right;"><b>100%</b></td></tr>
|
| 2010 |
+
<tr><td>🐅 兵符 (1~2枚)</td><td style="text-align:right;"><b>100%</b></td></tr>
|
| 2011 |
<tr><td>📜 偷看卷 (1~2張)</td><td style="text-align:right;"><b>100%</b></td></tr>
|
| 2012 |
<tr><td>✂️ 刪去卷 (1張)</td><td style="text-align:right;"><b>100%</b></td></tr>
|
| 2013 |
</tbody>
|
|
|
|
| 2091 |
if (rewards.bp > 0) {
|
| 2092 |
cardsHtml += `
|
| 2093 |
<div class="reward-item-card">
|
| 2094 |
+
<img src="assets/icon_tally.jpg" alt="兵符">
|
| 2095 |
<b>+${rewards.bp} 枚</b>
|
| 2096 |
+
<span>兵符</span>
|
| 2097 |
</div>
|
| 2098 |
`;
|
| 2099 |
}
|
|
|
|
| 2144 |
renderBuild();
|
| 2145 |
modal.close();
|
| 2146 |
|
| 2147 |
+
toast(`🎉 軍備已悉數入庫!獲得 +${fmt(rewards.coins)} 糧草${rewards.bp ? `、+${rewards.bp} 兵符` : ''}${rewards.peek ? `、+${rewards.peek} 偷看卷` : ''}${rewards.eliminate ? `、+${rewards.eliminate} 刪去卷` : ''}`, 'gold', 5000);
|
| 2148 |
});
|
| 2149 |
}, 1200);
|
| 2150 |
};
|
|
|
|
| 2376 |
<div class="center dim">${score >= PASS_SCORE ? '🎉 恭喜達標!' : '💦 再接再厲,達到 85 分才算通過喔'}</div>
|
| 2377 |
<div class="reward-box">
|
| 2378 |
<span class="badge badge-gold">🌾 +${fmt(coins)} 糧草</span>
|
| 2379 |
+
${blueprints > 0 ? `<span class="badge badge-sky">🐅 +${blueprints} 兵符 ${reviewBonus ? '(含複習)' : ''}</span>` : ''}
|
| 2380 |
</div>
|
| 2381 |
${coinReduced ? `<p class="center mute">今日此卷已練兵超過 ${QUIZ_COIN_DAILY_FULL} 次,糧草補給降為 25%(換卷或明日重整即恢復全額)</p>` : ''}`;
|
| 2382 |
|
|
|
|
| 2995 |
game.totalEarned += totalCoinsGained;
|
| 2996 |
}
|
| 2997 |
if (res.bp) game.blueprints += res.bp;
|
| 2998 |
+
toast(`領取成功!${totalCoinsGained > 0 ? `獲得 +${fmt(totalCoinsGained)} 糧草 ` : ''}${res.bp ? `+${res.bp} 兵符` : ''}`, 'success');
|
| 2999 |
save();
|
| 3000 |
renderRes();
|
| 3001 |
myGifts = myGifts.filter(x => x.id !== id);
|
scratch/boss_grid.png
ADDED
|
Git LFS Details
|
scratch/eye_markers_test1.png
ADDED
|
Git LFS Details
|
scratch/eye_markers_test2.png
ADDED
|
Git LFS Details
|
scratch/eye_markers_test3.png
ADDED
|
Git LFS Details
|
scratch/face_region.png
ADDED
|
Git LFS Details
|
scratch/head_full.png
ADDED
|
Git LFS Details
|
scratch/test_syntax.js
ADDED
|
@@ -0,0 +1,602 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
// ==========================================
|
| 3 |
+
// 1. 狀態
|
| 4 |
+
// ==========================================
|
| 5 |
+
const BOSS_MAX_HP = 500;
|
| 6 |
+
const MAX_ORDERS = 3;
|
| 7 |
+
const QUAL_DMG = 5;
|
| 8 |
+
let bossHp = BOSS_MAX_HP;
|
| 9 |
+
let ordersLeft = MAX_ORDERS;
|
| 10 |
+
let myTotalDamage = 0;
|
| 11 |
+
let simulatedMistakeCount = 28;
|
| 12 |
+
|
| 13 |
+
let inBattle = false;
|
| 14 |
+
let currentQueue = [];
|
| 15 |
+
let clearedAttacks = 0;
|
| 16 |
+
let currentRoundDamage = 0;
|
| 17 |
+
let hasChargeBuff = false;
|
| 18 |
+
let canClick = false;
|
| 19 |
+
let pendingTimer = null;
|
| 20 |
+
|
| 21 |
+
const MOCK_QUESTION_POOL = [
|
| 22 |
+
{ q: '在室內配線工程中,下列何種情況必須加裝漏電斷路器?', o: ['客廳一般照明插座', '浴室及戶外潮濕處之插座回路', '乾燥天花板內之通風機', '神明桌供電回路'], a: 'B', tag: '室內配線' },
|
| 23 |
+
{ q: '低壓單相三線式 110/220V 供電系統中,中性線之顏色原則為何?', o: ['黑色', '紅色', '綠色', '白色或淺灰色'], a: 'D', tag: '室內配線' },
|
| 24 |
+
{ q: '依據勞動基準法,下列何者不屬於可以合法扣除工資之事由?', o: ['依法提繳之勞保自付額', '公司逕行扣除之遲到罰款', '勞工同意代扣之福利金', '所得稅扣繳稅款'], a: 'B', tag: '勞動權益' },
|
| 25 |
+
{ q: '烘焙麵包時,酵母發酵最適宜的溫度範圍約為?', o: ['10 ~ 15 ℃', '28 ~ 38 ℃', '55 ~ 65 ℃', '80 ~ 90 ℃'], a: 'B', tag: '烘焙基礎' },
|
| 26 |
+
{ q: '使用三用電表測量電阻前,最關鍵的歸零校正步驟為何?', o: ['將兩表筆開路', '兩表筆短路並調整歸零鈕', '切換至最大電壓檔', '拆下電表電池'], a: 'B', tag: '儀表測量' },
|
| 27 |
+
{ q: '下列何種滅火器最適合撲滅電氣火災(C 類火災)?', o: ['泡沫滅火器', '水柱滅火器', '二氧化碳滅火器', '酸鹼滅火器'], a: 'C', tag: '工安常識' },
|
| 28 |
+
{ q: '促銷策略「買一送一」主要是刺激消費者的何種心理?', o: ['品牌忠誠度', '知覺價值與即時誘因', '品質信任感', '尊榮奢華感'], a: 'B', tag: '商業概論' },
|
| 29 |
+
{ q: '麵粉筋度主要取決於何種成分之含量?', o: ['碳水化合物', '蛋白質', '脂質', '粗纖維'], a: 'B', tag: '餐旅烘焙' },
|
| 30 |
+
];
|
| 31 |
+
|
| 32 |
+
const $ = (id) => document.getElementById(id);
|
| 33 |
+
|
| 34 |
+
// ==========================================
|
| 35 |
+
// 2. 音效
|
| 36 |
+
// ==========================================
|
| 37 |
+
let audioCtx = null;
|
| 38 |
+
function playBeep(freq, type, duration, gainVal) {
|
| 39 |
+
try {
|
| 40 |
+
if (!audioCtx) audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
| 41 |
+
if (audioCtx.state === 'suspended') audioCtx.resume();
|
| 42 |
+
const osc = audioCtx.createOscillator();
|
| 43 |
+
const gain = audioCtx.createGain();
|
| 44 |
+
osc.type = type;
|
| 45 |
+
osc.frequency.setValueAtTime(freq, audioCtx.currentTime);
|
| 46 |
+
gain.gain.setValueAtTime(gainVal, audioCtx.currentTime);
|
| 47 |
+
gain.gain.exponentialRampToValueAtTime(0.0001, audioCtx.currentTime + duration);
|
| 48 |
+
osc.connect(gain);
|
| 49 |
+
gain.connect(audioCtx.destination);
|
| 50 |
+
osc.start();
|
| 51 |
+
osc.stop(audioCtx.currentTime + duration);
|
| 52 |
+
} catch (e) { /* 音效失敗不影響遊戲 */ }
|
| 53 |
+
}
|
| 54 |
+
const soundCorrect = () => { playBeep(523, 'triangle', 0.1, 0.15); setTimeout(() => playBeep(659, 'triangle', 0.15, 0.15), 80); };
|
| 55 |
+
const soundWrong = () => playBeep(220, 'sine', 0.25, 0.2);
|
| 56 |
+
const soundCrit = () => {
|
| 57 |
+
playBeep(140, 'sawtooth', 0.45, 0.4);
|
| 58 |
+
playBeep(280, 'sawtooth', 0.3, 0.3);
|
| 59 |
+
setTimeout(() => playBeep(587, 'sine', 0.25, 0.3), 50);
|
| 60 |
+
setTimeout(() => playBeep(987, 'triangle', 0.45, 0.3), 110);
|
| 61 |
+
};
|
| 62 |
+
|
| 63 |
+
// ==========================================
|
| 64 |
+
// 3. 畫面切換
|
| 65 |
+
// ==========================================
|
| 66 |
+
function showIntro() {
|
| 67 |
+
inBattle = false;
|
| 68 |
+
canClick = false;
|
| 69 |
+
clearTimeout(pendingTimer);
|
| 70 |
+
$('screenBattle').classList.add('hidden');
|
| 71 |
+
$('screenIntro').classList.remove('hidden');
|
| 72 |
+
renderIntro();
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
function showBattle() {
|
| 76 |
+
inBattle = true;
|
| 77 |
+
$('screenIntro').classList.add('hidden');
|
| 78 |
+
$('screenBattle').classList.remove('hidden');
|
| 79 |
+
updateHpUI();
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
function renderIntro() {
|
| 83 |
+
const pct = (bossHp / BOSS_MAX_HP) * 100;
|
| 84 |
+
$('introHpText').textContent = `${bossHp} / ${BOSS_MAX_HP} HP`;
|
| 85 |
+
$('introHpBar').style.width = `${pct}%`;
|
| 86 |
+
|
| 87 |
+
const qual = $('introQual');
|
| 88 |
+
if (myTotalDamage >= QUAL_DMG) {
|
| 89 |
+
qual.textContent = `✅ 已取得領獎資格(個人累計傷害 ${myTotalDamage})`;
|
| 90 |
+
qual.classList.add('ok');
|
| 91 |
+
} else {
|
| 92 |
+
qual.textContent = `領獎資格:個人累計傷害 ${myTotalDamage} / ${QUAL_DMG}`;
|
| 93 |
+
qual.classList.remove('ok');
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
const btn = $('btnStart');
|
| 97 |
+
if (bossHp <= 0) {
|
| 98 |
+
btn.disabled = true;
|
| 99 |
+
btn.textContent = '饕餮已被封印';
|
| 100 |
+
} else if (ordersLeft <= 0) {
|
| 101 |
+
btn.disabled = true;
|
| 102 |
+
btn.textContent = '今日討伐次數已用完(0/3)';
|
| 103 |
+
} else {
|
| 104 |
+
btn.disabled = false;
|
| 105 |
+
btn.textContent = `開始討伐(${ordersLeft}/${MAX_ORDERS})`;
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
// ==========================================
|
| 110 |
+
// 4. 戰鬥流程
|
| 111 |
+
// ==========================================
|
| 112 |
+
function startNewCombat() {
|
| 113 |
+
if (inBattle || ordersLeft <= 0 || bossHp <= 0) return;
|
| 114 |
+
|
| 115 |
+
clearedAttacks = 0;
|
| 116 |
+
currentRoundDamage = 0;
|
| 117 |
+
hasChargeBuff = false;
|
| 118 |
+
$('requeueNotice').classList.add('hidden');
|
| 119 |
+
|
| 120 |
+
let chargeCount = 0;
|
| 121 |
+
if (simulatedMistakeCount >= 35) chargeCount = 3;
|
| 122 |
+
else if (simulatedMistakeCount >= 25) chargeCount = 2;
|
| 123 |
+
else if (simulatedMistakeCount >= 15) chargeCount = 1;
|
| 124 |
+
|
| 125 |
+
const queue = shuffle([...MOCK_QUESTION_POOL]).slice(0, 5).map(q => ({ ...q, isCharge: false }));
|
| 126 |
+
const extra = shuffle([...MOCK_QUESTION_POOL]);
|
| 127 |
+
if (chargeCount >= 1) queue.splice(2, 0, { ...extra[0], isCharge: true });
|
| 128 |
+
if (chargeCount >= 2) queue.splice(4, 0, { ...extra[1], isCharge: true });
|
| 129 |
+
if (chargeCount >= 3) queue.splice(1, 0, { ...extra[2], isCharge: true });
|
| 130 |
+
|
| 131 |
+
currentQueue = queue;
|
| 132 |
+
showBattle();
|
| 133 |
+
renderCurrentQuestion();
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
function renderCurrentQuestion() {
|
| 137 |
+
if (!inBattle) return;
|
| 138 |
+
if (currentQueue.length === 0 || clearedAttacks >= 5 || bossHp <= 0) {
|
| 139 |
+
finishCombat();
|
| 140 |
+
return;
|
| 141 |
+
}
|
| 142 |
+
const q = currentQueue[0];
|
| 143 |
+
if (!q || !Array.isArray(q.o)) { finishCombat(); return; }
|
| 144 |
+
|
| 145 |
+
const badge = $('qBadge');
|
| 146 |
+
if (q.isCharge) {
|
| 147 |
+
badge.className = 'q-badge charge';
|
| 148 |
+
badge.textContent = '⚡ 集氣試煉';
|
| 149 |
+
} else {
|
| 150 |
+
badge.className = 'q-badge';
|
| 151 |
+
badge.textContent = `攻擊回合 ${clearedAttacks + 1}/5`;
|
| 152 |
+
}
|
| 153 |
+
$('qQueue').textContent = `待精熟:${currentQueue.length} 題`;
|
| 154 |
+
const crit = $('qCrit');
|
| 155 |
+
crit.textContent = hasChargeBuff ? '⚡ 暴擊率 40%' : '暴擊率 15%';
|
| 156 |
+
crit.classList.toggle('buff', hasChargeBuff);
|
| 157 |
+
|
| 158 |
+
$('qStem').innerHTML =
|
| 159 |
+
(q.isCharge ? '<span class="charge-tag">【集氣】</span>' : '') +
|
| 160 |
+
escapeHtml(q.q) +
|
| 161 |
+
`<span class="tag">(${escapeHtml(q.tag || '')})</span>`;
|
| 162 |
+
|
| 163 |
+
$('optContainer').innerHTML = q.o.map((opt, i) => {
|
| 164 |
+
const label = String.fromCharCode(65 + i);
|
| 165 |
+
return `<button class="opt-btn" type="button" data-label="${label}">
|
| 166 |
+
<span class="opt-tag">${label}</span><span>${escapeHtml(opt)}</span>
|
| 167 |
+
</button>`;
|
| 168 |
+
}).join('');
|
| 169 |
+
|
| 170 |
+
canClick = true;
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
function handleAnswer(selected) {
|
| 174 |
+
if (!inBattle || !canClick) return;
|
| 175 |
+
canClick = false;
|
| 176 |
+
|
| 177 |
+
const q = currentQueue[0];
|
| 178 |
+
const isCorrect = selected === q.a;
|
| 179 |
+
|
| 180 |
+
document.querySelectorAll('#optContainer .opt-btn').forEach(b => {
|
| 181 |
+
b.disabled = true;
|
| 182 |
+
const l = b.dataset.label;
|
| 183 |
+
if (l === q.a) b.classList.add('correct');
|
| 184 |
+
else if (l === selected) b.classList.add('wrong');
|
| 185 |
+
else b.classList.add('dim');
|
| 186 |
+
});
|
| 187 |
+
|
| 188 |
+
if (isCorrect) {
|
| 189 |
+
$('requeueNotice').classList.add('hidden');
|
| 190 |
+
if (q.isCharge) {
|
| 191 |
+
soundCorrect();
|
| 192 |
+
hasChargeBuff = true;
|
| 193 |
+
showFloat('⚡ 集氣成功!下一擊暴擊率 40%', 'notice');
|
| 194 |
+
currentQueue.shift();
|
| 195 |
+
pendingTimer = setTimeout(renderCurrentQuestion, 900);
|
| 196 |
+
} else {
|
| 197 |
+
clearedAttacks++;
|
| 198 |
+
const isCrit = Math.random() < (hasChargeBuff ? 0.40 : 0.15);
|
| 199 |
+
const dmg = isCrit ? 2 : 1;
|
| 200 |
+
currentRoundDamage += dmg;
|
| 201 |
+
hasChargeBuff = false;
|
| 202 |
+
applyDamage(dmg, isCrit);
|
| 203 |
+
currentQueue.shift();
|
| 204 |
+
pendingTimer = setTimeout(renderCurrentQuestion, isCrit ? 1400 : 750);
|
| 205 |
+
}
|
| 206 |
+
} else {
|
| 207 |
+
soundWrong();
|
| 208 |
+
if (q.isCharge) {
|
| 209 |
+
hasChargeBuff = false;
|
| 210 |
+
showFloat('集氣失敗…', 'notice');
|
| 211 |
+
currentQueue.shift();
|
| 212 |
+
pendingTimer = setTimeout(renderCurrentQuestion, 1100);
|
| 213 |
+
} else {
|
| 214 |
+
$('requeueNotice').classList.remove('hidden');
|
| 215 |
+
currentQueue.push(currentQueue.shift());
|
| 216 |
+
pendingTimer = setTimeout(renderCurrentQuestion, 1400);
|
| 217 |
+
}
|
| 218 |
+
}
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
function restartAnim(el, cls) {
|
| 222 |
+
el.classList.remove(cls);
|
| 223 |
+
void el.offsetWidth;
|
| 224 |
+
el.classList.add(cls);
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
function applyDamage(dmg, isCrit) {
|
| 228 |
+
bossHp = Math.max(0, bossHp - dmg);
|
| 229 |
+
myTotalDamage += dmg;
|
| 230 |
+
updateHpUI();
|
| 231 |
+
|
| 232 |
+
const sprite = $('bossSprite');
|
| 233 |
+
if (sprite._hitTimer) {
|
| 234 |
+
clearTimeout(sprite._hitTimer);
|
| 235 |
+
sprite._hitTimer = null;
|
| 236 |
+
}
|
| 237 |
+
sprite.classList.remove('hit', 'crit-hit');
|
| 238 |
+
void sprite.offsetWidth;
|
| 239 |
+
|
| 240 |
+
if (isCrit) {
|
| 241 |
+
soundCrit();
|
| 242 |
+
restartAnim($('flashOverlay'), 'active');
|
| 243 |
+
restartAnim($('speedLines'), 'active');
|
| 244 |
+
restartAnim($('slashFx'), 'active');
|
| 245 |
+
restartAnim($('screenBattle'), 'heavy-shake');
|
| 246 |
+
sprite.classList.add('crit-hit');
|
| 247 |
+
showFloat(dmg, 'crit');
|
| 248 |
+
|
| 249 |
+
// 暴擊動畫時長 850ms,結束後自動移除 crit-hit,透過 CSS transition 平滑恢復正常光彩
|
| 250 |
+
sprite._hitTimer = setTimeout(() => {
|
| 251 |
+
sprite.classList.remove('crit-hit');
|
| 252 |
+
sprite._hitTimer = null;
|
| 253 |
+
}, 850);
|
| 254 |
+
} else {
|
| 255 |
+
soundCorrect();
|
| 256 |
+
sprite.classList.add('hit');
|
| 257 |
+
showFloat(`-${dmg}`, 'normal');
|
| 258 |
+
|
| 259 |
+
// 普通受擊動畫時長 400ms,結束後自動移除 hit
|
| 260 |
+
sprite._hitTimer = setTimeout(() => {
|
| 261 |
+
sprite.classList.remove('hit');
|
| 262 |
+
sprite._hitTimer = null;
|
| 263 |
+
}, 400);
|
| 264 |
+
}
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
function showFloat(content, kind) {
|
| 268 |
+
const box = $('floatingDmgBox');
|
| 269 |
+
box.innerHTML = '';
|
| 270 |
+
const el = document.createElement('div');
|
| 271 |
+
if (kind === 'crit') {
|
| 272 |
+
el.className = 'dmg-crit';
|
| 273 |
+
el.innerHTML = `CRITICAL!!<small>暴擊 -${content} HP</small>`;
|
| 274 |
+
} else if (kind === 'notice') {
|
| 275 |
+
el.className = 'dmg-normal dmg-notice';
|
| 276 |
+
el.textContent = content;
|
| 277 |
+
} else {
|
| 278 |
+
el.className = 'dmg-normal';
|
| 279 |
+
el.textContent = content;
|
| 280 |
+
}
|
| 281 |
+
box.appendChild(el);
|
| 282 |
+
setTimeout(() => el.remove(), kind === 'crit' ? 1350 : 900);
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
function updateHpUI() {
|
| 286 |
+
const pct = Math.max(0, (bossHp / BOSS_MAX_HP) * 100);
|
| 287 |
+
$('hpBar').style.width = `${pct.toFixed(1)}%`;
|
| 288 |
+
$('hpBar').classList.toggle('low', pct <= 20);
|
| 289 |
+
$('hpText').textContent = `${bossHp} / ${BOSS_MAX_HP} HP (${pct.toFixed(1)}%)`;
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
function finishCombat() {
|
| 293 |
+
if (!inBattle) return;
|
| 294 |
+
canClick = false;
|
| 295 |
+
ordersLeft = Math.max(0, ordersLeft - 1);
|
| 296 |
+
|
| 297 |
+
// 戰鬥結束時確保清除 Boss 任何受擊或暴擊強光
|
| 298 |
+
const sprite = $('bossSprite');
|
| 299 |
+
if (sprite) {
|
| 300 |
+
if (sprite._hitTimer) clearTimeout(sprite._hitTimer);
|
| 301 |
+
sprite.classList.remove('hit', 'crit-hit');
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
const dead = bossHp <= 0;
|
| 305 |
+
$('resIcon').textContent = dead ? '🏆' : '🎉';
|
| 306 |
+
$('resTitle').textContent = dead ? '饕餮已被封印!' : '本場討伐完成';
|
| 307 |
+
$('resDmg').textContent = `+${currentRoundDamage} HP`;
|
| 308 |
+
$('resBossHp').textContent = `${bossHp} / ${BOSS_MAX_HP}`;
|
| 309 |
+
$('resMyDmg').textContent = `${myTotalDamage} HP`;
|
| 310 |
+
const ok = myTotalDamage >= QUAL_DMG;
|
| 311 |
+
$('resQual').textContent = ok ? '✅ 已達標' : `尚差 ${QUAL_DMG - myTotalDamage} HP`;
|
| 312 |
+
$('resQual').style.color = ok ? '#86efac' : '#fde68a';
|
| 313 |
+
$('tailKill').classList.toggle('hidden', !dead);
|
| 314 |
+
$('modalResult').classList.remove('hidden');
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
function closeResult() {
|
| 318 |
+
$('modalResult').classList.add('hidden');
|
| 319 |
+
showIntro();
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
// ==========================================
|
| 323 |
+
// 5. 工具
|
| 324 |
+
// ==========================================
|
| 325 |
+
function shuffle(arr) {
|
| 326 |
+
for (let i = arr.length - 1; i > 0; i--) {
|
| 327 |
+
const j = Math.floor(Math.random() * (i + 1));
|
| 328 |
+
[arr[i], arr[j]] = [arr[j], arr[i]];
|
| 329 |
+
}
|
| 330 |
+
return arr;
|
| 331 |
+
}
|
| 332 |
+
function escapeHtml(s) {
|
| 333 |
+
return String(s).replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
function resetAll() {
|
| 337 |
+
bossHp = BOSS_MAX_HP;
|
| 338 |
+
ordersLeft = MAX_ORDERS;
|
| 339 |
+
myTotalDamage = 0;
|
| 340 |
+
const sprite = $('bossSprite');
|
| 341 |
+
if (sprite) {
|
| 342 |
+
if (sprite._hitTimer) clearTimeout(sprite._hitTimer);
|
| 343 |
+
sprite.classList.remove('hit', 'crit-hit');
|
| 344 |
+
}
|
| 345 |
+
$('modalResult').classList.add('hidden');
|
| 346 |
+
showIntro();
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
// ==========================================
|
| 350 |
+
// 6. 眼睛定位微調校準器 (Eyes Calibrator) 邏輯
|
| 351 |
+
// ==========================================
|
| 352 |
+
const DEFAULT_EYES_CONFIG = {
|
| 353 |
+
leftEye: { x: 24.5, y: 48.1, width: 9, height: 6, rotate: 14 },
|
| 354 |
+
rightEye: { x: 37.7, y: 44.5, width: 11, height: 8, rotate: -6 }
|
| 355 |
+
};
|
| 356 |
+
|
| 357 |
+
let calConfig = JSON.parse(JSON.stringify(DEFAULT_EYES_CONFIG));
|
| 358 |
+
|
| 359 |
+
function applyConfigToGlobal(cfg) {
|
| 360 |
+
const root = document.documentElement;
|
| 361 |
+
root.style.setProperty('--eye-l-x', `${cfg.leftEye.x}%`);
|
| 362 |
+
root.style.setProperty('--eye-l-y', `${cfg.leftEye.y}%`);
|
| 363 |
+
root.style.setProperty('--eye-l-w', `${cfg.leftEye.width}px`);
|
| 364 |
+
root.style.setProperty('--eye-l-h', `${cfg.leftEye.height}px`);
|
| 365 |
+
root.style.setProperty('--eye-l-rot', `${cfg.leftEye.rotate}deg`);
|
| 366 |
+
|
| 367 |
+
root.style.setProperty('--eye-r-x', `${cfg.rightEye.x}%`);
|
| 368 |
+
root.style.setProperty('--eye-r-y', `${cfg.rightEye.y}%`);
|
| 369 |
+
root.style.setProperty('--eye-r-w', `${cfg.rightEye.width}px`);
|
| 370 |
+
root.style.setProperty('--eye-r-h', `${cfg.rightEye.height}px`);
|
| 371 |
+
root.style.setProperty('--eye-r-rot', `${cfg.rightEye.rotate}deg`);
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
+
function updateCalibratorUI() {
|
| 375 |
+
// 1. 更新校準器畫布中的眼睛與握把
|
| 376 |
+
const eyeL = $('calEyeL');
|
| 377 |
+
const eyeR = $('calEyeR');
|
| 378 |
+
const handleL = $('calHandleL');
|
| 379 |
+
const handleR = $('calHandleR');
|
| 380 |
+
|
| 381 |
+
if (eyeL && handleL) {
|
| 382 |
+
eyeL.style.left = handleL.style.left = `${calConfig.leftEye.x}%`;
|
| 383 |
+
eyeL.style.top = handleL.style.top = `${calConfig.leftEye.y}%`;
|
| 384 |
+
eyeL.style.width = `${calConfig.leftEye.width}px`;
|
| 385 |
+
eyeL.style.height = `${calConfig.leftEye.height}px`;
|
| 386 |
+
eyeL.style.transform = `translate(-50%, -50%) rotate(${calConfig.leftEye.rotate}deg)`;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
if (eyeR && handleR) {
|
| 390 |
+
eyeR.style.left = handleR.style.left = `${calConfig.rightEye.x}%`;
|
| 391 |
+
eyeR.style.top = handleR.style.top = `${calConfig.rightEye.y}%`;
|
| 392 |
+
eyeR.style.width = `${calConfig.rightEye.width}px`;
|
| 393 |
+
eyeR.style.height = `${calConfig.rightEye.height}px`;
|
| 394 |
+
eyeR.style.transform = `translate(-50%, -50%) rotate(${calConfig.rightEye.rotate}deg)`;
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
+
// 2. 更新滑桿數值與標籤
|
| 398 |
+
$('valLX').textContent = `${calConfig.leftEye.x}%`;
|
| 399 |
+
$('rangeLX').value = calConfig.leftEye.x;
|
| 400 |
+
$('valLY').textContent = `${calConfig.leftEye.y}%`;
|
| 401 |
+
$('rangeLY').value = calConfig.leftEye.y;
|
| 402 |
+
$('valLW').textContent = `${calConfig.leftEye.width}px`;
|
| 403 |
+
$('rangeLW').value = calConfig.leftEye.width;
|
| 404 |
+
$('valLH').textContent = `${calConfig.leftEye.height}px`;
|
| 405 |
+
$('rangeLH').value = calConfig.leftEye.height;
|
| 406 |
+
$('valLRot').textContent = `${calConfig.leftEye.rotate}°`;
|
| 407 |
+
$('rangeLRot').value = calConfig.leftEye.rotate;
|
| 408 |
+
|
| 409 |
+
$('valRX').textContent = `${calConfig.rightEye.x}%`;
|
| 410 |
+
$('rangeRX').value = calConfig.rightEye.x;
|
| 411 |
+
$('valRY').textContent = `${calConfig.rightEye.y}%`;
|
| 412 |
+
$('rangeRY').value = calConfig.rightEye.y;
|
| 413 |
+
$('valRW').textContent = `${calConfig.rightEye.width}px`;
|
| 414 |
+
$('rangeRW').value = calConfig.rightEye.width;
|
| 415 |
+
$('valRH').textContent = `${calConfig.rightEye.height}px`;
|
| 416 |
+
$('rangeRH').value = calConfig.rightEye.height;
|
| 417 |
+
$('valRRot').textContent = `${calConfig.rightEye.rotate}°`;
|
| 418 |
+
$('rangeRRot').value = calConfig.rightEye.rotate;
|
| 419 |
+
|
| 420 |
+
// 3. 更新 JSON 代碼輸出
|
| 421 |
+
$('jsonOutput').textContent = JSON.stringify(calConfig, null, 2);
|
| 422 |
+
|
| 423 |
+
// 4. 同步更新至全域 CSS 變數
|
| 424 |
+
applyConfigToGlobal(calConfig);
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
function setupDragHandle(handleEl, key) {
|
| 428 |
+
if (!handleEl) return;
|
| 429 |
+
let dragging = false;
|
| 430 |
+
|
| 431 |
+
handleEl.addEventListener('pointerdown', (e) => {
|
| 432 |
+
dragging = true;
|
| 433 |
+
handleEl.setPointerCapture(e.pointerId);
|
| 434 |
+
e.preventDefault();
|
| 435 |
+
});
|
| 436 |
+
|
| 437 |
+
handleEl.addEventListener('pointermove', (e) => {
|
| 438 |
+
if (!dragging) return;
|
| 439 |
+
const box = $('calBox');
|
| 440 |
+
if (!box) return;
|
| 441 |
+
const rect = box.getBoundingClientRect();
|
| 442 |
+
let x = ((e.clientX - rect.left) / rect.width) * 100;
|
| 443 |
+
let y = ((e.clientY - rect.top) / rect.height) * 100;
|
| 444 |
+
x = Math.max(0, Math.min(100, Math.round(x * 10) / 10));
|
| 445 |
+
y = Math.max(0, Math.min(100, Math.round(y * 10) / 10));
|
| 446 |
+
calConfig[key].x = x;
|
| 447 |
+
calConfig[key].y = y;
|
| 448 |
+
updateCalibratorUI();
|
| 449 |
+
});
|
| 450 |
+
|
| 451 |
+
const stopDrag = () => { dragging = false; };
|
| 452 |
+
handleEl.addEventListener('pointerup', stopDrag);
|
| 453 |
+
handleEl.addEventListener('pointercancel', stopDrag);
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
+
function initCalibrator() {
|
| 457 |
+
setupDragHandle($('calHandleL'), 'leftEye');
|
| 458 |
+
setupDragHandle($('calHandleR'), 'rightEye');
|
| 459 |
+
|
| 460 |
+
// 滑桿監聽
|
| 461 |
+
const bindRange = (id, fn) => {
|
| 462 |
+
const el = $(id);
|
| 463 |
+
if (el) el.addEventListener('input', (e) => { fn(Number(e.target.value)); updateCalibratorUI(); });
|
| 464 |
+
};
|
| 465 |
+
|
| 466 |
+
bindRange('rangeLX', v => calConfig.leftEye.x = v);
|
| 467 |
+
bindRange('rangeLY', v => calConfig.leftEye.y = v);
|
| 468 |
+
bindRange('rangeLW', v => calConfig.leftEye.width = v);
|
| 469 |
+
bindRange('rangeLH', v => calConfig.leftEye.height = v);
|
| 470 |
+
bindRange('rangeLRot', v => calConfig.leftEye.rotate = v);
|
| 471 |
+
|
| 472 |
+
bindRange('rangeRX', v => calConfig.rightEye.x = v);
|
| 473 |
+
bindRange('rangeRY', v => calConfig.rightEye.y = v);
|
| 474 |
+
bindRange('rangeRW', v => calConfig.rightEye.width = v);
|
| 475 |
+
bindRange('rangeRH', v => calConfig.rightEye.height = v);
|
| 476 |
+
bindRange('rangeRRot', v => calConfig.rightEye.rotate = v);
|
| 477 |
+
|
| 478 |
+
// 模式切換按鈕
|
| 479 |
+
const underlay = $('calUnderlay');
|
| 480 |
+
const silhouette = $('calSilhouette');
|
| 481 |
+
const setMode = (mode) => {
|
| 482 |
+
$('btnModeSil').classList.toggle('active', mode === 'sil');
|
| 483 |
+
$('btnModeOverlay').classList.toggle('active', mode === 'overlay');
|
| 484 |
+
$('btnModeOrig').classList.toggle('active', mode === 'orig');
|
| 485 |
+
|
| 486 |
+
if (mode === 'sil') {
|
| 487 |
+
underlay.style.opacity = '0';
|
| 488 |
+
silhouette.style.opacity = '1';
|
| 489 |
+
} else if (mode === 'overlay') {
|
| 490 |
+
underlay.style.opacity = '0.85';
|
| 491 |
+
silhouette.style.opacity = '0.45';
|
| 492 |
+
} else if (mode === 'orig') {
|
| 493 |
+
underlay.style.opacity = '1';
|
| 494 |
+
silhouette.style.opacity = '0';
|
| 495 |
+
}
|
| 496 |
+
};
|
| 497 |
+
|
| 498 |
+
$('btnModeSil').addEventListener('click', () => setMode('sil'));
|
| 499 |
+
$('btnModeOverlay').addEventListener('click', () => setMode('overlay'));
|
| 500 |
+
$('btnModeOrig').addEventListener('click', () => setMode('orig'));
|
| 501 |
+
setMode('sil');
|
| 502 |
+
|
| 503 |
+
// 動畫切換
|
| 504 |
+
$('chkCalBlink').addEventListener('change', (e) => {
|
| 505 |
+
const anim = e.target.checked ? 'eyeBlink 4s infinite ease-in-out' : 'none';
|
| 506 |
+
$('calEyeL').style.animation = anim;
|
| 507 |
+
$('calEyeR').style.animation = anim;
|
| 508 |
+
});
|
| 509 |
+
|
| 510 |
+
$('chkCalPulse').addEventListener('change', (e) => {
|
| 511 |
+
$('calBox').style.animation = e.target.checked ? 'silhouettePulse 3.5s ease-in-out infinite alternate' : 'none';
|
| 512 |
+
});
|
| 513 |
+
|
| 514 |
+
// 複製 JSON
|
| 515 |
+
$('btnCopyJson').addEventListener('click', () => {
|
| 516 |
+
const text = JSON.stringify(calConfig, null, 2);
|
| 517 |
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
| 518 |
+
navigator.clipboard.writeText(text).then(() => {
|
| 519 |
+
showCopyToast();
|
| 520 |
+
}).catch(() => fallbackCopy(text));
|
| 521 |
+
} else {
|
| 522 |
+
fallbackCopy(text);
|
| 523 |
+
}
|
| 524 |
+
});
|
| 525 |
+
|
| 526 |
+
function fallbackCopy(text) {
|
| 527 |
+
const ta = document.createElement('textarea');
|
| 528 |
+
ta.value = text;
|
| 529 |
+
document.body.appendChild(ta);
|
| 530 |
+
ta.select();
|
| 531 |
+
document.execCommand('copy');
|
| 532 |
+
document.body.removeChild(ta);
|
| 533 |
+
showCopyToast();
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
function showCopyToast() {
|
| 537 |
+
const t = $('copyToast');
|
| 538 |
+
t.style.display = 'inline';
|
| 539 |
+
setTimeout(() => t.style.display = 'none', 2000);
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
+
// 重設按鈕
|
| 543 |
+
$('btnResetCal').addEventListener('click', () => {
|
| 544 |
+
calConfig = JSON.parse(JSON.stringify(DEFAULT_EYES_CONFIG));
|
| 545 |
+
updateCalibratorUI();
|
| 546 |
+
});
|
| 547 |
+
|
| 548 |
+
// 套用至預告公告
|
| 549 |
+
$('btnApplyToPatch').addEventListener('click', () => {
|
| 550 |
+
applyConfigToGlobal(calConfig);
|
| 551 |
+
$('modalCalibrator').classList.add('hidden');
|
| 552 |
+
$('modalPatch').classList.remove('hidden');
|
| 553 |
+
});
|
| 554 |
+
|
| 555 |
+
// 開關視窗
|
| 556 |
+
$('btnOpenEyeCalibrator').addEventListener('click', () => {
|
| 557 |
+
updateCalibratorUI();
|
| 558 |
+
$('modalCalibrator').classList.remove('hidden');
|
| 559 |
+
});
|
| 560 |
+
$('btnCloseCalibrator').addEventListener('click', () => {
|
| 561 |
+
$('modalCalibrator').classList.add('hidden');
|
| 562 |
+
});
|
| 563 |
+
|
| 564 |
+
// 初始化 UI 與全域變數
|
| 565 |
+
updateCalibratorUI();
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
// ==========================================
|
| 569 |
+
// 7. 事件綁定(只綁一次,使用事件委派)
|
| 570 |
+
// ==========================================
|
| 571 |
+
function init() {
|
| 572 |
+
try {
|
| 573 |
+
$('btnStart').addEventListener('click', startNewCombat);
|
| 574 |
+
$('btnModalClose').addEventListener('click', closeResult);
|
| 575 |
+
$('optContainer').addEventListener('click', (e) => {
|
| 576 |
+
const btn = e.target.closest('.opt-btn');
|
| 577 |
+
if (btn && !btn.disabled) handleAnswer(btn.dataset.label);
|
| 578 |
+
});
|
| 579 |
+
|
| 580 |
+
$('btnDebugToggle').addEventListener('click', () => $('debugBar').classList.toggle('collapsed'));
|
| 581 |
+
$('btnPreviewPatch').addEventListener('click', () => $('modalPatch').classList.remove('hidden'));
|
| 582 |
+
$('btnDismissPatch').addEventListener('click', () => $('modalPatch').classList.add('hidden'));
|
| 583 |
+
$('btnReset').addEventListener('click', resetAll);
|
| 584 |
+
document.querySelectorAll('[data-mistakes]').forEach(b => b.addEventListener('click', () => {
|
| 585 |
+
simulatedMistakeCount = Number(b.dataset.mistakes) || 0;
|
| 586 |
+
b.animate([{ transform: 'scale(1.15)' }, { transform: 'scale(1)' }], { duration: 200 });
|
| 587 |
+
}));
|
| 588 |
+
document.querySelectorAll('[data-hp]').forEach(b => b.addEventListener('click', () => {
|
| 589 |
+
bossHp = Number(b.dataset.hp) || BOSS_MAX_HP;
|
| 590 |
+
updateHpUI();
|
| 591 |
+
if (!inBattle) renderIntro();
|
| 592 |
+
}));
|
| 593 |
+
|
| 594 |
+
initCalibrator();
|
| 595 |
+
resetAll();
|
| 596 |
+
} catch (err) {
|
| 597 |
+
console.error('[boss-test] init 失敗:', err);
|
| 598 |
+
}
|
| 599 |
+
}
|
| 600 |
+
|
| 601 |
+
window.addEventListener('DOMContentLoaded', init);
|
| 602 |
+
|
screenshots/01_戰略沙盤全景_領地軍略.png
ADDED
|
Git LFS Details
|
screenshots/02_軍機策驗_想變強躲不掉考試.png
ADDED
|
Git LFS Details
|
screenshots/03_真實學生瘋狂刷題紀錄_滿分洗版.png
ADDED
|
Git LFS Details
|
screenshots/04_全軍共拓_班級合作每週軍餉.png
ADDED
|
Git LFS Details
|
screenshots/05_群英金榜_產量與軍餉排行.png
ADDED
|
Git LFS Details
|
screenshots/06_教師後台_測驗派送與進度控管.png
ADDED
|
Git LFS Details
|
screenshots/07_教師後台_城池沙盤校準與路線.png
ADDED
|
Git LFS Details
|
screenshots/08_教師後台_全班進度與個別題庫指派.png
ADDED
|
Git LFS Details
|
screenshots/game_class_tab_1792494579167.png
ADDED
|
Git LFS Details
|
screenshots/game_quiz_tab_1792494569186.png
ADDED
|
Git LFS Details
|
screenshots/game_rank_tab_1792494588134.png
ADDED
|
Git LFS Details
|
screenshots/game_territory_map_1792494562359.png
ADDED
|
Git LFS Details
|
screenshots/student_game_page_1792494403951.png
ADDED
|
Git LFS Details
|
screenshots/teacher_admin_dashboard_1792494391842.png
ADDED
|
Git LFS Details
|
screenshots/teacher_quiz_dispatch_1792494509650.png
ADDED
|
Git LFS Details
|
screenshots/teacher_quiz_records_1792494519910.png
ADDED
|
Git LFS Details
|
screenshots/teacher_territory_calibrator_1792494514316.png
ADDED
|
Git LFS Details
|
teacher.html
CHANGED
|
@@ -279,7 +279,7 @@
|
|
| 279 |
<th>姓名</th>
|
| 280 |
<th>題庫設定</th>
|
| 281 |
<th>糧草</th>
|
| 282 |
-
<th>
|
| 283 |
<th>背包錦囊</th>
|
| 284 |
<th>測驗通過</th>
|
| 285 |
<th>密碼</th>
|
|
|
|
| 279 |
<th>姓名</th>
|
| 280 |
<th>題庫設定</th>
|
| 281 |
<th>糧草</th>
|
| 282 |
+
<th>兵符</th>
|
| 283 |
<th>背包錦囊</th>
|
| 284 |
<th>測驗通過</th>
|
| 285 |
<th>密碼</th>
|
tools/__pycache__/cutout_rembg.cpython-313.pyc
ADDED
|
Binary file (1.27 kB). View file
|
|
|
tools/alpha-reset.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
// 功能:
|
| 6 |
// 1. 自動檢索並計算資料庫中全班每位學生的「每秒糧草產量(🌾/秒)」
|
| 7 |
// 2. 依階梯規準換算對應的「📜 偷看卷」與「✂️ 刪去卷」數量
|
| 8 |
-
// 3. 將個人糧草重設為 15、
|
| 9 |
// 4. 將換算卷軸存入學生背包(game.items)
|
| 10 |
// 5. 寫入 alphaPioneer 功勳紀錄,並將 alphaNoticeSeen 設為 false
|
| 11 |
// 讓學生於明日打開遊戲時自動彈出專屬冊封令(單次顯示,之後不再出現)
|
|
|
|
| 5 |
// 功能:
|
| 6 |
// 1. 自動檢索並計算資料庫中全班每位學生的「每秒糧草產量(🌾/秒)」
|
| 7 |
// 2. 依階梯規準換算對應的「📜 偷看卷」與「✂️ 刪去卷」數量
|
| 8 |
+
// 3. 將個人糧草重設為 15、兵符為 0、城池清空(恢復開局狀態)
|
| 9 |
// 4. 將換算卷軸存入學生背包(game.items)
|
| 10 |
// 5. 寫入 alphaPioneer 功勳紀錄,並將 alphaNoticeSeen 設為 false
|
| 11 |
// 讓學生於明日打開遊戲時自動彈出專屬冊封令(單次顯示,之後不再出現)
|
tools/cutout_rembg.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# pyright: reportMissingImports=false
|
| 2 |
+
import os
|
| 3 |
+
from PIL import Image
|
| 4 |
+
|
| 5 |
+
try:
|
| 6 |
+
from rembg import remove, new_session # type: ignore
|
| 7 |
+
except ImportError:
|
| 8 |
+
remove = None
|
| 9 |
+
new_session = None
|
| 10 |
+
|
| 11 |
+
input_path = 'assets/boss_taotie.jpg'
|
| 12 |
+
output_path = 'assets/boss_taotie.png'
|
| 13 |
+
|
| 14 |
+
if __name__ == '__main__':
|
| 15 |
+
if remove is None or new_session is None:
|
| 16 |
+
print("rembg is not installed in the current environment. Run: pip install rembg onnxruntime")
|
| 17 |
+
elif os.path.exists(input_path):
|
| 18 |
+
print(f"Opening {input_path}...")
|
| 19 |
+
input_image = Image.open(input_path)
|
| 20 |
+
print("Creating u2netp lightweight session (only ~4.7MB)...")
|
| 21 |
+
session = new_session('u2netp')
|
| 22 |
+
print("Running rembg AI cutout...")
|
| 23 |
+
output_image = remove(input_image, session=session)
|
| 24 |
+
output_image.save(output_path, format='PNG')
|
| 25 |
+
print(f"Successfully saved AI cutout to {output_path}!")
|
| 26 |
+
else:
|
| 27 |
+
print(f"Error: {input_path} not found.")
|