◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
“Widget:EnemyInfo/js”的版本间的差异
(更新) |
|||
(未显示3个用户的21个中间版本) | |||
第6行: | 第6行: | ||
var Enemy_standard_attribute; | var Enemy_standard_attribute; | ||
var Spot; | var Spot; | ||
+ | var Theater_area; | ||
var Mission; | var Mission; | ||
第12行: | 第13行: | ||
var Building; | var Building; | ||
var Team_ai; | var Team_ai; | ||
+ | var Mission_targettrain_enemy; | ||
var Mission_txt; | var Mission_txt; | ||
第18行: | 第20行: | ||
var Building_txt; | var Building_txt; | ||
var Team_ai_txt; | var Team_ai_txt; | ||
+ | var Mission_targettrain_enemy_txt; | ||
+ | |||
var Special_spot_config_txt; | var Special_spot_config_txt; | ||
var xmlhttp_Spot = new XMLHttpRequest(); | var xmlhttp_Spot = new XMLHttpRequest(); | ||
xmlhttp_Spot.onreadystatechange = function() { | xmlhttp_Spot.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { | |
− | + | Spot = JSON.parse(this.responseText); | |
− | + | loadstate ++; } | |
}; | }; | ||
− | xmlhttp_Spot.open("GET", " | + | xmlhttp_Spot.open("GET", "/images/0/06/StcSpot.txt", true); |
xmlhttp_Spot.send(); | xmlhttp_Spot.send(); | ||
var xmlhttp_in_team = new XMLHttpRequest(); | var xmlhttp_in_team = new XMLHttpRequest(); | ||
xmlhttp_in_team.onreadystatechange = function() { | xmlhttp_in_team.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { | |
− | + | Enemy_in_team = JSON.parse(this.responseText); | |
− | + | loadstate ++; } | |
}; | }; | ||
− | xmlhttp_in_team.open("GET", " | + | xmlhttp_in_team.open("GET", "/images/4/48/StcEnemy_in_team.txt", true); |
xmlhttp_in_team.send(); | xmlhttp_in_team.send(); | ||
var xmlhttp_standard_attribute = new XMLHttpRequest(); | var xmlhttp_standard_attribute = new XMLHttpRequest(); | ||
xmlhttp_standard_attribute.onreadystatechange = function() { | xmlhttp_standard_attribute.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { | |
− | + | Enemy_standard_attribute = JSON.parse(this.responseText); | |
− | + | loadstate ++; } | |
}; | }; | ||
− | xmlhttp_standard_attribute.open("GET", " | + | xmlhttp_standard_attribute.open("GET", "/images/1/13/StcEnemy_standard_attribute.txt", true); |
xmlhttp_standard_attribute.send(); | xmlhttp_standard_attribute.send(); | ||
var xmlhttp_team = new XMLHttpRequest(); | var xmlhttp_team = new XMLHttpRequest(); | ||
xmlhttp_team.onreadystatechange = function() { | xmlhttp_team.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { | |
− | + | Enemy_team = JSON.parse(this.responseText); | |
− | + | loadstate ++; } | |
}; | }; | ||
− | xmlhttp_team.open("GET", " | + | xmlhttp_team.open("GET", "/images/c/c8/StcEnemy_team.txt", true); |
xmlhttp_team.send(); | xmlhttp_team.send(); | ||
+ | var xmlhttp_Theater_area = new XMLHttpRequest(); | ||
+ | xmlhttp_Theater_area.onreadystatechange = function() { | ||
+ | if (this.readyState == 4 && this.status == 200) { | ||
+ | Theater_area = JSON.parse(this.responseText); | ||
+ | loadstate ++; } | ||
+ | }; | ||
+ | xmlhttp_Theater_area.open("GET", "/images/8/81/StcTheater_area.txt", true); | ||
+ | xmlhttp_Theater_area.send(); | ||
var xmlhttp_Building = new XMLHttpRequest(); | var xmlhttp_Building = new XMLHttpRequest(); | ||
xmlhttp_Building.onreadystatechange = function() { | xmlhttp_Building.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { | |
− | + | Building = JSON.parse(this.responseText); | |
− | + | loadstate ++; } | |
}; | }; | ||
− | xmlhttp_Building.open("GET", " | + | xmlhttp_Building.open("GET", "/images/6/69/StcBuilding.txt", true); |
xmlhttp_Building.send(); | xmlhttp_Building.send(); | ||
var xmlhttp_Mission = new XMLHttpRequest(); | var xmlhttp_Mission = new XMLHttpRequest(); | ||
xmlhttp_Mission.onreadystatechange = function() { | xmlhttp_Mission.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { | |
− | + | Mission = JSON.parse(this.responseText); | |
− | + | loadstate ++; } | |
}; | }; | ||
− | xmlhttp_Mission.open("GET", " | + | xmlhttp_Mission.open("GET", "/images/4/40/StcMission.txt", true); |
xmlhttp_Mission.send(); | xmlhttp_Mission.send(); | ||
var xmlhttp_charater_type = new XMLHttpRequest(); | var xmlhttp_charater_type = new XMLHttpRequest(); | ||
xmlhttp_charater_type.onreadystatechange = function() { | xmlhttp_charater_type.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { | |
− | + | Enemy_charater_type = JSON.parse(this.responseText); | |
− | + | loadstate ++; } | |
}; | }; | ||
− | xmlhttp_charater_type.open("GET", " | + | xmlhttp_charater_type.open("GET", "/images/6/66/StcEnemy_character_type.txt", true); |
xmlhttp_charater_type.send(); | xmlhttp_charater_type.send(); | ||
var xmlhttp_Ally_team = new XMLHttpRequest(); | var xmlhttp_Ally_team = new XMLHttpRequest(); | ||
xmlhttp_Ally_team.onreadystatechange = function() { | xmlhttp_Ally_team.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { | |
− | + | Ally_team = JSON.parse(this.responseText); | |
− | + | loadstate ++; } | |
}; | }; | ||
− | xmlhttp_Ally_team.open("GET", " | + | xmlhttp_Ally_team.open("GET", "/images/e/e4/StcAlly_team.txt", true); |
xmlhttp_Ally_team.send(); | xmlhttp_Ally_team.send(); | ||
var xmlhttp_Team_ai = new XMLHttpRequest(); | var xmlhttp_Team_ai = new XMLHttpRequest(); | ||
xmlhttp_Team_ai.onreadystatechange = function() { | xmlhttp_Team_ai.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { | |
− | Team_ai = JSON.parse(this.responseText | + | Team_ai = JSON.parse(this.responseText); |
− | + | loadstate ++; } | |
}; | }; | ||
− | xmlhttp_Team_ai.open("GET", " | + | xmlhttp_Team_ai.open("GET", "/images/b/b7/StcTeam_ai.txt", true); |
xmlhttp_Team_ai.send(); | xmlhttp_Team_ai.send(); | ||
+ | |||
+ | var xmlhttp_Mission_targettrain_enemy = new XMLHttpRequest(); | ||
+ | xmlhttp_Mission_targettrain_enemy.onreadystatechange = function() { | ||
+ | if (this.readyState == 4 && this.status == 200) { | ||
+ | Mission_targettrain_enemy = JSON.parse(this.responseText); | ||
+ | loadstate ++; } | ||
+ | }; | ||
+ | xmlhttp_Mission_targettrain_enemy.open("GET", "/images/c/c6/StcMission_targettrain_enemy.txt", true); | ||
+ | xmlhttp_Mission_targettrain_enemy.send(); | ||
第106行: | 第127行: | ||
var xmlhttp_Building_txt = new XMLHttpRequest(); | var xmlhttp_Building_txt = new XMLHttpRequest(); | ||
xmlhttp_Building_txt.onreadystatechange = function() { | xmlhttp_Building_txt.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { Building_txt = this.responseText; loadstate ++; } | |
}; | }; | ||
− | xmlhttp_Building_txt.open("GET", " | + | xmlhttp_Building_txt.open("GET", "/images/8/8f/Building.txt", true); |
xmlhttp_Building_txt.send(); | xmlhttp_Building_txt.send(); | ||
var xmlhttp_Mission_txt = new XMLHttpRequest(); | var xmlhttp_Mission_txt = new XMLHttpRequest(); | ||
xmlhttp_Mission_txt.onreadystatechange = function() { | xmlhttp_Mission_txt.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { Mission_txt = this.responseText; loadstate ++; } | |
}; | }; | ||
− | xmlhttp_Mission_txt.open("GET", " | + | xmlhttp_Mission_txt.open("GET", "/images/c/c7/Mission.txt", true); |
xmlhttp_Mission_txt.send(); | xmlhttp_Mission_txt.send(); | ||
var xmlhttp_Enemy_charater_type_txt = new XMLHttpRequest(); | var xmlhttp_Enemy_charater_type_txt = new XMLHttpRequest(); | ||
xmlhttp_Enemy_charater_type_txt.onreadystatechange = function() { | xmlhttp_Enemy_charater_type_txt.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { Enemy_charater_type_txt = this.responseText; loadstate ++; } | |
}; | }; | ||
− | xmlhttp_Enemy_charater_type_txt.open("GET", " | + | xmlhttp_Enemy_charater_type_txt.open("GET", "/images/4/49/Enemy_character_type.txt", true); |
xmlhttp_Enemy_charater_type_txt.send(); | xmlhttp_Enemy_charater_type_txt.send(); | ||
var xmlhttp_Ally_team_txt = new XMLHttpRequest(); | var xmlhttp_Ally_team_txt = new XMLHttpRequest(); | ||
xmlhttp_Ally_team_txt.onreadystatechange = function() { | xmlhttp_Ally_team_txt.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { Ally_team_txt = this.responseText; loadstate ++; } | |
}; | }; | ||
− | xmlhttp_Ally_team_txt.open("GET", " | + | xmlhttp_Ally_team_txt.open("GET", "/images/0/00/Ally_team.txt", true); |
xmlhttp_Ally_team_txt.send(); | xmlhttp_Ally_team_txt.send(); | ||
var xmlhttp_Team_ai_txt = new XMLHttpRequest(); | var xmlhttp_Team_ai_txt = new XMLHttpRequest(); | ||
xmlhttp_Team_ai_txt.onreadystatechange = function() { | xmlhttp_Team_ai_txt.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { Team_ai_txt = this.responseText; loadstate ++; } | |
}; | }; | ||
− | xmlhttp_Team_ai_txt.open("GET", " | + | xmlhttp_Team_ai_txt.open("GET", "/images/f/f5/Team_ai.txt", true); |
xmlhttp_Team_ai_txt.send(); | xmlhttp_Team_ai_txt.send(); | ||
+ | |||
+ | var xmlhttp_Mission_targettrain_enemy_txt = new XMLHttpRequest(); | ||
+ | xmlhttp_Mission_targettrain_enemy_txt.onreadystatechange = function() { | ||
+ | if (this.readyState == 4 && this.status == 200) { Mission_targettrain_enemy_txt = this.responseText; loadstate ++; } | ||
+ | }; | ||
+ | xmlhttp_Mission_targettrain_enemy_txt.open("GET", "/images/5/59/Mission_targettrain_enemy.txt", true); | ||
+ | xmlhttp_Mission_targettrain_enemy_txt.send(); | ||
var xmlhttp_Special_spot_config_txt = new XMLHttpRequest(); | var xmlhttp_Special_spot_config_txt = new XMLHttpRequest(); | ||
xmlhttp_Special_spot_config_txt.onreadystatechange = function() { | xmlhttp_Special_spot_config_txt.onreadystatechange = function() { | ||
− | + | if (this.readyState == 4 && this.status == 200) { Special_spot_config_txt = this.responseText; loadstate ++; } | |
}; | }; | ||
− | xmlhttp_Special_spot_config_txt.open("GET", " | + | xmlhttp_Special_spot_config_txt.open("GET", "/images/e/ec/Special_spot_config.txt", true); |
xmlhttp_Special_spot_config_txt.send(); | xmlhttp_Special_spot_config_txt.send(); | ||
第156行: | 第184行: | ||
var namepos = Mission_txt.indexOf(Mission[i].name); | var namepos = Mission_txt.indexOf(Mission[i].name); | ||
var namestr = Mission_txt.slice(namepos + Mission[i].name.length + 1, Mission_txt.indexOf("\n", namepos)); | var namestr = Mission_txt.slice(namepos + Mission[i].name.length + 1, Mission_txt.indexOf("\n", namepos)); | ||
− | Mission[i].name = namestr; | + | Mission[i].name = namestr.replace("//n", " "); |
} | } | ||
第176行: | 第204行: | ||
Team_ai[i].name = namestr; | Team_ai[i].name = namestr; | ||
} | } | ||
+ | |||
+ | for(i in Mission_targettrain_enemy){ | ||
+ | var namepos = Mission_targettrain_enemy_txt.indexOf(Mission_targettrain_enemy[i].name); | ||
+ | var namestr = Mission_targettrain_enemy_txt.slice(namepos + Mission_targettrain_enemy[i].name.length + 1, Mission_targettrain_enemy_txt.indexOf("\n", namepos) - 1); | ||
+ | Mission_targettrain_enemy[i].name = namestr; | ||
+ | |||
+ | var despos = Mission_targettrain_enemy_txt.indexOf(Mission_targettrain_enemy[i].des); | ||
+ | var desstr = Mission_targettrain_enemy_txt.slice(despos + Mission_targettrain_enemy[i].des.length + 1, Mission_targettrain_enemy_txt.indexOf("\n", despos) - 1); | ||
+ | Mission_targettrain_enemy[i].des = desstr.replace("//c", ","); | ||
+ | } | ||
+ | |||
} | } | ||
第181行: | 第220行: | ||
loadjudge(); | loadjudge(); | ||
function loadjudge(){ | function loadjudge(){ | ||
− | $("#loadtips").html("文件加载进度:" + loadstate + " / | + | $("#loadtips").html("文件加载进度:" + loadstate + " / 18"); |
− | if(loadstate < | + | if(loadstate < 18) setTimeout(function(){loadjudge();}, 100); |
else { | else { | ||
trans(); | trans(); | ||
第218行: | 第257行: | ||
var eteamspot = []; | var eteamspot = []; | ||
+ | var enemyteaminfo = []; | ||
/*-- 下载 sdownload 重置 sredraw 隐藏 smaphide 图例 sexample | /*-- 下载 sdownload 重置 sredraw 隐藏 smaphide 图例 sexample | ||
− | + | 敌人 smapenemy 建筑 smapbuild 类型 smaptype 颜色 smapcolor 标号 smapspotn 逻辑 smapenemyai | |
− | + | 建筑表格 sbuildtable 传送表格 sporttable 点位标记 sspotsign 同组堆叠 senemypile --*/ | |
− | var setmessage = {sdownload:0, sredraw:0, smaphide:0, sexample:0, smapenemy:1, smapbuild:1, smaptype:1, smapcolor:1, smapspotn:1, smapenemyai:1, sbuildtable:1, sporttable:1, sspotsign:0, senemypile:0}; | + | var setmessage = {sdownload:0, sredraw:0, smaphide:0, sexample:0, smapenemy:1, smapbuild:1, smaptype:1, smapcolor:1, smapspotn:1, smapenemyai:1, sbuildtable:1, sporttable:1, sspotsign:0, senemypile:0, steamconsult:0, sexistspot:0}; |
function missioncreat(){ | function missioncreat(){ | ||
/*-- 战役的选择创建 --*/ | /*-- 战役的选择创建 --*/ | ||
− | var output = `<div style="display:inline-block; padding:6.5px; background:#E0E0E0; color:black; position:relative; top:1px;">战役选择</div> | + | var output = `<div style="display:inline-block; padding:6.5px; background:#E0E0E0; color:black; position:relative; top:1px; cursor:default;">战役选择 ▷<\/div> |
<div class="eselect"><select id="campaignselect" name="campaignselect"> | <div class="eselect"><select id="campaignselect" name="campaignselect"> | ||
− | <option value="1000">[主线] 第零战役</option> | + | <option value="1000">[主线] 第零战役<\/option> |
− | <option value="1001">[主线] 第一战役</option> | + | <option value="1001">[主线] 第一战役<\/option> |
− | <option value="1002">[主线] 第二战役</option> | + | <option value="1002">[主线] 第二战役<\/option> |
− | <option value="1003">[主线] 第三战役</option> | + | <option value="1003">[主线] 第三战役<\/option> |
− | <option value="1004">[主线] 第四战役</option> | + | <option value="1004">[主线] 第四战役<\/option> |
− | <option value="1005">[主线] 第五战役</option> | + | <option value="1005">[主线] 第五战役<\/option> |
− | <option value="1006">[主线] 第六战役</option> | + | <option value="1006">[主线] 第六战役<\/option> |
− | <option value="1007">[主线] 第七战役</option> | + | <option value="1007">[主线] 第七战役<\/option> |
− | <option value="1008">[主线] 第八战役</option> | + | <option value="1008">[主线] 第八战役<\/option> |
− | <option value="1009">[主线] 第九战役</option> | + | <option value="1009">[主线] 第九战役<\/option> |
− | <option value="1010">[主线] 第十战役</option> | + | <option value="1010">[主线] 第十战役<\/option> |
− | <option value="1011">[主线] 第十一战役</option> | + | <option value="1011">[主线] 第十一战役<\/option> |
− | <option value="1012">[主线] 第十二战役</option> | + | <option value="1012">[主线] 第十二战役<\/option> |
− | <option value="1013">[主线] 第十三战役</option> | + | <option value="1013">[主线] 第十三战役<\/option> |
− | <option value="2001">[模拟] 经验特训</option> | + | <option value="2001">[模拟] 经验特训<\/option> |
− | <option value="2002">[模拟] 强化练习</option> | + | <option value="2002">[模拟] 强化练习<\/option> |
− | <option value="2003">[模拟] 资料采样</option> | + | <option value="2003">[模拟] 资料采样<\/option> |
− | <option value="2005">[模拟] 云图回廊</option> | + | <option value="2005">[模拟] 云图回廊<\/option> |
− | <option value="2007">[模拟] 融合演习</option> | + | <option value="2007">[模拟] 融合演习<\/option> |
− | <option value="2008">[模拟] 靶机专训</option> | + | <option value="2008">[模拟] 靶机专训<\/option> |
− | <option value="3001">[主线] 魔方行动</option> | + | <option value="3001">[主线] 魔方行动<\/option> |
− | <option value="3002">[主线] 失温症</option> | + | <option value="3002">[主线] 失温症<\/option> |
− | <option value="3006">[主线] 魔方行动+</option> | + | <option value="3006">[主线] 魔方行动+<\/option> |
− | <option value="3010">[主线] 深层映射</option> | + | <option value="3010">[主线] 深层映射<\/option> |
− | <option value="3016">[主线] 塌缩点</option> | + | <option value="3016">[主线] 塌缩点<\/option>◊ |
− | <option value="3024">[主线] 有序紊流</option> | + | <option value="3024">[主线] 有序紊流<\/option> |
− | <option value="3031">[主线] 异构体</option> | + | <option value="3031">[主线] 异构体<\/option> |
− | <option value="3033">[主线] 裂变链接</option> | + | <option value="3033">[主线] 裂变链接<\/option> |
− | <option value="3036">[主线] 偏振光</option> | + | <option value="3036">[主线] 偏振光<\/option> |
− | <option value="3041">[主线] 双联乱数</option> | + | <option value="3041">[主线] 双联乱数<\/option> |
+ | <option value="3044">[主线] 镜像论<\/option> | ||
+ | <option value="3048">[主线] 熵减焓增<\/option> | ||
+ | <option value="3051">[主线] 静风点<\/option> | ||
− | <option value="4008">[联动] 猎兔行动</option> | + | <option value="4008">[联动] 猎兔行动<\/option> |
− | <option value="4014">[联动] 独法师</option> | + | <option value="4014">[联动] 独法师<\/option> |
− | <option value="4019">[联动] 荣耀日</option> | + | <option value="4019">[联动] 荣耀日<\/option> |
− | <option value="4032">[联动] 瓦尔哈拉</option> | + | <option value="4032">[联动] 瓦尔哈拉<\/option> |
− | <option value="4038">[联动] 梦间剧</option> | + | <option value="4038">[联动] 梦间剧<\/option> |
− | <option value="4043">[联动] 暗金潮</option> | + | <option value="4043">[联动] 暗金潮<\/option> |
+ | <option value="4046">[联动] 小邪神前线<\/option> | ||
− | <option value="5034">[支线] 诡异狂潮</option> | + | <option value="5034">[支线] 诡异狂潮<\/option> |
− | <option value="5035">[支线] 雪夜杀礼异想曲</option> | + | <option value="5035">[支线] 雪夜杀礼异想曲<\/option> |
− | <option value="5037">[支线] 照相馆谜题</option> | + | <option value="5037">[支线] 照相馆谜题<\/option> |
− | <option value="5040">[支线] 碧海秘闻</option> | + | <option value="5040">[支线] 碧海秘闻<\/option> |
− | <option value="5042">[支线] 茧中蝶影</option> | + | <option value="5042">[支线] 茧中蝶影<\/option> |
+ | <option value="5047">[支线] 捩浪人<\/option> | ||
+ | <option value="5049">[支线] 一币之遥<\/option> | ||
− | </select></div> | + | <option value="6004">[战区] 第一版<\/option> |
+ | <option value="6005">[战区] 第二版<\/option> | ||
+ | <option value="6006">[战区] 第三版<\/option> | ||
+ | |||
+ | <\/select><\/div> | ||
<div class="eselect"><select id="missionselect" name="missionselect"> | <div class="eselect"><select id="missionselect" name="missionselect"> | ||
− | <option value="1"> | + | <option value="1">0-1 热身运动<\/option> |
− | <option value="2"> | + | <option value="2">0-2 黑色情报<\/option> |
− | <option value="3"> | + | <option value="3">0-3 守护据点<\/option> |
− | <option value="4"> | + | <option value="4">0-4 最终挑战<\/option> |
− | </select></div> | + | <\/select><\/div> |
− | <div class="eselect" style="width: | + | <div class="eselect" style="width:85px;"><select id="layerselect" name="layerselect" style="display:block;"><\/select><\/div> |
− | <div | + | <div id="packselect" style="inline-block; user-select:none; cursor:default; margin:"><\/div>`; |
$("#campaignchose").html(output); | $("#campaignchose").html(output); | ||
第291行: | 第341行: | ||
$("#missionselect").children().remove(); | $("#missionselect").children().remove(); | ||
var thevalue = Number(this.value); | var thevalue = Number(this.value); | ||
+ | |||
+ | /*-- 标靶 --*/ | ||
+ | if(Number(thevalue) == 2008){ | ||
+ | var logarray = [{name:"定制标靶", filter:"0"}]; | ||
+ | for (i in Mission_targettrain_enemy) { | ||
+ | var sign = 1; | ||
+ | for(j in logarray) if(Mission_targettrain_enemy[i].log_fitter_id == logarray[j].filter) sign = 0; | ||
+ | if(sign) logarray.push({name:Mission_targettrain_enemy[i].name, filter:Mission_targettrain_enemy[i].log_fitter_id}); | ||
+ | } | ||
+ | for(i in logarray){ | ||
+ | var op = document.createElement("OPTION"); | ||
+ | op.value = logarray[i].filter; | ||
+ | op.innerHTML = logarray[i].name; | ||
+ | $("#missionselect").append(op); | ||
+ | } | ||
+ | traindisplay(); | ||
+ | return; | ||
+ | } | ||
+ | |||
+ | else if(Number(thevalue) > 6000 && Number(thevalue) < 7000){ | ||
+ | var area = [0, "灰烬山丘", "雷鸣平原", "地狱玄关", "死亡山谷"]; | ||
+ | var place = [0, "普通", "普通", "要塞", "普通", "普通", "要塞", "普通", "要塞"]; | ||
+ | for(var i = 1; i < 5; i++){ | ||
+ | for(var j = 1; j < 9; j++){ | ||
+ | var op = document.createElement("OPTION"); | ||
+ | op.value = (Number(thevalue) - 6000)*100 + i*10 + j; | ||
+ | op.innerHTML = area[i] + " " + j + " " + place[j]; | ||
+ | $("#missionselect").append(op); | ||
+ | } | ||
+ | } | ||
+ | theaterdisplay(); | ||
+ | return; | ||
+ | } | ||
/*-- 主线关卡 --*/ | /*-- 主线关卡 --*/ | ||
− | if(Number(thevalue) >= 1000 && Number(thevalue) < 2000){ | + | else if(Number(thevalue) >= 1000 && Number(thevalue) < 2000){ |
for (i in Mission) { | for (i in Mission) { | ||
if ((Mission[i].campaign == thevalue - 1000) && (Mission[i].if_emergency != 2)) { | if ((Mission[i].campaign == thevalue - 1000) && (Mission[i].if_emergency != 2)) { | ||
var op = document.createElement("OPTION"); | var op = document.createElement("OPTION"); | ||
op.value = Number(Mission[i].id); | op.value = Number(Mission[i].id); | ||
− | op.innerHTML = | + | op.innerHTML = String(thevalue - 1000) + "-" + Mission[i].sub; |
− | op.innerHTML += (Mission[i].if_emergency == 1) ? "E | + | op.innerHTML += (Mission[i].if_emergency == 1) ? "E " : (Mission[i].if_emergency == 3) ? "N " : " "; |
op.innerHTML += Mission[i].name; | op.innerHTML += Mission[i].name; | ||
$("#missionselect").append(op); | $("#missionselect").append(op); | ||
第311行: | 第394行: | ||
if ((Mission[i].duplicate_type == thevalue - 2000) && (Mission[i].if_emergency == 2)) { | if ((Mission[i].duplicate_type == thevalue - 2000) && (Mission[i].if_emergency == 2)) { | ||
var op = document.createElement("OPTION"); | var op = document.createElement("OPTION"); | ||
− | op.value = | + | op.value = Number(Mission[i].id); |
− | op.innerHTML = Mission[i].sub | + | op.innerHTML = Mission[i].sub + Mission[i].name; |
$("#missionselect").append(op); | $("#missionselect").append(op); | ||
} | } | ||
第318行: | 第401行: | ||
} | } | ||
− | + | /*-- 有多个章节的活动 --*/ | |
else if(Number(thevalue) > 3000 && Number(thevalue) < 5000){ | else if(Number(thevalue) > 3000 && Number(thevalue) < 5000){ | ||
for (i in Mission) { | for (i in Mission) { | ||
第330行: | 第413行: | ||
else if(thevalue == 3010 && camp != -10 && camp != -11 && camp != -12 && camp != -13 && camp != -29) continue; | else if(thevalue == 3010 && camp != -10 && camp != -11 && camp != -12 && camp != -13 && camp != -29) continue; | ||
else if(thevalue == 3016 && camp != -16 && camp != -17 && camp != -18 && camp != -39) continue; | else if(thevalue == 3016 && camp != -16 && camp != -17 && camp != -18 && camp != -39) continue; | ||
− | else if(thevalue == 3024 && camp != -24 && camp != -25 && camp != -26 && camp != -27 && camp != -28) continue; | + | else if(thevalue == 3024 && camp != -24 && camp != -25 && camp != -26 && camp != -27 && camp != -28 && camp != -45) continue; |
else if(thevalue == 3031 && camp != -31) continue; | else if(thevalue == 3031 && camp != -31) continue; | ||
else if(thevalue == 3033 && camp != -33) continue; | else if(thevalue == 3033 && camp != -33) continue; | ||
else if(thevalue == 3036 && camp != -36) continue; | else if(thevalue == 3036 && camp != -36) continue; | ||
else if(thevalue == 3041 && camp != -41) continue; | else if(thevalue == 3041 && camp != -41) continue; | ||
+ | else if(thevalue == 3044 && camp != -44) continue; | ||
+ | else if(thevalue == 3048 && camp != -48) continue; | ||
/*-- 联动活动 --*/ | /*-- 联动活动 --*/ | ||
else if(thevalue == 4008 && camp != -8 && camp != -30) continue; | else if(thevalue == 4008 && camp != -8 && camp != -30) continue; | ||
第342行: | 第427行: | ||
else if(thevalue == 4038 && camp != -38) continue; | else if(thevalue == 4038 && camp != -38) continue; | ||
else if(thevalue == 4043 && camp != -43) continue; | else if(thevalue == 4043 && camp != -43) continue; | ||
+ | else if(thevalue == 4046 && camp != -46) continue; | ||
var op = document.createElement("OPTION"); | var op = document.createElement("OPTION"); | ||
第348行: | 第434行: | ||
if(Number(thevalue) < 4000 && ((- Number(camp) - (thevalue - 3000 - 1)) > 6)) op.innerHTML = ""; | if(Number(thevalue) < 4000 && ((- Number(camp) - (thevalue - 3000 - 1)) > 6)) op.innerHTML = ""; | ||
else if(Number(thevalue) > 4000 && ((- Number(camp) - (thevalue - 4000 - 1)) > 6)) op.innerHTML = "复刻 " + Mission[i].sub + " "; | else if(Number(thevalue) > 4000 && ((- Number(camp) - (thevalue - 4000 - 1)) > 6)) op.innerHTML = "复刻 " + Mission[i].sub + " "; | ||
− | else op.innerHTML = | + | else op.innerHTML = String(- Number(camp) - (thevalue - ((thevalue > 4000) ? 4000 : 3000) - 1)) + "-" + Mission[i].sub + " "; |
/*-- 秃洞的识别 无尽模式 --*/ | /*-- 秃洞的识别 无尽模式 --*/ | ||
if (Mission[i].endless_mode == 1 || Mission[i].endless_mode == 2) op.innerHTML += "[无尽模式] "; | if (Mission[i].endless_mode == 1 || Mission[i].endless_mode == 2) op.innerHTML += "[无尽模式] "; | ||
第357行: | 第443行: | ||
/*-- 支线活动 --*/ | /*-- 支线活动 --*/ | ||
− | if(Number(thevalue) > 5000 && Number(thevalue) < 6000){ | + | else if(Number(thevalue) > 5000 && Number(thevalue) < 6000){ |
for (i in Mission) { | for (i in Mission) { | ||
/*-- 去除剧情关卡 --*/ | /*-- 去除剧情关卡 --*/ | ||
第363行: | 第449行: | ||
if ((Mission[i].campaign == - (thevalue - 5000)) && (Mission[i].if_emergency != 2)) { | if ((Mission[i].campaign == - (thevalue - 5000)) && (Mission[i].if_emergency != 2)) { | ||
var op = document.createElement("OPTION"); | var op = document.createElement("OPTION"); | ||
− | op.value = | + | op.value = Number(Mission[i].id); |
− | op.innerHTML = Mission[i].sub | + | op.innerHTML = Mission[i].sub + Mission[i].name; |
$("#missionselect").append(op); | $("#missionselect").append(op); | ||
} | } | ||
第380行: | 第466行: | ||
/*-- 地图的显示 --*/ | /*-- 地图的显示 --*/ | ||
$("#missionselect").change(function(){ | $("#missionselect").change(function(){ | ||
+ | if($("#campaignselect").val() == 2008){ traindisplay(); return;} | ||
+ | else if($("#campaignselect").val() >= 6000 && $("#campaignselect").val() < 7000){ theaterdisplay(); return;} | ||
+ | |||
mspot = []; | mspot = []; | ||
for(i in Spot) if(Spot[i].mission_id == $("#missionselect").val()) mspot.push(Spot[i]); | for(i in Spot) if(Spot[i].mission_id == $("#missionselect").val()) mspot.push(Spot[i]); | ||
第392行: | 第481行: | ||
for(i in mspot) if(mspot[i].map_num == $("#layerselect").val()) lspot.push(mspot[i]); | for(i in mspot) if(mspot[i].map_num == $("#layerselect").val()) lspot.push(mspot[i]); | ||
dspotcreat(); | dspotcreat(); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
missiondisplay(); | missiondisplay(); | ||
}); | }); | ||
/*-- 绘制地图画布 --*/ | /*-- 绘制地图画布 --*/ | ||
− | var drawingoutput = `<canvas id="missiondrawing" width="1200px" height="675px" style="cursor:crosshair;">Your browser does not support the HTML5 canvas tag.</canvas>`; | + | var drawingoutput = `<canvas id="missiondrawing" width="1200px" height="675px" style="cursor:crosshair;">Your browser does not support the HTML5 canvas tag.<\/canvas>`; |
$("#missionmap").html(drawingoutput); | $("#missionmap").html(drawingoutput); | ||
第428行: | 第509行: | ||
/*-- canvas内鼠标缩放功能 --*/ | /*-- canvas内鼠标缩放功能 --*/ | ||
− | missiondraw.onmousewheel = $("#missionmap").onwheel = function (event) { | + | missiondraw.onmousewheel = $("#missionmap")[0].onwheel = function (event) { |
+ | event.preventDefault(); | ||
var pos = windowToCanvas(event.clientX, event.clientY); | var pos = windowToCanvas(event.clientX, event.clientY); | ||
var newPos = {x:((pos.x - xmove)/scale).toFixed(2) , y:((pos.y - ymove)/scale).toFixed(2)}; | var newPos = {x:((pos.x - xmove)/scale).toFixed(2) , y:((pos.y - ymove)/scale).toFixed(2)}; | ||
第455行: | 第537行: | ||
/*-- 优化排版设置 自动隐藏 --*/ | /*-- 优化排版设置 自动隐藏 --*/ | ||
− | if(layernum.length <= 1){ $("#layerselect"). | + | if(layernum.length <= 1){ $("#layerselect").parent().css("display","none");} |
− | else { $("#layerselect"). | + | else { $("#layerselect").parent().css("display","inline-block");} |
$("#layerselect").children().remove(); | $("#layerselect").children().remove(); | ||
第485行: | 第567行: | ||
} | } | ||
− | + | /*-- 优化排版设置 自动隐藏 --*/ | |
− | /*-- | + | if(packagenum.length <= 1){ $("#packselect").css("display","none");} |
− | + | else { $("#packselect").css("display","inline-block");} | |
− | |||
− | |||
− | $("#packselect"). | ||
− | /*-- | + | /*-- 区域选择的创建 --*/ |
+ | var output = `<div style="display:inline-block; padding:6.5px; background:#E0E0E0; color:black; position:relative; top:1px; cursor:auto;">区域选择 ▷<\/div> | ||
+ | <div id="packall" class="packcheck" style="display:inline-block; padding:5.5px; background:black; color:#E0E0E0; position:relative; top:1px; cursor:pointer; border:1px #e0e0e0 solid;">全选<\/div> | ||
+ | <div id="packclear" class="packcheck" style="display:inline-block; padding:5.5px; background:black; color:#E0E0E0; position:relative; top:1px; cursor:pointer; border:1px #e0e0e0 solid;">清空<\/div>`; | ||
for(var i = 0; i < packagenum.length; i++){ | for(var i = 0; i < packagenum.length; i++){ | ||
− | + | output += `<input class="packcheck" type="checkbox" id="package_` + packagenum[i] + `" value="` + packagenum[i] + `" checked="checked" /><label for="package_` + packagenum[i] + `">` + packagenum[i] + `<\/label>`; | |
− | |||
− | |||
− | |||
} | } | ||
+ | $("#packselect").html(output); | ||
+ | |||
+ | /*-- 区域选择事件 --*/ | ||
+ | $(".packcheck").click(function(){ | ||
+ | if($(this).attr("id") == "packall") $("#packselect").children("input").each(function(){ $(this).parent().children("input[type=checkbox]").prop("checked","checked"); }); | ||
+ | if($(this).attr("id") == "packclear") $("#packselect").children("input").each(function(){ $(this).parent().children("input[type=checkbox]").removeAttr("checked"); }); | ||
+ | |||
+ | var packnum = []; | ||
+ | $("#packselect").children("input:checked").each(function(){ packnum.push(this.value); }); | ||
+ | |||
+ | dspot = []; | ||
+ | for(i in lspot){ | ||
+ | var sign = 0; | ||
+ | for(j in packnum) if(lspot[i].package == packnum[j]){ sign = 1; break;} | ||
+ | if(sign) dspot.push(lspot[i]); | ||
+ | } | ||
+ | |||
+ | missiondisplay(); | ||
+ | }); | ||
} | } | ||
第559行: | 第657行: | ||
thisline += Building[buildnum].defender + `<\/td><td width="140px">`; | thisline += Building[buildnum].defender + `<\/td><td width="140px">`; | ||
thisline += Building[buildnum].is_destroy.replace("0", "不可破坏").replace("1", "重装打击").replace("2", "踩点破坏") + `<\/td><td width="60px">`; | thisline += Building[buildnum].is_destroy.replace("0", "不可破坏").replace("1", "重装打击").replace("2", "踩点破坏") + `<\/td><td width="60px">`; | ||
− | thisline += Building[buildnum].initial_state.replace("0", "开启").replace("-1", "关闭") + `<\/td><td width="80px">`; | + | thisline += String(Building[buildnum].initial_state).replace("0", "开启").replace("-1", "关闭") + `<\/td><td width="80px">`; |
thisline += Building[buildnum].battle_assist_range + `<\/td><td width="544px">`; | thisline += Building[buildnum].battle_assist_range + `<\/td><td width="544px">`; | ||
thisline += ((buildsigndes) ? buildsigndes : "其他") + "<\/td><\/tr>"; | thisline += ((buildsigndes) ? buildsigndes : "其他") + "<\/td><\/tr>"; | ||
第580行: | 第678行: | ||
$(".buildingline").click(function(){ | $(".buildingline").click(function(){ | ||
if(setmessage.sspotsign == 0) $("#sspotsign").click(); | if(setmessage.sspotsign == 0) $("#sspotsign").click(); | ||
− | $("# | + | $("#spotsign1").val(Number($($(this).children("td")[0]).html())); |
drawmap(); | drawmap(); | ||
}); | }); | ||
第638行: | 第736行: | ||
thisline += nextpack + `<\/td><td width="100px">`; | thisline += nextpack + `<\/td><td width="100px">`; | ||
thisline += nextid + `<\/td><td width="100px">TO<\/td><td width="100px">`; | thisline += nextid + `<\/td><td width="100px">TO<\/td><td width="100px">`; | ||
− | + | ||
thisline += "地图 " + mspot[i].map_num + `<\/td><td width="100px">`; | thisline += "地图 " + mspot[i].map_num + `<\/td><td width="100px">`; | ||
thisline += mspot[i].package + `<\/td><td width="100px">`; | thisline += mspot[i].package + `<\/td><td width="100px">`; | ||
thisline += mspot[i].id + `<\/td><td width="500px"><\/td><\/tr>`; | thisline += mspot[i].id + `<\/td><td width="500px"><\/td><\/tr>`; | ||
− | + | ||
var existsign = 0; | var existsign = 0; | ||
for(j in telespot) if(nextid == telespot[j].a && Number(mspot[i].id) == telespot[j].b){ existsign = 1; break;} | for(j in telespot) if(nextid == telespot[j].a && Number(mspot[i].id) == telespot[j].b){ existsign = 1; break;} | ||
第664行: | 第762行: | ||
$(".teleportline").click(function(){ | $(".teleportline").click(function(){ | ||
if(setmessage.sspotsign == 0) $("#sspotsign").click(); | if(setmessage.sspotsign == 0) $("#sspotsign").click(); | ||
− | $("# | + | $("#spotsign2").val(Number($($(this).children("td")[2]).html())); |
− | $("# | + | $("#spotsign3").val(Number($($(this).children("td")[6]).html())); |
drawmap(); | drawmap(); | ||
}); | }); | ||
第683行: | 第781行: | ||
var output = `<table id="Missiontable" class="enemydata" style="text-align:center; border:1px #f4c430cc solid; background-color:#111111; margin:4px 0px 14px 0px;" cellspacing="1"> | var output = `<table id="Missiontable" class="enemydata" style="text-align:center; border:1px #f4c430cc solid; background-color:#111111; margin:4px 0px 14px 0px;" cellspacing="1"> | ||
<thead style="display:block; background-color:#f4c430; color:black;"><tr> | <thead style="display:block; background-color:#f4c430; color:black;"><tr> | ||
− | <th style="width:100px;">编号</th> | + | <th style="width:100px;">编号<\/th> |
− | <th style="width:160px;">队长</th> | + | <th style="width:160px;">队长<\/th> |
− | <th style="width:100px;">敌人/中立</th> | + | <th style="width:100px;">敌人/中立<\/th> |
− | <th style="width:80px;">AI</th> | + | <th style="width:80px;">AI<\/th> |
− | <th style="width:100px;">效能</th> | + | <th style="width:100px;">效能<\/th> |
− | <th style="width:490px;">组成</th> | + | <th style="width:490px;">组成<\/th> |
− | <th class="cellacap" style="width:120px; display:table-cell;">站位</th> | + | <th class="cellacap" style="width:120px; display:table-cell;">站位<\/th> |
− | <th class="cellbcap" style="width:120px; display:none;">数量</th> | + | <th class="cellbcap" style="width:120px; display:none;">数量<\/th> |
− | <th style="width:50px;">其它</th> | + | <th style="width:50px;">其它<\/th> |
− | </tr></thead><tbody id="Missionbody" style="height:300px; overflow-y:scroll; display:block;">`; | + | <\/tr><\/thead><tbody id="Missionbody" style="height:300px; overflow-y:scroll; display:block;">`; |
/*-- 路径点的敌人站位 --*/ | /*-- 路径点的敌人站位 --*/ | ||
第734行: | 第832行: | ||
leader_name = Enemy_charater_type[j]["name"]; | leader_name = Enemy_charater_type[j]["name"]; | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | /*-- enemyai 敌方行动逻辑 --*/ | |
− | + | var enemy_ai; | |
− | + | if(enemy_ai_num == 0) for(j in Mission) if(Mission[j].id == $("#missionselect").val()) {enemy_ai_num = Mission[j].enemy_ai_type; break;} | |
− | + | for(j in Team_ai) if(enemy_ai_num == Team_ai[j].ai_type) {enemy_ai = Team_ai[j].name; break;} | |
− | + | /*-- 利用数组存储效能数据以优化计算 --*/ | |
− | + | spotinfo.push({sename:leader_name, sally:((ally_name) ? ally_name : 0), sefect:((efect == 0) ? efectcal(enemy_team_id) : efect), seai:enemy_ai, sbuild:0}); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | /*-- 利用数组存储效能数据以优化计算 --*/ | ||
− | spotinfo.push({sename:leader_name, sally:((ally_name) ? ally_name : 0), sefect:efect, seai:enemy_ai, sbuild:0}); | ||
eteamspot.push(enemy_team_id); | eteamspot.push(enemy_team_id); | ||
第803行: | 第849行: | ||
thisline += ((ally_name) ? ally_name : "敌人") + `<\/td><td width="80px">`; | thisline += ((ally_name) ? ally_name : "敌人") + `<\/td><td width="80px">`; | ||
thisline += aioutput + `<\/td><td width="100px">`; | thisline += aioutput + `<\/td><td width="100px">`; | ||
− | thisline += efect + `<\/td><td width="490px">`; | + | thisline += ((efect == 0) ? efectcal(enemy_team_id) : efect) + `<\/td><td width="490px">`; |
− | thisline += | + | thisline += enemyoutcal(enemy_team_id) + `<\/td><td class="cella" width="120px" style="display:table-cell;">`; |
thisline += Number(dspot[i]["id"]) + `<\/td><td class="cellb" width="120px" style="display:none;">`; | thisline += Number(dspot[i]["id"]) + `<\/td><td class="cellb" width="120px" style="display:none;">`; | ||
thisline += "team_num" + `<\/td><td width="34px">`; | thisline += "team_num" + `<\/td><td width="34px">`; | ||
第823行: | 第869行: | ||
$(this).css({"background-color":"#f4c430cc", "color":"black"}); | $(this).css({"background-color":"#f4c430cc", "color":"black"}); | ||
enemydisplay($(this).children("td").eq(0).html()); | enemydisplay($(this).children("td").eq(0).html()); | ||
− | if(setmessage.sspotsign == 1) $("# | + | if(setmessage.sspotsign == 1) $("#spotsign1").val(Number($($(this).children("td")[6]).html())); |
if($($(this).children("td")[3]).html() == "巡逻"){ | if($($(this).children("td")[3]).html() == "巡逻"){ | ||
− | for(i in Enemy_team) if(Enemy_team[i].id == $($(this).children("td")[0]).html()) theaicontent = Enemy_team[i].ai_content; | + | for(i in Enemy_team) if(Enemy_team[i].id == $($(this).children("td")[0]).html()) theaicontent = "巡逻" + Enemy_team[i].ai_content; |
− | } | + | } else if($($(this).children("td")[3]).html().indexOf("警戒") != -1){ |
− | else theaicontent = 0; | + | for(i in Enemy_team) if(Enemy_team[i].id == $($(this).children("td")[0]).html()) theaicontent = "警戒" + Enemy_team[i].ai_content; |
+ | } else theaicontent = 0; | ||
drawmap(); | drawmap(); | ||
}); | }); | ||
第860行: | 第907行: | ||
/*-- mapcanvas的预设参数 --*/ | /*-- mapcanvas的预设参数 --*/ | ||
− | var x_min = Number( | + | var x_min = Number(lspot[0].coordinator_x); |
− | var x_max = Number( | + | var x_max = Number(lspot[0].coordinator_x); |
− | var y_min = Number( | + | var y_min = Number(lspot[0].coordinator_y); |
− | var y_max = Number( | + | var y_max = Number(lspot[0].coordinator_y); |
− | for(i in | + | for(i in lspot){ |
− | if(Number( | + | if(Number(lspot[i].coordinator_x) > x_max) x_max = Number(lspot[i].coordinator_x); |
− | if(Number( | + | if(Number(lspot[i].coordinator_x) < x_min) x_min = Number(lspot[i].coordinator_x); |
− | if(Number( | + | if(Number(lspot[i].coordinator_y) > y_max) y_max = Number(lspot[i].coordinator_y); |
− | if(Number( | + | if(Number(lspot[i].coordinator_y) < y_min) y_min = Number(lspot[i].coordinator_y); |
} | } | ||
var x_radio = (x_max - x_min + 200)/(mapwidth - mapwidth / 12); | var x_radio = (x_max - x_min + 200)/(mapwidth - mapwidth / 12); | ||
第874行: | 第921行: | ||
coparameter = (x_radio > y_radio) ? x_radio : y_radio; | coparameter = (x_radio > y_radio) ? x_radio : y_radio; | ||
− | + | /*-- 路径点的绘制 --*/ | |
− | + | var singlespot = []; | |
− | + | con.lineWidth = String(30 / coparameter); | |
− | + | con.strokeStyle = "#cecece"; | |
− | + | for(i in dspot){ | |
− | + | /*-- 路径点的连接 --*/ | |
− | + | var routestr = dspot[i].map_route; | |
− | + | while(routestr){ | |
− | + | var i2n = Number(routestr.slice(0, (routestr.indexOf(",") == -1) ? (routestr.length) : routestr.indexOf(","))); | |
− | + | var i2 = -1; | |
− | + | ||
− | + | for(k in dspot){ if(dspot[k].id == i2n){ i2 = k; break;}} | |
+ | if(dspot[i].route.indexOf(i2n) == -1){ singlespot.push({a1:i, a2:i2}); break;} | ||
+ | if(i2 == -1) break; | ||
− | + | /*-- 两个路径点的原始坐标 --*/ | |
− | + | var x1 = Number(dspot[i].coordinator_x); | |
− | + | var x2 = Number(dspot[i2].coordinator_x); | |
− | + | var y1 = Number(dspot[i].coordinator_y); | |
− | + | var y2 = Number(dspot[i2].coordinator_y); | |
− | + | /*-- 双向路径的绘制 --*/ | |
− | + | con.lineWidth = String(coorchange(3, 30)); | |
− | + | con.beginPath(); | |
− | + | con.moveTo(coorchange(1, x1, x_min), coorchange(2, y1, y_min)); | |
− | + | con.lineTo(coorchange(1, x2, x_min), coorchange(2, y2, y_min)); | |
− | + | con.stroke(); | |
− | + | ||
− | + | routestr = (routestr.indexOf(",", j) == -1) ? "" : routestr.slice(routestr.indexOf(",", j) + 1, routestr.length); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
+ | } | ||
+ | |||
+ | for(i in singlespot){ | ||
+ | var x1 = Number(dspot[singlespot[i].a1].coordinator_x); | ||
+ | var x2 = Number(dspot[singlespot[i].a2].coordinator_x); | ||
+ | var y1 = Number(dspot[singlespot[i].a1].coordinator_y); | ||
+ | var y2 = Number(dspot[singlespot[i].a2].coordinator_y); | ||
+ | |||
+ | con.lineWidth = String(coorchange(3, 32)); | ||
+ | con.strokeStyle = "#111111"; | ||
+ | con.beginPath(); | ||
+ | con.moveTo(coorchange(1, x1, x_min), coorchange(2, y1, y_min)); | ||
+ | con.lineTo(coorchange(1, (x1 + x2)/2, x_min), coorchange(2, (y1 + y2)/2, y_min)); | ||
+ | con.stroke(); | ||
+ | con.lineWidth = String(coorchange(3, 10)); | ||
+ | con.strokeStyle = "#cecece"; | ||
+ | con.beginPath(); | ||
+ | con.moveTo(coorchange(1, x1, x_min), coorchange(2, y1, y_min)); | ||
+ | con.lineTo(coorchange(1, (x1 + x2)/2, x_min), coorchange(2, (y1 + y2)/2, y_min)); | ||
+ | con.stroke(); | ||
+ | } | ||
+ | |||
for(i in dspot){ | for(i in dspot){ | ||
第935行: | 第991行: | ||
/*-- 特殊标点 12ff00 d800ff 00ffea ccff00 --*/ | /*-- 特殊标点 12ff00 d800ff 00ffea ccff00 --*/ | ||
if(setmessage.sspotsign == 1){ | if(setmessage.sspotsign == 1){ | ||
− | if($("# | + | if($("#spotsign1").val() && dspot[i].id == $("#spotsign1").val()) spotcolor = "#12ff00"; |
− | else if($("# | + | else if($("#spotsign2").val() && dspot[i].id == $("#spotsign2").val()) spotcolor = "#d800ff"; |
− | else if($("# | + | else if($("#spotsign3").val() && dspot[i].id == $("#spotsign3").val()) spotcolor = "#00ffea"; |
− | else if($("# | + | else if($("#spotsign4").val() && dspot[i].id == $("#spotsign4").val()) spotcolor = "#ccff00"; |
} | } | ||
con.fillStyle = spotcolor; | con.fillStyle = spotcolor; | ||
/*-- 特殊标点 的特殊显示 --*/ | /*-- 特殊标点 的特殊显示 --*/ | ||
− | if(setmessage.sspotsign == 1 && (dspot[i].id == $("# | + | if(setmessage.sspotsign == 1 && (dspot[i].id == $("#spotsign1").val() || dspot[i].id == $("#spotsign2").val() || dspot[i].id == $("#spotsign3").val() || dspot[i].id == $("#spotsign4").val())){ |
con.beginPath(); | con.beginPath(); | ||
con.rect(coorchange(1, Number(dspot[i].coordinator_x), x_min) - coorchange(3, 140), coorchange(2, Number(dspot[i].coordinator_y), y_min) - coorchange(3, 15), coorchange(3, 280), coorchange(3, 30)); | con.rect(coorchange(1, Number(dspot[i].coordinator_x), x_min) - coorchange(3, 140), coorchange(2, Number(dspot[i].coordinator_y), y_min) - coorchange(3, 15), coorchange(3, 280), coorchange(3, 30)); | ||
第1,024行: | 第1,080行: | ||
/*-- 巡逻路径 --*/ | /*-- 巡逻路径 --*/ | ||
− | if(setmessage.sspotsign == 1 && setmessage.smapenemyai == 1 && theaicontent != 0){ | + | if(setmessage.sspotsign == 1 && setmessage.smapenemyai == 1 && theaicontent != 0 && theaicontent.indexOf("巡逻") != -1){ |
− | var content_copy = theaicontent; | + | var content_copy = theaicontent.slice(2,theaicontent.length); |
for(var j = 1; content_copy; j++){ | for(var j = 1; content_copy; j++){ | ||
var thisspotid; | var thisspotid; | ||
第1,035行: | 第1,091行: | ||
thisspotid = content_copy.slice(0, content_copy.length); | thisspotid = content_copy.slice(0, content_copy.length); | ||
content_copy = ""; | content_copy = ""; | ||
− | if((thisspotid == theaicontent.slice( | + | if((thisspotid == theaicontent.slice(2, theaicontent.indexOf(",")))) break; |
} | } | ||
第1,060行: | 第1,116行: | ||
} | } | ||
} | } | ||
− | |||
− | /*-- | + | /*-- 警戒范围 --*/ |
− | + | if(setmessage.sspotsign == 1 && setmessage.smapenemyai == 1 && theaicontent != 0 && theaicontent.indexOf("警戒") != -1){ | |
− | if( | + | var spotid = $("#spotsign1").val(); |
− | + | var rangearray = []; | |
− | + | for(i in dspot) if(dspot[i].id == spotid){ rangearray.push({id:spotid, num:i, range:0}); break;} | |
− | |||
− | |||
− | |||
− | |||
− | } | ||
− | + | var rangenum = 1; | |
− | + | while(rangenum <= theaicontent.slice(2,theaicontent.length)){ | |
− | + | for(i in dspot){ | |
+ | var esign = 0; | ||
+ | for(j in rangearray) if(dspot[i].id == rangearray[j].id){ esign = 1; break;} | ||
+ | if(esign) continue; | ||
− | + | var jsign = 0; | |
− | + | for(j in rangearray) if(rangearray[j].range == (rangenum - 1) && dspot[i].map_route.indexOf(rangearray[j].id) != -1){ jsign = 1; break;} | |
+ | if(jsign) rangearray.push({id:dspot[i].id, num:i, range:rangenum}); | ||
+ | } | ||
+ | rangenum ++; | ||
+ | } | ||
− | + | for(i in rangearray){ | |
− | + | var thisspot = dspot[rangearray[i].num]; | |
− | |||
− | + | con.lineWidth= "1"; | |
− | + | con.strokeStyle = "#111111"; | |
− | + | con.fillStyle = "#12ff00"; | |
− | + | con.beginPath(); | |
− | + | con.arc(coorchange(1, Number(thisspot.coordinator_x), x_min), coorchange(2, Number(thisspot.coordinator_y), y_min), coorchange(3, 100), 0, 2*Math.PI); | |
− | + | con.fill(); | |
− | + | con.stroke(); | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | function enemydisplay(enemy_team_id){ | + | con.fillStyle = "#111111"; |
+ | con.textAlign="center"; | ||
+ | con.textBaseline="middle"; | ||
+ | con.lineWidth= String(coorchange(3, 20)); | ||
+ | con.font = String(coorchange(3, 150)) + "px bold Arial"; | ||
+ | con.beginPath(); | ||
+ | con.strokeText(rangearray[i].range, coorchange(1, Number(thisspot.coordinator_x), x_min), coorchange(2, Number(thisspot.coordinator_y), y_min)); | ||
+ | con.fillText(rangearray[i].range, coorchange(1, Number(thisspot.coordinator_x), x_min), coorchange(2, Number(thisspot.coordinator_y), y_min)); | ||
+ | con.stroke(); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | /*-- 地图内的坐标转换为canvas坐标 --*/ | ||
+ | function coorchange(xy, a, a_min){ | ||
+ | if(xy == "x" || xy == 1){ | ||
+ | return ((a - a_min + 100) / coparameter + mapwidth/24)*scale + xmove; | ||
+ | }else if(xy == "y" || xy == 2){ | ||
+ | return (mapheight -(a - a_min + 100) / coparameter - mapheight/24)*scale + ymove; | ||
+ | }else if(xy == "xy" || xy == 3){ | ||
+ | return (a / coparameter)*scale; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function traindisplay(){ | ||
+ | /*-- 清空地图 --*/ | ||
+ | $("#missiondrawing")[0].getContext("2d").clearRect(0, 0, mapwidth, mapheight); | ||
+ | if(setmessage.smaphide == 0) $("#smaphide").click(); | ||
+ | if(setmessage.sbuildtable == 1) $("#smaphide").click(); | ||
+ | if(setmessage.sporttable == 1) $("#smaphide").click(); | ||
+ | if(setmessage.sspotsign == 1) $("#smaphide").click(); | ||
+ | if(setmessage.senemypile == 1) $("#smaphide").click(); | ||
+ | |||
+ | var output = `<table id="Missiontable" class="enemydata" style="text-align:center; border:1px #f4c430cc solid; background-color:#111111; margin:4px 0px 14px 0px;" cellspacing="1"> | ||
+ | <thead style="display:block; background-color:#f4c430; color:black;"><tr> | ||
+ | <th style="width:100px;">编号<\/th> | ||
+ | <th style="width:160px;">名称<\/th> | ||
+ | <th style="width:450px;">组成<\/th> | ||
+ | <th style="width:490px;">描述<\/th> | ||
+ | <\/tr><\/thead><tbody id="Missionbody" style="height:300px; overflow-y:scroll; display:block;">`; | ||
+ | |||
+ | for(i in Mission_targettrain_enemy){ | ||
+ | if(Mission_targettrain_enemy[i].log_fitter_id != $("#missionselect").val()) continue; | ||
+ | var enemy_team_id = Mission_targettrain_enemy[i].enemy_team_id; | ||
+ | |||
+ | var thisline = `<tr class="missionline" style="border-bottom:2px #f4c43033 solid; display:block; cursor:pointer;"><td width="100px">`; | ||
+ | thisline += enemy_team_id + `<\/td><td width="160px">`; | ||
+ | thisline += Mission_targettrain_enemy[i].name + `<\/td><td width="450px">`; | ||
+ | thisline += enemyoutcal(enemy_team_id) + `<\/td><td width="480px">`; | ||
+ | thisline += Mission_targettrain_enemy[i].des + "<\/td><\/tr>"; | ||
+ | |||
+ | output += thisline; | ||
+ | } | ||
+ | |||
+ | $("#missionshow").html(output); | ||
+ | $(".missionline").mouseover(function(){ | ||
+ | $(this).children("td").css("background-color", "#f4c43033"); | ||
+ | }); | ||
+ | $(".missionline").mouseout(function(){ | ||
+ | $(this).children("td").css("background-color", ""); | ||
+ | }); | ||
+ | $(".missionline").click(function(){ | ||
+ | $(this).parent().children("tr").css({"background-color":"", "color":""}); | ||
+ | $(this).css({"background-color":"#f4c430cc", "color":"black"}); | ||
+ | enemydisplay($(this).children("td").eq(0).html()); | ||
+ | }); | ||
+ | } | ||
+ | |||
+ | function theaterdisplay(){ | ||
+ | /*-- 清空地图 --*/ | ||
+ | $("#missiondrawing")[0].getContext("2d").clearRect(0, 0, mapwidth, mapheight); | ||
+ | if(setmessage.smaphide == 0) $("#smaphide").click(); | ||
+ | if(setmessage.sbuildtable == 1) $("#smaphide").click(); | ||
+ | if(setmessage.sporttable == 1) $("#smaphide").click(); | ||
+ | if(setmessage.sspotsign == 1) $("#smaphide").click(); | ||
+ | if(setmessage.senemypile == 1) $("#smaphide").click(); | ||
+ | |||
+ | var output = `<table id="Missiontable" class="enemydata" style="text-align:center; border:1px #f4c430cc solid; background-color:#111111; margin:4px 0px 14px 0px;" cellspacing="1"> | ||
+ | <thead style="display:block; background-color:#f4c430; color:black;"><tr> | ||
+ | <th style="width:100px;">编号<\/th> | ||
+ | <th style="width:160px;">队长<\/th> | ||
+ | <th style="width:100px;">效能<\/th> | ||
+ | <th style="width:490px;">组成<\/th> | ||
+ | <th style="width:60px;">环境<\/th> | ||
+ | <th style="width:100px;">波数<\/th> | ||
+ | <th style="width:200px;">其它<\/th> | ||
+ | <\/tr><\/thead><tbody id="Missionbody" style="height:300px; overflow-y:scroll; display:block;">`; | ||
+ | |||
+ | /*-- 路径点的敌人站位 --*/ | ||
+ | for(i in Theater_area){ | ||
+ | if(Theater_area[i].id != $("#missionselect").val()) continue; | ||
+ | var enemystr = Theater_area[i].enemy_group + ","; | ||
+ | |||
+ | while(enemystr){ | ||
+ | var enemy_team_id = enemystr.slice(0, enemystr.indexOf("-")); | ||
+ | var enemy_num = enemystr.slice(enemystr.indexOf("-") + 1, enemystr.indexOf(",")); | ||
+ | var enemy_odd = (enemy_num.indexOf("-", 3) == -1) ? ("0~" + enemy_num[2]) : (enemy_num[4] + "~" + (Number(enemy_num[2]) + Number(enemy_num[4]))); | ||
+ | |||
+ | var enemy_leader; | ||
+ | var leader_name; | ||
+ | for(j in Enemy_team) if(Enemy_team[j]["id"] == enemy_team_id){ enemy_leader = Enemy_team[j]["enemy_leader"]; break;} | ||
+ | for(j in Enemy_charater_type) if(Enemy_charater_type[j]["id"] == enemy_leader){ leader_name = Enemy_charater_type[j]["name"]; break;} | ||
+ | |||
+ | var thisline = `<tr class="missionline" style="border-bottom:2px #f4c43033 solid; display:block; cursor:pointer;"><td width="100px">`; | ||
+ | thisline += enemy_team_id + `<\/td><td width="160px">`; | ||
+ | thisline += leader_name + `<\/td><td width="100px">`; | ||
+ | thisline += efectcal(enemy_team_id) + `<\/td><td width="490px">`; | ||
+ | thisline += enemyoutcal(enemy_team_id) + `<\/td><td width="60px">`; | ||
+ | thisline += ((enemy_num[0] == 0) ? "昼战" : "夜战") + `<\/td><td width="100px">`; | ||
+ | thisline += enemy_odd + `<\/td><td width="180px">`; | ||
+ | thisline += "<\/td><\/tr>"; | ||
+ | |||
+ | output += thisline; | ||
+ | |||
+ | enemystr = enemystr.slice(enemystr.indexOf(",") + 1, enemystr.length); | ||
+ | } | ||
+ | break; | ||
+ | } | ||
+ | |||
+ | $("#missionshow").html(output); | ||
+ | $(".missionline").mouseover(function(){ | ||
+ | $(this).children("td").css("background-color", "#f4c43033"); | ||
+ | }); | ||
+ | $(".missionline").mouseout(function(){ | ||
+ | $(this).children("td").css("background-color", ""); | ||
+ | }); | ||
+ | $(".missionline").click(function(){ | ||
+ | $(this).parent().children("tr").css({"background-color":"", "color":""}); | ||
+ | $(this).css({"background-color":"#f4c430cc", "color":"black"}); | ||
+ | enemydisplay($(this).children("td").eq(0).html()); | ||
+ | }); | ||
+ | } | ||
+ | |||
+ | function efectcal(enemy_team_id){ | ||
+ | var efect = 0; | ||
+ | for(j in Enemy_in_team){ | ||
+ | if(Enemy_in_team[j]["enemy_team_id"] != enemy_team_id) continue; | ||
+ | var enemy_character_type_id = Number(Enemy_in_team[j].enemy_character_type_id); | ||
+ | var level = Number(Enemy_in_team[j].level); | ||
+ | |||
+ | var charatype; | ||
+ | for(var k = 0; k < Enemy_charater_type.length; k++){ | ||
+ | if(Enemy_charater_type[k]["id"] != enemy_character_type_id) continue; | ||
+ | charatype = Enemy_charater_type[k]; break;} | ||
+ | |||
+ | var attr_number = Number(Enemy_in_team[j].number); | ||
+ | var attr_pow = enemyattribute(charatype , "pow" , level); | ||
+ | var attr_def_break = enemyattribute(charatype , "def_break" , level); | ||
+ | var attr_rate = enemyattribute(charatype , "rate" , level); | ||
+ | var attr_hit = enemyattribute(charatype , "hit" , level); | ||
+ | var attr_maxlife = enemyattribute(charatype , "maxlife" , level); | ||
+ | var attr_dodge = enemyattribute(charatype , "dodge" , level); | ||
+ | var attr_armor = enemyattribute(charatype , "armor" , level); | ||
+ | var attr_def = enemyattribute(charatype , "def" , level); | ||
+ | var attr_def_percent = Number(Enemy_in_team[j].def_percent); | ||
+ | /*-- 攻击:ceiling:22*扩编数*((pow + def_break*0.85) * rate/50 * hit/(hit+35) +2) --*/ | ||
+ | var efect_att = ceiling(22*attr_number*((attr_pow + attr_def_break*0.85) * attr_rate/50 * attr_hit/(attr_hit+35) +2)); | ||
+ | /*-- 防御:ceiling:0.25*(maxlife * (35+dodge)/35 * 300/(300-armor) + 100) * (def_max*2-def+1200*2)/(def_max-def+1200) /2 --*/ | ||
+ | var efect_def = ceiling(0.25*(bround(attr_number * attr_maxlife) * (35+attr_dodge)/35 * 300/(300-attr_armor) + 100) * (attr_def*2 - attr_def*attr_def_percent/100 + 1200*2)/(attr_def - attr_def*attr_def_percent/100 + 1200) /2); | ||
+ | efect += ceiling(Number(charatype.effect_ratio) * (efect_att + efect_def)); | ||
+ | } | ||
+ | return efect; | ||
+ | } | ||
+ | |||
+ | function enemyoutcal(enemy_team_id){ | ||
+ | var enemyout = ""; | ||
+ | for(j in Enemy_in_team){ | ||
+ | if(Enemy_in_team[j]["enemy_team_id"] != enemy_team_id) continue; | ||
+ | var enemy_character_type_id = Number(Enemy_in_team[j]["enemy_character_type_id"]); | ||
+ | var name; | ||
+ | |||
+ | for(var k = 0; k < Enemy_charater_type.length; k++){ | ||
+ | if(Enemy_charater_type[k]["id"] != enemy_character_type_id) continue; | ||
+ | name = Enemy_charater_type[k]["name"]; | ||
+ | } | ||
+ | |||
+ | if(enemyout.indexOf(name) == -1) enemyout += name + "×" + Enemy_in_team[j]["number"] + " "; | ||
+ | else{ | ||
+ | var namepos = enemyout.indexOf(name); | ||
+ | var oldnum = enemyout.slice(namepos + name.length + 1, enemyout.indexOf(" ", namepos)); | ||
+ | var newnum = Number(oldnum) + Number(Enemy_in_team[j]["number"]); | ||
+ | enemyout = enemyout.replace(name + "×" + oldnum + " ", name + "×" + newnum + " "); | ||
+ | } | ||
+ | } | ||
+ | return enemyout; | ||
+ | } | ||
+ | |||
+ | function enemyselectcreat(){ | ||
+ | var output = `<div style="display:inline-block; padding:6.5px; background:#E0E0E0; color:black; position:relative; top:1px;">敌人编号<\/div> | ||
+ | <div class="eselect"><select id="enemyselect" name="enemyselect">`; | ||
+ | |||
+ | for(var i = 0; i < Enemy_team.length; i++) output += "<option value=\"" + Enemy_team[i].id + "\">" + Enemy_team[i].id + "<\/option>"; | ||
+ | output += `<\/select><\/div> <input type="text" id="enemytext" name="enemytext" style="border:none; padding:10px; background-color:#e0e0e0; top:1px;"/>`; | ||
+ | |||
+ | output += `<div class="eteambtn" id="sexistspot" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5.5px 10px; cursor:pointer; vertical-align:middle; margin-left:50px;">存在地点<\/div> | ||
+ | <div class="eteambtn" id="steamconsult" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5.5px 10px; cursor:pointer; vertical-align:middle;">组成查询<\/div>`; | ||
+ | |||
+ | $("#enemychose").html(output); | ||
+ | |||
+ | /*-- 绘制画布 --*/ | ||
+ | var drawingoutput = `<canvas id="enemydrawing" width="4800px" height="300px" style="border:1px #ffffff99 solid;">Your browser does not support the HTML5 canvas tag.<\/canvas>`; | ||
+ | $("#enemyposition").html(drawingoutput); | ||
+ | |||
+ | $(".eteambtn").mouseover(function(){ | ||
+ | $(this).css({"border":"1px #f4c430 solid","padding":"5px 10px"}); | ||
+ | }); | ||
+ | $(".eteambtn").mouseout(function(){ | ||
+ | $(this).css({"border":"1px #eaeaea solid","padding":"5px 10px"}); | ||
+ | }); | ||
+ | |||
+ | $("#teammadediv").hide(); | ||
+ | $("#teamexistdiv").hide(); | ||
+ | $("#steamconsult").click(function(){ | ||
+ | if(setmessage["steamconsult"] == 0){ | ||
+ | setmessage["steamconsult"] = 1; | ||
+ | $(this).css({"background-color":"#f4c430","color":"black"}); | ||
+ | $("#teammadediv").show(); | ||
+ | }else{ | ||
+ | setmessage["steamconsult"] = 0; | ||
+ | $(this).css({"background-color":"#111111","color":"#eaeaea"}); | ||
+ | $("#teammadediv").hide(); | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | $("#sexistspot").click(function(){ | ||
+ | if(enemyteaminfo.length == 0)enemymadecal(); | ||
+ | if(setmessage["sexistspot"] == 0){ | ||
+ | setmessage["sexistspot"] = 1; | ||
+ | $(this).css({"background-color":"#f4c430","color":"black"}); | ||
+ | $("#teamexistdiv").show(); | ||
+ | }else{ | ||
+ | setmessage["sexistspot"] = 0; | ||
+ | $(this).css({"background-color":"#111111","color":"#eaeaea"}); | ||
+ | $("#teamexistdiv").hide(); | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | $("#enemyselect").change(function(){ | ||
+ | enemydisplay(Number(this.value)); | ||
+ | if(setmessage.sexistspot == 1) existdisplay(Number(this.value)); | ||
+ | }); | ||
+ | $("#enemytext").change(function(){ | ||
+ | for(var i = 0; i < Enemy_team.length; i++){ | ||
+ | if(Enemy_team[i].id == Number(this.value)){ | ||
+ | enemydisplay(Number(this.value)); | ||
+ | if(setmessage.sexistspot == 1) existdisplay(Number(this.value)); | ||
+ | return; | ||
+ | } | ||
+ | } | ||
+ | alert("该敌人不存在"); | ||
+ | }); | ||
+ | |||
+ | let teamoutput = `<div class="enemyname" id="enemyname1">NONE<\/div><input type="number" name="enemynumber1" id="enemynumber1" class="enemynumber" value="0" min="0"/> | ||
+ | <div class="enemyname" id="enemyname2">NONE<\/div><input type="number" name="enemynumber2" id="enemynumber2" class="enemynumber" value="0" min="0"/> | ||
+ | <div class="enemyname" id="enemyname3">NONE<\/div><input type="number" name="enemynumber3" id="enemynumber3" class="enemynumber" value="0" min="0"/> | ||
+ | <div id="teamconfirm" style="border:1px solid #e0e0e0; padding:6px; margin-left:10px; cursor:pointer; display:inline-block;">查询<\/div><br/><br/>`; | ||
+ | |||
+ | for(i in Enemy_charater_type){ | ||
+ | let sign = 1; | ||
+ | for(let j = 0; j < i; j++) if(Enemy_charater_type[j].name == Enemy_charater_type[i].name){ sign = 0; break;} | ||
+ | if(sign && Enemy_charater_type[i].name && (Enemy_charater_type[i].name != ",")) teamoutput += `<div class="enemytypename" state="off">` + Enemy_charater_type[i].name + `<\/div>`; | ||
+ | } | ||
+ | $("#teammadediv").html(teamoutput); | ||
+ | $("div.enemyname").css({"width":"160px", "display":"inline-block", "padding":"5px", "background-color":"#e0e0e0", "color":"black", "margin-left":"6px", "cursor":"pointer", "border":"double"}); | ||
+ | $("input.enemynumber").css({"width":"50px", "padding":"9.5px", "background-color":"#e0e0e0", "border":"none", "margin-left":"2px"}); | ||
+ | $("div.enemytypename").css({"background-color":"#e0e0e0", "color":"black", "display":"inline-block", "margin":"4px 4px", "padding":"4px", "cursor":"pointer", "border-style":"double"}); | ||
+ | $("div#teamconfirm").mouseover(function(){$(this).css({"border-color":"#f4c430", "color":"#f4c430"})}); | ||
+ | $("div#teamconfirm").mouseout(function(){$(this).css({"border-color":"#e0e0e0", "color":"#eaeaea"})}); | ||
+ | |||
+ | $("div.enemyname").click(function(){ | ||
+ | if($(this).html() == "NONE") return; | ||
+ | var namedivs = document.querySelectorAll("div.enemytypename"); | ||
+ | for(i in namedivs) if($(namedivs[i]).html() == $(this).html()){ $(namedivs[i]).css({"background-color":"#e0e0e0"}); break;} | ||
+ | $(this).html("NONE"); | ||
+ | $(this).css("background-color", "#e0e0e0"); | ||
+ | $(this).next().val(0); | ||
+ | }); | ||
+ | $("div.enemytypename").click(function(){ | ||
+ | if($(this).attr("state") == "off"){ | ||
+ | if($("#enemyname1").html() == "NONE"){ | ||
+ | $("#enemyname1").html($(this).html()); | ||
+ | $("#enemyname1").css("background-color", "#f4c430"); | ||
+ | } | ||
+ | else if($("#enemyname2").html() == "NONE"){ | ||
+ | $("#enemyname2").html($(this).html()); | ||
+ | $("#enemyname2").css("background-color", "#f4c430"); | ||
+ | } | ||
+ | else if($("#enemyname3").html() == "NONE"){ | ||
+ | $("#enemyname3").html($(this).html()); | ||
+ | $("#enemyname3").css("background-color", "#f4c430"); | ||
+ | } | ||
+ | else return; | ||
+ | $(this).attr("state", "on"); | ||
+ | $(this).css({"background-color":"#f4c430"}); | ||
+ | } else { | ||
+ | if($("#enemyname1").html() == $(this).html()) $("#enemyname1").click(); | ||
+ | else if($("#enemyname2").html() == $(this).html()) $("#enemyname2").click(); | ||
+ | else if($("#enemyname3").html() == $(this).html()) $("#enemyname3").click(); | ||
+ | $(this).attr("state", "off"); | ||
+ | } | ||
+ | }); | ||
+ | $("div#teamconfirm").click(function(){ | ||
+ | if(setmessage.sexistspot == 1) existdisplay(); | ||
+ | }); | ||
+ | |||
+ | } | ||
+ | |||
+ | function enemymadecal(){ | ||
+ | /*-- 敌方存在的关卡以及点位,计算 --*/ | ||
+ | for(i in Enemy_team){ | ||
+ | enemyteaminfo.push({id:Enemy_team[i].id, enemy:[]}); | ||
+ | let thisteam = enemyteaminfo.length - 1; | ||
+ | |||
+ | for(j in Enemy_in_team){ | ||
+ | if(Enemy_in_team[j]["enemy_team_id"] != Enemy_team[i].id) continue; | ||
+ | let enemyname; | ||
+ | |||
+ | for(k in Enemy_charater_type) if(Enemy_charater_type[k]["id"] == Enemy_in_team[j]["enemy_character_type_id"]){ enemyname = Enemy_charater_type[k]["name"]; break;} | ||
+ | |||
+ | let sign = 1; | ||
+ | for(k in enemyteaminfo[thisteam].enemy){ | ||
+ | if(enemyteaminfo[thisteam].enemy[k].name == enemyname){ enemyteaminfo[thisteam].enemy[k].number += Number(Enemy_in_team[j]["number"]); sign = 0;} | ||
+ | } | ||
+ | if(enemyteaminfo[thisteam].enemy.length == 0) enemyteaminfo[thisteam].enemy.push({name:enemyname, number:Number(Enemy_in_team[j]["number"])}); | ||
+ | else if(sign) enemyteaminfo[thisteam].enemy.push({name:enemyname, number:Number(Enemy_in_team[j]["number"])}); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function existdisplay(define_team){ | ||
+ | var output = `<table id="existancetable" class="enemydata" style="text-align:center; border:1px #f4c430cc solid; background-color:#111111; margin:4px 0px 14px 0px;" cellspacing="1"> | ||
+ | <thead style="display:block; background-color:#f4c430; color:black;"><tr> | ||
+ | <th style="width:100px;">编号<\/th> | ||
+ | <th style="width:540px;">组成<\/th> | ||
+ | <th style="width:140px;">战役<\/th> | ||
+ | <th style="width:140px;">关卡<\/th> | ||
+ | <th style="width:100px;">效能<\/th> | ||
+ | <th style="width:100px;">点位<\/th> | ||
+ | <th style="width:80px;">其它<\/th> | ||
+ | <\/tr><\/thead><tbody id="Buildingbody" style="height:300px; overflow-y:scroll; display:block;">`; | ||
+ | |||
+ | if(define_team) output += existcalculation(define_team) + `<\/tbody><\/table>`; | ||
+ | else{ | ||
+ | for(list in enemyteaminfo){ | ||
+ | let sign = 0; | ||
+ | if($("#enemyname1").html() != "NONE"){ | ||
+ | for(i in enemyteaminfo[list].enemy){ | ||
+ | if(enemyteaminfo[list].enemy[i].name == $("#enemyname1").html() && enemyteaminfo[list].enemy[i].number >= Number($("#enemynumber1").val())) {sign = 1; break;} | ||
+ | } | ||
+ | if(sign == 0) continue; | ||
+ | else sign = 1; | ||
+ | } | ||
+ | if($("#enemyname2").html() != "NONE"){ | ||
+ | for(i in enemyteaminfo[list].enemy){ | ||
+ | if(enemyteaminfo[list].enemy[i].name == $("#enemyname2").html() && enemyteaminfo[list].enemy[i].number >= Number($("#enemynumber2").val())) {sign = 1; break;} | ||
+ | } | ||
+ | if(sign == 0) continue; | ||
+ | else sign = 1; | ||
+ | } | ||
+ | if($("#enemyname3").html() != "NONE"){ | ||
+ | for(i in enemyteaminfo[list].enemy){ | ||
+ | if(enemyteaminfo[list].enemy[i].name == $("#enemyname3").html() && enemyteaminfo[list].enemy[i].number >= Number($("#enemynumber3").val())) {sign = 1; break;} | ||
+ | } | ||
+ | if(sign == 0) continue; | ||
+ | } | ||
+ | |||
+ | output += existcalculation(enemyteaminfo[list].id) ; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | $("#teamexistdiv").html(output + `<\/tbody><\/table>`); | ||
+ | |||
+ | $(".existanceline").mouseover(function(){ | ||
+ | $(this).children("td").css("background-color", "#f4c43033"); | ||
+ | }); | ||
+ | $(".existanceline").mouseout(function(){ | ||
+ | $(this).children("td").css("background-color", ""); | ||
+ | }); | ||
+ | $(".existanceline").click(function(){ | ||
+ | if(setmessage.sspotsign == 0) return; | ||
+ | $("#spotsign1").val(Number($($(this).children("td")[0]).html())); | ||
+ | drawmap(); | ||
+ | }); | ||
+ | } | ||
+ | |||
+ | function existcalculation(enemy_team_id){ | ||
+ | var thisput = ``; | ||
+ | for(i in Spot){ | ||
+ | if(Spot[i]["enemy_team_id"] != enemy_team_id && !(Spot[i]["ally_team_id"])) continue; | ||
+ | else if(Spot[i]["enemy_team_id"] != enemy_team_id && Spot[i]["ally_team_id"]){ | ||
+ | var ally_tar; | ||
+ | for(j in Ally_team) if(Ally_team[j].id == Number(Spot[i]["ally_team_id"])){ ally_tar = j; break;} | ||
+ | if(!(Ally_team[ally_tar]) || Ally_team[ally_tar]["enemy_team_id"] != enemy_team_id) continue; | ||
+ | } | ||
+ | |||
+ | var enemymadestr = ""; | ||
+ | for(j in enemyteaminfo) if(enemyteaminfo[j].id == enemy_team_id) for(k in enemyteaminfo[j].enemy) enemymadestr += enemyteaminfo[j].enemy[k].name + "×" + enemyteaminfo[j].enemy[k].number + " "; | ||
+ | |||
+ | var mapname = "", campaignname = ""; | ||
+ | for(j in Mission) if(Mission[j].id == Spot[i].mission_id){ | ||
+ | mapname = Mission[j].name; | ||
+ | campaignname = Mission[j].campaign; | ||
+ | } | ||
+ | |||
+ | let thisline = `<tr class="existanceline" style="border-bottom:2px #f4c43033 solid; display:block; cursor:pointer;"><td width="100px">`; | ||
+ | thisline += enemy_team_id + `<\/td><td width="540px">`; | ||
+ | thisline += enemymadestr.slice(0, enemymadestr.length - 1) + `<\/td><td width="140px">`; | ||
+ | thisline += campaignname + `<\/td><td width="140px">`; | ||
+ | thisline += mapname + `<\/td><td width="100px">`; | ||
+ | thisline += efectcal(enemy_team_id) + `<\/td><td width="100px">`; | ||
+ | thisline += Spot[i].id + `<\/td><td width="60px">`; | ||
+ | thisline += "其他" + "<\/td><\/tr>"; | ||
+ | |||
+ | thisput += thisline; | ||
+ | } | ||
+ | return thisput; | ||
+ | } | ||
+ | |||
+ | function enemydisplay(enemy_team_id){ | ||
/*-- enemyselect选择被选择的option --*/ | /*-- enemyselect选择被选择的option --*/ | ||
− | $("#enemyselect").val(enemy_team_id); | + | $("#enemyselect").val(enemy_team_id); |
− | + | ||
− | /*-- canvas作图区域清空/画背景以及参考线 --*/ | + | /*-- canvas作图区域清空/画背景以及参考线 --*/ |
− | var con = $("#enemydrawing")[0].getContext("2d"); | + | var con = $("#enemydrawing")[0].getContext("2d"); |
− | con.clearRect(0, 0, 4800, 300); | + | con.clearRect(0, 0, 4800, 300); |
− | con.lineWidth="1"; | + | con.lineWidth="1"; |
− | con.strokeStyle="#444444"; | + | con.strokeStyle="#444444"; |
− | con.fillStyle = "#111111"; | + | con.fillStyle = "#111111"; |
− | con.font="10px bolder Arial"; | + | con.font="10px bolder Arial"; |
− | con.beginPath(); | + | con.beginPath(); |
− | con.fillRect(0, 0, 4800, 300); | + | con.fillRect(0, 0, 4800, 300); |
− | con.stroke(); | + | con.stroke(); |
− | + | ||
− | /*-- 参考线横向/纵向线条 --*/ | + | /*-- 参考线横向/纵向线条 --*/ |
− | for(var i = 0; i <= 300 / 25; i++){ dcoordinator(3, "#444444", 0, i);} | + | for(var i = 0; i <= 300 / 25; i++){ dcoordinator(3, "#444444", 0, i);} |
− | for(var i = 0; i <= 3600/100; i++){ | + | for(var i = 0; i <= 3600/100; i++){ |
− | dcoordinator(2, "#444444", i*4, 0); | + | dcoordinator(2, "#444444", i*4, 0); |
− | dcoordinator(6, "#444444", i*4, -1, i*4-3);} | + | dcoordinator(6, "#444444", i*4, -1, i*4-3);} |
− | /*-- 我方位置 --*/ | + | /*-- 我方位置 --*/ |
− | dcoordinator(1, "#f4c430", -1.7, -0.09); | + | dcoordinator(1, "#f4c430", -1.7, -0.09); |
− | dcoordinator(1, "#f4c430", -1.7, 8.31); | + | dcoordinator(1, "#f4c430", -1.7, 8.31); |
− | dcoordinator(1, "#f4c430", -1.7, 4.11); | + | dcoordinator(1, "#f4c430", -1.7, 4.11); |
− | dcoordinator(1, "#f4c430", 0.7, -0.09); | + | dcoordinator(1, "#f4c430", 0.7, -0.09); |
− | dcoordinator(1, "#f4c430", 0.7, 8.31); | + | dcoordinator(1, "#f4c430", 0.7, 8.31); |
− | dcoordinator(1, "#f4c430", 0.7, 4.11); | + | dcoordinator(1, "#f4c430", 0.7, 4.11); |
− | dcoordinator(1, "#f4c430", 3.1, -0.09); | + | dcoordinator(1, "#f4c430", 3.1, -0.09); |
− | dcoordinator(1, "#f4c430", 3.1, 8.31); | + | dcoordinator(1, "#f4c430", 3.1, 8.31); |
− | dcoordinator(1, "#f4c430", 3.1, 4.11); | + | dcoordinator(1, "#f4c430", 3.1, 4.11); |
− | /*-- 嘲讽 --*/ | + | /*-- 嘲讽 --*/ |
dcoordinator(1, "#3366cc", 4, 3.91); | dcoordinator(1, "#3366cc", 4, 3.91); | ||
dcoordinator(5, "#3366cc", 4, 3.91, "嘲讽"); | dcoordinator(5, "#3366cc", 4, 3.91, "嘲讽"); | ||
第1,150行: | 第1,618行: | ||
dcoordinator(4, "#4caf50", 11.76, 0); | dcoordinator(4, "#4caf50", 11.76, 0); | ||
con.textBaseline = "top"; | con.textBaseline = "top"; | ||
− | dcoordinator(5, "#4caf50", 8.76, 10.5, "2排阵 | + | dcoordinator(5, "#4caf50", 8.76, 10.5, "2排阵-移动"); |
− | dcoordinator(5, "#4caf50", 9.76, 10, "2排阵 | + | dcoordinator(5, "#4caf50", 9.76, 10, "2排阵-站定"); |
− | dcoordinator(5, "#4caf50", 10.76, 10.5, "3排阵 | + | dcoordinator(5, "#4caf50", 10.76, 10.5, "3排阵-移动"); |
− | dcoordinator(5, "#4caf50", 11.76, 10, "3排阵 | + | dcoordinator(5, "#4caf50", 11.76, 10, "3排阵-站定"); |
con.textBaseline = "middle"; | con.textBaseline = "middle"; | ||
con.font = "16px bolder Arial"; | con.font = "16px bolder Arial"; | ||
第1,462行: | 第1,930行: | ||
敌人 smapenemy 建筑 smapbuild 类型 smaptype 颜色 smapcolor 标号 smapspotn 逻辑 smapenemyai | 敌人 smapenemy 建筑 smapbuild 类型 smaptype 颜色 smapcolor 标号 smapspotn 逻辑 smapenemyai | ||
建筑表格 sbuildtable 传送表格 sporttable 点位标记 sspotsign 同组堆叠 senemypile --*/ | 建筑表格 sbuildtable 传送表格 sporttable 点位标记 sspotsign 同组堆叠 senemypile --*/ | ||
− | var mapsetoutput = `<div class="mapsetbtn" id="sdownload" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px;"><a style="color:#eaeaea; text-decoration:auto;">下载大图</a></div> | + | var mapsetoutput = `<div class="mapsetbtn" id="sdownload" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px;"><a style="color:#eaeaea; text-decoration:auto;">下载大图<\/a><\/div> |
− | <div class="mapsetbtn" id="sredraw" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">还原地图</div> | + | <div class="mapsetbtn" id="sredraw" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">还原地图<\/div> |
− | <div class="mapsetbtn" id="smaphide" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">隐藏地图</div> | + | <div class="mapsetbtn" id="smaphide" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">隐藏地图<\/div> |
− | <div class="mapsetbtn" id="sexample" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">显示图例</div> | + | <div class="mapsetbtn" id="sexample" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">显示图例<\/div> |
− | <span style="padding:0px 5px;"></span> | + | <span style="padding:0px 5px;"><\/span> |
− | <div class="mapsetbtn" id="smapenemy" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">敌人</div> | + | <div class="mapsetbtn" id="smapenemy" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">敌人<\/div> |
− | <div class="mapsetbtn" id="smapbuild" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">建筑</div> | + | <div class="mapsetbtn" id="smapbuild" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">建筑<\/div> |
− | <div class="mapsetbtn" id="smaptype" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">类型</div> | + | <div class="mapsetbtn" id="smaptype" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">类型<\/div> |
− | <div class="mapsetbtn" id="smapcolor" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">颜色</div> | + | <div class="mapsetbtn" id="smapcolor" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">颜色<\/div> |
− | <div class="mapsetbtn" id="smapspotn" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">标号</div> | + | <div class="mapsetbtn" id="smapspotn" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">标号<\/div> |
− | <div class="mapsetbtn" id="smapenemyai" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">逻辑</div> | + | <div class="mapsetbtn" id="smapenemyai" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">逻辑<\/div> |
− | <span style="padding:0px 5px;"></span> | + | <span style="padding:0px 5px;"><\/span> |
− | <div class="mapsetbtn" id="sbuildtable" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">建筑表格</div> | + | <div class="mapsetbtn" id="sbuildtable" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">建筑表格<\/div> |
− | <div class="mapsetbtn" id="sporttable" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">传送表格</div> | + | <div class="mapsetbtn" id="sporttable" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; background-color:#f4c430; color:black; cursor:pointer;">传送表格<\/div> |
− | <div class="mapsetbtn" id="sspotsign" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">点位标记</div> | + | <div class="mapsetbtn" id="sspotsign" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">点位标记<\/div> |
− | <div class="mapsetbtn" id="senemypile" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">同组堆叠</div>`; | + | <div class="mapsetbtn" id="senemypile" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">同组堆叠<\/div>`; |
$("#mapsetdiv").css({"user-select":"none", "margin":"5px 0px"}); | $("#mapsetdiv").css({"user-select":"none", "margin":"5px 0px"}); | ||
第1,503行: | 第1,971行: | ||
mapwidth = 4800; mapheight = 2700; | mapwidth = 4800; mapheight = 2700; | ||
/*-- 创建更大的新画布 --*/ | /*-- 创建更大的新画布 --*/ | ||
− | var drawingoutput = `<canvas id="downloaddrawing" width="4800px" height="2700px" style="display:none;">Your browser does not support the HTML5 canvas tag.</canvas>`; | + | var drawingoutput = `<canvas id="downloaddrawing" width="4800px" height="2700px" style="display:none;">Your browser does not support the HTML5 canvas tag.<\/canvas>`; |
$("#downloaddraw").html(drawingoutput); | $("#downloaddraw").html(drawingoutput); | ||
/*-- 对新画布进行绘画 --*/ | /*-- 对新画布进行绘画 --*/ | ||
第1,510行: | 第1,978行: | ||
var campaignname = $("#campaignselect").find("option:selected").text().slice(5, $("#campaignselect").find("option:selected").text().length); | var campaignname = $("#campaignselect").find("option:selected").text().slice(5, $("#campaignselect").find("option:selected").text().length); | ||
var missionname = $("#missionselect").find("option:selected").text().slice(0, $("#missionselect").find("option:selected").text().length - 1).replace(/\[/g, "").replace(/\]/g, ""); | var missionname = $("#missionselect").find("option:selected").text().slice(0, $("#missionselect").find("option:selected").text().length - 1).replace(/\[/g, "").replace(/\]/g, ""); | ||
− | |||
var othername = ($("#layerselect").css("display") != "none") ? (" " + $("#layerselect").find("option:selected").text().replace(" ", "") + " " + $("#packselect").find("option:selected").text().replace(" ", "")) : ""; | var othername = ($("#layerselect").css("display") != "none") ? (" " + $("#layerselect").find("option:selected").text().replace(" ", "") + " " + $("#packselect").find("option:selected").text().replace(" ", "")) : ""; | ||
$(this).children("a").attr("download",campaignname + " " + missionname + othername + ".png"); | $(this).children("a").attr("download",campaignname + " " + missionname + othername + ".png"); | ||
第1,599行: | 第2,066行: | ||
/*-- 绘制地图的图例 --*/ | /*-- 绘制地图的图例 --*/ | ||
function examplecreate(){ | function examplecreate(){ | ||
− | var exampleoutput = `<canvas id="exampledrawing" width="1220px" height="120px" style="border:1px #ffffff99 solid;">Your browser does not support the HTML5 canvas tag.</canvas>`; | + | var exampleoutput = `<canvas id="exampledrawing" width="1220px" height="120px" style="border:1px #ffffff99 solid;">Your browser does not support the HTML5 canvas tag.<\/canvas>`; |
$("#mapexample").html(exampleoutput); | $("#mapexample").html(exampleoutput); | ||
$("#mapexample").css({"display":"none"}); | $("#mapexample").css({"display":"none"}); | ||
第1,663行: | 第2,130行: | ||
con.fill(); | con.fill(); | ||
con.stroke(); | con.stroke(); | ||
− | + | ||
/*-- 地图图例的文字 --*/ | /*-- 地图图例的文字 --*/ | ||
con.lineWidth = 4; | con.lineWidth = 4; | ||
第1,725行: | 第2,192行: | ||
function spotsigncreat(){ | function spotsigncreat(){ | ||
/*-- 特殊标点 12ff00 d800ff 00ffea ccff00 --*/ | /*-- 特殊标点 12ff00 d800ff 00ffea ccff00 --*/ | ||
− | var output = `<div id="mapredraw" class="mapsignbtn" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">重绘</div> | + | var output = `<div id="mapredraw" class="mapsignbtn" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">重绘<\/div> |
− | <div id="mapclear" class="mapsignbtn" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">清空</div> | + | <div id="mapclear" class="mapsignbtn" style="display:inline-block; user-select:none; border:1px #eaeaea solid; padding:5px 10px; cursor:pointer;">清空<\/div> |
− | <input type="text" id=" | + | <input type="text" id="spotsign1" name="spotsign1" style="border:none; padding:10px; margin:3px 3px; background-color:#12ff00; color:#111111;"/> |
− | <input type="text" id=" | + | <input type="text" id="spotsign2" name="spotsign2" style="border:none; padding:10px; margin:3px 3px; background-color:#d800ff; color:#111111;"/> |
− | <input type="text" id=" | + | <input type="text" id="spotsign3" name="spotsign3" style="border:none; padding:10px; margin:3px 3px; background-color:#00ffea; color:#111111;"/> |
− | <input type="text" id=" | + | <input type="text" id="spotsign4" name="spotsign4" style="border:none; padding:10px; margin:3px 3px; background-color:#ccff00; color:#111111;"/>`; |
$("#spotsign").html(output); | $("#spotsign").html(output); | ||
$("#spotsign").css("display", "none"); | $("#spotsign").css("display", "none"); | ||
第1,749行: | 第2,216行: | ||
$("#mapredraw").click(function(){ drawmap();}); | $("#mapredraw").click(function(){ drawmap();}); | ||
$("#mapclear").click(function(){ | $("#mapclear").click(function(){ | ||
− | $("# | + | $("#spotsign1").val(""); |
− | $("# | + | $("#spotsign2").val(""); |
− | $("# | + | $("#spotsign3").val(""); |
− | $("# | + | $("#spotsign4").val(""); |
theaicontent = 0; | theaicontent = 0; | ||
drawmap(); | drawmap(); | ||
第1,759行: | 第2,226行: | ||
function firstcreat(){ | function firstcreat(){ | ||
− | var output = `<div id="loadtips" style="padding:20px; font-size:130%; display:block; border:1px solid #eaeaea; width:1180px; margin:20px 0px;">文件加载进度:0/12</div> | + | var output = `<div id="loadtips" style="padding:20px; font-size:130%; display:block; border:1px solid #eaeaea; width:1180px; margin:20px 0px;">文件加载进度:0/12<\/div> |
− | <div id="campaignchose"></div> | + | <div id="campaignchose" style="height:37px;"><\/div> |
− | <div id="mapsetdiv"></div> | + | <div id="mapsetdiv"><\/div> |
− | <div id="mapexample"></div> | + | <div id="mapexample"><\/div> |
− | <div id="missionmap" style="max-width:1220px; overflow-y:scroll; overscroll-behavior-y:contain; border:1px #ffffff99 solid;"></div> | + | <div id="missionmap" style="max-width:1220px; overflow-y:scroll; overscroll-behavior-y:contain; border:1px #ffffff99 solid;"><\/div> |
− | <div id="spotsign"></div> | + | <div id="spotsign"><\/div> |
− | <div id="teleportshow" style="max-width:1222px;"></div> | + | <div id="teleportshow" style="max-width:1222px;"><\/div> |
− | <div id="buildingshow" style="max-width:1222px;"></div> | + | <div id="buildingshow" style="max-width:1222px;"><\/div> |
− | <div id="missionshow" style="max-width:1222px;"></div> | + | <div id="missionshow" style="max-width:1222px;"><\/div> |
− | <div id="enemychose"></div> | + | <div id="enemychose"><\/div> |
− | <div id="enemyshow" style="max-width:1222px;"></div> | + | <div id="teammadediv" style="max-width:1220px; border:1px #e0e0e0 solid; padding:5px; margin:5px 0px;"><\/div> |
− | <div id="enemyposition" style="overflow-x:scroll; width:1222px;"></div> | + | <div id="teamexistdiv" style="max-width:1222px;"><\/div> |
− | <div id="otherthing"></div> | + | <div id="enemyshow" style="max-width:1222px;"><\/div> |
− | <div id="downloaddraw"></div>`; | + | <div id="enemyposition" style="overflow-x:scroll; width:1222px;"><\/div> |
+ | <div id="otherthing"><\/div> | ||
+ | <div id="downloaddraw"><\/div>`; | ||
$("#thisdiv").html(output); | $("#thisdiv").html(output); | ||
var text = `<br><br><br><div style="padding:8px 10px; width:1212px; background-color:#222; font-weight:300;"> | var text = `<br><br><br><div style="padding:8px 10px; width:1212px; background-color:#222; font-weight:300;"> | ||
− | <div style="margin:5px; font-size:120%; font-weight:800; position:relative; left:-8px;">使用说明:</div> | + | <div style="margin:5px; font-size:120%; font-weight:800; position:relative; left:-8px;">使用说明:<\/div> |
【战役选择】:战役(活动)、章节(关卡)、地图(分层)、区域(分块),当该地图存在多层时会出现“地图”和“区域”的选择框<br><br> | 【战役选择】:战役(活动)、章节(关卡)、地图(分层)、区域(分块),当该地图存在多层时会出现“地图”和“区域”的选择框<br><br> | ||
第1,784行: | 第2,253行: | ||
【隐藏地图】:将绘制地图隐藏<br> | 【隐藏地图】:将绘制地图隐藏<br> | ||
【显示图例】:展示不同种类的路径点ICON所代表的含义<br><br> | 【显示图例】:展示不同种类的路径点ICON所代表的含义<br><br> | ||
− | + | ||
【敌人】:打开时,在绘制地图内展示该路径点存在的敌人的队长名称和效能<br> | 【敌人】:打开时,在绘制地图内展示该路径点存在的敌人的队长名称和效能<br> | ||
【建筑】:打开时,在绘制地图内展示该路径点存在的建筑的名称<br> | 【建筑】:打开时,在绘制地图内展示该路径点存在的建筑的名称<br> | ||
第1,791行: | 第2,260行: | ||
【标号】:打开时,在绘制地图内展示该路径点的编号<br> | 【标号】:打开时,在绘制地图内展示该路径点的编号<br> | ||
【逻辑】:打开,且【点位标记】打开,并在敌方梯队表格点击其中一行敌人时,在绘制地图内展示敌人行动逻辑<br><br> | 【逻辑】:打开,且【点位标记】打开,并在敌方梯队表格点击其中一行敌人时,在绘制地图内展示敌人行动逻辑<br><br> | ||
− | + | ||
【建筑表格】:打开时,若地图内存在建筑,即以弹出表格的形式展示建筑的信息,点击其中一行会自动打开【点位标记】进行标记<br> | 【建筑表格】:打开时,若地图内存在建筑,即以弹出表格的形式展示建筑的信息,点击其中一行会自动打开【点位标记】进行标记<br> | ||
【传送表格】:打开时,若地图内存在自动传送点,即以弹出表格的形式展示传送点的信息,点击其中一行会自动打开【点位标记】进行标记<br> | 【传送表格】:打开时,若地图内存在自动传送点,即以弹出表格的形式展示传送点的信息,点击其中一行会自动打开【点位标记】进行标记<br> | ||
【点位标记】:打开时,常驻显示四个路径点编号的输入框。输入编号后点击【重绘】,所对应的绘制地图内路径点会变成相应的颜色,可关闭【颜色】便于寻找标记的路径点<br> | 【点位标记】:打开时,常驻显示四个路径点编号的输入框。输入编号后点击【重绘】,所对应的绘制地图内路径点会变成相应的颜色,可关闭【颜色】便于寻找标记的路径点<br> | ||
【同组堆叠】:打开时,取消显示敌方梯队的站位信息,将同组的敌方梯队进行合并,同时显示所存在的数量<br><br> | 【同组堆叠】:打开时,取消显示敌方梯队的站位信息,将同组的敌方梯队进行合并,同时显示所存在的数量<br><br> | ||
− | + | ||
− | + | 【敌方梯队】:当【点位标记】打开时,可在敌方梯队表格点击一行进行标记;当敌人的行动逻辑为“巡逻”或“警戒”且【逻辑】打开时,在绘制地图内展示敌人行动逻辑<br> | |
− | + | 【敌人选择】:除在敌方梯队表格选中梯队外,也可在此处选择想要查看的梯队,或者在输入框输入对应的编号<br><br> | |
+ | |||
+ | 【存在地点】:首次使用需要加载一分钟左右,打开时,在【敌人选择】中更改敌人梯队编号会在下方的表格内展示存在该编号敌人的关卡<br> | ||
+ | 【组成查询】:打开时,且【存在地点】打开,选择敌人组成并点击【查询】,加载一段时间后,将在下方的表格内展示存在该组成的敌人及其所属关卡<br><\/div> | ||
<div style="padding:8px 10px; margin:10px 0px; width:1212px; background-color:#222; font-weight:300;"> | <div style="padding:8px 10px; margin:10px 0px; width:1212px; background-color:#222; font-weight:300;"> | ||
− | <div style="margin:5px; font-size:120%; font-weight:800; position:relative; left:-8px;">制作参考:</div> | + | <div style="margin:5px; font-size:120%; font-weight:800; position:relative; left:-8px;">制作参考:<\/div> |
− | 1 . 杯具终产物,<a class="external text" style="color:#eaeaea;" href="https://bbs.nga.cn/read.php?tid=14769876">铁血生态观察手记 V1.0</a>,2018年08月16日更新。<br> | + | 1 . 杯具终产物,<a class="external text" style="color:#eaeaea;" href="https://bbs.nga.cn/read.php?tid=14769876">铁血生态观察手记 V1.0<\/a>,2018年08月16日更新。<br> |
− | 2 . CCX_CX_D,<a class="external text" style="color:#eaeaea;" href="https://gf.hometehomete.com/zh/maps/">少女前线数据网站</a>,2020年02月27日更新。<br> | + | 2 . CCX_CX_D,<a class="external text" style="color:#eaeaea;" href="https://gf.hometehomete.com/zh/maps/">少女前线数据网站<\/a>,2020年02月27日更新。<br> |
− | 3 . pohcy,<a class="external text" style="color:#eaeaea;" href="https://ngabbs.com/read.php?tid=19587014">改良版战场模型</a>,2019年12月10日更新。<br></div>`; | + | 3 . pohcy,<a class="external text" style="color:#eaeaea;" href="https://ngabbs.com/read.php?tid=19587014">改良版战场模型<\/a>,2019年12月10日更新。<br><\/div>`; |
$("#otherthing").html(text); | $("#otherthing").html(text); | ||
} | } | ||
})</script></includeonly> | })</script></includeonly> |