mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-21 22:48:13 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
51d1411c40
@ -7,7 +7,7 @@ const Render = {
|
||||
console.log('未找到e.runtime,请升级至最新版Yunzai')
|
||||
}
|
||||
return e.runtime.render(cfg.plugin || 'miao-plugin', path, params, {
|
||||
retType: cfg.retMsgId ? 'msgId' : 'default',
|
||||
retType: cfg.retType || (cfg.retMsgId ? 'msgId' : 'default'),
|
||||
beforeRender ({ data }) {
|
||||
let pluginName = ''
|
||||
if (data.pluginName !== false) {
|
||||
@ -39,4 +39,4 @@ const Render = {
|
||||
}
|
||||
}
|
||||
|
||||
export default Render
|
||||
export default Render
|
46
main.js
46
main.js
@ -1,27 +1,21 @@
|
||||
import { createApps } from 'alemonjs'
|
||||
import { createApp } from 'alemonjs'
|
||||
import { apps } from './index.js'
|
||||
const app = createApps(import.meta.url)
|
||||
const arg = /^#?(\*|星铁|星轨|穹轨|星穹|崩铁|星穹铁道|崩坏星穹铁道|铁道)+/
|
||||
app.setMessage(async e => {
|
||||
e.isSr = true
|
||||
e.isGs = true
|
||||
await runtime.init(e)
|
||||
Object.defineProperty(e, 'isSr', {
|
||||
get: () => e.game === 'sr',
|
||||
set: (v) => { e.game = v ? 'sr' : 'gs' }
|
||||
})
|
||||
Object.defineProperty(e, 'isGs', {
|
||||
get: () => e.game === 'gs',
|
||||
set: (v) => { e.game = v ? 'gs' : 'sr' }
|
||||
})
|
||||
if (arg.test(e.msg)) {
|
||||
e.game = 'sr'
|
||||
e.msg = e.msg.replace(arg, '#星铁')
|
||||
}
|
||||
e.sender = {}
|
||||
e.sender.card = e.user_name
|
||||
return e
|
||||
})
|
||||
app.setCharacter('#')
|
||||
app.component(apps)
|
||||
app.mount()
|
||||
/**
|
||||
* *******
|
||||
* 创建应用 createApp
|
||||
* 重定义 reSetEvent
|
||||
* 切割消息 replace
|
||||
* 使用 use
|
||||
* 挂载 mount
|
||||
* *******
|
||||
* global.YUNZAI_GENSHIN 原神星铁重定义方法 | 方便A崽统一修改
|
||||
* global.YUNZAI_EVENT 非原神星铁相关的重定义方法 | 方便A崽统一修改
|
||||
* global.YUNZAI_REG 星铁消息的正则变量
|
||||
* *******
|
||||
*/
|
||||
createApp(import.meta.url)
|
||||
.reSetEvent(global.YUNZAI_GENSHIN)
|
||||
.replace(global.YUNZAI_REG,'#星铁')
|
||||
.replace(/^(\/|#)/,'#')
|
||||
.use(apps)
|
||||
.mount()
|
||||
|
40
resources/meta-gs/character/嘉明/calc.js
Normal file
40
resources/meta-gs/character/嘉明/calc.js
Normal file
@ -0,0 +1,40 @@
|
||||
export const details = [{
|
||||
title: '下落攻击·踏云献瑞伤害',
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['下落攻击·踏云献瑞伤害'], 'a3')
|
||||
},{
|
||||
title: '下落攻击·踏云献瑞蒸发',
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['下落攻击·踏云献瑞伤害'], 'a3', 'vaporize')
|
||||
},{
|
||||
title: '猊兽·文仔砸击伤害',
|
||||
dmg: ({ talent }, dmg) => dmg(talent.q['猊兽·文仔砸击伤害'], 'q')
|
||||
},{
|
||||
title: '猊兽·文仔砸击蒸发',
|
||||
dmg: ({ talent }, dmg) => dmg(talent.q['猊兽·文仔砸击伤害'], 'q', 'vaporize')
|
||||
}]
|
||||
|
||||
export const defDmgIdx = 1
|
||||
export const mainAttr = 'atk,cpct,cdmg'
|
||||
|
||||
export const buffs = [{
|
||||
title: '嘉明天赋:生命值低于50%时,获得[healInc]%受治疗加成。生命值高于或等于50%时,下落攻击·踏云献瑞造成的伤害提升[a3Dmg]%。',
|
||||
data: {
|
||||
healInc: 20,
|
||||
a3Dmg: 20
|
||||
}
|
||||
},{
|
||||
title: '嘉明2命:受到治疗溢出,攻击力提升[atkPct]%',
|
||||
sort: 1,
|
||||
cons: 2,
|
||||
data: {
|
||||
atkPct: 20
|
||||
}
|
||||
},{
|
||||
title: '嘉明6命:下落攻击·踏云献瑞的暴击率提升[a3Cpct]%,暴击伤害提升[a3Cdmg]%',
|
||||
cons: 6,
|
||||
data: {
|
||||
a3Cpct: 20,
|
||||
a3Cdmg: 40
|
||||
}
|
||||
}]
|
||||
|
||||
export const createdBy = 'liangshi'
|
@ -8,14 +8,6 @@ export const details = [{
|
||||
title: '3消耗典仪式晶火',
|
||||
params: { jp: 3 },
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['玫瑰晶弹基础伤害'] * 2 , 'e')
|
||||
},{
|
||||
title: '4消耗典仪式晶火',
|
||||
params: { jp: 4 },
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['玫瑰晶弹基础伤害'] * 2 , 'e')
|
||||
},{
|
||||
title: '5消耗典仪式晶火',
|
||||
params: { jp: 5 },
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['玫瑰晶弹基础伤害'] * 2 , 'e')
|
||||
},{
|
||||
title: '6消耗典仪式晶火',
|
||||
params: { jp: 6 },
|
||||
@ -28,7 +20,7 @@ export const details = [{
|
||||
dmg: ({ talent }, dmg) => dmg(talent.q['支援炮击伤害'], 'q')
|
||||
}]
|
||||
|
||||
export const defDmgIdx = 5
|
||||
export const defDmgIdx = 3
|
||||
export const mainAttr = 'atk,cpct,cdmg'
|
||||
|
||||
export const buffs = [{
|
||||
|
109
resources/meta-gs/character/娜维娅/calc_auto.js
Normal file
109
resources/meta-gs/character/娜维娅/calc_auto.js
Normal file
@ -0,0 +1,109 @@
|
||||
export const details = [{
|
||||
title: '0消耗典仪式晶火',
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['玫瑰晶弹基础伤害'], 'e')
|
||||
},{
|
||||
title: '3消耗典仪式晶火',
|
||||
params: { jp: 3 },
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['玫瑰晶弹基础伤害'] * 2 , 'e')
|
||||
},{
|
||||
title: '6消耗典仪式晶火',
|
||||
params: { jp: 6 },
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['玫瑰晶弹基础伤害'] * 2 , 'e')
|
||||
},{
|
||||
title: '如霰澄天的鸣礼伤害',
|
||||
dmg: ({ talent }, dmg) => dmg(talent.q['技能伤害'], 'q')
|
||||
},{
|
||||
title: '支援炮击伤害',
|
||||
dmg: ({ talent }, dmg) => dmg(talent.q['支援炮击伤害'], 'q')
|
||||
},{
|
||||
title: '娜芙夜琴EAAA冲AA两轮',
|
||||
params: { jp: 6 , team: true },
|
||||
dmg: ({ talent }, dmg) => {
|
||||
let a1 = dmg(talent.a['一段伤害'], 'a')
|
||||
let a2 = dmg(talent.a['二段伤害'], 'a')
|
||||
let a3 = dmg(talent.a['三段伤害'], 'a')
|
||||
let e = dmg(talent.e['玫瑰晶弹基础伤害'] * 2 , 'e')
|
||||
let e_Arkhe = dmg(talent.e['流涌之刃伤害'], 'e')
|
||||
return {
|
||||
dmg: e.dmg * 2 + e_Arkhe.dmg + 2 * ( 2 * a1.dmg + 2 * a2.dmg + a3.dmg ) ,
|
||||
avg: e.avg * 2 + e_Arkhe.avg + 2 * ( 2 * a1.avg + 2 * a2.avg + a3.avg )
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
export const defDmgIdx = 5
|
||||
export const mainAttr = 'atk,cpct,cdmg'
|
||||
|
||||
export const buffs = [{
|
||||
check: ({ params }) => params.jp > 3 ,
|
||||
title: '典仪式晶火:消耗[_count]枚弹片将使本次射击造成的伤害额外提升[eDmg]%',
|
||||
data: {
|
||||
_count: ({ params }) => params.jp ,
|
||||
eDmg: ({ params }) => ( params.jp - 3 ) * 15
|
||||
}
|
||||
},{
|
||||
title: '娜维娅天赋:施放典仪式晶火后娜维娅的普攻,重击,下落攻击造成的伤害提升[aDmg]%',
|
||||
data: {
|
||||
aDmg: 40,
|
||||
a2Dmg: 40,
|
||||
a3Dmg: 40
|
||||
}
|
||||
},{
|
||||
title: '娜维娅天赋:队伍中存在三位火雷冰水元素角色,攻击力提升[atkPct]%',
|
||||
data: {
|
||||
atkPct: 40
|
||||
}
|
||||
},{
|
||||
check: ({ params }) => params.jp !== undefined ,
|
||||
title: '娜维娅2命:施放典仪式晶火时消耗「裂晶弹片」使本次典仪式晶火的暴击率提升[eCpct]%',
|
||||
cons: 2,
|
||||
data: {
|
||||
eCpct : ({ params }) => Math.min( 36 , params.jp * 12 )
|
||||
}
|
||||
},{
|
||||
title: '娜维娅4命:被如霰澄天的鸣礼命中的敌人抗性降低[kx]%',
|
||||
cons: 4,
|
||||
data: {
|
||||
kx: 20
|
||||
}
|
||||
},{
|
||||
check: ({ params }) => params.jp > 3 ,
|
||||
title: '娜维娅6命:消耗[_count]枚弹片,使典仪式晶火的暴击伤害提升[eCdmg]%',
|
||||
cons: 6,
|
||||
data: {
|
||||
_count: ({ params }) => params.jp ,
|
||||
eCdmg : ({ params }) => Math.min( 135 , ( params.jp - 3 ) * 45 )
|
||||
}
|
||||
}, {
|
||||
check: ({ params }) => params.team === true ,
|
||||
title: '夜兰:获得[dmg]%增伤',
|
||||
data: {
|
||||
dmg: 35
|
||||
}
|
||||
}, {
|
||||
check: ({ params , cons }) => ( cons < 1 ) && params.team === true ,
|
||||
title: '0命芙宁娜:获得[dmg]%增伤',
|
||||
data: {
|
||||
dmg: 52.5
|
||||
}
|
||||
}, {
|
||||
check: ({ params , cons }) => ( ( cons < 2 && cons >= 1 ) && params.team === true ) ,
|
||||
title: '1命芙宁娜:获得[dmg]%增伤',
|
||||
data: {
|
||||
dmg: 70
|
||||
}
|
||||
}, {
|
||||
check: ({ params , cons }) => ( cons >= 2 && params.team === true ) ,
|
||||
title: '2命芙宁娜:获得[dmg]%增伤',
|
||||
data: {
|
||||
dmg: 100
|
||||
}
|
||||
}, {
|
||||
check: ({ params , artis }) => params.team === true && artis.昔日宗室之仪 !== 4 ,
|
||||
title: '宗室琴:增加[atkPlus]%攻击力',
|
||||
data: {
|
||||
atkPct: 20
|
||||
}
|
||||
}]
|
||||
|
||||
export const createdBy = 'liangshi'
|
68
resources/meta-gs/character/闲云/calc.js
Normal file
68
resources/meta-gs/character/闲云/calc.js
Normal file
@ -0,0 +1,68 @@
|
||||
export const details = [{
|
||||
title: '仙力助推下落攻击伤害提升值',
|
||||
dmg: ({ calc, attr, cons }) => {
|
||||
let cons2 = cons * 1 >= 2 ? ( Math.min( calc(attr.atk) * 136 / 100 , 6800 ) ) : 0
|
||||
return {
|
||||
avg: Math.min( calc(attr.atk) * 170 / 100 , 8500 ) + cons2
|
||||
}
|
||||
}
|
||||
},{
|
||||
title: '步天梯伤害',
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['仙人姿态路径伤害'], 'e')
|
||||
},{
|
||||
title: '一段跳冲击波伤害',
|
||||
params: { btt: 1 },
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['一段跳·鹤形追击伤害'], 'a3')
|
||||
},{
|
||||
title: '二段跳冲击波伤害',
|
||||
params: { btt: 2 },
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['二段跳·鹤形追击伤害'], 'a3')
|
||||
},{
|
||||
title: '三段跳冲击波伤害',
|
||||
params: { btt: 3 },
|
||||
dmg: ({ talent }, dmg) => dmg(talent.e['三段跳·鹤形追击伤害'], 'a3')
|
||||
},{
|
||||
title: '暮集竹星释放伤害',
|
||||
dmg: ({ talent }, dmg) => dmg(talent.q['施放瞬间伤害'], 'q')
|
||||
},{
|
||||
title: '暮集竹星释放治疗',
|
||||
dmg: ({ attr, calc, talent, cons }, { heal }) => {
|
||||
let xz = talent.q['施放瞬间治疗2'][0] * calc(attr.atk) / 100 + talent.q['施放瞬间治疗2'][1] * 1
|
||||
return heal(xz)
|
||||
}
|
||||
}]
|
||||
|
||||
export const defDmgIdx = 0
|
||||
export const mainAttr = 'atk,cpct,cdmg'
|
||||
|
||||
export const buffs = [{
|
||||
title: '闲云天赋:Q后下落攻击坠地冲击造成的伤害提升[a3Plus]',
|
||||
sort: 9,
|
||||
data: {
|
||||
a3Plus: ({ attr, calc }) => Math.min( calc(attr.atk) * 136 / 100 , 8500 )
|
||||
}
|
||||
},{
|
||||
title: '闲云2命:施放朝起鹤云后,攻击力提升[atkPct]%',
|
||||
sort: 1,
|
||||
cons: 2,
|
||||
data: {
|
||||
atkPct: 20
|
||||
}
|
||||
},{
|
||||
title: '闲云2命:Q后下落攻击坠地冲击造成的伤害额外提升[a3Plus]',
|
||||
sort: 9,
|
||||
cons: 2,
|
||||
data: {
|
||||
a3Plus: ({ attr, calc }) => Math.min( calc(attr.atk) * 170 / 100 , 6800 )
|
||||
}
|
||||
},{
|
||||
check: ({ params }) => params.btt !== undefined ,
|
||||
title: '闲云6命:施展了[buffCount]次步天梯,闲云冲击波的暴击伤害提升[a3Cdmg]%',
|
||||
cons: 6,
|
||||
data: {
|
||||
buffCount: ({ params }) => params.btt ,
|
||||
a3Cdmg: ({ params }) => 15 + Math.floor( params.btt / 2 ) * 20 + Math.floor( params.btt / 3 ) * 35
|
||||
}
|
||||
}]
|
||||
|
||||
export const createdBy = 'liangshi'
|
@ -205,6 +205,12 @@ export default function (step, staticStep) {
|
||||
aDmg: step(8 * 3),
|
||||
a2Dmg: step(6 * 3)
|
||||
}
|
||||
}],
|
||||
鹤鸣余音: [{
|
||||
title: '下落攻击命中敌人后,下落攻击造成的伤害提高[hpPct]%',
|
||||
refine: {
|
||||
a3Dmg: step(28)
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user