mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-25 09:27:34 +00:00
修正对物伤的处理
This commit is contained in:
parent
6e3728d3b8
commit
e8d76f529d
@ -64,11 +64,11 @@ export const characters = {
|
|||||||
10000067: ['柯莱', 'Collei', '柯来', '科莱', '科来', '小天使', '须弥安柏', '草安柏', '须弥飞行冠军'],
|
10000067: ['柯莱', 'Collei', '柯来', '科莱', '科来', '小天使', '须弥安柏', '草安柏', '须弥飞行冠军'],
|
||||||
10000068: ['多莉', 'Dori', '多利', '多力', '奸商'],
|
10000068: ['多莉', 'Dori', '多利', '多力', '奸商'],
|
||||||
10000070: ['妮露', 'nilou', '尼露', '妮璐', '舞娘', '红牛'],
|
10000070: ['妮露', 'nilou', '尼露', '妮璐', '舞娘', '红牛'],
|
||||||
10000071: ['赛诺', 'cyno', '塞诺', '胡狼'],
|
10000071: ['赛诺', 'cyno', '塞诺', '胡狼', '大风纪官', '大风机关'],
|
||||||
10000072: ['坎蒂丝', 'candace', '坎迪斯'],
|
10000072: ['坎蒂丝', 'candace', '坎迪斯'],
|
||||||
10000073: ['纳西妲', '草神', '小草神', '小吉祥', '小吉祥草王', '花神', '草萝莉', '羽毛球'],
|
10000073: ['纳西妲', '草神', '小吉祥', '大吉祥', '小草神', '大慈树王', '小吉祥草王', '草萝莉', '羽毛球', '摩诃善法大吉祥智慧主', '智慧主'],
|
||||||
10000074: ['莱依拉', '莱依菈', '来依菈', '来依拉'],
|
10000074: ['莱依拉', '莱依菈', '来依菈', '来依拉'],
|
||||||
10000075: ['流浪者', '散兵', '国崩', '雷电国崩', '大炮', '雷电大炮', '雷大炮', '伞兵', '斯卡拉姆齐'],
|
10000075: ['流浪者', '散兵', '国崩', '雷电国崩', '大炮', '雷电大炮', '雷大炮', '伞兵', '斯卡拉姆齐', '七叶寂照秘密主', '正机之神'],
|
||||||
10000076: ['珐露珊', '法露珊', '法璐珊', '法露姗', '法璐姗', '珐露姗', '珐璐姗'],
|
10000076: ['珐露珊', '法露珊', '法璐珊', '法露姗', '法璐姗', '珐露姗', '珐璐姗'],
|
||||||
|
|
||||||
// 自定义角色
|
// 自定义角色
|
||||||
|
@ -70,14 +70,14 @@ let DmgAttr = {
|
|||||||
ret.vaporize = 0 // 蒸发
|
ret.vaporize = 0 // 蒸发
|
||||||
ret.melt = 0 // 融化
|
ret.melt = 0 // 融化
|
||||||
ret.burning = 0 // 燃烧
|
ret.burning = 0 // 燃烧
|
||||||
ret.superconduct = 0 // 超导
|
ret.superConduct = 0 // 超导
|
||||||
ret.swirl = 0 // 扩散
|
ret.swirl = 0 // 扩散
|
||||||
ret.electro_charged = 0 // 感电
|
ret.electroCharged = 0 // 感电
|
||||||
ret.shatter = 0 // 碎冰
|
ret.shatter = 0 // 碎冰
|
||||||
ret.overloaded = 0 // 超载
|
ret.overloaded = 0 // 超载
|
||||||
ret.bloom = 0 // 绽放
|
ret.bloom = 0 // 绽放
|
||||||
ret.burgeon = 0 // 烈绽放
|
ret.burgeon = 0 // 烈绽放
|
||||||
ret.hyperbloom = 0 // 超绽放
|
ret.hyperBloom = 0 // 超绽放
|
||||||
ret.aggravate = 0 // 超激化
|
ret.aggravate = 0 // 超激化
|
||||||
ret.spread = 0 // 蔓激化
|
ret.spread = 0 // 蔓激化
|
||||||
ret.kx = 0 // 敌人抗性降低
|
ret.kx = 0 // 敌人抗性降低
|
||||||
@ -176,7 +176,7 @@ let DmgAttr = {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (['vaporize', 'melt', 'burning', 'superconduct', 'swirl', 'electro_charged', 'shatter', 'overloaded', 'bloom', 'burgeon', 'hyperbloom', 'aggravate' , 'spread' ,'kx', 'fykx'].includes(key)) {
|
if (['vaporize', 'melt', 'burning', 'superConduct', 'swirl', 'electroCharged', 'shatter', 'overloaded', 'bloom', 'burgeon', 'hyperBloom', 'aggravate', 'spread', 'kx', 'fykx'].includes(key)) {
|
||||||
attr[key] += val * 1 || 0
|
attr[key] += val * 1 || 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -83,19 +83,16 @@ let DmgCalc = {
|
|||||||
cdmgNum = 0
|
cdmgNum = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isEle = ele !== false && ele !== 'phy'
|
||||||
// 反应区
|
// 反应区
|
||||||
let eleNum = (ele === false) ? 1 : DmgMastery.getBasePct(ele, attr.element)
|
let eleNum = isEle ? DmgMastery.getBasePct(ele, attr.element) : 1
|
||||||
let eleBase = (ele === false) ? 1 : 1 + attr[ele] / 100 + DmgMastery.getMultiple(ele, attr.mastery.base + attr.mastery.plus)
|
let eleBase = isEle ? 1 + attr[ele] / 100 + DmgMastery.getMultiple(ele, attr.mastery.base + attr.mastery.plus) : 1
|
||||||
let dmgBase = (mode === 'basic') ? basicNum : atkNum * pctNum * (1 + multiNum)
|
let dmgBase = (mode === 'basic') ? basicNum : atkNum * pctNum * (1 + multiNum)
|
||||||
let ret = {}
|
let ret = {}
|
||||||
|
|
||||||
console.log(atkNum, multiNum, dmgBase)
|
switch (ele) {
|
||||||
|
|
||||||
switch(ele)
|
|
||||||
{
|
|
||||||
case 'vaporize':
|
case 'vaporize':
|
||||||
case 'melt':
|
case 'melt': {
|
||||||
{
|
|
||||||
ret = {
|
ret = {
|
||||||
dmg: dmgBase * dmgNum * (1 + cdmgNum) * defNum * kNum * eleBase * eleNum,
|
dmg: dmgBase * dmgNum * (1 + cdmgNum) * defNum * kNum * eleBase * eleNum,
|
||||||
avg: dmgBase * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum * eleBase * eleNum
|
avg: dmgBase * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum * eleBase * eleNum
|
||||||
@ -104,23 +101,21 @@ let DmgCalc = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 'burning':
|
case 'burning':
|
||||||
case 'superconduct':
|
case 'superConduct':
|
||||||
case 'swirl':
|
case 'swirl':
|
||||||
case 'electro_charged':
|
case 'electroCharged':
|
||||||
case 'shatter':
|
case 'shatter':
|
||||||
case 'overloaded':
|
case 'overloaded':
|
||||||
case 'bloom':
|
case 'bloom':
|
||||||
case 'burgeon':
|
case 'burgeon':
|
||||||
case 'hyperbloom':
|
case 'hyperBloom': {
|
||||||
{
|
|
||||||
eleBase *= eleBaseDmg[level]
|
eleBase *= eleBaseDmg[level]
|
||||||
ret = { avg: eleBase * eleNum * kNum }
|
ret = { avg: eleBase * eleNum * kNum }
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'aggravate':
|
case 'aggravate':
|
||||||
case 'spread':
|
case 'spread': {
|
||||||
{
|
|
||||||
eleBase *= eleBaseDmg[level]
|
eleBase *= eleBaseDmg[level]
|
||||||
dmgBase += eleBase * eleNum
|
dmgBase += eleBase * eleNum
|
||||||
ret = {
|
ret = {
|
||||||
@ -130,10 +125,9 @@ let DmgCalc = {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default: {
|
||||||
{
|
|
||||||
ret = {
|
ret = {
|
||||||
dmg: dmgBase * dmgNum * (1 + cdmgNum) * defNum * kNum ,
|
dmg: dmgBase * dmgNum * (1 + cdmgNum) * defNum * kNum,
|
||||||
avg: dmgBase * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum
|
avg: dmgBase * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,40 @@
|
|||||||
|
export const eleMap = {
|
||||||
|
anemo: '风',
|
||||||
|
cryo: '冰',
|
||||||
|
electro: '雷',
|
||||||
|
geo: '岩',
|
||||||
|
hydro: '水',
|
||||||
|
pyro: '火',
|
||||||
|
dendro: '草'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 元素反应类型及基数
|
||||||
|
export const erType = {
|
||||||
|
vaporize: { type: 'pct', num: ({ element }) => element === '水' ? 2 : 1.5 }, // 蒸发
|
||||||
|
melt: { type: 'pct', num: ({ element }) => element === '火' ? 2 : 1.5 }, // 融化
|
||||||
|
burning: { type: 'fusion', num: () => 1 }, // 燃烧
|
||||||
|
superConduct: { type: 'fusion', num: () => 2 }, // 超导
|
||||||
|
swirl: { type: 'fusion', num: () => 2.4 }, // 扩散
|
||||||
|
electroCharged: { type: 'fusion', num: () => 4.8 }, // 感电
|
||||||
|
shatter: { type: 'fusion', num: () => 6 }, // 碎冰
|
||||||
|
overloaded: { type: 'fusion', num: () => 8 }, // 超载
|
||||||
|
bloom: { type: 'fusion', num: () => 8 }, // 绽放
|
||||||
|
burgeon: { type: 'fusion', num: () => 12 }, // 烈绽放
|
||||||
|
hyperBloom: { type: 'fusion', num: () => 12 }, // 超绽放
|
||||||
|
aggravate: { type: 'bonus', num: () => 4.6 }, // 超激化
|
||||||
|
spread: { type: 'bonus', num: () => 5.0 } // 蔓激化
|
||||||
|
}
|
||||||
|
|
||||||
|
export const attrMap = {
|
||||||
|
atk: { type: 'pct', val: 5.83, title: '大攻击', text: '5.8%' },
|
||||||
|
hp: { type: 'pct', val: 5.83, title: '大生命', text: '5.8%' },
|
||||||
|
def: { type: 'pct', val: 7.29, title: '大防御', text: '7.3%' },
|
||||||
|
recharge: { type: 'plus', val: 6.48, title: '元素充能', text: '6.5%' },
|
||||||
|
mastery: { type: 'plus', val: 23.31, title: '元素精通', text: '23.3' },
|
||||||
|
cpct: { type: 'plus', val: 3.89, title: '暴击率', text: '3.9%' },
|
||||||
|
cdmg: { type: 'plus', val: 7.77, title: '暴击伤害', text: '7.8%' }
|
||||||
|
}
|
||||||
|
|
||||||
// 各等级精通基础伤害
|
// 各等级精通基础伤害
|
||||||
export const eleBaseDmg = {
|
export const eleBaseDmg = {
|
||||||
1: 4.291,
|
1: 4.291,
|
||||||
@ -91,40 +128,3 @@ export const eleBaseDmg = {
|
|||||||
89: 351.274,
|
89: 351.274,
|
||||||
90: 361.713
|
90: 361.713
|
||||||
}
|
}
|
||||||
|
|
||||||
export const eleMap = {
|
|
||||||
anemo: '风',
|
|
||||||
cryo: '冰',
|
|
||||||
electro: '雷',
|
|
||||||
geo: '岩',
|
|
||||||
hydro: '水',
|
|
||||||
pyro: '火',
|
|
||||||
dendro: '草'
|
|
||||||
}
|
|
||||||
|
|
||||||
// 元素反应类型及基数
|
|
||||||
export const erType = {
|
|
||||||
'vaporize': { type: 'pct', num: ({ element }) => element === '水' ? 2 : 1.5 },
|
|
||||||
'melt': { type: 'pct', num: ({ element }) => element === '火' ? 2 : 1.5 },
|
|
||||||
'burning': { type: 'fusion', num: () => 1 },
|
|
||||||
'superconduct': { type: 'fusion', num: () => 2 },
|
|
||||||
'swirl': { type: 'fusion', num: () => 2.4 },
|
|
||||||
'electro_charged': { type: 'fusion', num: () => 4.8 },
|
|
||||||
'shatter': { type: 'fusion', num: () => 6 },
|
|
||||||
'overloaded': { type: 'fusion', num: () => 8 },
|
|
||||||
'bloom': { type: 'fusion', num: () => 8 },
|
|
||||||
'burgeon': { type: 'fusion', num: () => 12 },
|
|
||||||
'hyperbloom': { type: 'fusion', num: () => 12 },
|
|
||||||
'aggravate': { type: 'bonus', num: () => 4.6 },
|
|
||||||
'spread': { type: 'bonus', num: () => 5.0 }
|
|
||||||
}
|
|
||||||
|
|
||||||
export const attrMap = {
|
|
||||||
atk: { type: 'pct', val: 5.83, title: '大攻击', text: '5.8%' },
|
|
||||||
hp: { type: 'pct', val: 5.83, title: '大生命', text: '5.8%' },
|
|
||||||
def: { type: 'pct', val: 7.29, title: '大防御', text: '7.3%' },
|
|
||||||
recharge: { type: 'plus', val: 6.48, title: '元素充能', text: '6.5%' },
|
|
||||||
mastery: { type: 'plus', val: 23.31, title: '元素精通', text: '23.3' },
|
|
||||||
cpct: { type: 'plus', val: 3.89, title: '暴击率', text: '3.9%' },
|
|
||||||
cdmg: { type: 'plus', val: 7.77, title: '暴击伤害', text: '7.8%' }
|
|
||||||
}
|
|
||||||
|
@ -7,7 +7,7 @@ let DmgMastery = {
|
|||||||
return (25 / 9) * mastery / (mastery + 1400)
|
return (25 / 9) * mastery / (mastery + 1400)
|
||||||
} else if (typeCfg.type === 'fusion') {
|
} else if (typeCfg.type === 'fusion') {
|
||||||
return 16 * mastery / (mastery + 2000)
|
return 16 * mastery / (mastery + 2000)
|
||||||
} else if(typeCfg.type === 'bonus'){
|
} else if (typeCfg.type === 'bonus') {
|
||||||
return 5 * mastery / (mastery + 1200)
|
return 5 * mastery / (mastery + 1200)
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
|
@ -45,7 +45,7 @@ export const usefulAttr = {
|
|||||||
神里绫人: { hp: 50, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, heal: 0 },
|
神里绫人: { hp: 50, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, heal: 0 },
|
||||||
八重神子: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 },
|
八重神子: { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 },
|
||||||
申鹤: { hp: 0, atk: 100, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 },
|
申鹤: { hp: 0, atk: 100, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 },
|
||||||
云堇: { hp: 0, atk: 0, def: 100, cp: 80, cd: 80, mastery: 0, dmg: 80, phy: 0, recharge: 80, heal: 0 },
|
云堇: { hp: 0, atk: 75, def: 100, cp: 80, cd: 80, mastery: 0, dmg: 80, phy: 0, recharge: 80, heal: 0 },
|
||||||
荒泷一斗: { hp: 0, atk: 50, def: 100, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, heal: 0 },
|
荒泷一斗: { hp: 0, atk: 50, def: 100, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, heal: 0 },
|
||||||
五郎: { hp: 0, atk: 75, def: 100, cp: 50, cd: 50, mastery: 0, dmg: 100, phy: 0, recharge: 75, heal: 0 },
|
五郎: { hp: 0, atk: 75, def: 100, cp: 50, cd: 50, mastery: 0, dmg: 100, phy: 0, recharge: 75, heal: 0 },
|
||||||
班尼特: { hp: 100, atk: 50, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 80, phy: 0, recharge: 55, heal: 100 },
|
班尼特: { hp: 100, atk: 50, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 80, phy: 0, recharge: 55, heal: 100 },
|
||||||
|
@ -204,8 +204,8 @@ const buffs = {
|
|||||||
title: '如雷4:超载、感电、超导反应造成的伤害提升40%,超激化反应带来的伤害提升提高20%',
|
title: '如雷4:超载、感电、超导反应造成的伤害提升40%,超激化反应带来的伤害提升提高20%',
|
||||||
data: {
|
data: {
|
||||||
overloaded: 40,
|
overloaded: 40,
|
||||||
electro_charged: 40,
|
electroCharged: 40,
|
||||||
superconduct: 40,
|
superConduct: 40,
|
||||||
aggravate: 20
|
aggravate: 20
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,10 +1,28 @@
|
|||||||
export const details = [{
|
export const details = [{
|
||||||
title: 'E长按伤害',
|
title: 'E长按伤害',
|
||||||
params: { e: true, q: false },
|
params: { e: true, q: false },
|
||||||
dmg: ({ talent }, dmg ) => dmg(talent.e['长按伤害'], 'e')
|
dmg: ({ talent }, dmg) => dmg(talent.e['长按伤害'], 'e')
|
||||||
}, {
|
}, {
|
||||||
title: '灭净三业伤害',
|
title: '灭净三业伤害',
|
||||||
params: { e2: true, q: false },
|
params: { e2: true, q: false },
|
||||||
|
dmg: ({ talent, calc, attr }, { basic }) => {
|
||||||
|
const td = talent.e['灭净三业伤害2']
|
||||||
|
const em = calc(attr.mastery)
|
||||||
|
const atk = calc(attr.atk)
|
||||||
|
return basic(td[0] * atk / 100 + td[1] * em / 100, 'e')
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
title: '开Q灭净三业伤害',
|
||||||
|
params: { e2: true },
|
||||||
|
dmg: ({ talent, calc, attr, cons }, { basic }) => {
|
||||||
|
const td = talent.e['灭净三业伤害2']
|
||||||
|
const em = calc(attr.mastery)
|
||||||
|
const atk = calc(attr.atk)
|
||||||
|
return basic(td[0] * atk / 100 + td[1] * em / 100, 'e')
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
title: '灭净三业蔓激化',
|
||||||
|
params: { e2: true, q: false },
|
||||||
dmg: ({ talent, calc, attr }, { basic }) => {
|
dmg: ({ talent, calc, attr }, { basic }) => {
|
||||||
const td = talent.e['灭净三业伤害2']
|
const td = talent.e['灭净三业伤害2']
|
||||||
const em = calc(attr.mastery)
|
const em = calc(attr.mastery)
|
||||||
@ -12,7 +30,7 @@ export const details = [{
|
|||||||
return basic(td[0] * atk / 100 + td[1] * em / 100, 'e', 'spread')
|
return basic(td[0] * atk / 100 + td[1] * em / 100, 'e', 'spread')
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
title: '开Q灭净三业伤害',
|
title: '开Q灭净三业蔓激化',
|
||||||
params: { e2: true },
|
params: { e2: true },
|
||||||
dmg: ({ talent, calc, attr, cons }, { basic }) => {
|
dmg: ({ talent, calc, attr, cons }, { basic }) => {
|
||||||
const td = talent.e['灭净三业伤害2']
|
const td = talent.e['灭净三业伤害2']
|
||||||
|
Loading…
Reference in New Issue
Block a user