更新原神4.2新角色数据,修复已知问题

This commit is contained in:
Kokomi 2023-11-07 03:52:55 +08:00
parent bb63b9224a
commit 76d90792bb
26 changed files with 101 additions and 41 deletions

View File

@ -2,7 +2,16 @@ import Cfg from './Cfg.js'
import Render from './common/Render.js'
const Common = {
render: Render.render,
render: async function (arg1, arg2, arg3, arg4) {
if (arguments.length === 4 && typeof (arguments[1]) === 'string') {
return Render.render(arg2, arg3, {
...arg4,
plugin: arg1
})
} else {
return Render.render(arg1, arg2, arg3)
}
},
cfg: Cfg.get,
sleep (ms) {
return new Promise((resolve) => setTimeout(resolve, ms))

View File

@ -6,7 +6,7 @@ const Render = {
if (!e.runtime) {
console.log('未找到e.runtime请升级至最新版Yunzai')
}
return e.runtime.render('miao-plugin', path, params, {
return e.runtime.render(cfg.plugin || 'miao-plugin', path, params, {
retType: cfg.retMsgId ? 'msgId' : 'default',
beforeRender ({ data }) {
let pluginName = ''
@ -21,7 +21,6 @@ const Render = {
return {
...data,
_res_path: resPath,
_miao_path: resPath,
_layout_path: layoutPath,
_tpl_path: process.cwd() + '/plugins/miao-plugin/resources/common/tpl/',
defaultLayout: layoutPath + 'default.html',

View File

@ -33,7 +33,7 @@ class Character extends Base {
this.game = game
if (!this.isCustom) {
let meta = Meta.getData(game, 'char', name)
this.meta = meta
this.meta = meta || {}
if (this.isGs) {
this.elem = Format.elem(elem || meta.elem, 'anemo')
}
@ -246,7 +246,7 @@ class Character extends Base {
// 检查老婆类型
checkWifeType (type) {
let { wifeData } = Meta.getMeta(this.game, 'char')
let { wifeData } = Meta.getMeta('gs', 'char')
let key = ['girlfriend', 'boyfriend', 'daughter', 'son'][type] || 'girlfriend'
return !!wifeData[key]?.[this.id]
}
@ -290,7 +290,7 @@ class Character extends Base {
// 基于角色名获取Character
// 获取详情数据
getDetail (elem = '') {
getDetail () {
if (this.meta?._detail) {
return this.meta._detail
}
@ -299,6 +299,7 @@ class Character extends Base {
}
try {
let name = this.isTraveler ? `旅行者/${this.elem}` : this.name
this.meta = this.meta || {}
this.meta._detail = Data.readJSON(`resources/meta-${this.game}/character/${name}/data.json`, 'miao')
} catch (e) {
console.log(e)

View File

@ -29,7 +29,6 @@ body,
height: 35px;
line-height: 35px;
vertical-align: middle;
width: 16%;
}
.mark-table .thead > div.th {
width: 20%;

View File

@ -200,6 +200,9 @@
<div>{{charCfg.posMaxMark.m3}}</div>
<div>{{charCfg.posMaxMark.m4}}</div>
<div>{{charCfg.posMaxMark.m5}}</div>
{{if game === 'sr'}}
<div>{{charCfg.posMaxMark.m6}}</div>
{{/if}}
</div>
</div>
<ul class="cont-msg">

View File

@ -39,7 +39,6 @@ body, .container {
height: 35px;
line-height: 35px;
vertical-align: middle;
width: 16%;
&.th {
width: 20%;

View File

@ -77,4 +77,5 @@ export const usefulAttr = {
那维莱特: { hp: 100, atk: 0, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 75, heal: 0 },
莱欧斯利: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 },
芙宁娜: { hp: 100, atk: 0, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 75, heal: 100 },
夏洛蒂:{ hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 75, heal: 100 },
}

View File

@ -183,6 +183,7 @@
"10041": "a"
},
"talentCons": {
"a": 0,
"e": 5,
"q": 3
}
@ -1307,7 +1308,11 @@
"star": 4,
"elem": "cryo",
"weapon": "catalyst",
"talentId": {},
"talentId": {
"10881": "a",
"10882": "e",
"10885": "q"
},
"talentCons": {
"a": 0,
"e": 5,
@ -1322,7 +1327,11 @@
"star": 5,
"elem": "hydro",
"weapon": "sword",
"talentId": {},
"talentId": {
"10891": "a",
"10892": "e",
"10895": "q"
},
"talentCons": {
"a": 0,
"e": 5,

View File

@ -10,8 +10,8 @@
"birth": "4-10",
"astro": "真视镜座",
"desc": "充满活力的蒸汽鸟报记者,每时每刻都在为「真相」而奔走。",
"cncv": "",
"jpcv": "",
"cncv": "阮从青",
"jpcv": "和气杏未",
"costume": false,
"ver": 1,
"baseAttr": {
@ -23,7 +23,11 @@
"key": "atkPct",
"value": 24
},
"talentId": {},
"talentId": {
"10881": "a",
"10882": "e",
"10885": "q"
},
"talentCons": {
"a": 0,
"e": 5,
@ -35,7 +39,7 @@
"specialty": "苍晶螺",
"normal": "奇械机芯齿轮",
"talent": "「正义」的哲学",
"weekly": ""
"weekly": "无光丝线"
},
"eta": 1699408800000,
"talent": {
@ -400,7 +404,7 @@
]
},
{
"name": "「聚焦印象」印记间隔",
"name": "「聚焦印象」印记触发间隔",
"unit": "",
"isSame": true,
"values": [
@ -1187,7 +1191,7 @@
"6": {
"name": "以有趣相关为要义",
"desc": [
"当前场上角色的普通攻击与重击命中附有取景·冰点构图法的「聚焦印象」的敌人后「温亨廷先生」将进行协同攻击造成相当于夏洛蒂攻击力180%的冰元素范围伤害,并为攻击范围内的当前场上角色恢复生命值,回复量相当于夏洛蒂攻击力42%的治疗效果。该效果每6秒至多触发一次通过这种方式造成的伤害与治疗效果视为夏洛蒂的元素爆发造成的伤害与治疗效果。"
"当前场上角色的普通攻击与重击命中附有取景·冰点构图法的「聚焦印象」的敌人后「温亨廷先生」将进行协同攻击造成相当于夏洛蒂攻击力180%的冰元素范围伤害,并为攻击范围内的当前场上角色恢复生命值,回复量相当于夏洛蒂攻击力42%。该效果每6秒至多触发一次通过这种方式造成的伤害与治疗效果视为夏洛蒂的元素爆发造成的伤害与治疗效果。"
]
}
},

View File

@ -1,5 +1,5 @@
{
"id": "21",
"id": 10000021,
"name": "安柏",
"abbr": "安柏",
"title": "飞行冠军",
@ -29,6 +29,7 @@
"10041": "a"
},
"talentCons": {
"a": 0,
"e": 5,
"q": 3
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -10,8 +10,8 @@
"birth": "10-13",
"astro": "司颂座",
"desc": "审判舞台上的绝对焦点,直至谢幕的掌声响起。",
"cncv": "",
"jpcv": "",
"cncv": "钱琛",
"jpcv": "水濑祈",
"costume": false,
"ver": 1,
"baseAttr": {
@ -23,7 +23,11 @@
"key": "cpct",
"value": 19.2
},
"talentId": {},
"talentId": {
"10891": "a",
"10892": "e",
"10895": "q"
},
"talentCons": {
"a": 0,
"e": 5,
@ -35,7 +39,7 @@
"specialty": "湖光铃兰",
"normal": "原素花蜜",
"talent": "「正义」的哲学",
"weekly": ""
"weekly": "无光质块"
},
"eta": 1699408800000,
"talent": {
@ -1183,20 +1187,20 @@
},
"cons": {
"1": {
"name": "「爱是难驯鸟,哀乞亦无用」",
"name": "「爱是难驯鸟,哀乞亦无用」",
"desc": [
"施放万众狂欢时芙宁娜获得150点「气氛值」。",
"此外芙宁娜持有「气氛值」的上限提升100点。"
]
},
"2": {
"name": "「让我们举起爱的酒杯!」",
"name": "「女人皆善变,仿若水中萍。」",
"desc": [
"万众狂欢持续期间芙宁娜通过队伍中附近角色的当前生命值提升或降低的方式获得的「气氛值」提升250%。基于「气氛值」超过上限的部分每1点「气氛值」都将使芙宁娜的生命值上限提升0.35%。至多通过这种方式使芙宁娜的生命值上限提升140%。"
]
},
"3": {
"name": "「我已有觉察,他名即是…!」",
"name": "「秘密藏心间,无人知我名。」",
"desc": [
"<h3>万众狂欢的技能等级提高3级。</h3>",
"至多提升至15级。"
@ -1209,23 +1213,23 @@
]
},
"5": {
"name": "「秘密藏心间,无人知我名。」",
"name": "「我已有觉察,他名即是…!」",
"desc": [
"<h3>孤心沙龙的技能等级提高3级。</h3>",
"至多提升至15级。"
]
},
"6": {
"name": "「女人皆善变,仿若水中萍。」",
"name": "「诸君听我颂,共举爱之杯!」",
"desc": [
"施放元素战技「孤心沙龙芙宁娜将获得「万众瞩目」持续10秒。",
"持续期间芙宁娜的普通攻击、重击与下落攻击将转为无法被附魔覆盖的水元素伤害且造成的伤害提升提升值相当于芙宁娜生命值上限的15%。",
"持续期间每0.1秒,芙宁娜的普通攻击、重击与下落攻击坠地冲击命中敌人后,将根据芙宁娜当前的始基力属性产生不同的效果:",
"施放孤心沙龙时芙宁娜将获得「万众瞩目」持续10秒。",
"持续期间芙宁娜的普通攻击、重击与下落攻击将转为无法被附魔覆盖的水元素伤害且造成的伤害提升提升值相当于芙宁娜生命值上限的18%。",
"持续期间每0.1秒,芙宁娜的普通攻击(不包括「始基力:圣俗杂座」的攻击)、重击与下落攻击坠地冲击命中敌人后,将根据芙宁娜当前的始基力属性产生不同的效果:",
"<h3>始基力:荒性</h3>",
"每1秒基于芙宁娜生命值上限的4%为附近的队伍中所有角色恢复生命值持续2.5秒,重复触发将延长持续时间。",
"每1秒基于芙宁娜生命值上限的4%为附近的队伍中所有角色恢复生命值持续2.9秒,重复触发将延长持续时间。",
"始基力:芒性",
"本次普通攻击、重击与下落攻击坠地冲击造成的伤害进一步提高提升值相当于芙宁娜生命值上限的20%上述攻击命中敌人时附近的队伍中所有角色将消耗相当于当前生命值1%的生命值。",
"一次「万众瞩目」持续期间,上述效果至多触发7次该效果将在触发次数达到7次或持续时间结束时解除。"
"本次普通攻击(不包括「始基力:圣俗杂座」的攻击)、重击与下落攻击坠地冲击造成的伤害进一步提高提升值相当于芙宁娜生命值上限的25%上述攻击命中敌人时附近的队伍中所有角色将消耗相当于当前生命值1%的生命值。",
"一次「万众瞩目」持续期间,上述效果至多触发6次该效果将在触发次数达到6次或持续时间结束时解除。"
]
}
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -6,6 +6,8 @@ export default {
'亘古树海之一瞬': '树海之一瞬',
'原初绿洲之初绽': '绿洲之初绽',
'生长天地之蕨草': '天地之蕨草',
'「图比昂装置」': '图比昂装置',
'未能达成超越之水': '未超越之水',
'奇械机芯齿轮': '机芯齿轮',
'奇械发条备件·歌裴莉娅': '歌裴莉娅',

View File

@ -2499,5 +2499,17 @@
"name": "苍晶螺",
"type": "specialty",
"star": 1
},
"无光质块": {
"id": "n113056",
"name": "无光质块",
"type": "weekly",
"star": 5
},
"无光丝线": {
"id": "n113054",
"name": "无光丝线",
"type": "weekly",
"star": 5
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 B

View File

@ -1,7 +1,24 @@
import { Data, Meta } from '#miao'
import { alias } from './alias.js'
import { wifeCfg } from './extra.js'
import lodash from 'lodash'
let data = Data.readJSON('resources/meta-sr/character/data.json', 'miao')
let meta = Meta.create('sr', 'char')
meta.addData(data)
meta.addAlias(alias)
// 老婆设置同样设置到gs下通用数据
let gsMeta = Meta.create('gs', 'char')
let { wifeData } = gsMeta.getMeta()
lodash.forEach(wifeCfg, (txt, type) => {
wifeData[type] = wifeData[type] || {}
Data.eachStr(txt, (name) => {
let id = meta.getId(name)
if (id) {
wifeData[type][id] = true
}
})
})
gsMeta.addMeta({ wifeData })

View File

@ -54,8 +54,8 @@
{{each detail.talent talent type}}
<div class="talent-box elem-bg">
<div class="talent-detail cont">
{{set minLv = game === 'gs' ? 4 : (type==='a' || type ==='a2'?1:4) }}
{{set maxLv = game === 'gs' ? (type==='a'?11:13) : (type==='a' || type ==='a2'?7:12)}}
{{set minLv = game === 'gs' ? 6 : (type==='a' || type ==='a2'? 1 : 6) }}
{{set maxLv = game === 'gs' ? 13 : (type==='a' || type ==='a2' ? 7 : 12 )}}
<% include(_tpl_path+'/talent-detail.html', [talent, {_res_path,lvs,type,icon:imgs[type],minLv,maxLv,game}]) %>
</div>
</div>