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.3 kB

6 years ago
6 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. typekiller_for_type.forEach(t=>
  32. t.typeKiller.push(0,12,14,15) //补充4种特殊杀
  33. );
  34. //类型允许的潜觉杀
  35. const type_allowable_latent = [];
  36. typekiller_for_type.forEach(t=>
  37. type_allowable_latent[t.type] = t.typeKiller.map(tn=>
  38. typekiller_for_type.find(_t=>_t.type == tn).latent
  39. )
  40. );
  41. //等效觉醒列表
  42. const equivalent_awoken = [
  43. {small:10,big:52,times:2}, //防封
  44. {small:11,big:68,times:5}, //防暗
  45. {small:12,big:69,times:5}, //防废
  46. {small:13,big:70,times:5}, //防毒
  47. {small:19,big:53,times:2}, //手指
  48. {small:21,big:56,times:2}, //SB
  49. ];
  50. //排序程序列表
  51. const sort_function_list = [
  52. {tag:"sort_none",name:"无",function:()=>0},
  53. {tag:"sort_id",name:"怪物ID",function:(a,b)=>a.id-b.id},
  54. {tag:"sort_attrs",name:"属性",function:(a,b)=>{
  55. let num = a.attrs[0] - b.attrs[0];
  56. if (num === 0) num = a.attrs[1] - b.attrs[1];
  57. return num;
  58. }},
  59. {tag:"sort_evoRootId",name:"进化树",function:(a,b)=>a.evoRootId-b.evoRootId},
  60. {tag:"sort_evoRoot_Attrs",name:"进化根怪物的属性",function:(a,b)=>{
  61. const card_a = Cards[a.evoRootId],card_b = Cards[b.evoRootId];
  62. let num = card_a.attrs[0] - card_b.attrs[0];
  63. if (num === 0) num = card_a.attrs[1] - card_b.attrs[1];
  64. return num;
  65. }},
  66. {tag:"sort_rarity",name:"稀有度",function:(a,b)=>a.rarity-b.rarity},
  67. {tag:"sort_cost",name:"消耗",function:(a,b)=>a.cost-b.cost},
  68. {tag:"sort_skillLv1",name:"技能最大冷却时间",function:(a,b)=>Skills[a.activeSkillId].initialCooldown-Skills[b.activeSkillId].initialCooldown},
  69. {tag:"sort_skillLvMax",name:"技能最小冷却时间",function:(a,b)=>{
  70. const skill_a = Skills[a.activeSkillId],skill_b = Skills[b.activeSkillId];
  71. return (skill_a.initialCooldown - skill_a.maxLevel) - (skill_b.initialCooldown - skill_b.maxLevel);
  72. }},
  73. {tag:"sort_hpMax110",name:"最大HP(Lv110)",function:(a,b)=>a.hp.max * (1 + a.limitBreakIncr/100) - b.hp.max * (1 + b.limitBreakIncr/100)},
  74. {tag:"sort_atkMax110",name:"最大攻击(Lv110)",function:(a,b)=>a.atk.max * (1 + a.limitBreakIncr/100) - b.atk.max * (1 + b.limitBreakIncr/100)},
  75. {tag:"sort_rcvMax110",name:"最大回复(Lv110)",function:(a,b)=>a.rcv.max * (1 + a.limitBreakIncr/100) - b.rcv.max * (1 + b.limitBreakIncr/100)},
  76. ];
  77. if (!solo)
  78. {
  79. const multiSort = [
  80. {tag:"sort_hpMax110_Multi",name:"最大协力攻击(Lv110)",function:(a,b)=>
  81. a.atk.max * (1 + a.limitBreakIncr/100) * Math.pow(1.5, a.awakenings.filter(ak=>ak===30).length) -
  82. b.atk.max * (1 + b.limitBreakIncr/100) * Math.pow(1.5, b.awakenings.filter(ak=>ak===30).length)
  83. },
  84. {tag:"sort_hpMax110_Multi",name:"最大协力HP(Lv110)",function:(a,b)=>
  85. a.hp.max * (1 + a.limitBreakIncr/100) * Math.pow(1.5, a.awakenings.filter(ak=>ak===30).length) -
  86. b.hp.max * (1 + b.limitBreakIncr/100) * Math.pow(1.5, b.awakenings.filter(ak=>ak===30).length)
  87. },
  88. {tag:"sort_hpMax110_Multi",name:"最大协力回复(Lv110)",function:(a,b)=>
  89. a.rcv.max * (1 + a.limitBreakIncr/100) * Math.pow(1.5, a.awakenings.filter(ak=>ak===30).length) -
  90. b.rcv.max * (1 + b.limitBreakIncr/100) * Math.pow(1.5, b.awakenings.filter(ak=>ak===30).length)
  91. },
  92. ];
  93. sort_function_list.push(...multiSort);
  94. }

智龙迷城队伍图制作工具