优化部分伤害计算

This commit is contained in:
UCPr 2025-01-24 17:03:05 +08:00
parent afce42af23
commit 1e09912b84
5 changed files with 17 additions and 19 deletions

View file

@ -137,6 +137,8 @@ export class Calculator {
damage.add = (d) => { damage.add = (d) => {
if (typeof d === 'string') if (typeof d === 'string')
d = this.calc_skill(d); d = this.calc_skill(d);
if (!d)
return;
logger.debug('追加伤害:' + d.skill.name, d.result); logger.debug('追加伤害:' + d.skill.name, d.result);
damage.result.expectDMG += d.result.expectDMG; damage.result.expectDMG += d.result.expectDMG;
damage.result.critDMG += d.result.critDMG; damage.result.critDMG += d.result.critDMG;

View file

@ -268,6 +268,7 @@ export class Calculator {
if (skill.after) { if (skill.after) {
damage.add = (d) => { damage.add = (d) => {
if (typeof d === 'string') d = this.calc_skill(d) if (typeof d === 'string') d = this.calc_skill(d)
if (!d) return
logger.debug('追加伤害:' + d.skill.name, d.result) logger.debug('追加伤害:' + d.skill.name, d.result)
damage.result.expectDMG += d.result.expectDMG damage.result.expectDMG += d.result.expectDMG
damage.result.critDMG += d.result.critDMG damage.result.critDMG += d.result.critDMG

View file

@ -32,19 +32,16 @@ export const skills = [
{ name: '普攻三段(以太)', type: 'AQY3' }, { name: '普攻三段(以太)', type: 'AQY3' },
{ name: '冲刺攻击:火力压制', type: 'CCQ' }, { name: '冲刺攻击:火力压制', type: 'CCQ' },
{ {
name: '强化特殊技:全弹连射',
type: 'EQ',
after: ({ damage, calc }) => {
if (calc.avatar.rank >= 6) {
const EQ2 = calc.calc_skill({
name: '6影以太鹿弹', name: '6影以太鹿弹',
type: 'EQ2', type: 'EQ2',
fixedMultiplier: 2.2 * 4, fixedMultiplier: 2.2 * 4,
element: 'Ether' isHide: true,
}) check: ({ avatar }) => avatar.rank >= 6
damage.add(EQ2) },
} {
} name: '强化特殊技:全弹连射',
type: 'EQ',
after: ({ damage }) => damage.add('EQ2')
}, },
{ name: '连携技:歼灭模式', type: 'RL' }, { name: '连携技:歼灭模式', type: 'RL' },
{ name: '终结技歼灭模式MAX', type: 'RZ' } { name: '终结技歼灭模式MAX', type: 'RZ' }

View file

@ -24,13 +24,11 @@ export const skills = [
{ {
name: '强化特殊技:沸腾熔炉', name: '强化特殊技:沸腾熔炉',
type: 'EQP', type: 'EQP',
after: ({ avatar, damage }) => { after: ({ damage }) => {
damage.add('EQP0') damage.add('EQP0')
if (avatar.rank >= 6) {
damage.add('Y6') damage.add('Y6')
} }
}
}, },
{ name: '连携技:天崩-地裂', type: 'RL', after: ({ avatar, damage }) => avatar.rank >= 6 && damage.add('Y6') }, { name: '连携技:天崩-地裂', type: 'RL', after: ({ damage }) => damage.add('Y6') },
{ name: '终结技:锤进地心', type: 'RZP', after: ({ avatar, damage }) => avatar.rank >= 6 && damage.add('Y6') } { name: '终结技:锤进地心', type: 'RZP', after: ({ damage }) => damage.add('Y6') }
] ]

View file

@ -35,9 +35,9 @@ export const skills = [
{ {
name: '蓄力普攻:雷霆击-感电', name: '蓄力普攻:雷霆击-感电',
type: 'AX', type: 'AX',
after: ({ avatar, damage }) => { after: ({ damage }) => {
damage.add('AX0') damage.add('AX0')
if (avatar.rank >= 6) damage.add('Y6') damage.add('Y6')
} }
}, },
{ name: '闪避反击:以退为进', type: 'CF' }, { name: '闪避反击:以退为进', type: 'CF' },