Browse Source

增加新技能解析

tags/v21.5
枫谷剑仙 4 years ago
parent
commit
f48e01a130
5 changed files with 30 additions and 9 deletions
  1. +1
    -0
      languages/zh-TW.js
  2. +1
    -0
      languages/zh.js
  3. +16
    -5
      script-json_data.js
  4. +9
    -3
      script-skill-parser.js
  5. +3
    -1
      script-universal_function.js

+ 1
- 0
languages/zh-TW.js View File

@@ -123,6 +123,7 @@
exact_combo: tp`剛好${'value'}連擊時`,
exact_match_length: tp`相連消除剛好${'value'}${'orbs'}時`,
exact_match_enhanced: tp`並且其中包含至少一個強化寶珠`,
exact_match_length_multiple: tp`每相連消除剛好${'value'}${'orbs'}1次時`,
compo_type_card: tp`隊伍中同時存在 ${'ids'} 時`,
compo_type_series: tp`隊員組成全為 ${'ids'} 合作時`,


+ 1
- 0
languages/zh.js View File

@@ -123,6 +123,7 @@
exact_combo: tp`刚好${'value'}连击时`,
exact_match_length: tp`相连消除刚好${'value'}${'orbs'}时`,
exact_match_enhanced: tp`并且其中包含至少一个强化宝珠`,
exact_match_length_multiple: tp`每相连消除刚好${'value'}${'orbs'}1次时`,
compo_type_card: tp`队伍中同时存在 ${'ids'} 时`,
compo_type_series: tp`队员组成全为 ${'ids'} 合作时`,


+ 16
- 5
script-json_data.js View File

@@ -137,8 +137,9 @@ let localTranslating = {
multi_player: tp`When in Multiplayer Mode `,
remain_orbs: tp`When ≤ ${'value'} Orbs on the board `,
exact_combo: tp`When exactly ${'value'} combos `,
exact_match_length: tp`When matching exactly ${'value'}${'orbs'} `,
exact_match_length: tp`When matching exactly of ${'value'}${'orbs'} `,
exact_match_enhanced: tp` orbs including enhanced`,
exact_match_length_multiple: tp`When matching each exactly of ${'value'}${'orbs'} `,
compo_type_card: tp`When ${'ids'} are all on team, `,
compo_type_series: tp`When all subs from ${'ids'} collab (Needs at least 1 sub), `,
@@ -1207,10 +1208,20 @@ const specialSearchFunctions = (function() {
});
},
addition:card=>{
const value = getSkillAddCombo(card);
const searchTypeArray = [210];
const skill = getCardLeaderSkill(card, searchTypeArray);
return `+${value.bigNumberToString()}C${skill?`/十字`:""}`;
const value = getSkillAddCombo(card);
let nodeArr = [`+${value.bigNumberToString()}C`]
let skill;
skill = getCardLeaderSkill(card, [210]);
if (skill) {
nodeArr.push("/十字");
}
skill = getCardLeaderSkill(card, [235]);
if (skill) {
nodeArr.push("/");
nodeArr.push(createOrbsList(flags(skill.params[0])));
nodeArr.push(`×${skill.params[2]}`);
}
return nodeArr.nodeJoin();
}
},
{name:"[7×6 board]",otLangName:{chs:"【7×6 版面】",cht:"【7×6 版面】"},


+ 9
- 3
script-skill-parser.js View File

@@ -722,9 +722,9 @@ const c = {
hp: function (min, max) {
return { hp: { min: min / 100, max: max / 100 } };
},
exact: function (type, value, attrs) {
exact: function (type, value, attrs, multiple = false) {
if (attrs === void 0) { attrs = Attributes.all(); }
return { exact: { type: type, value: value, attrs: attrs } };
return { exact: { type: type, value: value, attrs: attrs, multiple: multiple} };
},
compo: function (type, ids) {
return { compo: { type: type, ids: ids } };
@@ -1418,6 +1418,9 @@ const parsers = {
[232](...ids) { return evolvedSkills(false, ids.map(id => this.parser(id))); },
[233](...ids) { return evolvedSkills(true, ids.map(id => this.parser(id))); },
[234](min, max) { return skillProviso(c.stage(min ?? 0, max ?? 0)); },
[235](attr, _, len, _2, _3, combo) {
return powerUp(null, null, p.mul({ atk: 100 }), c.exact('match-length', len, flags(attr), true), null, [addCombo(combo)]);
},
[1000](type, pos, ...ids) {
const posType = (type=>{
switch (type) {
@@ -2428,7 +2431,10 @@ function renderCondition(cond) {
value: renderValue(v.constant(cond.exact.value), {unit: tsp.unit.orbs}),
orbs: cond.exact.attrs === 'enhanced' ? tsp.cond.exact_match_enhanced() : renderOrbs(cond.exact.attrs, {affix: true})
};
frg.ap(tsp.cond.exact_match_length(dict));
frg.ap(cond.exact.multiple ?
tsp.cond.exact_match_length_multiple(dict) :
tsp.cond.exact_match_length(dict));
}
} else if (cond.compo) {
let dict = {};


+ 3
- 1
script-universal_function.js View File

@@ -1121,7 +1121,7 @@ function tIf_Effect_addCombo(leader1id, leader2id) {
];
}
function getSkillAddCombo(card) {
const searchTypeArray = [192, 194, 206, 209, 210, 219, 220];
const searchTypeArray = [192, 194, 206, 209, 210, 219, 220, 235];
const skill = getCardLeaderSkills(card, searchTypeArray)[0];
if (!skill) return 0;
switch (skill.type) {
@@ -1137,6 +1137,8 @@ function getSkillAddCombo(card) {
return skill.params[2];
case 220:
return skill.params[1];
case 235:
return skill.params[5];
default:
return 0;
}


Loading…
Cancel
Save