MediaWiki:Ck main.js:修订间差异

无编辑摘要
无编辑摘要
(未显示同一用户的44个中间版本)
第1行: 第1行:
var roles_3 = [{
name: '马努埃尔',
},
{
name: '伊布林',
},
{
name: '哈利',
},
{
name: '霍尔赫',
},
{
name: '萨莉亚',
},
{
name: '佩妮',
},
{
name: '迪艾格',
},
{
name: '费丽妮',
},
{
name: '比利',
},
{
name: '赫塞',
},
{
name: '帕尔',
},
{
name: '特利',
},
{
name: '弗昂',
},
{
name: '卡萝尔',
},
{
name: '科妮',
},
{
name: '古提',
},
{
name: '薇薇安',
},
{
name: '萨妮',
},
{
name: '伍格',
},
{
name: '南娜',
},
{
name: '梅妮',
},
{
name: '弗利欧',
},
{
name: '尤妮丝',
},
{
name: '多利',
},
];
var roles_4 = [{
name: '普利基特',
},
{
name: '洛洛',
},
{
name: '雪娜',
},
{
name: '约伦',
},
{
name: '勒凡',
},
{
name: '波拉',
},
{
name: '艾弗伦',
},
{
name: '肯尼斯',
},
{
name: '科尔尼利亚',
},
{
name: '杜兰',
},
{
name: '纳尔',
},
{
name: '梅贝儿',
},
{
name: '伊利斯',
},
{
name: '法维欧',
},
{
name: '莉塔',
},
{
name: '歇尔薇',
},
{
name: '罗迪恩',
},
{
name: '玛德蕾妮',
},
{
name: '诺艾尔',
},
{
name: '塞德里克',
},
{
name: '梅诺',
},
{
name: '巴拉德',
},
{
name: '贝尔加',
},
{
name: '阿孜莱特',
},
{
name: '卡米拉',
},
{
name: '迈尔斯',
},
{
name: '贝尔特朗',
},
{
name: '洁卡莉特',
},
{
name: '塔希尔',
},
{
name: '特里休',
},
{
name: '阿什兰',
},
{
name: '劳拉',
},
{
name: '佩雷迪尔',
},
{
name: '米娜',
},
{
name: '卢塞塔',
},
{
name: '拉莫纳',
},
{
name: '梅蕾特',
},
{
name: '皮雅',
},
{
name: '哈因茨',
},
{
name: '德文',
},
{
name: '克雷斯',
},
{
name: '卡尔茨',
},
{
name: '温格特',
}
];
var roles_5 = [{
name: '洁卡莉特Ex'
},
{
name: '亚芬'
},
{
name: '乌·鲁代'
},
{
name: '泰蕾兹'
},
{
name: '莱欧尼尔'
},
{
name: '海茵特'
},
{
name: '普里姆萝洁'
},
{
name: '赛拉斯'
},
{
name: '斯凯亚克罗'
},
{
name: '菲欧儿'
},
{
name: '米罗德'
},
{
name: '薇欧拉'
},
{
name: '莉妮特'
},
{
name: '吉尔德罗伊'
},
{
name: '特欧'
},
{
name: '索菲亚'
},
{
name: '拉斯'
},
{
name: '赛西莉'
},
{
name: '莲见'
},
{
name: '尼兰娜拉'
},
{
name: '欧尔贝克'
},
{
name: '欧菲莉亚'
},
{
name: '希斯柯特'
},
{
name: '哈雷'
},
];




// 亚芬、海茵特混池
var percent_up_50 = 0.8;
var roles_hc_5 = [{
var percent_up_45 = 0.4;
name: "亚芬",
var percent_other_50 = 0.6;
isUp: true,
var percent_other_45 = 0.2;
weight: 1
var percent_other_2_50 = 0.6;
}, {
var percent_other_2_45 = 1.4;
name: "海茵特",
var percent_40 = 96;
isUp: true,
var percent_35 = 0;
weight: 1
var percent_30 = 0;
}];
// 卡杰斯
var role_sg_5 = [{
name: "卡杰斯",
isUp: true,
weight: 1
}]
// 尼尔
var roles_nier_5 = [{
name: "A2",
isUp: true,
weight: 1
}, {
name: "2B",
isUp: true,
weight: 1
}, {
name: "9S",
isUp: true,
weight: 1
}];


var arr_star_3 = [
var pools = [{
{ name:'马努埃尔',star:3},
name: "尼尔机械纪元:A2 2B 9S",
{ name:'伊布林',star:3},
btn_1: true,
{ name:'哈利',star:3},
btn_10: true,
{ name:'霍尔赫',star:3},
step: false,
{ name:'萨莉亚',star:3},
stepRole: [],
{ name:'佩妮',star:3},
stepCount: [],
{ name:'迪艾格',star:3},
roleType: [{
{ name:'费丽妮',star:3},
// 5 A2 2B 9S
{ name:'比利',star:3},
num: 1,
{ name:'赫塞',star:3},
maxStar: 5,
{ name:'帕尔',star:3},
thisStar: 5,
{ name:'特利',star:3},
isUp: true,
{ name:'弗昂',star:3},
roles: roles_nier_5
{ name:'卡萝尔',star:3},
},
{ name:'科妮',star:3},
{
{ name:'古提',star:3},
// 4.5 A2 2B 9S
{ name:'薇薇安',star:3},
num: 1,
{ name:'萨妮',star:3},
maxStar: 5,
{ name:'伍格',star:3},
thisStar: 4,
{ name:'南娜',star:3},
isUp: true,
{ name:'梅妮',star:3},
roles: roles_nier_5
{ name:'弗利欧',star:3},
},
{ name:'尤妮丝',star:3},
{
{ name:'多利',star:3},
// 5其他
];
num: 1,
var arr_star_4 = [
maxStar: 5,
{ name:'普利基特',star:4 },
thisStar: 5,
{ name:'洛洛',star:4 },
isUp: false,
{ name:'雪娜',star:4 },
roles: roles_5
{ name:'约伦',star:4 },
},
{ name:'勒凡',star:4 },
{
{ name:'波拉',star:4 },
// 4.5其他
{ name:'艾弗伦',star:4 },
num: 1,
{ name:'肯尼斯',star:4 },
maxStar: 5,
{ name:'科尔尼利亚',star:4 },
thisStar: 4,
{ name:'杜兰',star:4 },
isUp: false,
{ name:'纳尔',star:4 },
roles: roles_5
{ name:'梅贝儿',star:4 },
},
{ name:'伊利斯',star:4 },
{
{ name:'法维欧',star:4 },
// 4星
{ name:'莉塔',star:4 },
num: 18,
{ name:'歇尔薇',star:4 },
maxStar: 4,
{ name:'罗迪恩',star:4 },
thisStar: 4,
{ name:'玛德蕾妮',star:4 },
isUp: false,
{ name:'诺艾尔',star:4 },
roles: roles_4
{ name:'塞德里克',star:4 },
},
{ name:'梅诺',star:4 },
{
{ name:'巴拉德',star:4 },
// 3.5星
{ name:'贝尔加',star:4 },
num: 40,
{ name:'阿孜莱特',star:4 },
maxStar: 4,
{ name:'卡米拉',star:4 },
thisStar: 3,
{ name:'迈尔斯',star:4 },
isUp: false,
{ name:'贝尔特朗',star:4 },
roles: roles_4
{ name:'洁卡莉特',star:4 },
},
{ name:'塔希尔',star:4 },
{
{ name:'特里休',star:4 },
// 3星
{ name:'阿什兰',star:4 },
num: 38,
{ name:'劳拉',star:4 },
maxStar: 3,
{ name:'佩雷迪尔',star:4 },
thisStar: 3,
{ name:'米娜',star:4 },
isUp: false,
{ name:'卢塞塔',star:4 },
roles: roles_3
{ name:'拉莫纳',star:4 },
}
{ name:'梅蕾特',star:4 },
]
{ name:'皮雅',star:4 },
},
{ name:'哈因茨',star:4 },
{
{ name:'德文',star:4 },
name: "尼尔机械纪元(阶梯):A2 2B 9S",
{ name:'克雷斯',star:4 },
btn_1: false,
{ name:'卡尔茨',star:4 },
btn_10: true,
{ name:'温格特',star:4 }
step: true,
];
stepRole: roles_nier_5,
var arr_star_5_up = [
stepCount: [7, 8, 10, 10, 10],
{ name:'奥黛特',star:5 },
roleType: [{
];
// 5 A2 2B 9S
var arr_star_5_other = [
num: 1,
{ name:'多萝德娅',star:5 },
maxStar: 5,
];
thisStar: 5,
var arr_star_5_other_2 = [
isUp: true,
{ name:'洁卡莉特Ex',star:5 },
roles: roles_nier_5
{ name:'亚芬',star:5 },
},
{ name:'乌·鲁代',star:5 },
{
{ name:'泰蕾兹',star:5 },
// 4.5 A2 2B 9S
{ name:'莱欧尼尔',star:5 },
num: 1,
{ name:'海茵特',star:5 },
maxStar: 5,
{ name:'普里姆萝洁',star:5 },
thisStar: 4,
{ name:'赛拉斯',star:5 },
isUp: true,
{ name:'斯凯亚克罗',star:5 },
roles: roles_nier_5
{ name:'菲欧儿',star:5 },
},
{ name:'米罗德',star:5 },
{
{ name:'薇欧拉',star:5 },
// 5其他
{ name:'莉妮特',star:5 },
num: 1,
{ name:'吉尔德罗伊',star:5 },
maxStar: 5,
{ name:'特欧',star:5 },
thisStar: 5,
{ name:'索菲亚',star:5 },
isUp: false,
{ name:'拉斯',star:5 },
roles: roles_5
{ name:'赛西莉',star:5 },
},
{ name:'莲见',star:5 },
{
{ name:'尼兰娜拉',star:5 },
// 4.5其他
{ name:'欧尔贝克',star:5 },
num: 1,
{ name:'欧菲莉亚',star:5 },
maxStar: 5,
{ name:'希斯柯特',star:5 },
thisStar: 4,
{ name:'哈雷',star:5 },
isUp: false,
];
roles: roles_5
},
{
var currPool = [];
// 4星
var poolName = "";
num: 18,
var poolRoleTyels = [];
maxStar: 4,
var numStep = [];
thisStar: 4,
isUp: false,
roles: roles_4
},
var arr_result = [];
{
var max_result_level = 3;
// 3.5星
var step = 0;
num: 40,
maxStar: 4,
thisStar: 3,
isUp: false,
roles: roles_4
},
{
// 3星
num: 38,
maxStar: 3,
thisStar: 3,
isUp: false,
roles: roles_3
}
]
},
{
name: "闪光的旅人:卡杰斯",
btn_1: true,
btn_10: true,
step: false,
stepRole: [],
stepCount: [],
roleType: [{
// 5卡杰斯
num: 0.8,
maxStar: 5,
thisStar: 5,
isUp: true,
roles: role_sg_5
},
{
// 4.5亚芬、海茵特
num: 0.4,
maxStar: 5,
thisStar: 4,
isUp: true,
roles: role_sg_5
},
{
// 5其他
num: 1.2,
maxStar: 5,
thisStar: 5,
isUp: false,
roles: roles_5
},
{
// 4.5其他
num: 1.6,
maxStar: 5,
thisStar: 4,
isUp: false,
roles: roles_5
},
{
// 4星
num: 18,
maxStar: 4,
thisStar: 4,
isUp: false,
roles: roles_4
},
{
// 3.5星
num: 40,
maxStar: 4,
thisStar: 3,
isUp: false,
roles: roles_4
},
{
// 3星
num: 38,
maxStar: 3,
thisStar: 3,
isUp: false,
roles: roles_3
}
]
},
{
name: "被选中的旅人:亚芬、海茵特",
btn_1: true,
btn_10: true,
step: false,
stepRole: [],
stepCount: [],
roleType: [{
// 5亚芬、海茵特
num: 1,
maxStar: 5,
thisStar: 5,
isUp: true,
roles: roles_hc_5
},
{
// 4.5亚芬、海茵特
num: 1,
maxStar: 5,
thisStar: 4,
isUp: true,
roles: roles_hc_5
},
{
// 5其他
num: 1,
maxStar: 5,
thisStar: 5,
isUp: false,
roles: roles_5
},
{
// 4.5其他
num: 1,
maxStar: 5,
thisStar: 4,
isUp: false,
roles: roles_5
},
{
// 4星
num: 18,
maxStar: 4,
thisStar: 4,
isUp: false,
roles: roles_4
},
{
// 3.5星
num: 40,
maxStar: 4,
thisStar: 3,
isUp: false,
roles: roles_4
},
{
// 3星
num: 38,
maxStar: 3,
thisStar: 3,
isUp: false,
roles: roles_3
}
]
},
{
name: "邂逅的旅人们",
btn_1: true,
btn_10: true,
step: false,
stepRole: [],
stepCount: [],
roleType: [{
// 5其他
num: 2,
maxStar: 5,
thisStar: 5,
isUp: false,
roles: roles_5
},
{
// 4.5其他
num: 2,
maxStar: 5,
thisStar: 4,
isUp: false,
roles: roles_5
},
{
// 4星
num: 18,
maxStar: 4,
thisStar: 4,
isUp: false,
roles: roles_4
},
{
// 3.5星
num: 40,
maxStar: 4,
thisStar: 3,
isUp: false,
roles: roles_4
},
{
// 3星
num: 38,
maxStar: 3,
thisStar: 3,
isUp: false,
roles: roles_3
}
]
},
{
name: "历战的旅人们",
btn_1: true,
btn_10: false,
step: false,
stepRole: [],
stepCount: [],
roleType: [{
// 5其他
num: 100,
maxStar: 5,
thisStar: 5,
isUp: true,
roles: roles_5
}]
}
];
 
var currPool = {};
var poolName = "";
var poolRoleTyels = [];
var numStep = [];


var stepPoolIndex = 0;
var total_num = 0;
 
var up_num = 0;
var arr_result = [];
var up_half_num = 0;
var max_result_level = 3;
var other_num = 0;
var step = 0;
var other_half_num = 0;
 
 
// 截取字符串
var total_num = 0;
function extractContentBetweenStrings(text, start, end) {
var total_diamond_num = 0;
    var pattern = new RegExp(start + '((.*?)(?=' + end + '))', 'gm');
var up_num = 0;
    var matches = text.match(pattern);
var arr_ups = [];
    if (matches) {
var up_half_num = 0;
        return matches[0].replace(start, '');
var other_num = 0;
    }
var other_half_num = 0;
    return null;
 
}
// 截取字符串
function extractContentBetweenStrings(text, start, end) {
function ringMoveIn(count = 1) {
var pattern = new RegExp(start + '((.*?)(?=' + end + '))', 'gm');
var obj_ring = document.getElementById("ring");
var matches = text.match(pattern);
obj_ring.style = "display: block;"
if (matches) {
setTimeout(()=>{
return matches[0].replace(start, '');
getRoles(count);
}
return null;
},3500)
}
}
 
function getRoles(count = 1) {
function getRoles(count = 1) {
for (var i = 0; i < count; i++) {
for (var i = 0; i < count; i++) {
cardResult();
cardResult(i);
}
}
 
console.log("arr_result",arr_result)
 
$("#ring").css("display", "none");
 
 
if (max_result_level == 5) {
$("#ring_2").css("display", "block")
} else if (max_result_level == 4) {
$("#ring_1").css("display", "block")
} else {
$("#ring_0").css("display", "block")
}
 
step = 2;


$("#ring").css("display","none");
}


function cardResult(index) {


if (max_result_level == 5) {
if (stepPoolIndex == 5 && index == 9) {
$("#ring_2").css("display","block")
var arrRolesThis = currPool.stepRole;
} else if (max_result_level == 4) {
var stepRoleTotalNum = 0;
$("#ring_1").css("display","block")
arrRolesThis.forEach(item => {
stepRoleTotalNum = stepRoleTotalNum + item.weight;
})
var random_index = Math.floor(Math.random() * stepRoleTotalNum);
for (var i = 0; i < arrRolesThis.length; i++) {
var objThis = arrRolesThis[i];
if (random_index < objThis.weight) {
var result = JSON.parse(JSON.stringify(objThis));
break;
} else {
} else {
$("#ring_0").css("display","block")
random_index = random_index - objThis.weight;
}
}


step = 2;
}
}
function cardResult() {
// var result = JSON.parse(JSON.stringify(arrRolesThis[random_index]));
result.maxStar = 5;
result.thisStar = 5;
if (max_result_level < 5) {
max_result_level = 5;
}
arr_result.push(result);
if (result.isUp) {
up_num = up_num + 1;
arr_ups.push(result)
} else {
other_num = other_num + 1;
}
} else {
var result_num = Math.floor(Math.random() * 1000) / 10.0;
for (var i = 0; i < numStep.length; i++) {
var thisStep = numStep[i];
if (result_num < thisStep) {
var roleTypeThis = poolRoleTyels[i];
var arrRolesThis = roleTypeThis.roles;
var random_index = Math.floor(Math.random() * arrRolesThis.length);
var result = JSON.parse(JSON.stringify(arrRolesThis[random_index]));
result.maxStar = roleTypeThis.maxStar;
result.thisStar = roleTypeThis.thisStar;
if (max_result_level < roleTypeThis.thisStar) {
max_result_level = roleTypeThis.thisStar;
}
arr_result.push(result);
console.log(result)


var result_num = Math.floor(Math.random() * 1000) / 10.0;
if (roleTypeThis.isUp && result.maxStar == 5 && result.thisStar == 5) {
up_num = up_num + 1;
debugger
arr_ups.push(result)
for(var i = 0;i < numStep.length; i ++) {
} else if (!roleTypeThis.isUp && result.maxStar == 5 && result.thisStar == 5) {
var thisStep = numStep[i];
other_num = other_num + 1;
if(result_num < thisStep) {
} else if (roleTypeThis.isUp && result.maxStar == 5 && result.thisStar == 4) {
var roleTypeThis = poolRoleTyels[i];
up_half_num = up_half_num + 1;
var arrRolesThis = roleTypeThis.roles;
arr_ups.push(result)
var random_index = Math.floor(Math.random() * arrRolesThis.length);
} else if (!roleTypeThis.isUp && result.maxStar == 5 && result.thisStar == 4) {
var result = arrRolesThis[random_index];
other_half_num = other_half_num + 1;
result.maxStar = roleTypeThis.maxStar;
result.maxStar = roleTypeThis.thisStar;
if (max_result_level < roleTypeThis.thisStar) {
max_result_level = roleTypeThis.thisStar;
}
arr_result.push(result);
break
}
}
break
}
}
}
return
}
 
// console.log(result_num)
 
// var result_role = {};
 
// var star_curr_num = 3;
}
// if(result_num < percent_up_50.toFixed(2)) {
// result_role = getRole("up_50");
// } else if(result_num < (percent_up_50 + percent_up_45).toFixed(2)) {
// result_role = getRole("up_45");
// } else if(result_num < (percent_up_50 + percent_up_45 + percent_other_50).toFixed(2)) {
// result_role = getRole("other_50");
// } else if(result_num < (percent_up_50 + percent_up_45 + percent_other_50 + percent_other_45).toFixed(2)) {
// result_role = getRole("other_45");
// } else if(result_num < (percent_up_50 + percent_up_45 + percent_other_50 + percent_other_45 + percent_other_2_50).toFixed(2)) {
// result_role = getRole("other_2_50");
// } else if(result_num < (percent_up_50 + percent_up_45 + percent_other_50 + percent_other_45 + percent_other_2_50 + percent_other_2_45).toFixed(2)) {
// result_role = getRole("other_2_45");
// } else {
// result_role = getRole("40");
// }


// if(max_result_level < result_role.star) {
function clickWindow() {
// max_result_level = result_role.star;
if (step != 2) return;
// }
step = 3;
// arr_result.push(result_role);


var obj_result_area = document.getElementsByClassName("result_area")[0];
}
obj_result_area.style = "display:flex;"
function getRole( str_star = "30") {
console.log('1', arr_ups)
// 正常流程
var thisArr = [];
setTimeout(() => {
var star_num = 3;
 
var half = false;
obj_result_area.style =
if(str_star == "30") {
"display:flex;background-image: url(https://i.17173cdn.com/g8bz6k/octopathsp/5/58/db_ck_bg.png?20240904091141);background-color:transparent;"
thisArr = arr_star_3;
$(".img_ring").each(function() {
star_num = 3;
$(this).css("display", "none")
half = false;
})
} else if(str_star == "35") {
var obj_all_result = document.getElementsByClassName("all_Result")[0];
thisArr = arr_star_4;
if (currPool.name == '邂逅的旅人们') {
star_num = 3;
obj_all_result.innerHTML = "<div>" + "本次抽卡" + total_num + "次,消费" + total_diamond_num + "钻石" +
half = true;
"</div>" +
} else if( str_star == "40") {
"<div>" + "抽到5星角色" + other_num + '次,4.5星角色' + other_half_num + '次' + "</div>";
thisArr = arr_star_4;
} else if (currPool.name == '历战的旅人们') {
star_num = 4;
obj_all_result.innerHTML = "<div></div>"
half = false;
} else {
} else if(str_star == "other_2_45") {
var arrUpRoles = [];
thisArr = arr_star_5_other_2;
var arrUpRolesData = [];
other_half_num ++;
arr_ups.forEach(item => {
star_num = 4;
var name = item.name;
half = true;
var indexThis = arrUpRoles.indexOf(name);
} else if(str_star == "other_2_50") {
if (indexThis >= 0) {
thisArr = arr_star_5_other_2;
arrUpRolesData[indexThis].count++
other_num ++;
} else {
star_num = 5;
arrUpRoles.push(name);
half = false;
arrUpRolesData.push({
} else if(str_star == "other_45") {
name: name,
thisArr = arr_star_5_other;
count: 1
other_half_num ++;
})
star_num = 4;
}
half = true;
})
} else if(str_star == "other_50") {
console.log(arrUpRoles)
thisArr = arr_star_5_other;
console.log(arrUpRolesData)
other_num ++;
var strUps = ""
star_num = 5;
arrUpRolesData.forEach(item => {
half = false;
strUps = strUps + ',' + item.name + ' ' + item.count + '个'
} else if(str_star == "up_45") {
})
thisArr = arr_star_5_up;
if (strUps.length > 0) {
up_half_num ++;
strUps = '抽到 ' + strUps.substring(1);
star_num = 4;
half = true;
} else if(str_star == "up_50") {
thisArr = arr_star_5_up;
up_num ++;
star_num = 5;
half = false;
} else {
} else {
return { name:"",img:"" }
strUps = '暂未抽到当期UP角色';
}
}
obj_all_result.innerHTML = "<div>" + "本次抽卡" + total_num + "次,消费" + total_diamond_num + "钻石" +
"</div>" +
"<div>" + strUps + "</div>" +
// "抽到5星当期UP角色" + up_num + "次,4.5星当期UP角色" + up_half_num + "次</div>" +
"<div>其他5星角色" +
other_num + '次,其他4.5星角色' + other_half_num + '次' + "</div>";
}
showResults();
}, 2500)




var arr_length = thisArr.length;
}
var random_num = Math.floor(Math.random() * arr_length);
 
var result = thisArr[random_num];
function showResults() {
result.star = star_num;
var str_html = "";
result.half = half;
for (var i = 0; i < arr_result.length; i++) {
console.log(str_star)
var objThis = arr_result[i];
console.log(result)
str_html = str_html + "<div class='role_area'>" +
return result;
"<div class='text'>" + objThis.name + "</div>" +
"<div class='text'>";
for (var j = 0; j < objThis.thisStar; j++) {
str_html = str_html + "★"
}
}
function clickWindow() {
if (objThis.maxStar > objThis.thisStar) {
if(step != 2) return;
str_html = str_html + ""
step = 3;
var obj_result_area = document.getElementsByClassName("result_area")[0];
obj_result_area.style = "display:flex;"
// 正常流程
setTimeout(()=>{
obj_result_area.style = "display:flex;background-image: url(https://i.17173cdn.com/g8bz6k/octopathsp/5/58/db_ck_bg.png?20240904091141);background-color:transparent;"
$(".img_ring").each(function(){
$(this).css("display","none")
})
var obj_all_result = document.getElementsByClassName("all_Result")[0];
obj_all_result.innerHTML = "<div>" +  "本次抽卡" + total_num + "次,消费" + total_num * 30 + "钻石" + "</div><div>" + "抽到5星当期UP角色" + up_num + "次,4.5星当期UP角色" + up_half_num + "次</div><div>其他5星角色" + other_num  + '次,其他4.5星角色' + other_half_num + '次' + "</div>";
showResults();
},2500)
}
}
function showResults() {
 
var str_html = "";
 
for (var i = 0; i < arr_result.length; i++) {
var roleData = getRoleDataWithRoleName(objThis.name);
var objThis = arr_result[i];
var img_lh = "https://wiki.17173.com/octopathsp/thumb.php?f=角色立绘-角色编号" + roleData[0] + ".png&width=200x";
str_html = str_html + "<div class='role_area'>"
var img_xs = "https://wiki.17173.com/octopathsp/thumb.php?f=" + roleData[2] + ".png&width=90x";
+ "<div class='text'>" + objThis.name + "</div>"
 
+ "<div class='text'>";
 
for(var j = 0; j < objThis.thisStar ; j ++) {
str_html = str_html + "</div>" + "<img class='img' src='" + img_lh + "'/>" + "<img class='img_xs' src='" +
str_html = str_html + "★"
img_xs + "' />" + "</div>"
}
}
if(objThis.maxStar > objThis.thisStar) {
 
str_html = str_html + "☆"
 
}
$(".result_area").each(function() {
 
$(this).html(str_html).load()
var roleData = getRoleDataWithRoleName(objThis.name);
})
var img_lh = "https://wiki.17173.com/octopathsp/thumb.php?f=角色立绘-角色编号" + roleData[0] + ".png&width=200x";
 
var img_xs = "https://wiki.17173.com/octopathsp/thumb.php?f=" + roleData[2] + ".png&width=100x";
setTimeout(() => {
step = 0;
}, 1000)
str_html = str_html + "</div>" + "<img class='img' src='" + img_lh + "'/>" + "<img class='img_xs' src='" + img_xs + "' />" + "</div>"
}
}
 
function clickStart(count = 1) {
 
$(".result_area").each(function(){
if (step != 0) return
step = 1;
$(this).html(str_html).load()
max_result_level = 3;
})
arr_result = [];
 
setTimeout(()=>{
if (currPool.step) {
step = 0;
if (stepPoolIndex >= currPool.stepCount.length) {
},1000)
stepPoolIndex = 0
}
}
var countThis = currPool.stepCount[stepPoolIndex];
function clickStart( count = 1) {
total_num = total_num + count;
total_diamond_num = total_diamond_num + countThis * 30;
stepPoolIndex = stepPoolIndex + 1;
 
 
} else {
total_num = total_num + count;
total_diamond_num = total_diamond_num + count * 30;
}
 
 
setTimeout(function() {
$("#window_area").css("background-color", "transparent");
}, 1000)


if(step != 0) return
var obj_result_area = document.getElementsByClassName("result_area")[0];
step = 1;
obj_result_area.style = "display:none;background-color:#FFFFFF;"
max_result_level = 3;
obj_result_area.innerHTML = "";
arr_result = [];
total_num = total_num + count;
setTimeout(function(){
$("#window_area").css("background-color","transparent");
},1000)
var obj_result_area = document.getElementsByClassName("result_area")[0];
obj_result_area.style = "display:none;background-color:#FFFFFF;"
obj_result_area.innerHTML = "";


getRoles(count);


getRoles(count);
}
function initPool(index) {
try {
if (pools.length > index) {
currPool = pools[index];
} else {
currPool = pools[0];
}
}
} catch (e) {
if (e.message == 'pools is not defined') {
setTimeout(() => {
initPool(index)
}, 1000)
}
}
poolName = currPool.name;
poolRoleTyels = currPool.roleType;
numStep = [];
stepPoolIndex = 0;
var numCurr = 0;
poolRoleTyels.forEach(item => {
numCurr = numCurr + item.num;
numStep.push(numCurr.toFixed(2))
})
$('#pool_title').html(poolName);
if (currPool.btn_1) {
$('#btn_start_1').css("display", "block")
} else {
$('#btn_start_1').css("display", "none")
}
if (currPool.btn_10) {
$('#btn_start_10').css("display", "block")
} else {
$('#btn_start_10').css("display", "none")
}
}
function initFunc() {


function initFunc() {
$(document).ready(function() {
 
$(document).ready(function() {
var queryString = window.location.search;
console.log("pools->",pools)
var urlParams = new URLSearchParams(queryString);
currPool = pools[0];
var poolIndex = urlParams.get("index") || 0;
poolName = currPool.name;
initPool(poolIndex)
poolRoleTyels = currPool.roleType;
 
numStep = [];
for (var i = 0; i < pools.length; i++) {
var poolThis = pools[i];
var numCurr = 0;
var $button = $('<div>', {
poolRoleTyels.forEach(item => {
class: 'btn_change_pool',
numCurr = numCurr + item.num;
text: poolThis.name,
numStep.push(numCurr.toFixed(2))
"index": i
})
}).on('click', function() {
console.log("numStep",numStep)
var dataIndex = $(this).attr("data-index");
var url = new URL(window.location.href);
$('#btn_start_1').on("click",function() {
url.searchParams.set("index", dataIndex);
console.log('clickStart(1)');
window.location.href = url.href;
clickStart(1)
});
$('#btn_start_2').on("click",()=>{
console.log('clickStart(10)');
clickStart(10)
});
$('#window_area').on("click",()=>{
clickWindow()
});
});
});
$button.attr("data-index", i);
$('.change_pool').append($button);
}


}


initFunc()
 
$('#btn_start_1').on("click", function() {
clickStart(1)
 
});
$('#btn_start_10').on("click", () => {
clickStart(10)
});
$('#window_area').on("click", () => {
clickWindow()
});
});
 
}
 
initFunc()

2024年9月28日 (六) 18:42的版本

var roles_3 = [{
		name: '马努埃尔',
	},
	{
		name: '伊布林',
	},
	{
		name: '哈利',
	},
	{
		name: '霍尔赫',
	},
	{
		name: '萨莉亚',
	},
	{
		name: '佩妮',
	},
	{
		name: '迪艾格',
	},
	{
		name: '费丽妮',
	},
	{
		name: '比利',
	},
	{
		name: '赫塞',
	},
	{
		name: '帕尔',
	},
	{
		name: '特利',
	},
	{
		name: '弗昂',
	},
	{
		name: '卡萝尔',
	},
	{
		name: '科妮',
	},
	{
		name: '古提',
	},
	{
		name: '薇薇安',
	},
	{
		name: '萨妮',
	},
	{
		name: '伍格',
	},
	{
		name: '南娜',
	},
	{
		name: '梅妮',
	},
	{
		name: '弗利欧',
	},
	{
		name: '尤妮丝',
	},
	{
		name: '多利',
	},
];
var roles_4 = [{
		name: '普利基特',
	},
	{
		name: '洛洛',
	},
	{
		name: '雪娜',
	},
	{
		name: '约伦',
	},
	{
		name: '勒凡',
	},
	{
		name: '波拉',
	},
	{
		name: '艾弗伦',
	},
	{
		name: '肯尼斯',
	},
	{
		name: '科尔尼利亚',
	},
	{
		name: '杜兰',
	},
	{
		name: '纳尔',
	},
	{
		name: '梅贝儿',
	},
	{
		name: '伊利斯',
	},
	{
		name: '法维欧',
	},
	{
		name: '莉塔',
	},
	{
		name: '歇尔薇',
	},
	{
		name: '罗迪恩',
	},
	{
		name: '玛德蕾妮',
	},
	{
		name: '诺艾尔',
	},
	{
		name: '塞德里克',
	},
	{
		name: '梅诺',
	},
	{
		name: '巴拉德',
	},
	{
		name: '贝尔加',
	},
	{
		name: '阿孜莱特',
	},
	{
		name: '卡米拉',
	},
	{
		name: '迈尔斯',
	},
	{
		name: '贝尔特朗',
	},
	{
		name: '洁卡莉特',
	},
	{
		name: '塔希尔',
	},
	{
		name: '特里休',
	},
	{
		name: '阿什兰',
	},
	{
		name: '劳拉',
	},
	{
		name: '佩雷迪尔',
	},
	{
		name: '米娜',
	},
	{
		name: '卢塞塔',
	},
	{
		name: '拉莫纳',
	},
	{
		name: '梅蕾特',
	},
	{
		name: '皮雅',
	},
	{
		name: '哈因茨',
	},
	{
		name: '德文',
	},
	{
		name: '克雷斯',
	},
	{
		name: '卡尔茨',
	},
	{
		name: '温格特',
	}
];
var roles_5 = [{
		name: '洁卡莉特Ex'
	},
	{
		name: '亚芬'
	},
	{
		name: '乌·鲁代'
	},
	{
		name: '泰蕾兹'
	},
	{
		name: '莱欧尼尔'
	},
	{
		name: '海茵特'
	},
	{
		name: '普里姆萝洁'
	},
	{
		name: '赛拉斯'
	},
	{
		name: '斯凯亚克罗'
	},
	{
		name: '菲欧儿'
	},
	{
		name: '米罗德'
	},
	{
		name: '薇欧拉'
	},
	{
		name: '莉妮特'
	},
	{
		name: '吉尔德罗伊'
	},
	{
		name: '特欧'
	},
	{
		name: '索菲亚'
	},
	{
		name: '拉斯'
	},
	{
		name: '赛西莉'
	},
	{
		name: '莲见'
	},
	{
		name: '尼兰娜拉'
	},
	{
		name: '欧尔贝克'
	},
	{
		name: '欧菲莉亚'
	},
	{
		name: '希斯柯特'
	},
	{
		name: '哈雷'
	},
];


// 亚芬、海茵特混池
var roles_hc_5 = [{
	name: "亚芬",
	isUp: true,
	weight: 1
}, {
	name: "海茵特",
	isUp: true,
	weight: 1
}];
// 卡杰斯
var role_sg_5 = [{
	name: "卡杰斯",
	isUp: true,
	weight: 1
}]
// 尼尔
var roles_nier_5 = [{
	name: "A2",
	isUp: true,
	weight: 1
}, {
	name: "2B",
	isUp: true,
	weight: 1
}, {
	name: "9S",
	isUp: true,
	weight: 1
}];

var pools = [{
		name: "尼尔机械纪元:A2 2B 9S",
		btn_1: true,
		btn_10: true,
		step: false,
		stepRole: [],
		stepCount: [],
		roleType: [{
				// 5 A2 2B 9S
				num: 1,
				maxStar: 5,
				thisStar: 5,
				isUp: true,
				roles: roles_nier_5
			},
			{
				// 4.5 A2 2B 9S
				num: 1,
				maxStar: 5,
				thisStar: 4,
				isUp: true,
				roles: roles_nier_5
			},
			{
				// 5其他
				num: 1,
				maxStar: 5,
				thisStar: 5,
				isUp: false,
				roles: roles_5
			},
			{
				// 4.5其他
				num: 1,
				maxStar: 5,
				thisStar: 4,
				isUp: false,
				roles: roles_5
			},
			{
				// 4星
				num: 18,
				maxStar: 4,
				thisStar: 4,
				isUp: false,
				roles: roles_4
			},
			{
				// 3.5星
				num: 40,
				maxStar: 4,
				thisStar: 3,
				isUp: false,
				roles: roles_4
			},
			{
				// 3星
				num: 38,
				maxStar: 3,
				thisStar: 3,
				isUp: false,
				roles: roles_3
			}
		]
	},
	{
		name: "尼尔机械纪元(阶梯):A2 2B 9S",
		btn_1: false,
		btn_10: true,
		step: true,
		stepRole: roles_nier_5,
		stepCount: [7, 8, 10, 10, 10],
		roleType: [{
				// 5 A2 2B 9S
				num: 1,
				maxStar: 5,
				thisStar: 5,
				isUp: true,
				roles: roles_nier_5
			},
			{
				// 4.5 A2 2B 9S
				num: 1,
				maxStar: 5,
				thisStar: 4,
				isUp: true,
				roles: roles_nier_5
			},
			{
				// 5其他
				num: 1,
				maxStar: 5,
				thisStar: 5,
				isUp: false,
				roles: roles_5
			},
			{
				// 4.5其他
				num: 1,
				maxStar: 5,
				thisStar: 4,
				isUp: false,
				roles: roles_5
			},
			{
				// 4星
				num: 18,
				maxStar: 4,
				thisStar: 4,
				isUp: false,
				roles: roles_4
			},
			{
				// 3.5星
				num: 40,
				maxStar: 4,
				thisStar: 3,
				isUp: false,
				roles: roles_4
			},
			{
				// 3星
				num: 38,
				maxStar: 3,
				thisStar: 3,
				isUp: false,
				roles: roles_3
			}
		]
	},
	{
		name: "闪光的旅人:卡杰斯",
		btn_1: true,
		btn_10: true,
		step: false,
		stepRole: [],
		stepCount: [],
		roleType: [{
				// 5卡杰斯
				num: 0.8,
				maxStar: 5,
				thisStar: 5,
				isUp: true,
				roles: role_sg_5
			},
			{
				// 4.5亚芬、海茵特
				num: 0.4,
				maxStar: 5,
				thisStar: 4,
				isUp: true,
				roles: role_sg_5
			},
			{
				// 5其他
				num: 1.2,
				maxStar: 5,
				thisStar: 5,
				isUp: false,
				roles: roles_5
			},
			{
				// 4.5其他
				num: 1.6,
				maxStar: 5,
				thisStar: 4,
				isUp: false,
				roles: roles_5
			},
			{
				// 4星
				num: 18,
				maxStar: 4,
				thisStar: 4,
				isUp: false,
				roles: roles_4
			},
			{
				// 3.5星
				num: 40,
				maxStar: 4,
				thisStar: 3,
				isUp: false,
				roles: roles_4
			},
			{
				// 3星
				num: 38,
				maxStar: 3,
				thisStar: 3,
				isUp: false,
				roles: roles_3
			}
		]
	},
	{
		name: "被选中的旅人:亚芬、海茵特",
		btn_1: true,
		btn_10: true,
		step: false,
		stepRole: [],
		stepCount: [],
		roleType: [{
				// 5亚芬、海茵特
				num: 1,
				maxStar: 5,
				thisStar: 5,
				isUp: true,
				roles: roles_hc_5
			},
			{
				// 4.5亚芬、海茵特
				num: 1,
				maxStar: 5,
				thisStar: 4,
				isUp: true,
				roles: roles_hc_5
			},
			{
				// 5其他
				num: 1,
				maxStar: 5,
				thisStar: 5,
				isUp: false,
				roles: roles_5
			},
			{
				// 4.5其他
				num: 1,
				maxStar: 5,
				thisStar: 4,
				isUp: false,
				roles: roles_5
			},
			{
				// 4星
				num: 18,
				maxStar: 4,
				thisStar: 4,
				isUp: false,
				roles: roles_4
			},
			{
				// 3.5星
				num: 40,
				maxStar: 4,
				thisStar: 3,
				isUp: false,
				roles: roles_4
			},
			{
				// 3星
				num: 38,
				maxStar: 3,
				thisStar: 3,
				isUp: false,
				roles: roles_3
			}
		]
	},
	{
		name: "邂逅的旅人们",
		btn_1: true,
		btn_10: true,
		step: false,
		stepRole: [],
		stepCount: [],
		roleType: [{
				// 5其他
				num: 2,
				maxStar: 5,
				thisStar: 5,
				isUp: false,
				roles: roles_5
			},
			{
				// 4.5其他
				num: 2,
				maxStar: 5,
				thisStar: 4,
				isUp: false,
				roles: roles_5
			},
			{
				// 4星
				num: 18,
				maxStar: 4,
				thisStar: 4,
				isUp: false,
				roles: roles_4
			},
			{
				// 3.5星
				num: 40,
				maxStar: 4,
				thisStar: 3,
				isUp: false,
				roles: roles_4
			},
			{
				// 3星
				num: 38,
				maxStar: 3,
				thisStar: 3,
				isUp: false,
				roles: roles_3
			}
		]
	},
	{
		name: "历战的旅人们",
		btn_1: true,
		btn_10: false,
		step: false,
		stepRole: [],
		stepCount: [],
		roleType: [{
			// 5其他
			num: 100,
			maxStar: 5,
			thisStar: 5,
			isUp: true,
			roles: roles_5
		}]
	}
];

var currPool = {};
var poolName = "";
var poolRoleTyels = [];
var numStep = [];

var stepPoolIndex = 0;

var arr_result = [];
var max_result_level = 3;
var step = 0;


var total_num = 0;
var total_diamond_num = 0;
var up_num = 0;
var arr_ups = [];
var up_half_num = 0;
var other_num = 0;
var other_half_num = 0;

// 截取字符串
function extractContentBetweenStrings(text, start, end) {
	var pattern = new RegExp(start + '((.*?)(?=' + end + '))', 'gm');
	var matches = text.match(pattern);
	if (matches) {
		return matches[0].replace(start, '');
	}
	return null;
}

function getRoles(count = 1) {
	for (var i = 0; i < count; i++) {
		cardResult(i);
	}


	$("#ring").css("display", "none");


	if (max_result_level == 5) {
		$("#ring_2").css("display", "block")
	} else if (max_result_level == 4) {
		$("#ring_1").css("display", "block")
	} else {
		$("#ring_0").css("display", "block")
	}

	step = 2;

}

function cardResult(index) {

	if (stepPoolIndex == 5 && index == 9) {
		var arrRolesThis = currPool.stepRole;
		var stepRoleTotalNum = 0;
		arrRolesThis.forEach(item => {
			stepRoleTotalNum = stepRoleTotalNum + item.weight;
		})
		var random_index = Math.floor(Math.random() * stepRoleTotalNum);
		for (var i = 0; i < arrRolesThis.length; i++) {
			var objThis = arrRolesThis[i];
			if (random_index < objThis.weight) {
				var result = JSON.parse(JSON.stringify(objThis));
				break;
			} else {
				random_index = random_index - objThis.weight;
			}

		}
		// var result = JSON.parse(JSON.stringify(arrRolesThis[random_index]));
		result.maxStar = 5;
		result.thisStar = 5;
		if (max_result_level < 5) {
			max_result_level = 5;
		}
		arr_result.push(result);
		if (result.isUp) {
			up_num = up_num + 1;
			arr_ups.push(result)
		} else {
			other_num = other_num + 1;
		}
	} else {
		var result_num = Math.floor(Math.random() * 1000) / 10.0;
		for (var i = 0; i < numStep.length; i++) {
			var thisStep = numStep[i];
			if (result_num < thisStep) {
				var roleTypeThis = poolRoleTyels[i];
				var arrRolesThis = roleTypeThis.roles;
				var random_index = Math.floor(Math.random() * arrRolesThis.length);
				var result = JSON.parse(JSON.stringify(arrRolesThis[random_index]));
				result.maxStar = roleTypeThis.maxStar;
				result.thisStar = roleTypeThis.thisStar;
				if (max_result_level < roleTypeThis.thisStar) {
					max_result_level = roleTypeThis.thisStar;
				}
				arr_result.push(result);
				console.log(result)

				if (roleTypeThis.isUp && result.maxStar == 5 && result.thisStar == 5) {
					up_num = up_num + 1;
					arr_ups.push(result)
				} else if (!roleTypeThis.isUp && result.maxStar == 5 && result.thisStar == 5) {
					other_num = other_num + 1;
				} else if (roleTypeThis.isUp && result.maxStar == 5 && result.thisStar == 4) {
					up_half_num = up_half_num + 1;
					arr_ups.push(result)
				} else if (!roleTypeThis.isUp && result.maxStar == 5 && result.thisStar == 4) {
					other_half_num = other_half_num + 1;
				}

				break

			}
		}
	}



}

function clickWindow() {
	if (step != 2) return;
	step = 3;

	var obj_result_area = document.getElementsByClassName("result_area")[0];
	obj_result_area.style = "display:flex;"
	console.log('1', arr_ups)
	// 正常流程
	setTimeout(() => {

		obj_result_area.style =
			"display:flex;background-image: url(https://i.17173cdn.com/g8bz6k/octopathsp/5/58/db_ck_bg.png?20240904091141);background-color:transparent;"
		$(".img_ring").each(function() {
			$(this).css("display", "none")
		})
		var obj_all_result = document.getElementsByClassName("all_Result")[0];
		if (currPool.name == '邂逅的旅人们') {
			obj_all_result.innerHTML = "<div>" + "本次抽卡" + total_num + "次,消费" + total_diamond_num + "钻石" +
				"</div>" +
				"<div>" + "抽到5星角色" + other_num + '次,4.5星角色' + other_half_num + '次' + "</div>";
		} else if (currPool.name == '历战的旅人们') {
			obj_all_result.innerHTML = "<div></div>"
		} else {
			var arrUpRoles = [];
			var arrUpRolesData = [];
			arr_ups.forEach(item => {
				var name = item.name;
				var indexThis = arrUpRoles.indexOf(name);
				if (indexThis >= 0) {
					arrUpRolesData[indexThis].count++
				} else {
					arrUpRoles.push(name);
					arrUpRolesData.push({
						name: name,
						count: 1
					})
				}
			})
			console.log(arrUpRoles)
			console.log(arrUpRolesData)
			var strUps = ""
			arrUpRolesData.forEach(item => {
				strUps = strUps + ',' + item.name + ' ' + item.count + '个'
			})
			if (strUps.length > 0) {
				strUps = '抽到 ' + strUps.substring(1);
			} else {
				strUps = '暂未抽到当期UP角色';
			}
			obj_all_result.innerHTML = "<div>" + "本次抽卡" + total_num + "次,消费" + total_diamond_num + "钻石" +
				"</div>" +
				"<div>" + strUps + "</div>" +
				// "抽到5星当期UP角色" + up_num + "次,4.5星当期UP角色" + up_half_num + "次</div>" + 
				"<div>其他5星角色" +
				other_num + '次,其他4.5星角色' + other_half_num + '次' + "</div>";
		}
		showResults();
	}, 2500)



}

function showResults() {
	var str_html = "";
	for (var i = 0; i < arr_result.length; i++) {
		var objThis = arr_result[i];
		str_html = str_html + "<div class='role_area'>" +
			"<div class='text'>" + objThis.name + "</div>" +
			"<div class='text'>";
		for (var j = 0; j < objThis.thisStar; j++) {
			str_html = str_html + "★"
		}
		if (objThis.maxStar > objThis.thisStar) {
			str_html = str_html + "☆"
		}


		var roleData = getRoleDataWithRoleName(objThis.name);
		var img_lh = "https://wiki.17173.com/octopathsp/thumb.php?f=角色立绘-角色编号" + roleData[0] + ".png&width=200x";
		var img_xs = "https://wiki.17173.com/octopathsp/thumb.php?f=" + roleData[2] + ".png&width=90x";


		str_html = str_html + "</div>" + "<img class='img' src='" + img_lh + "'/>" + "<img class='img_xs' src='" +
			img_xs + "' />" + "</div>"
	}


	$(".result_area").each(function() {

		$(this).html(str_html).load()
	})

	setTimeout(() => {
		step = 0;
	}, 1000)
}

function clickStart(count = 1) {

	if (step != 0) return
	step = 1;
	max_result_level = 3;
	arr_result = [];

	if (currPool.step) {
		if (stepPoolIndex >= currPool.stepCount.length) {
			stepPoolIndex = 0
		}
		var countThis = currPool.stepCount[stepPoolIndex];
		total_num = total_num + count;
		total_diamond_num = total_diamond_num + countThis * 30;
		stepPoolIndex = stepPoolIndex + 1;


	} else {
		total_num = total_num + count;
		total_diamond_num = total_diamond_num + count * 30;
	}


	setTimeout(function() {
		$("#window_area").css("background-color", "transparent");
	}, 1000)

	var obj_result_area = document.getElementsByClassName("result_area")[0];
	obj_result_area.style = "display:none;background-color:#FFFFFF;"
	obj_result_area.innerHTML = "";


	getRoles(count);

}

function initPool(index) {
	try {
		if (pools.length > index) {
			currPool = pools[index];
		} else {
			currPool = pools[0];
		}
	} catch (e) {
		if (e.message == 'pools is not defined') {
			setTimeout(() => {
				initPool(index)
			}, 1000)
		}
	}

	poolName = currPool.name;
	poolRoleTyels = currPool.roleType;
	numStep = [];
	stepPoolIndex = 0;

	var numCurr = 0;
	poolRoleTyels.forEach(item => {
		numCurr = numCurr + item.num;
		numStep.push(numCurr.toFixed(2))
	})

	$('#pool_title').html(poolName);

	if (currPool.btn_1) {
		$('#btn_start_1').css("display", "block")
	} else {
		$('#btn_start_1').css("display", "none")
	}

	if (currPool.btn_10) {
		$('#btn_start_10').css("display", "block")
	} else {
		$('#btn_start_10').css("display", "none")
	}
}

function initFunc() {

	$(document).ready(function() {

		var queryString = window.location.search;
		var urlParams = new URLSearchParams(queryString);
		var poolIndex = urlParams.get("index") || 0;
		initPool(poolIndex)

		for (var i = 0; i < pools.length; i++) {
			var poolThis = pools[i];
			var $button = $('<div>', {
				class: 'btn_change_pool',
				text: poolThis.name,
				"index": i
			}).on('click', function() {
				var dataIndex = $(this).attr("data-index");
				var url = new URL(window.location.href);
				url.searchParams.set("index", dataIndex);
				window.location.href = url.href;
			});
			$button.attr("data-index", i);
			$('.change_pool').append($button);
		}



		$('#btn_start_1').on("click", function() {
			clickStart(1)

		});
		$('#btn_start_10').on("click", () => {
			clickStart(10)
		});
		$('#window_area').on("click", () => {
			clickWindow()
		});
	});

}

initFunc()