You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

script-json_data.js 4.8 kB

6 years ago
6 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. const dataSourceList = [ //几个不同的游戏服务区
  2. {
  3. code:"ja",
  4. source:"パズル&ドラゴンズ"
  5. },
  6. {
  7. code:"en",
  8. source:"Puzzle & Dragons"
  9. },
  10. {
  11. code:"ko",
  12. source:"퍼즐앤드래곤"
  13. },
  14. ];
  15. //类型和觉醒杀和潜觉杀的对应编号,还有类型可以打什么类型的潜觉杀
  16. const typekiller_for_type = [
  17. {type:0,awoken:39,latent:16,typeKiller:[]}, //0进化
  18. {type:12,awoken:40,latent:17,typeKiller:[]}, //12觉醒
  19. {type:14,awoken:41,latent:18,typeKiller:[]}, //14强化
  20. {type:15,awoken:42,latent:19,typeKiller:[]}, //15卖钱
  21. {type:5,awoken:32,latent:20,typeKiller:[7]}, //5神
  22. {type:4,awoken:31,latent:21,typeKiller:[8,3]}, //4龙
  23. {type:7,awoken:33,latent:22,typeKiller:[5]}, //7恶魔
  24. {type:8,awoken:34,latent:23,typeKiller:[5,1]}, //8机械
  25. {type:1,awoken:35,latent:24,typeKiller:[5,4,7,8,1,6,2,3]}, //1平衡
  26. {type:6,awoken:36,latent:25,typeKiller:[7,2]}, //6攻击
  27. {type:2,awoken:37,latent:26,typeKiller:[8,3]}, //2体力
  28. {type:3,awoken:38,latent:27,typeKiller:[4,6]}, //3回复
  29. {type:9,awoken:null,latent:null,typeKiller:[]}, //特殊保护
  30. ];
  31. //类型允许的潜觉杀
  32. const type_allowable_latent = [];
  33. typekiller_for_type.forEach(t=>
  34. {
  35. t.allowableLatent = t.typeKiller.concat([0,12,14,15]) //补充4种特殊杀
  36. .map(tn=>
  37. typekiller_for_type.find(_t=>_t.type == tn).latent
  38. );
  39. type_allowable_latent[t.type] = t.allowableLatent;
  40. }
  41. );
  42. //等效觉醒列表
  43. const equivalent_awoken = [
  44. {small:10,big:52,times:2}, //防封
  45. {small:11,big:68,times:5}, //防暗
  46. {small:12,big:69,times:5}, //防废
  47. {small:13,big:70,times:5}, //防毒
  48. {small:19,big:53,times:2}, //手指
  49. {small:21,big:56,times:2}, //SB
  50. ];
  51. //排序程序列表
  52. const sort_function_list = [
  53. {tag:"sort_none",name:"无",function:()=>0},
  54. {tag:"sort_id",name:"怪物ID",function:(a,b)=>a.id-b.id},
  55. {tag:"sort_attrs",name:"属性",function:(a,b)=>{
  56. let num = a.attrs[0] - b.attrs[0];
  57. if (num === 0) num = a.attrs[1] - b.attrs[1];
  58. return num;
  59. }},
  60. {tag:"sort_evoRootId",name:"进化树",function:(a,b)=>a.evoRootId-b.evoRootId},
  61. {tag:"sort_evoRoot_Attrs",name:"进化根怪物的属性",function:(a,b)=>{
  62. const card_a = Cards[a.evoRootId],card_b = Cards[b.evoRootId];
  63. let num = card_a.attrs[0] - card_b.attrs[0];
  64. if (num === 0) num = card_a.attrs[1] - card_b.attrs[1];
  65. return num;
  66. }},
  67. {tag:"sort_rarity",name:"稀有度",function:(a,b)=>a.rarity-b.rarity},
  68. {tag:"sort_cost",name:"消耗",function:(a,b)=>a.cost-b.cost},
  69. {tag:"sort_skillLv1",name:"技能最大冷却时间",function:(a,b)=>Skills[a.activeSkillId].initialCooldown-Skills[b.activeSkillId].initialCooldown},
  70. {tag:"sort_skillLvMax",name:"技能最小冷却时间",function:(a,b)=>{
  71. const skill_a = Skills[a.activeSkillId],skill_b = Skills[b.activeSkillId];
  72. return (skill_a.initialCooldown - skill_a.maxLevel) - (skill_b.initialCooldown - skill_b.maxLevel);
  73. }},
  74. {tag:"sort_hpMax110",name:"最大HP(Lv110)",function:(a,b)=>a.hp.max * (1 + a.limitBreakIncr/100) - b.hp.max * (1 + b.limitBreakIncr/100)},
  75. {tag:"sort_atkMax110",name:"最大攻击(Lv110)",function:(a,b)=>a.atk.max * (1 + a.limitBreakIncr/100) - b.atk.max * (1 + b.limitBreakIncr/100)},
  76. {tag:"sort_rcvMax110",name:"最大回复(Lv110)",function:(a,b)=>a.rcv.max * (1 + a.limitBreakIncr/100) - b.rcv.max * (1 + b.limitBreakIncr/100)},
  77. ];
  78. if (!solo)
  79. {
  80. const multiSort = [
  81. {tag:"sort_hpMax110_Multi",name:"最大协力攻击(Lv110+297)",function:(a,b)=>
  82. (a.atk.max * (1 + a.limitBreakIncr/100) + ((a.overlay || a.types[0] == 15 && a.types[1] == -1) ? 0 : 495)) * Math.pow(1.5, a.awakenings.filter(ak=>ak===30).length) -
  83. (b.atk.max * (1 + b.limitBreakIncr/100) + ((b.overlay || b.types[0] == 15 && b.types[1] == -1) ? 0 : 495)) * Math.pow(1.5, b.awakenings.filter(ak=>ak===30).length)
  84. },
  85. {tag:"sort_hpMax110_Multi",name:"最大协力HP(Lv110+297)",function:(a,b)=>
  86. (a.hp.max * (1 + a.limitBreakIncr/100) + ((a.overlay || a.types[0] == 15 && a.types[1] == -1) ? 0 : 990)) * Math.pow(1.5, a.awakenings.filter(ak=>ak===30).length) -
  87. (b.hp.max * (1 + b.limitBreakIncr/100) + ((b.overlay || b.types[0] == 15 && b.types[1] == -1) ? 0 : 990)) * Math.pow(1.5, b.awakenings.filter(ak=>ak===30).length)
  88. },
  89. {tag:"sort_hpMax110_Multi",name:"最大协力回复(Lv110+297)",function:(a,b)=>
  90. (a.rcv.max * (1 + a.limitBreakIncr/100) + ((a.overlay || a.types[0] == 15 && a.types[1] == -1) ? 0 : 297)) * Math.pow(1.5, a.awakenings.filter(ak=>ak===30).length) -
  91. (b.rcv.max * (1 + b.limitBreakIncr/100) + ((b.overlay || b.types[0] == 15 && b.types[1] == -1) ? 0 : 297)) * Math.pow(1.5, b.awakenings.filter(ak=>ak===30).length)
  92. },
  93. ];
  94. sort_function_list.push(...multiSort);
  95. }

智龙迷城队伍图制作工具