minigame 1 question 1.1
This commit is contained in:
@@ -196,8 +196,6 @@ function defaultQuizSettings() {
|
||||
/** quiz_carry: ถ้าใส่รหัสฉาก + คูณ — เดินเร็วเฉพาะแมปนั้น (เทียบกับค่าเริ่มในไคลเอนต์) */
|
||||
carryWalkSpeedMultForMapId: '',
|
||||
carryWalkSpeedMult: null,
|
||||
/** ถูก/ผิด: สุ่มกี่ข้อต่อรอบจากชุดคำถาม (สูงสุดเท่าที่มีในชุด) */
|
||||
quizRoundQuestionCount: 10,
|
||||
questions: [],
|
||||
carryQuestions: [],
|
||||
battleQuizMcq: [],
|
||||
@@ -447,17 +445,6 @@ function clampCarrySessionLength(n, def) {
|
||||
return Math.max(0, Math.min(500, Math.floor(v)));
|
||||
}
|
||||
|
||||
/** เกมตอบคำถามถูก/ผิด: จำนวนข้อที่สุ่มจากชุดต่อรอบ (เซสชัน) — 1–50 */
|
||||
function clampQuizRoundQuestionCount(n, def) {
|
||||
const v = Number(n);
|
||||
if (!Number.isFinite(v)) {
|
||||
const d = Number(def);
|
||||
if (!Number.isFinite(d)) return 10;
|
||||
return Math.max(1, Math.min(50, Math.floor(d)));
|
||||
}
|
||||
return Math.max(1, Math.min(50, Math.floor(v)));
|
||||
}
|
||||
|
||||
function clampCarryChoicePlaqueMapScale(n, def) {
|
||||
const v = Number(n);
|
||||
if (Number.isNaN(v)) return def;
|
||||
@@ -522,9 +509,6 @@ function mergeQuizCarryFromMirrorIfSet(base) {
|
||||
if (Array.isArray(j.carryQuestions) && j.carryQuestions.length) {
|
||||
base.carryQuestions = sanitizeCarryQuestions(j.carryQuestions);
|
||||
}
|
||||
if (j.quizRoundQuestionCount != null) {
|
||||
base.quizRoundQuestionCount = clampQuizRoundQuestionCount(j.quizRoundQuestionCount, base.quizRoundQuestionCount);
|
||||
}
|
||||
return base;
|
||||
} catch (e) {
|
||||
console.error('mergeQuizCarryFromMirrorIfSet', e.message);
|
||||
|
||||
Reference in New Issue
Block a user