加入破白盾的技能解析

This commit is contained in:
枫谷剑仙 2024-05-23 22:09:12 +08:00
parent bc3dc14fdc
commit 39fd27a898
8 changed files with 76 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 188 KiB

View File

@ -224,6 +224,7 @@ const _localTranslating = {
maxhp: tp`${'icon'}最大HP`,
hp: tp`HP`,
chp: tp`当前HP`,
shield: tp`护盾`,
atk: tp`攻击力`,
rcv: tp`回复力`,
teamhp: tp`队伍总HP`,

View File

@ -224,6 +224,7 @@ const _localTranslating = {
maxhp: tp`最大HP`,
hp: tp`HP`,
chp: tp`當前HP`,
shield: tp`護盾`,
atk: tp`攻擊力`,
rcv: tp`回復力`,
teamhp: tp`隊伍總HP`,

View File

@ -238,6 +238,7 @@ let localTranslating = {
maxhp: tp`${'icon'}Max HP`,
hp: tp`HP`,
chp: tp`current HP`,
shield: tp`shield`,
atk: tp`ATK`,
rcv: tp`RCV`,
teamhp: tp`Team HP`,
@ -2320,7 +2321,10 @@ const specialSearchFunctions = (function() {
const skill = getCardActiveSkill(card, searchTypeArray);
if (!skill) return;
const sk = skill.params;
return document.createTextNode(`威吓×${sk[0]}T`);
const fragment = document.createDocumentFragment();
fragment.appendChild(createSkillIcon('delay'));
fragment.append(`×${sk[0]}T`);
return fragment;
}
},
{name:"Reduces enemies' DEF(sort by rate)",otLangName:{chs:"破防(按防御减少比例排序)",cht:"破防(按防禦減少比例排序)"},
@ -2336,7 +2340,10 @@ const specialSearchFunctions = (function() {
const skill = getCardActiveSkill(card, searchTypeArray);
if (!skill) return;
const sk = skill.params;
return `破防${sk[1]}%×${sk[0]}T`;
const fragment = document.createDocumentFragment();
fragment.appendChild(createSkillIcon('def-break'));
fragment.append(`${sk[1]}%×${sk[0]}T`);
return fragment;
}
},
{name:"Poisons enemies(sort by rate)",otLangName:{chs:"中毒(按毒伤比率排序)",cht:"中毒(按毒傷比率排序)"},
@ -2352,7 +2359,10 @@ const specialSearchFunctions = (function() {
const skill = getCardActiveSkill(card, searchTypeArray);
if (!skill) return;
const sk = skill.params;
return `攻击力×${sk[0]/100}`;
const fragment = document.createDocumentFragment();
fragment.appendChild(createSkillIcon('poison'));
fragment.append(`ATK×${sk[0]/100}`);
return fragment;
}
},
{name:"Change enemies's Attr(sort by attr)",otLangName:{chs:"改变敌人属性(按属性排序)",cht:"改變敵人屬性(按屬性排序)"},
@ -2389,8 +2399,9 @@ const specialSearchFunctions = (function() {
const sk = skill.params;
const fragment = document.createDocumentFragment();
fragment.appendChild(document.createTextNode(`${sk[1]/100}`));
fragment.appendChild(createSkillIcon('counter-attack'));
fragment.appendChild(createOrbsList(sk[2]));
fragment.appendChild(document.createTextNode(`×${sk[1]/100}`));
fragment.appendChild(document.createTextNode(`×${sk[0]}T`));
return fragment;
@ -3243,6 +3254,25 @@ const specialSearchFunctions = (function() {
},
addition: gravity_Addition
},
{name:"Breaking Shield",otLangName:{chs:"破白盾",cht:"破白盾"},
function:cards=>{
const searchTypeArray = [259];
return cards.filter(card=>{
const skill = getCardActiveSkill(card, searchTypeArray);
return skill;
}).sort((a,b)=>sortByParams(a,b,searchTypeArray));
},
addition:card=>{
const searchTypeArray = [259];
const skill = getCardActiveSkill(card, searchTypeArray);
if (!skill) return;
const sk = skill.params;
const fragment = document.createDocumentFragment();
fragment.appendChild(createSkillIcon('breaking-shield'));
fragment.append(`-${sk[0]}%`);
return fragment;
}
},
]},
{group:true,name:"-----Damage Enemy - Fixed damage-----",otLangName:{chs:"-----对敌直接伤害类-无视防御固伤-----",cht:"-----對敵直接傷害類-無視防禦固傷-----"}, functions: [
{name:"Fixed damage - Any(sort by damage)",otLangName:{chs:"无视防御固伤-任意(按总伤害排序)",cht:"無視防禦固傷-任意(按總傷害排序)"},

View File

@ -479,6 +479,7 @@ const SkillKinds = {
BoardJammingStates: "board-jamming-states",
RemoveAssist: "remove-assist",
PredictionFalling: "prediction-falling",
BreakingShield: "breaking-shield",
}
function skillParser(skillId)
@ -815,6 +816,9 @@ const v = {
xCHP: function(value) {
return { kind: SkillValueKind.xCHP, value: (value / 100) ?? 1 };
},
xShield: function(value) {
return { kind: SkillValueKind.xShield, value: (value / 100) ?? 1 };
},
xATK: function(value) {
return { kind: SkillValueKind.xATK, value: (value / 100) ?? 1 };
},
@ -1067,6 +1071,9 @@ function removeAssist() {
function predictionFalling() {
return { kind: SkillKinds.PredictionFalling };
}
function breakingShield(value) {
return { kind: SkillKinds.BreakingShield, value: value };
}
const skillObjectParsers = {
//parser: (() => []), //这个用来解决代码提示的报错问题,不起实际作用
@ -1709,6 +1716,7 @@ const skillObjectParsers = {
increaseDamageCap(cap * 1e8, typeArr)
);
},
[259](percent) { return breakingShield(v.xShield(percent)); },
[1000](type, pos, ...ids) {
const posType = (type=>{
switch (type) {
@ -2283,7 +2291,7 @@ function renderSkill(skill, option = {})
frg.ap(tsp.skill.drum());
break;
}
case SkillKinds.AutoPath: { //小龙的萌新技能
case SkillKinds.AutoPath: { //自动路径,小龙的萌新技能
const {matchesNumber} = skill;
frg.ap(tsp.skill.auto_path({
icon: createIcon(skill.kind),
@ -2759,6 +2767,15 @@ function renderSkill(skill, option = {})
frg.ap(tsp.skill.prediction_falling(dict));
break;
}
case SkillKinds.BreakingShield: { //破白盾
let dict = {
icon: createIcon(skill.kind),
target: tsp.target.enemy(),
value: renderValue(skill.value, { percent:true }),
};
frg.ap(tsp.skill.gravity(dict));
break;
}
default: {
console.log("未处理的技能类型",skill.kind, skill);
@ -3321,6 +3338,18 @@ function renderValue(_value, option = {}) {
);
break;
}
case SkillValueKind.xShield: {
dict = {
value: option.percent ? (_value.value * 100).keepCounts(od,os) : _value.value.keepCounts(od,os),
stats: renderStat('shield'),
};
frg.ap(
option.percent ?
tspv.mul_of_percent(dict) :
tspv.mul_of_times(dict)
);
break;
}
case SkillValueKind.xATK: {
dict = {
value: option.percent ? (_value.value * 100).keepCounts(od,os) : _value.value.keepCounts(od,os),

View File

@ -27591,11 +27591,11 @@ const cachesMap = new Map([
],
[
"script-json_data.js",
"c561981bc04e8cb4d34854e82f693225"
"a35ace305c9c34d939adff8af66327ed"
],
[
"script-skill-parser.js",
"7fd84302ec5dc1d1a7b68a8f4bbec9d5"
"5d5e6d38d82035de49807f72b2d8b0c3"
],
[
"script-universal_function.js",
@ -27615,7 +27615,7 @@ const cachesMap = new Map([
],
[
"style.css",
"422f4ee07beebce7698f9ea55978721a"
"83e798ecd23802bb1d6b755dca6d8392"
],
[
"temp.js",
@ -27659,7 +27659,7 @@ const cachesMap = new Map([
],
[
"languages/zh-hans.js",
"1cb9427d980613750be284b683b6c965"
"e8f4e76f67a4cbb4a72517e6f17434ee"
],
[
"languages/zh-hant.css",
@ -27667,7 +27667,7 @@ const cachesMap = new Map([
],
[
"languages/zh-hant.js",
"2d62a0b2c437f20580881351ed0f2faf"
"bede32cfeaa26e46a4cd26d57c319378"
],
[
"images/attrs.png",
@ -27803,7 +27803,7 @@ const cachesMap = new Map([
],
[
"images/icon-skills.png",
"0554abb63a36baf0348ba844e7aa10f4"
"924dcf954c1f7def6addc3f62e17e028"
],
[
"images/icon-switch-leader.png",

View File

@ -4587,6 +4587,10 @@ body.external-link-support #external-support{
{
background-position-y:calc(-36px * 42);
}
.icon-skill[data-icon-type="breaking-shield"]
{
background-position-y:calc(-36px * 43);
}
:where(:lang(en), :lang(ko)) .icon-skill:where(
[data-icon-type="mass-attack"],