◆少前百科是非盈利性、非官方的少女前线维基百科。
◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科
◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科
◆To foreigners,You can use twitter to contact us.
Icon Nyto Silver.png

“Widget:EnemyInfo/js”的版本间的差异

来自少前百科GFwiki
跳转至: 导航搜索
(更新)
(测试)
第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) {  
+
if (this.readyState == 4 && this.status == 200) {  
      Spot = JSON.parse(this.responseText.slice(`{"spot_info":`.length, this.responseText.length - 1));  
+
    Spot = JSON.parse(this.responseText.slice(`{"spot_info":`.length, this.responseText.length - 1));  
      loadstate ++; }
+
    loadstate ++; }
 
};
 
};
 
xmlhttp_Spot.open("GET", "http://www.gfwiki.org/images/0/06/StcSpot.txt", true);
 
xmlhttp_Spot.open("GET", "http://www.gfwiki.org/images/0/06/StcSpot.txt", true);
第31行: 第35行:
 
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) {  
+
if (this.readyState == 4 && this.status == 200) {  
      Enemy_in_team = JSON.parse(this.responseText.slice(`{"enemy_in_team_info":`.length, this.responseText.length - 1));  
+
    Enemy_in_team = JSON.parse(this.responseText.slice(`{"enemy_in_team_info":`.length, this.responseText.length - 1));  
      loadstate ++; }
+
    loadstate ++; }
 
};
 
};
 
xmlhttp_in_team.open("GET", "http://www.gfwiki.org/images/4/48/StcEnemy_in_team.txt", true);
 
xmlhttp_in_team.open("GET", "http://www.gfwiki.org/images/4/48/StcEnemy_in_team.txt", true);
第40行: 第44行:
 
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) {  
+
if (this.readyState == 4 && this.status == 200) {  
      Enemy_standard_attribute = JSON.parse(this.responseText.slice(`{"enemy_standard_attribute_info":`.length, this.responseText.length - 1));  
+
    Enemy_standard_attribute = JSON.parse(this.responseText.slice(`{"enemy_standard_attribute_info":`.length, this.responseText.length - 1));  
      loadstate ++; }
+
    loadstate ++; }
 
};
 
};
 
xmlhttp_standard_attribute.open("GET", "http://www.gfwiki.org/images/1/13/StcEnemy_standard_attribute.txt", true);
 
xmlhttp_standard_attribute.open("GET", "http://www.gfwiki.org/images/1/13/StcEnemy_standard_attribute.txt", true);
第49行: 第53行:
 
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) {  
+
if (this.readyState == 4 && this.status == 200) {  
      Enemy_team = JSON.parse(this.responseText.slice(`{"enemy_team_info":`.length, this.responseText.length - 1));  
+
    Enemy_team = JSON.parse(this.responseText.slice(`{"enemy_team_info":`.length, this.responseText.length - 1));  
      loadstate ++; }
+
    loadstate ++; }
 
};
 
};
 
xmlhttp_team.open("GET", "http://www.gfwiki.org/images/c/c8/StcEnemy_team.txt", true);
 
xmlhttp_team.open("GET", "http://www.gfwiki.org/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.slice(`{"theater_area_info":`.length, this.responseText.length - 1));
 +
    loadstate ++; }
 +
};
 +
xmlhttp_Theater_area.open("GET", "http://www.gfwiki.org/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) {  
+
if (this.readyState == 4 && this.status == 200) {  
      Building = JSON.parse(this.responseText.slice(`{"building_info":`.length, this.responseText.length - 1));  
+
    Building = JSON.parse(this.responseText.slice(`{"building_info":`.length, this.responseText.length - 1));  
      loadstate ++; }
+
    loadstate ++; }
 
};
 
};
 
xmlhttp_Building.open("GET", "http://www.gfwiki.org/images/6/69/StcBuilding.txt", true);
 
xmlhttp_Building.open("GET", "http://www.gfwiki.org/images/6/69/StcBuilding.txt", true);
第68行: 第80行:
 
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) {  
+
if (this.readyState == 4 && this.status == 200) {  
      Mission = JSON.parse(this.responseText.slice(`{"mission_info":`.length, this.responseText.length - 1));  
+
    Mission = JSON.parse(this.responseText.slice(`{"mission_info":`.length, this.responseText.length - 1));  
      loadstate ++; }
+
    loadstate ++; }
 
};
 
};
 
xmlhttp_Mission.open("GET", "http://www.gfwiki.org/images/4/40/StcMission.txt", true);
 
xmlhttp_Mission.open("GET", "http://www.gfwiki.org/images/4/40/StcMission.txt", true);
第77行: 第89行:
 
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) {  
+
if (this.readyState == 4 && this.status == 200) {  
      Enemy_charater_type = JSON.parse(this.responseText.slice(`{"enemy_character_type_info":`.length, this.responseText.length - 1));  
+
    Enemy_charater_type = JSON.parse(this.responseText.slice(`{"enemy_character_type_info":`.length, this.responseText.length - 1));  
      loadstate ++; }
+
    loadstate ++; }
 
};
 
};
 
xmlhttp_charater_type.open("GET", "http://www.gfwiki.org/images/6/66/StcEnemy_character_type.txt", true);
 
xmlhttp_charater_type.open("GET", "http://www.gfwiki.org/images/6/66/StcEnemy_character_type.txt", true);
第86行: 第98行:
 
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) {  
+
if (this.readyState == 4 && this.status == 200) {  
      Ally_team = JSON.parse(this.responseText.slice(`{"ally_team_info":`.length, this.responseText.length - 1));  
+
    Ally_team = JSON.parse(this.responseText.slice(`{"ally_team_info":`.length, this.responseText.length - 1));  
      loadstate ++; }
+
    loadstate ++; }
 
};
 
};
 
xmlhttp_Ally_team.open("GET", "http://www.gfwiki.org/images/e/e4/StcAlly_team.txt", true);
 
xmlhttp_Ally_team.open("GET", "http://www.gfwiki.org/images/e/e4/StcAlly_team.txt", true);
第95行: 第107行:
 
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) {  
+
if (this.readyState == 4 && this.status == 200) {  
 
     Team_ai = JSON.parse(this.responseText.slice(`{"team_ai_info":`.length, this.responseText.length - 1));  
 
     Team_ai = JSON.parse(this.responseText.slice(`{"team_ai_info":`.length, this.responseText.length - 1));  
      loadstate ++; }
+
    loadstate ++; }
 
};
 
};
 
xmlhttp_Team_ai.open("GET", "http://www.gfwiki.org/images/b/b7/StcTeam_ai.txt", true);
 
xmlhttp_Team_ai.open("GET", "http://www.gfwiki.org/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.slice(`{"mission_targettrain_enemy_info":`.length, this.responseText.length - 1));
 +
    loadstate ++; }
 +
};
 +
xmlhttp_Mission_targettrain_enemy.open("GET", "http://www.gfwiki.org/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 ++; }
+
if (this.readyState == 4 && this.status == 200) { Building_txt = this.responseText; loadstate ++; }
 
};
 
};
 
xmlhttp_Building_txt.open("GET", "http://www.gfwiki.org/images/8/8f/Building.txt", true);
 
xmlhttp_Building_txt.open("GET", "http://www.gfwiki.org/images/8/8f/Building.txt", true);
第113行: 第134行:
 
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 ++; }
+
if (this.readyState == 4 && this.status == 200) { Mission_txt = this.responseText; loadstate ++; }
 
};
 
};
 
xmlhttp_Mission_txt.open("GET", "http://www.gfwiki.org/images/c/c7/Mission.txt", true);
 
xmlhttp_Mission_txt.open("GET", "http://www.gfwiki.org/images/c/c7/Mission.txt", true);
第120行: 第141行:
 
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 ++; }
+
if (this.readyState == 4 && this.status == 200) { Enemy_charater_type_txt = this.responseText; loadstate ++; }
 
};
 
};
 
xmlhttp_Enemy_charater_type_txt.open("GET", "http://www.gfwiki.org/images/4/49/Enemy_character_type.txt", true);
 
xmlhttp_Enemy_charater_type_txt.open("GET", "http://www.gfwiki.org/images/4/49/Enemy_character_type.txt", true);
第127行: 第148行:
 
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 ++; }
+
if (this.readyState == 4 && this.status == 200) { Ally_team_txt = this.responseText; loadstate ++; }
 
};
 
};
 
xmlhttp_Ally_team_txt.open("GET", "http://www.gfwiki.org/images/0/00/Ally_team.txt", true);
 
xmlhttp_Ally_team_txt.open("GET", "http://www.gfwiki.org/images/0/00/Ally_team.txt", true);
第134行: 第155行:
 
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 ++; }
+
if (this.readyState == 4 && this.status == 200) { Team_ai_txt = this.responseText; loadstate ++; }
 
};
 
};
 
xmlhttp_Team_ai_txt.open("GET", "http://www.gfwiki.org/images/f/f5/Team_ai.txt", true);
 
xmlhttp_Team_ai_txt.open("GET", "http://www.gfwiki.org/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", "http://www.gfwiki.org/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 ++; }
+
if (this.readyState == 4 && this.status == 200) { Special_spot_config_txt = this.responseText; loadstate ++; }
 
};
 
};
 
xmlhttp_Special_spot_config_txt.open("GET", "http://www.gfwiki.org/images/e/ec/Special_spot_config.txt", true);
 
xmlhttp_Special_spot_config_txt.open("GET", "http://www.gfwiki.org/images/e/ec/Special_spot_config.txt", true);
第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 + " / 15");
+
     $("#loadtips").html("文件加载进度:" + loadstate + " / 18");
     if(loadstate < 15) setTimeout(function(){loadjudge();}, 100);
+
     if(loadstate < 18) setTimeout(function(){loadjudge();}, 100);
 
     else {
 
     else {
 
         trans();
 
         trans();
第220行: 第259行:
  
 
/*-- 下载 sdownload  重置 sredraw  隐藏 smaphide  图例 sexample   
 
/*-- 下载 sdownload  重置 sredraw  隐藏 smaphide  图例 sexample   
    敌人 smapenemy  建筑 smapbuild  类型 smaptype  颜色 smapcolor  标号 smapspotn  逻辑 smapenemyai
+
    敌人 smapenemy  建筑 smapbuild  类型 smaptype  颜色 smapcolor  标号 smapspotn  逻辑 smapenemyai
    建筑表格 sbuildtable  传送表格 sporttable  点位标记 sspotsign  同组堆叠 senemypile  --*/
+
    建筑表格 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};
  
第254行: 第293行:
 
             <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>
第274行: 第313行:
 
             <option value="5042">[支线] 茧中蝶影</option>
 
             <option value="5042">[支线] 茧中蝶影</option>
 
              
 
              
 +
            <option value="6004">[战区] 第一版</option>
 +
            <option value="6005">[战区] 第二版</option>
 +
            <option value="6006">[战区] 第三版</option>
 +
 
             </select></div>
 
             </select></div>
 
             <div class="eselect"><select id="missionselect" name="missionselect">
 
             <div class="eselect"><select id="missionselect" name="missionselect">
第291行: 第334行:
 
         $("#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)) {
第357行: 第433行:
  
 
         /*-- 支线活动 --*/
 
         /*-- 支线活动 --*/
         if(Number(thevalue) > 5000 && Number(thevalue) < 6000){
+
         else if(Number(thevalue) > 5000 && Number(thevalue) < 6000){
 
             for (i in Mission) {
 
             for (i in Mission) {
 
                 /*-- 去除剧情关卡 --*/
 
                 /*-- 去除剧情关卡 --*/
第380行: 第456行:
 
     /*-- 地图的显示 --*/
 
     /*-- 地图的显示 --*/
 
     $("#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]);
第646行: 第725行:
 
             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;}
第741行: 第820行:
 
             if(Enemy_charater_type[j]["id"] != enemy_leader) continue;
 
             if(Enemy_charater_type[j]["id"] != enemy_leader) continue;
 
             leader_name = Enemy_charater_type[j]["name"];
 
             leader_name = Enemy_charater_type[j]["name"];
        }
 
       
 
        /*-- enemy组成:enemyout --*/
 
        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 + " ");
 
            }
 
        }
 
 
        /*-- enemy效能计算 --*/
 
        if(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));
 
            }
 
 
         }
 
         }
  
第801行: 第828行:
  
 
         /*-- 利用数组存储效能数据以优化计算 --*/
 
         /*-- 利用数组存储效能数据以优化计算 --*/
         spotinfo.push({sename:leader_name, sally:((ally_name) ? ally_name : 0), sefect:efect, seai:enemy_ai, sbuild:0});
+
         spotinfo.push({sename:leader_name, sally:((ally_name) ? ally_name : 0), sefect:((efect == 0) ? efectcal(enemy_team_id) : efect), seai:enemy_ai, sbuild:0});
 
         eteamspot.push(enemy_team_id);
 
         eteamspot.push(enemy_team_id);
  
第811行: 第838行:
 
         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 += enemyout + `<\/td><td class="cella" width="120px" style="display:table-cell;">`;
+
         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">`;
第883行: 第910行:
 
     coparameter = (x_radio > y_radio) ? x_radio : y_radio;
 
     coparameter = (x_radio > y_radio) ? x_radio : y_radio;
  
  /*--  路径点的绘制  --*/
+
/*--  路径点的绘制  --*/
  var singlespot = [];
+
var singlespot = [];
  con.lineWidth = String(30 / coparameter);
+
con.lineWidth = String(30 / coparameter);
  con.strokeStyle = "#cecece";
+
con.strokeStyle = "#cecece";
  for(i in dspot){
+
for(i in dspot){
      /*--  路径点的连接  --*/
+
    /*--  路径点的连接  --*/
      var routestr = dspot[i].map_route;
+
    var routestr = dspot[i].map_route;
      while(routestr){
+
    while(routestr){
          var i2n = Number(routestr.slice(0, (routestr.indexOf(",") == -1) ? (routestr.length) : routestr.indexOf(",")));
+
        var i2n = Number(routestr.slice(0, (routestr.indexOf(",") == -1) ? (routestr.length) : routestr.indexOf(",")));
          var i2 = -1;
+
        var i2 = -1;
         
+
       
          for(k in dspot){ if(dspot[k].id == i2n){ i2 = k; break;}}
+
        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(dspot[i].route.indexOf(i2n) == -1){ singlespot.push({a1:i, a2:i2}); break;}
          if(i2 == -1) break;
+
        if(i2 == -1) break;
  
          /*--  两个路径点的原始坐标  --*/
+
        /*--  两个路径点的原始坐标  --*/
          var x1 = Number(dspot[i].coordinator_x);
+
        var x1 = Number(dspot[i].coordinator_x);
          var x2 = Number(dspot[i2].coordinator_x);
+
        var x2 = Number(dspot[i2].coordinator_x);
          var y1 = Number(dspot[i].coordinator_y);
+
        var y1 = Number(dspot[i].coordinator_y);
          var y2 = Number(dspot[i2].coordinator_y);
+
        var y2 = Number(dspot[i2].coordinator_y);
  
          /*--  双向路径的绘制  --*/
+
        /*--  双向路径的绘制  --*/
          con.lineWidth = String(coorchange(3, 30));
+
        con.lineWidth = String(coorchange(3, 30));
          con.beginPath();
+
        con.beginPath();
          con.moveTo(coorchange(1, x1, x_min), coorchange(2, y1, y_min));
+
        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.lineTo(coorchange(1, x2, x_min), coorchange(2, y2, y_min));
          con.stroke();
+
        con.stroke();
  
          routestr = (routestr.indexOf(",", j) == -1) ? "" : routestr.slice(routestr.indexOf(",", j) + 1, routestr.length);
+
        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));
+
for(i in singlespot){
      con.strokeStyle = "#111111";
+
    var x1 = Number(dspot[singlespot[i].a1].coordinator_x);
      con.beginPath();
+
    var x2 = Number(dspot[singlespot[i].a2].coordinator_x);
      con.moveTo(coorchange(1, x1, x_min), coorchange(2, y1, y_min));
+
    var y1 = Number(dspot[singlespot[i].a1].coordinator_y);
      con.lineTo(coorchange(1, (x1 + x2)/2, x_min), coorchange(2, (y1 + y2)/2, y_min));
+
    var y2 = Number(dspot[singlespot[i].a2].coordinator_y);
      con.stroke();
+
 
      con.lineWidth = String(coorchange(3, 10));
+
    con.lineWidth = String(coorchange(3, 32));
      con.strokeStyle = "#cecece";
+
    con.strokeStyle = "#111111";
      con.beginPath();
+
    con.beginPath();
      con.moveTo(coorchange(1, x1, x_min), coorchange(2, y1, y_min));
+
    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.lineTo(coorchange(1, (x1 + x2)/2, x_min), coorchange(2, (y1 + y2)/2, y_min));
      con.stroke();
+
    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();
 +
}
  
  
第1,135行: 第1,162行:
 
}
 
}
  
function enemyselectcreat(){
+
function traindisplay(){
     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">`;
+
    $("#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;
  
    for(var i = 0; i < Enemy_team.length; i++) output += "<option value=\"" + Enemy_team[i].id + "\">" + Enemy_team[i].id + "</option>";
+
        var thisline = `<tr class="missionline" style="border-bottom:2px #f4c43033 solid; display:block; cursor:pointer;"><td width="100px">`;
    output += `</select></div> <input type="text" id="enemytext" name="enemytext" style="border:none; padding:10px; background-color:#e0e0e0;"/>`;
+
        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;
    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);
 
  
     $("#enemychose").html(output);
+
     $("#missionshow").html(output);
     $("#enemyselect").change(function(){
+
     $(".missionline").mouseover(function(){
         enemydisplay(Number(this.value));
+
         $(this).children("td").css("background-color", "#f4c43033");
 
     });
 
     });
     $("#enemytext").change(function(){  
+
    $(".missionline").mouseout(function(){
         for(var i = 0; i < Enemy_team.length; i++){
+
        $(this).children("td").css("background-color", "");
             if(Enemy_team[i].id == Number(this.value)){
+
    });
                 enemydisplay(Number(this.value));
+
    $(".missionline").click(function(){
                 return;
+
        $(this).parent().children("tr").css({"background-color":"", "color":""});
             }
+
        $(this).css({"background-color":"#f4c430cc", "color":"black"});
         }
+
        enemydisplay($(this).children("td").eq(0).html());
         alert("该敌人不存在");
+
    });
     });
+
}
}
+
 
 
+
function theaterdisplay(){
function enemydisplay(enemy_team_id){
+
    /*-- 清空地图 --*/
     /*-- enemyselect选择被选择的option --*/
+
    $("#missiondrawing")[0].getContext("2d").clearRect(0, 0, mapwidth, mapheight);
     $("#enemyselect").val(enemy_team_id);
+
    if(setmessage.smaphide == 0) $("#smaphide").click();
 
+
    if(setmessage.sbuildtable == 1) $("#smaphide").click();
     /*-- canvas作图区域清空/画背景以及参考线 --*/
+
    if(setmessage.sporttable == 1) $("#smaphide").click();
     var con = $("#enemydrawing")[0].getContext("2d");
+
    if(setmessage.sspotsign == 1) $("#smaphide").click();
     con.clearRect(0, 0, 4800, 300);
+
    if(setmessage.senemypile == 1) $("#smaphide").click();
     con.lineWidth="1";
+
 
     con.strokeStyle="#444444";
+
    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">
     con.fillStyle = "#111111";
+
        <thead style="display:block; background-color:#f4c430; color:black;"><tr>
     con.font="10px bolder Arial";
+
        <th style="width:100px;">编号</th>
     con.beginPath();
+
        <th style="width:160px;">队长</th>
     con.fillRect(0, 0, 4800, 300);
+
        <th style="width:100px;">效能</th>
     con.stroke();
+
        <th style="width:490px;">组成</th>
 
+
        <th style="width:100px;">波数</th>
     /*-- 参考线横向/纵向线条 --*/
+
        <th style="width:270px;">其它</th>
     for(var i = 0; i <= 300 / 25; i++){ dcoordinator(3, "#444444", 0, i);}
+
        </tr></thead><tbody id="Missionbody" style="height:300px; overflow-y:scroll; display:block;">`;
     for(var i = 0; i <= 3600/100; i++){  
+
   
 +
    /*-- 路径点的敌人站位 --*/
 +
    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_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="100px">`;
 +
            thisline += enemy_num + `<\/td><td width="250px">`;
 +
            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;"/>`;
 +
 
 +
    /*-- 绘制画布 --*/
 +
    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);
 +
 
 +
    $("#enemychose").html(output);
 +
    $("#enemyselect").change(function(){
 +
        enemydisplay(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));
 +
                 return;
 +
             }
 +
         }
 +
         alert("该敌人不存在");
 +
     });
 +
}
 +
 
 +
function enemydisplay(enemy_team_id){
 +
     /*-- enemyselect选择被选择的option --*/
 +
     $("#enemyselect").val(enemy_team_id);
 +
 
 +
     /*-- canvas作图区域清空/画背景以及参考线 --*/
 +
     var con = $("#enemydrawing")[0].getContext("2d");
 +
     con.clearRect(0, 0, 4800, 300);
 +
     con.lineWidth="1";
 +
     con.strokeStyle="#444444";
 +
     con.fillStyle = "#111111";
 +
     con.font="10px bolder Arial";
 +
     con.beginPath();
 +
     con.fillRect(0, 0, 4800, 300);
 +
     con.stroke();
 +
 
 +
     /*-- 参考线横向/纵向线条 --*/
 +
     for(var i = 0; i <= 300 / 25; i++){ dcoordinator(3, "#444444", 0, 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);}
第1,572行: 第1,759行:
 
             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, "");
            console.log($("#missionselect").find("option:selected").text());
 
 
             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,725行: 第1,911行:
 
     con.fill();
 
     con.fill();
 
     con.stroke();
 
     con.stroke();
 
+
 
 
     /*-- 地图图例的文字 --*/   
 
     /*-- 地图图例的文字 --*/   
 
     con.lineWidth = 4;
 
     con.lineWidth = 4;

2021年1月23日 (六) 17:53的版本