diff --git a/languages/zh-CN.js b/languages/zh-CN.js index 17f7f58d..5ed56229 100644 --- a/languages/zh-CN.js +++ b/languages/zh-CN.js @@ -47,8 +47,7 @@ auto_heal: tp`${'icon'}消除宝珠的回合,回复${'belong_to'}${'value'}的${'stats'}`, ctw: tp`${'icon'}${'value'}内时间停止,可以任意移动宝珠`, gravity: tp`${'icon'}造成${'target'}${'value'}的伤害`, - resolve: tp`${'icon'}如${'stats'}≧${'value'},受到单一次致命攻击时,${'probability'}将会以1点 HP 生还`, - probability: tp`有${'value'}%几率`, + resolve: tp`${'icon'}如${'stats'}≧${'value'},受到单一次致命攻击时,${'prob'}将会以1点 HP 生还`, board_change: tp`全画面的宝珠变为${'attrs'}`, skill_boost: tp`自身以外成员的技能冷却储备${'icon'}${'turns'}`, add_combo: tp`结算时连击数增加${'value'}c${'icon'}`, @@ -57,6 +56,7 @@ drop_refresh: tp`全板刷新`, drum: tp`宝珠移动和消除的声音变成太鼓达人的音效`, board7x6: tp`【${'icon'}7×6版面】`, + counter_attack: tp`受到${'target'}攻击时,${'prob'}进行受到伤害${'value'}的${'attr'}属性${'icon'}反击`, }, value: { unknown: tp`[ 未知数值: ${'type'}]`, //type @@ -68,6 +68,7 @@ mul_of_times: tp`${'stats'}×${'value'}倍`, hp_scale: tp`${'hp'}为100%时${'min'},${'hp'}为1时${'max'}`, random_atk: tp`${'atk'}×${'min'}${'max'}倍`, + prob: tp`有${'value'}几率`, }, target: { self: tp`发动者自身`, diff --git a/script-skill-parser.js b/script-skill-parser.js index 9f15b94a..f2167636 100644 --- a/script-skill-parser.js +++ b/script-skill-parser.js @@ -270,7 +270,7 @@ const c = { remainOrbs: function (count) { return { remainOrbs: { count: count } }; }, useSkill: function () { return { useSkill: true }; }, multiplayer: function () { return { multiplayer: true }; }, - probability: function (percent) { return { probability: percent }; }, + prob: function (percent) { return { prob: percent }; }, } const p = { @@ -373,8 +373,8 @@ function rateMultiply(value, rate) { function orbDropIncrease(value, attrs) { return { kind: SkillKinds.OrbDropIncrease, value: value, attrs: attrs }; } -function resolve(min, condition) { - return { kind: SkillKinds.Resolve, min: min, max: 1, condition: condition }; +function resolve(min, prob) { + return { kind: SkillKinds.Resolve, min: min, max: 1, prob: prob }; } function unbind(normal, awakenings, matches) { return { kind: SkillKinds.Unbind, normal: normal, awakenings: awakenings , matches: matches}; @@ -429,7 +429,7 @@ const parsers = { [11](attr, mul) { return powerUp([attr], null, p.mul({ atk: mul })); }, [12](mul) { return followAttack(v.xATK(mul)); }, [13](mul) { return autoHeal(v.xRCV(mul)); }, - [14](min, percent) { return resolve(v.percent(min), c.probability(percent)); }, + [14](min, prob) { return resolve(v.percent(min), v.percent(prob)); }, [15](time) { return timeExtend(v.constant(time / 100)); }, [16](percent) { return reduceDamage('all', v.percent(percent)); }, [17](attr, percent) { return reduceDamage([attr], v.percent(percent)); }, @@ -972,12 +972,12 @@ function renderSkill(skill, option = {}) break; } case SkillKinds.Resolve: { //根性 - let prob = skill.condition.probability; + let prob = skill.prob; let dict = { icon: createIcon("resolve"), stats: renderStat('hp'), value: renderValue(skill.min, { percent:true }), - probability: prob < 100 ? tsp.skill.probability({value: prob}) : "", + prob: prob.value < 1 ? tsp.value.prob({value: renderValue(prob, { percent:true })}) : null, }; frg.ap(tsp.skill.resolve(dict)); break; @@ -1085,17 +1085,19 @@ function renderSkill(skill, option = {}) frg.ap(tsp.skill.vampire(dict)); break; } - /* case SkillKinds.CounterAttack: { - const { attr, prob, value } = skill as Skill.CounterAttack; - return ( - - - {renderValue(prob)} ⇒ {renderValue(value)} damage - {typeof attr === 'number' && renderAttrs(attr)} - - ); + let attr = skill.attr, prob = skill.prob, value = skill.value; + dict = { + icon: createIcon("counter-attack"), + target: tsp.target.enemy(), + prob: prob.value < 1 ? tsp.value.prob({value: renderValue(prob, { percent:true })}) : null, + value: renderValue(value), + attr: renderAttrs(attr), + }; + frg.ap(tsp.skill.counter_attack(dict)); + break; } + /* case SkillKinds.ChangeOrbs: { const { changes } = skill as Skill.ChangeOrbs; return ( diff --git a/style.css b/style.css index f594dea4..a26db221 100644 --- a/style.css +++ b/style.css @@ -3166,6 +3166,7 @@ table .orb-icon { border-color: #7F00FF; } + .icon-skill, .icon-skill::after, .icon-skill::before @@ -3176,7 +3177,8 @@ table .orb-icon background-image: url(images/icon-skills.fw.png); background-repeat: no-repeat; } -.icon-skill +.icon-skill, +.skill-datail-parsed icon.orb { vertical-align: bottom; transform: scale(0.75); @@ -3370,4 +3372,8 @@ table .orb-icon .icon-skill[data-icon-type="7x6-board"] { background-position-y:calc(-36px * 21); +} +.icon-skill[data-icon-type="counter-attack"] +{ + background-position-y:calc(-36px * 22); } \ No newline at end of file