From b6da5d820ff1c4072d6cf56bd58dd5e56d7b2956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Thu, 22 Jul 2021 02:05:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8A=80=E8=83=BD=E8=A7=A3?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- languages/zh-CN.js | 6 +++ script-skill-parser.js | 117 +++++++++++++++++++++-------------------- style.css | 45 ++++++++++++++-- 3 files changed, 106 insertions(+), 62 deletions(-) diff --git a/languages/zh-CN.js b/languages/zh-CN.js index 5876ae03..7502d700 100644 --- a/languages/zh-CN.js +++ b/languages/zh-CN.js @@ -28,6 +28,12 @@ probability: tp`有${'value'}%几率`, board_change: tp`全画面的宝珠变为${'attrs'}`, skill_boost: tp`自身以外成员的技能冷却储备${'icon'}${'turns'}`, + add_combo: tp`结算时连击数增加${'value'}c${'icon'}`, + fixed_time: tp`【${'icon'}操作时间固定${'value'}】`, + min_match_length: tp`【限定≥${'value'}珠才能消除】`, + drop_refresh: tp`全板刷新`, + drum: tp`宝珠移动和消除的声音变成太鼓达人的音效`, + board7x6: tp`【${'icon'}7×6版面】`, }, value: { unknown: tp`[ 未知数值: ${'type'}]`, //type diff --git a/script-skill-parser.js b/script-skill-parser.js index 8fcdc2c0..9f15b94a 100644 --- a/script-skill-parser.js +++ b/script-skill-parser.js @@ -396,7 +396,7 @@ function voidEnemyBuff(buffs) { } function skillBoost(value) { return { kind: SkillKinds.SkillBoost, value: value }; } function minMatch(value) { return { kind: SkillKinds.MinMatchLength, value: value }; } -function fixedTime(value) { return { kind: SkillKinds.FixedTime, value: value }; } +function fixedTime(value) { return { kind: SkillKinds.FixedTime, value: v.constant(value) }; } function addCombo(value) { return { kind: SkillKinds.AddCombo, value: value }; } function defBreak(value) { return { kind: SkillKinds.DefenseBreak, value: value }; } function poison(value) { return { kind: SkillKinds.Poison, value: value }; } @@ -925,9 +925,10 @@ function renderSkill(skill, option = {}) break; } case SkillKinds.TimeExtend: { //时间变化buff + let value = skill.value; let dict = { - icon: createIcon("status-time", SkillValue.isLess(skill.value) ? "time-decr" : "time-incr"), - value: renderValue(skill.value, { unit:tsp.unit.seconds, plusSign: skill.value.kind != SkillValueKind.Percent, percent:true }), + icon: createIcon("status-time", SkillValue.isLess(value) ? "time-decr" : "time-incr"), + value: renderValue(value, { unit:tsp.unit.seconds, plusSign: value.kind != SkillValueKind.Percent, percent: SkillValue.isLess(value) }), }; frg.ap(tsp.skill.time_extend(dict)); @@ -993,19 +994,7 @@ function renderSkill(skill, option = {}) frg.ap(tsp.skill.damage_enemy(dict)); break; } - case SkillKinds.Vampire: { - let attr = skill.attr, damage = skill.damage, heal = skill.heal; - dict = { - icon: createIcon("heal", "hp-incr"), - target: tsp.target.enemy_one(), - damage: renderValue(damage), - attr: renderAttrs(attr, {affix: (attr === 'self' || attr === 'fixed') ? false : true}), - heal: renderValue(heal, {percent: true}), - }; - frg.ap(tsp.skill.vampire(dict)); - break; - } - case SkillKinds.Unbind: { + case SkillKinds.Unbind: { //解封 let normal = skill.normal, awakenings = skill.awakenings, matches = skill.matches; let effects = []; if (normal) @@ -1017,7 +1006,7 @@ function renderSkill(skill, option = {}) frg.ap(effects.nodeJoin(tsp.word.comma())); break; } - case SkillKinds.BoardChange: { + case SkillKinds.BoardChange: { //洗版 const attrs = skill.attrs; dict = { attrs: renderOrbs(attrs), @@ -1025,64 +1014,78 @@ function renderSkill(skill, option = {}) frg.ap(tsp.skill.board_change(dict)); break; } - case SkillKinds.SkillBoost: { + case SkillKinds.SkillBoost: { //溜 const value = skill.value; let dict = { icon: createIcon("skill-boost", SkillValue.isLess(skill.value) ? "boost-decr" : "boost-incr"), turns: renderValue(value, { unit:tsp.unit.turns, plusSign:true }), }; - //renderValue(skill.value, { unit:tsp.unit.seconds, plusSign:true, percent:true }) frg.ap(tsp.skill.skill_boost(dict)); break; } - /* - case SkillKinds.AddCombo: { - const { value } = skill as Skill.WithValue; - return ( - - - - ); + case SkillKinds.AddCombo: { //+C + const value = skill.value; + let icon = createIcon("add-combo"); + icon.setAttribute("data-add-combo", value); + let dict = { + icon: icon, + value: value, + }; + frg.ap(tsp.skill.add_combo(dict)); + break; } - case SkillKinds.FixedTime: { - const { value } = skill as Skill.WithValue; - return ( - - - - - - {value} seconds - - ); + case SkillKinds.FixedTime: { //固定手指 + const value = skill.value; + let dict = { + icon: createIcon(skill.kind), + value: renderValue(value, { unit: tsp.unit.seconds }), + }; + frg.ap(tsp.skill.fixed_time(dict)); + break; } - case SkillKinds.MinMatchLength: { - const { value } = skill as Skill.WithValue; - return minimum match length {value}; + case SkillKinds.MinMatchLength: { //最低匹配长度 + const value = skill.value; + let dict = { + icon: createIcon(skill.kind), + value: value, + }; + frg.ap(tsp.skill.min_match_length(dict)); + break; } case SkillKinds.DropRefresh: { - return drop refresh; + let dict = { + icon: createIcon(skill.kind), + }; + frg.ap(tsp.skill.drop_refresh(dict)); + break; } case SkillKinds.Drum: { - return drum sound; + let dict = { + icon: createIcon(skill.kind), + }; + frg.ap(tsp.skill.drum(dict)); + break; } case SkillKinds.Board7x6: { - return 7x6 board; + let dict = { + icon: createIcon(skill.kind), + }; + frg.ap(tsp.skill.board7x6(dict)); + break; } - - case SkillKinds.Vampire: { - const { attr, damage, heal } = skill as Skill.Vampire; - return ( - - - single enemy ⇒ {renderValue(damage)} - {typeof attr === 'number' && renderAttrs(attr)} -  ⇒ - - {renderValue(heal)} damage - - ); + case SkillKinds.Vampire: { //吸血 + let attr = skill.attr, damage = skill.damage, heal = skill.heal; + dict = { + icon: createIcon("heal", "hp-incr"), + target: tsp.target.enemy_one(), + damage: renderValue(damage), + attr: renderAttrs(attr, {affix: (attr === 'self' || attr === 'fixed') ? false : true}), + heal: renderValue(heal, {percent: true}), + }; + frg.ap(tsp.skill.vampire(dict)); + break; } + /* case SkillKinds.CounterAttack: { const { attr, prob, value } = skill as Skill.CounterAttack; return ( diff --git a/style.css b/style.css index 52226529..fb8244b9 100644 --- a/style.css +++ b/style.css @@ -791,10 +791,6 @@ icon.poison-no-effect::after, { display: none; } -.tIf-total-hp .reduce:not([data-value="0"])::after -{ - content: "%⇔" attr(data-max-equal-general) "/" attr(data-max-equal-awoken-bind); -} .reduce-details { @@ -3153,6 +3149,12 @@ table .orb-icon /*margin: -4px;*/ position: relative; } +.card-skill-list>.fixed-time, +.card-skill-list>.min-match-len, +.card-skill-list>.\37x6-board +{ + color: red; +} .icon-skill.status-incr::after, .icon-skill.status-decr::after, .icon-skill.status-bind::after, @@ -3161,7 +3163,9 @@ table .orb-icon .icon-skill.boost-incr::after, .icon-skill.boost-decr::after, .icon-skill[data-icon-type="ctw"]::before, -.icon-skill[data-icon-type="ctw"]::after +.icon-skill[data-icon-type="ctw"]::after, +.icon-skill[data-icon-type="add-combo"]::after, +.icon-skill[data-icon-type="fixed-time"]::after { content: ""; position: absolute; @@ -3301,4 +3305,35 @@ table .orb-icon .icon-skill.boost-decr::after { background-position-x:calc(-36px * 2); +} +.icon-skill[data-icon-type="add-combo"] +{ + background-position-y:calc(-36px * 20); +} +.icon-skill[data-icon-type="add-combo"]::after +{ + color: white; + text-shadow: black 1px 1px 0,black -1px 0px 0,black 0 0 1px; + font-family: var(--game-font-family); + font-size: 15px; + top: 0; + left: 20px; + content: attr(data-add-combo); +} +.icon-skill[data-icon-type="fixed-time"] +{ + background-position-y:calc(-36px * 11); + background-position-x:calc(-36px * 1); +} +.icon-skill[data-icon-type="fixed-time"]::after +{ + background-position-y:calc(-36px * 11); + background-position-x:calc(-36px * 2); + transform: scale(0.75); + left: 10px; + top: 5px; +} +.icon-skill[data-icon-type="7x6-board"] +{ + background-position-y:calc(-36px * 21); } \ No newline at end of file