minigame 5 add more design 1.2
This commit is contained in:
File diff suppressed because one or more lines are too long
+161
-32
@@ -4094,6 +4094,11 @@
|
||||
return isStackTowerMissionUiMapPlay() && stackTowerMissionPhase === 'live';
|
||||
}
|
||||
|
||||
/** mnptfts2 Jumper — ใช้ cyber HUD แบบภารกิจคำถาม (TIME plaque + SCORE แถว QM + กรอบโปรไฟล์) */
|
||||
function isJumpSurviveMissionHudActivePlay() {
|
||||
return isJumpSurviveMissionUiMapPlay() && jumpSurviveMissionPhase === 'live';
|
||||
}
|
||||
|
||||
function stackTowerAssetUrl(file) {
|
||||
return BASE + '/img/TowerBlock/' + String(file || '').replace(/^\/+/, '');
|
||||
}
|
||||
@@ -4548,6 +4553,57 @@
|
||||
}, STACK_TOWER_RESULT_FLASH_MS);
|
||||
}
|
||||
|
||||
/** Jumper mnptfts2: เกรด F = ภาพ gameover · อื่น = complete (ก่อนแผงสรุปผล) */
|
||||
function jumpSurviveMissionOutcomeImageFile(mission) {
|
||||
const g = mission && String(mission.grade || '').toUpperCase();
|
||||
if (g === 'F') return 'result-gameover.png';
|
||||
return 'result-complete.png';
|
||||
}
|
||||
|
||||
/**
|
||||
* Jumper ภารกิจ: ใช้ #stack-tower-result-flash เหมือน Tower — time_up = timeup แล้ว outcome;
|
||||
* all_dead = ข้าม timeup แล้ว outcome อย่างเดียว แล้วค่อย GCM
|
||||
*/
|
||||
function beginJumpSurviveMissionResultFlashSequenceThenGcm(mission, endKind) {
|
||||
if (!mission || mission.uiSkin !== 'jumper') {
|
||||
showGauntletCrownMissionOverlay(mission);
|
||||
return;
|
||||
}
|
||||
hideStackTowerResultFlashDomOnlyPlay();
|
||||
const ov = document.getElementById('stack-tower-result-flash');
|
||||
const imgEl = document.getElementById('stack-tower-result-flash-img');
|
||||
if (!ov || !imgEl) {
|
||||
showGauntletCrownMissionOverlay(mission);
|
||||
return;
|
||||
}
|
||||
const outcomeFile = jumpSurviveMissionOutcomeImageFile(mission);
|
||||
const finishToGcm = function () {
|
||||
hideStackTowerResultFlashDomOnlyPlay();
|
||||
showGauntletCrownMissionOverlay(mission);
|
||||
};
|
||||
const showOneFlash = function (file, onDone) {
|
||||
imgEl.onerror = function () {
|
||||
imgEl.onerror = null;
|
||||
onDone();
|
||||
};
|
||||
imgEl.src = jumperAssetUrl(file);
|
||||
ov.classList.remove('is-hidden');
|
||||
ov.setAttribute('aria-hidden', 'false');
|
||||
stackTowerResultFlashTimer = setTimeout(function () {
|
||||
stackTowerResultFlashTimer = null;
|
||||
onDone();
|
||||
}, STACK_TOWER_RESULT_FLASH_MS);
|
||||
};
|
||||
if (endKind === 'time_up') {
|
||||
showOneFlash('result-timeup.png', function () {
|
||||
hideStackTowerResultFlashDomOnlyPlay();
|
||||
showOneFlash(outcomeFile, finishToGcm);
|
||||
});
|
||||
} else {
|
||||
showOneFlash(outcomeFile, finishToGcm);
|
||||
}
|
||||
}
|
||||
|
||||
function stackTowerMissionTimeLimitSecPlay() {
|
||||
const t = Number(playStackTowerMissionTimeSec);
|
||||
if (Number.isFinite(t) && t > 0) return Math.max(10, Math.min(7200, Math.floor(t)));
|
||||
@@ -4681,6 +4737,27 @@
|
||||
: (humansReady ? 'START (โฮสต์เท่านั้น)' : 'READY (โฮสต์เท่านั้น)');
|
||||
}
|
||||
|
||||
/** Space Shooter mnpz6rkp — Ready Status / ปุ่ม เดียวกับ Jumper */
|
||||
function updateSpaceShooterMissionHowtoHud() {
|
||||
if (!isSpaceShooterMissionUiMapPlay() || spaceShooterMissionPhase !== 'howto') return;
|
||||
const st = document.getElementById('gauntlet-crown-howto-status');
|
||||
const btn = document.getElementById('btn-gch-ready');
|
||||
if (!st || !btn) return;
|
||||
const humans = quizCarryPregameHumanIds();
|
||||
const tot = Math.max(1, quizCarryPregameTotalPlayers());
|
||||
const num = gauntletCrownPregameReadyNumerator();
|
||||
st.classList.remove('is-hidden');
|
||||
st.textContent = 'Ready Status : ' + num + '/' + tot;
|
||||
const humansReady = humans.length > 0 && humans.every((id) => !!gauntletCrownLobbyReadyMap[id]);
|
||||
btn.classList.toggle('is-start-phase', humansReady);
|
||||
btn.classList.toggle('is-read-only', !isMePlayHost());
|
||||
btn.disabled = !isMePlayHost();
|
||||
btn.setAttribute('aria-pressed', humansReady ? 'false' : ((myId && gauntletCrownLobbyReadyMap[String(myId)]) ? 'true' : 'false'));
|
||||
btn.title = isMePlayHost()
|
||||
? (humansReady ? 'START' : ((myId && gauntletCrownLobbyReadyMap[String(myId)]) ? 'ยกเลิก READY' : 'READY'))
|
||||
: (humansReady ? 'START (โฮสต์เท่านั้น)' : 'READY (โฮสต์เท่านั้น)');
|
||||
}
|
||||
|
||||
function beginStackTowerMissionCountdownThenRun() {
|
||||
if (!isStackTowerMissionUiMapPlay()) return;
|
||||
if (stackTowerMissionCountdownTimer) {
|
||||
@@ -5104,17 +5181,12 @@
|
||||
return n;
|
||||
}
|
||||
|
||||
/** จบทันทีเมื่อไม่มีผู้รอด หรือเหลือคนเดียว (หลายคนในรอบ) — โหมด solo 1 คนยังเล่นจนหมดเวลา */
|
||||
/** จบทันทีเมื่อไม่มีผู้รอด — เหลือคนสุดท้ายยังเล่นต่อจนหมดเวลา (ไม่จบเร็วแบบ “ชนะขาดลอย”) */
|
||||
function jumpSurviveMissionMaybeEarlyFinish() {
|
||||
if (!isJumpSurviveMissionUiMapPlay() || jumpSurviveMissionPhase !== 'live' || jumpSurviveGameEnded) return;
|
||||
const total = jumpSurviveMissionTotalParticipants();
|
||||
const alive = jumpSurviveMissionCountAlive();
|
||||
if (alive === 0) {
|
||||
endJumpSurviveMissionRound();
|
||||
return;
|
||||
}
|
||||
if (total >= 2 && alive === 1) {
|
||||
endJumpSurviveMissionRound();
|
||||
endJumpSurviveMissionRound('all_dead');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5256,13 +5328,14 @@
|
||||
};
|
||||
}
|
||||
|
||||
function endJumpSurviveMissionRound() {
|
||||
function endJumpSurviveMissionRound(endKind) {
|
||||
if (!isJumpSurviveMissionUiMapPlay() || jumpSurviveGameEnded) return;
|
||||
jumpSurviveGameEnded = true;
|
||||
jumpSurviveMissionPhase = 'ended';
|
||||
applyJumpSurviveJumperPanelImages();
|
||||
const mission = jumpSurviveBuildMissionPayload();
|
||||
showGauntletCrownMissionOverlay(mission);
|
||||
const kind = endKind === 'all_dead' ? 'all_dead' : 'time_up';
|
||||
beginJumpSurviveMissionResultFlashSequenceThenGcm(mission, kind);
|
||||
}
|
||||
function isSpaceShooter() { return mapData && mapData.gameType === 'space_shooter'; }
|
||||
|
||||
@@ -5337,21 +5410,28 @@
|
||||
gauntletCrownHowtoVisible = true;
|
||||
ov.classList.remove('is-hidden');
|
||||
const st = document.getElementById('gauntlet-crown-howto-status');
|
||||
if (st) {
|
||||
st.textContent = '';
|
||||
st.classList.remove('gch-status--jumper');
|
||||
st.classList.add('is-hidden');
|
||||
}
|
||||
if (st) st.classList.remove('gch-status--jumper');
|
||||
const btn = document.getElementById('btn-gch-ready');
|
||||
if (btn) {
|
||||
const humans = quizCarryPregameHumanIds();
|
||||
const soleHuman = humans.length === 1;
|
||||
const canGo = soleHuman || isMePlayHost();
|
||||
btn.classList.remove('is-start-phase');
|
||||
btn.classList.toggle('is-read-only', !canGo);
|
||||
btn.disabled = !canGo;
|
||||
btn.title = canGo ? 'READY — เริ่มนับถอยหลัง' : 'รอโฮสต์ · Wait for host';
|
||||
btn.setAttribute('aria-pressed', 'false');
|
||||
const humans = quizCarryPregameHumanIds();
|
||||
const totPlayers = Math.max(1, quizCarryPregameTotalPlayers());
|
||||
const soleParticipant = totPlayers === 1;
|
||||
if (soleParticipant) {
|
||||
if (st) {
|
||||
st.textContent = '';
|
||||
st.classList.add('is-hidden');
|
||||
}
|
||||
if (btn) {
|
||||
const canGo = humans.length === 1 || isMePlayHost();
|
||||
btn.classList.remove('is-start-phase');
|
||||
btn.classList.toggle('is-read-only', !canGo);
|
||||
btn.disabled = !canGo;
|
||||
btn.title = canGo ? 'READY — เริ่มนับถอยหลัง' : 'รอโฮสต์ · Wait for host';
|
||||
btn.setAttribute('aria-pressed', 'false');
|
||||
}
|
||||
} else {
|
||||
if (socket && socket.connected) socket.emit('gauntlet-crown-lobby-sync-request');
|
||||
gauntletCrownSyncGuestReadyIfNeeded();
|
||||
updateSpaceShooterMissionHowtoHud();
|
||||
}
|
||||
spaceShooterResetMissionShipStateForAllPlay();
|
||||
}
|
||||
@@ -9424,6 +9504,7 @@
|
||||
|
||||
/** ซ่อน overlay โหมดอื่นที่ค้างจาก embed / session ก่อน — กัน UI ซ้อนไม่ตรง mock */
|
||||
function hideConflictingOverlaysForGauntletCrown() {
|
||||
hideStackTowerResultFlashDomOnlyPlay();
|
||||
hideQuizCarryPregameOverlay();
|
||||
quizCarryPregameActive = false;
|
||||
const hideIds = [
|
||||
@@ -9468,7 +9549,8 @@
|
||||
const inQuizQuestionHowto = isQuizQuestionMissionUiMapPlay() && quizQuestionMissionPhase === 'howto';
|
||||
const inStackTowerHowto = isStackTowerMissionUiMapPlay() && stackTowerMissionPhase === 'howto';
|
||||
const inJumpSurviveHowto = isJumpSurviveMissionUiMapPlay() && jumpSurviveMissionPhase === 'howto';
|
||||
if (gauntletCrownPregamePhase !== 'howto' && !inQuizQuestionHowto && !inStackTowerHowto && !inJumpSurviveHowto) return;
|
||||
const inSpaceShooterHowto = isSpaceShooterMissionUiMapPlay() && spaceShooterMissionPhase === 'howto';
|
||||
if (gauntletCrownPregamePhase !== 'howto' && !inQuizQuestionHowto && !inStackTowerHowto && !inJumpSurviveHowto && !inSpaceShooterHowto) return;
|
||||
if (myId == null || isMePlayHost()) return;
|
||||
const sid = String(myId);
|
||||
if (gauntletCrownLobbyReadyMap[sid]) return;
|
||||
@@ -9933,7 +10015,7 @@
|
||||
if (previewMode && editorEmbedReturn) {
|
||||
ov.classList.add('is-hidden');
|
||||
if (gcmHead) gcmHead.classList.remove('sr-only');
|
||||
if (mission && (mission.uiSkin === 'question_mission' || mission.uiSkin === 'stack_tower' || mission.uiSkin === 'mega_virus')) {
|
||||
if (mission && (mission.uiSkin === 'question_mission' || mission.uiSkin === 'stack_tower' || mission.uiSkin === 'mega_virus' || mission.uiSkin === 'jumper')) {
|
||||
cancelQuizCarryResultEndAfterTimeup();
|
||||
hideQuizCarryTimeupOnDeskLayer();
|
||||
hideQuizCarryResultEndLayer();
|
||||
@@ -12257,7 +12339,7 @@
|
||||
if (jumpSurviveMissionPhase !== 'live' || jumpSurviveGameEnded) return;
|
||||
const remEnd = jumpSurviveRemainingSecMission();
|
||||
if (remEnd !== null && remEnd <= 0) {
|
||||
endJumpSurviveMissionRound();
|
||||
endJumpSurviveMissionRound('time_up');
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -13027,6 +13109,7 @@
|
||||
if (isQuizQuestionMissionUiMapPlay() && quizQuestionMissionPhase === 'howto') updateQuizQuestionMissionHowtoHud();
|
||||
if (isStackTowerMissionUiMapPlay() && stackTowerMissionPhase === 'howto') updateStackTowerMissionHowtoHud();
|
||||
if (isJumpSurviveMissionUiMapPlay() && jumpSurviveMissionPhase === 'howto') updateJumpSurviveMissionHowtoHud();
|
||||
if (isSpaceShooterMissionUiMapPlay() && spaceShooterMissionPhase === 'howto') updateSpaceShooterMissionHowtoHud();
|
||||
});
|
||||
socket.on('host-changed', (d) => {
|
||||
if (d && d.hostId != null) playHostId = d.hostId;
|
||||
@@ -13034,6 +13117,7 @@
|
||||
if (isQuizQuestionMissionUiMapPlay() && quizQuestionMissionPhase === 'howto') updateQuizQuestionMissionHowtoHud();
|
||||
if (isStackTowerMissionUiMapPlay() && stackTowerMissionPhase === 'howto') updateStackTowerMissionHowtoHud();
|
||||
if (isJumpSurviveMissionUiMapPlay() && jumpSurviveMissionPhase === 'howto') updateJumpSurviveMissionHowtoHud();
|
||||
if (isSpaceShooterMissionUiMapPlay() && spaceShooterMissionPhase === 'howto') updateSpaceShooterMissionHowtoHud();
|
||||
});
|
||||
socket.on('quiz-carry-lobby-sync', (d) => {
|
||||
if (!d || typeof d.readyMap !== 'object') return;
|
||||
@@ -13062,6 +13146,9 @@
|
||||
} else if (isJumpSurviveMissionUiMapPlay() && jumpSurviveMissionPhase === 'howto') {
|
||||
gauntletCrownSyncGuestReadyIfNeeded();
|
||||
updateJumpSurviveMissionHowtoHud();
|
||||
} else if (isSpaceShooterMissionUiMapPlay() && spaceShooterMissionPhase === 'howto') {
|
||||
gauntletCrownSyncGuestReadyIfNeeded();
|
||||
updateSpaceShooterMissionHowtoHud();
|
||||
}
|
||||
});
|
||||
socket.on('gauntlet-crown-lobby-started', () => {
|
||||
@@ -13077,6 +13164,10 @@
|
||||
beginJumpSurviveMissionCountdownThenRun();
|
||||
return;
|
||||
}
|
||||
if (isSpaceShooterMissionUiMapPlay() && spaceShooterMissionPhase === 'howto') {
|
||||
beginSpaceShooterMissionCountdownThenRun();
|
||||
return;
|
||||
}
|
||||
if (!usesCrownLobbyShellPlay()) return;
|
||||
beginGauntletCrownCountdownThenRun();
|
||||
});
|
||||
@@ -13186,6 +13277,7 @@
|
||||
if (isQuizQuestionMissionUiMapPlay() && quizQuestionMissionPhase === 'howto') updateQuizQuestionMissionHowtoHud();
|
||||
if (isStackTowerMissionUiMapPlay() && stackTowerMissionPhase === 'howto') updateStackTowerMissionHowtoHud();
|
||||
if (isJumpSurviveMissionUiMapPlay() && jumpSurviveMissionPhase === 'howto') updateJumpSurviveMissionHowtoHud();
|
||||
if (isSpaceShooterMissionUiMapPlay() && spaceShooterMissionPhase === 'howto') updateSpaceShooterMissionHowtoHud();
|
||||
});
|
||||
socket.on('chat', (data) => {
|
||||
const box = document.getElementById('chat-messages');
|
||||
@@ -14796,7 +14888,7 @@
|
||||
const qText = document.getElementById('play-cyber-quiz-mission-q-text');
|
||||
const qPlaque = document.getElementById('play-cyber-quiz-mission-q-plaque');
|
||||
const tb = root ? root.querySelector('.play-cyber-time-block') : null;
|
||||
const on = isQuizQuestionMissionHudActivePlay() || isStackTowerMissionHudActivePlay();
|
||||
const on = isQuizQuestionMissionHudActivePlay() || isStackTowerMissionHudActivePlay() || isJumpSurviveMissionHudActivePlay();
|
||||
if (isQuizQuestionMissionUiMapPlay()) {
|
||||
if (qBand) {
|
||||
qBand.classList.add('is-hidden');
|
||||
@@ -14929,6 +15021,7 @@
|
||||
if (!on) {
|
||||
root.classList.remove('play-cyber-hud--question-mission');
|
||||
root.classList.remove('play-cyber-hud--score-flush-left');
|
||||
root.classList.remove('play-cyber-hud--jump-mission-hide-score');
|
||||
}
|
||||
}
|
||||
if (stackEl) stackEl.classList.toggle('play-cyber-vignette', !!on);
|
||||
@@ -14937,7 +15030,7 @@
|
||||
if (!on || !root) return;
|
||||
root.classList.toggle(
|
||||
'play-cyber-hud--question-mission',
|
||||
!!(isQuizQuestionMissionHudActivePlay() || isStackTowerMissionHudActivePlay()),
|
||||
!!(isQuizQuestionMissionHudActivePlay() || isStackTowerMissionHudActivePlay() || isJumpSurviveMissionHudActivePlay()),
|
||||
);
|
||||
root.classList.toggle(
|
||||
'play-cyber-hud--stack-tower-canvas-hud',
|
||||
@@ -14949,6 +15042,7 @@
|
||||
!!(on && (isGauntletCrownHeistMapPlay() || isQuizCarry())),
|
||||
);
|
||||
root.classList.toggle('play-cyber-hud--score-flush-left', !!(on && isQuizCarry()));
|
||||
root.classList.toggle('play-cyber-hud--jump-mission-hide-score', !!isJumpSurviveMissionUiMapPlay());
|
||||
const timeLabelEl = root.querySelector('.play-cyber-time-label');
|
||||
if (timeLabelEl) timeLabelEl.style.display = isQuizCarry() ? 'none' : '';
|
||||
const timeVal = document.getElementById('play-cyber-time-val');
|
||||
@@ -15093,6 +15187,8 @@
|
||||
statusEl.textContent = 'QUIZ LINK · ประลองความรู้';
|
||||
} else if (isStackTowerMissionHudActivePlay()) {
|
||||
statusEl.textContent = 'DECRYPT UPLINK · TOWER';
|
||||
} else if (isJumpSurviveMissionHudActivePlay()) {
|
||||
statusEl.textContent = 'JUMPER LINK · SURVIVE';
|
||||
} else if (isQuizCarry() && quizCarrySessionEnded) {
|
||||
statusEl.textContent = 'SESSION COMPLETE · จบชุดคำถาม';
|
||||
} else if (isJumpSurvive() && jumpSurviveEliminated) {
|
||||
@@ -15160,6 +15256,14 @@
|
||||
|
||||
const ul = document.getElementById('play-cyber-score-list');
|
||||
if (!ul) return;
|
||||
/* mnptfts2 — ไม่แสดงแผง SCORE (เหลือ TIME + โปรไฟล์) */
|
||||
if (isJumpSurviveMissionUiMapPlay()) {
|
||||
ul.innerHTML = '';
|
||||
const boardSkip = ul.closest('.play-cyber-scoreboard');
|
||||
if (boardSkip) boardSkip.classList.remove('play-cyber-scoreboard--crown-strip');
|
||||
ul.classList.remove('play-cyber-score-list--crown-strip');
|
||||
return;
|
||||
}
|
||||
const stripScoreHud = isGauntletCrownHeistMapPlay() || isQuizCarry();
|
||||
const board = ul.closest('.play-cyber-scoreboard');
|
||||
if (board) board.classList.toggle('play-cyber-scoreboard--crown-strip', !!stripScoreHud);
|
||||
@@ -15194,8 +15298,9 @@
|
||||
const jumpMissionHud = isJumpSurvive() && isJumpSurviveMissionUiMapPlay();
|
||||
const quizMissionHud = isQuizQuestionMissionHudActivePlay();
|
||||
const stackMissionHud = isStackTowerMissionHudActivePlay();
|
||||
/** แถบ SCORE แบบ mock mng8a80o (แนวนอน อวาตาร์+ชื่อ | คะแนน) — ใช้กับภารกิจคำถาม + Stack Tower mnn93hpi */
|
||||
const cyberQmMockHud = quizMissionHud || stackMissionHud;
|
||||
const jumpMissionLiveHud = isJumpSurviveMissionHudActivePlay();
|
||||
/** แถบ SCORE แบบ mock mng8a80o (แนวนอน อวาตาร์+ชื่อ | คะแนน) — ภารกิจคำถาม + Stack Tower + Jumper mnptfts2 */
|
||||
const cyberQmMockHud = quizMissionHud || stackMissionHud || jumpMissionLiveHud;
|
||||
const stackTeamPts = Math.max(0, Number(stackMini && stackMini.score) || 0);
|
||||
const rows = [];
|
||||
rows.push({
|
||||
@@ -16613,8 +16718,32 @@
|
||||
if (isSpaceShooterMissionUiMapPlay()) {
|
||||
if (spaceShooterMissionPhase !== 'howto') return;
|
||||
const humansSs = quizCarryPregameHumanIds();
|
||||
if (!(humansSs.length === 1 || isMePlayHost())) return;
|
||||
beginSpaceShooterMissionCountdownThenRun();
|
||||
const totPlayersSs = Math.max(1, quizCarryPregameTotalPlayers());
|
||||
if (totPlayersSs === 1) {
|
||||
if (!(humansSs.length === 1 || isMePlayHost())) return;
|
||||
beginSpaceShooterMissionCountdownThenRun();
|
||||
return;
|
||||
}
|
||||
if (!isMePlayHost()) {
|
||||
if (myId == null) return;
|
||||
const sidSs = String(myId);
|
||||
const nextSs = !gauntletCrownLobbyReadyMap[sidSs];
|
||||
gauntletCrownLobbyReadyMap[sidSs] = nextSs;
|
||||
updateSpaceShooterMissionHowtoHud();
|
||||
if (socket && socket.connected) socket.emit('gauntlet-crown-lobby-ready', { ready: nextSs });
|
||||
return;
|
||||
}
|
||||
if (myId == null) return;
|
||||
const humansReadySs = humansSs.length > 0 && humansSs.every((id) => !!gauntletCrownLobbyReadyMap[id]);
|
||||
if (humansReadySs) {
|
||||
socket.emit('gauntlet-crown-lobby-start', {}, (r) => { if (!r || !r.ok) { /* ignore */ } });
|
||||
return;
|
||||
}
|
||||
const sidHostSs = String(myId);
|
||||
const nextHostSs = !gauntletCrownLobbyReadyMap[sidHostSs];
|
||||
gauntletCrownLobbyReadyMap[sidHostSs] = nextHostSs;
|
||||
updateSpaceShooterMissionHowtoHud();
|
||||
if (socket && socket.connected) socket.emit('gauntlet-crown-lobby-ready', { ready: nextHostSs });
|
||||
return;
|
||||
}
|
||||
if (isQuizQuestionMissionUiMapPlay()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// ทุกครั้งที่มีการเพิ่มหรือเปลี่ยน ให้เพิ่ม v +0.0001
|
||||
// หลังแก้ค่าแล้วต้อง copy ไป path ที่ Nginx ชี้ (หรือรัน copy-frogger-files-only.sh) ถึงจะเห็นบนเว็บ
|
||||
window.APP_VERSION = '0.0301';
|
||||
window.APP_VERSION = '0.0308';
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var t = document.querySelector('.version-tag');
|
||||
if (t) t.textContent = 'v ' + window.APP_VERSION;
|
||||
|
||||
@@ -1648,6 +1648,10 @@
|
||||
inset: 0;
|
||||
}
|
||||
.play-cyber-hud.is-hidden { display: none !important; }
|
||||
/* Jumper ภารกิจ mnptfts2 — ซ่อนแผง SCORE เท่านั้น (TIME + โปรไฟล์ยังใช้งาน) */
|
||||
#play-cyber-hud.play-cyber-hud--jump-mission-hide-score .play-cyber-scoreboard {
|
||||
display: none !important;
|
||||
}
|
||||
/* mng8a80o — แผง SCORE: มุมคม, หัว SCORE ใหญ่, แถวแนวนอน = [อวาตาร์เล็ก + ชื่อไทย] ซ้าย | คะแนนใหญ่ขวา */
|
||||
#play-cyber-hud.play-cyber-hud--question-mission .play-cyber-scoreboard {
|
||||
width: min(252px, 64vw);
|
||||
@@ -3021,8 +3025,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<script src="/Game/socket.io/socket.io.js"></script>
|
||||
<script src="js/version.js?v=0.0301"></script>
|
||||
<script src="js/play.js?v=0.0301"></script>
|
||||
<script src="js/version.js?v=0.0306"></script>
|
||||
<script src="js/play.js?v=0.0308"></script>
|
||||
<div class="version-tag">v —</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+13
-5
@@ -2901,6 +2901,8 @@ const GAUNTLET_LANE_ROW_SPAWN_CHANCE = 0.34;
|
||||
const GAUNTLET_CROWN_HEIST_MAP_ID = 'mno9kb07';
|
||||
/** Mega Virus — balloon_boss ฉากภารกิจ (flow เดียวกับ crown) */
|
||||
const BALLOON_BOSS_MISSION_MAP_ID = 'mnq1eml7';
|
||||
/** Space Shooter ภารกิจ Violent Crime — lobby READY / START เดียวกับ Jumper */
|
||||
const SPACE_SHOOTER_MISSION_MAP_ID = 'mnpz6rkp';
|
||||
|
||||
function isGauntletCrownHeistMapBySpace(space) {
|
||||
return !!(space && space.mapId && String(space.mapId) === GAUNTLET_CROWN_HEIST_MAP_ID);
|
||||
@@ -2931,8 +2933,14 @@ function isJumpSurviveMissionShellSpace(space) {
|
||||
return !!(md && md.gameType === 'jump_survive');
|
||||
}
|
||||
|
||||
function isSpaceShooterMissionShellSpace(space) {
|
||||
if (!space || !space.mapId || String(space.mapId) !== SPACE_SHOOTER_MISSION_MAP_ID) return false;
|
||||
const md = (space.mapId && maps.get(space.mapId)) || space.mapData;
|
||||
return !!(md && md.gameType === 'space_shooter');
|
||||
}
|
||||
|
||||
function isCrownLobbyShellSpace(space) {
|
||||
return isGauntletCrownHeistMapBySpace(space) || isBalloonBossMissionShellSpace(space) || isQuizQuestionMissionShellSpace(space) || isStackTowerMissionShellSpace(space) || isJumpSurviveMissionShellSpace(space);
|
||||
return isGauntletCrownHeistMapBySpace(space) || isBalloonBossMissionShellSpace(space) || isQuizQuestionMissionShellSpace(space) || isStackTowerMissionShellSpace(space) || isJumpSurviveMissionShellSpace(space) || isSpaceShooterMissionShellSpace(space);
|
||||
}
|
||||
|
||||
function newBalloonBossShellGauntletRunState() {
|
||||
@@ -3726,7 +3734,7 @@ io.on('connection', (socket) => {
|
||||
io.to(spaceId).emit('gauntlet-crown-lobby-sync', { readyMap: { ...space.gauntletCrownLobbyReady } });
|
||||
}
|
||||
startGauntletTicker(spaceId, space);
|
||||
} else if (isBalloonBossMissionShellSpace(space) || isQuizQuestionMissionShellSpace(space) || isStackTowerMissionShellSpace(space) || isJumpSurviveMissionShellSpace(space)) {
|
||||
} else if (isBalloonBossMissionShellSpace(space) || isQuizQuestionMissionShellSpace(space) || isStackTowerMissionShellSpace(space) || isJumpSurviveMissionShellSpace(space) || isSpaceShooterMissionShellSpace(space)) {
|
||||
if (!space.gauntletCrownLobbyReady || typeof space.gauntletCrownLobbyReady !== 'object') space.gauntletCrownLobbyReady = {};
|
||||
space.gauntletCrownLobbyReady[socket.id] = false;
|
||||
if (!space.gauntletRun) space.gauntletRun = newBalloonBossShellGauntletRunState();
|
||||
@@ -3775,7 +3783,7 @@ io.on('connection', (socket) => {
|
||||
if (mdJoin.gameType === 'gauntlet' && space.gauntletRun) {
|
||||
joinCb.gauntletEndsAt = space.gauntletRun.endsAt != null ? space.gauntletRun.endsAt : null;
|
||||
}
|
||||
if ((isBalloonBossMissionShellSpace(space) || isQuizQuestionMissionShellSpace(space) || isStackTowerMissionShellSpace(space) || isJumpSurviveMissionShellSpace(space)) && space.gauntletRun) {
|
||||
if ((isBalloonBossMissionShellSpace(space) || isQuizQuestionMissionShellSpace(space) || isStackTowerMissionShellSpace(space) || isJumpSurviveMissionShellSpace(space) || isSpaceShooterMissionShellSpace(space)) && space.gauntletRun) {
|
||||
joinCb.gauntletCrownRunHeld = !!space.gauntletRun.crownRunHeld;
|
||||
}
|
||||
if (typeof cb === 'function') cb(joinCb);
|
||||
@@ -4040,7 +4048,7 @@ io.on('connection', (socket) => {
|
||||
gauntletEliminated: !!p.gauntletEliminated,
|
||||
}));
|
||||
}
|
||||
if (md && (isBalloonBossMissionShellSpace(space) || isQuizQuestionMissionShellSpace(space) || isStackTowerMissionShellSpace(space) || isJumpSurviveMissionShellSpace(space))) {
|
||||
if (md && (isBalloonBossMissionShellSpace(space) || isQuizQuestionMissionShellSpace(space) || isStackTowerMissionShellSpace(space) || isJumpSurviveMissionShellSpace(space) || isSpaceShooterMissionShellSpace(space))) {
|
||||
if (!space.gauntletCrownLobbyReady || typeof space.gauntletCrownLobbyReady !== 'object') space.gauntletCrownLobbyReady = {};
|
||||
space.peers.forEach((_p, id) => {
|
||||
space.gauntletCrownLobbyReady[id] = false;
|
||||
@@ -4055,7 +4063,7 @@ io.on('connection', (socket) => {
|
||||
peersSnap: peersSnap || undefined,
|
||||
};
|
||||
if (peersSnap) gameStartPayload.gauntletEndsAt = gauntletEndsAtEmit != null ? gauntletEndsAtEmit : null;
|
||||
if (mapId && maps.has(mapId) && (isBalloonBossMissionShellSpace(space) || isQuizQuestionMissionShellSpace(space) || isStackTowerMissionShellSpace(space) || isJumpSurviveMissionShellSpace(space))) {
|
||||
if (mapId && maps.has(mapId) && (isBalloonBossMissionShellSpace(space) || isQuizQuestionMissionShellSpace(space) || isStackTowerMissionShellSpace(space) || isJumpSurviveMissionShellSpace(space) || isSpaceShooterMissionShellSpace(space))) {
|
||||
const grs = space.gauntletRun;
|
||||
gameStartPayload.gauntletCrownRunHeld = !!(grs && grs.crownRunHeld);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user