new:添加誓约升级效果
This commit is contained in:
@@ -286,6 +286,15 @@ class CalcEquipMixin(CharacterBase):
|
|||||||
continue
|
continue
|
||||||
apply_uppercase_attrs(self, oath)
|
apply_uppercase_attrs(self, oath)
|
||||||
fun(self)
|
fun(self)
|
||||||
|
# 誓约升级效果
|
||||||
|
for upgrade in item.upgrade:
|
||||||
|
if upgrade == 1:
|
||||||
|
self.SetStatus(SkillAttack=0.04,Buffer=800)
|
||||||
|
pass
|
||||||
|
if upgrade == 2:
|
||||||
|
self.SetSkillCD(cd=0.08)
|
||||||
|
self.SetStatus(EquEffectRatio=0.04,Buffer=800)
|
||||||
|
pass
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def calc_avatar(self, avatar: dict):
|
def calc_avatar(self, avatar: dict):
|
||||||
|
|||||||
@@ -60,12 +60,16 @@ class CharacterOathInfo:
|
|||||||
"""誓约ID"""
|
"""誓约ID"""
|
||||||
adaptation: int
|
adaptation: int
|
||||||
"""调适等级"""
|
"""调适等级"""
|
||||||
|
upgrade: list[int]
|
||||||
|
"""誓约升级"""
|
||||||
oathInfo: Union['Oath', None]
|
oathInfo: Union['Oath', None]
|
||||||
"""誓约信息"""
|
"""誓约信息"""
|
||||||
|
|
||||||
def __init__(self, info=None, equVerison=0, position='', equipments=None) -> None:
|
def __init__(self, info=None, equVerison=0, position='', equipments=None) -> None:
|
||||||
if info is None:
|
if info is None:
|
||||||
info = {}
|
info = {}
|
||||||
|
if info.get('upgrade') is None:
|
||||||
|
info['upgrade'] = [0, 0, 0, 0]
|
||||||
self.__dict__.update(info)
|
self.__dict__.update(info)
|
||||||
self.id = str(self.id)
|
self.id = str(self.id)
|
||||||
equipments = equipments or get_equipment(equVerison)
|
equipments = equipments or get_equipment(equVerison)
|
||||||
@@ -73,6 +77,7 @@ class CharacterOathInfo:
|
|||||||
if oath is not None and position in oath.position:
|
if oath is not None and position in oath.position:
|
||||||
self.oathInfo = oath.adapt(self.adaptation)
|
self.oathInfo = oath.adapt(self.adaptation)
|
||||||
self.adaptation = min(self.adaptation, self.oathInfo.max_adaptation)
|
self.adaptation = min(self.adaptation, self.oathInfo.max_adaptation)
|
||||||
|
self.upgrade = [int(upgrade) for upgrade in self.upgrade]
|
||||||
else:
|
else:
|
||||||
self.oathInfo = None
|
self.oathInfo = None
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@@ -12,7 +12,7 @@
|
|||||||
label="全局修改"
|
label="全局修改"
|
||||||
></calc-checkbox>
|
></calc-checkbox>
|
||||||
</div>
|
</div>
|
||||||
<div class="equ-profile-item">
|
<div class="equ-profile-item" v-if="part !== '11'">
|
||||||
<div class="row-name">调适</div>
|
<div class="row-name">调适</div>
|
||||||
<calc-select v-model="adaptation" class="flex-1 !h-20px">
|
<calc-select v-model="adaptation" class="flex-1 !h-20px">
|
||||||
<template v-for="i in Array.from({ length: 4 }, (_, i) => i)" :key="i">
|
<template v-for="i in Array.from({ length: 4 }, (_, i) => i)" :key="i">
|
||||||
@@ -20,6 +20,20 @@
|
|||||||
</template>
|
</template>
|
||||||
</calc-select>
|
</calc-select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="equ-profile-item" v-else>
|
||||||
|
<div class="row-name">誓约升级</div>
|
||||||
|
<template v-for="i in Array.from({ length: 4 }, (_, i) => i)" :key="i">
|
||||||
|
<calc-select
|
||||||
|
:model-value="getOathUpgradeValue(i)"
|
||||||
|
@update:model-value="setOathUpgradeValue(i, $event)"
|
||||||
|
class="flex-1 !h-20px"
|
||||||
|
>
|
||||||
|
<calc-option :value="0">无</calc-option>
|
||||||
|
<calc-option :value="1">技攻 +4%</calc-option>
|
||||||
|
<calc-option :value="2">CD -8%</calc-option>
|
||||||
|
</calc-select>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -36,7 +50,7 @@ const configStore = useConfigStore()
|
|||||||
const infoStore = useInfoStore()
|
const infoStore = useInfoStore()
|
||||||
|
|
||||||
const currentInfo = function <T>(name: string, defaultValue?: T) {
|
const currentInfo = function <T>(name: string, defaultValue?: T) {
|
||||||
return computed<string | number>({
|
return computed<T>({
|
||||||
get() {
|
get() {
|
||||||
return (
|
return (
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
@@ -74,4 +88,14 @@ const currentInfo = function <T>(name: string, defaultValue?: T) {
|
|||||||
|
|
||||||
// 调适
|
// 调适
|
||||||
const adaptation = currentInfo<string | number>('adaptation')
|
const adaptation = currentInfo<string | number>('adaptation')
|
||||||
|
// 誓约升级
|
||||||
|
const oath_upgrade = currentInfo<number[]>('upgrade', [0, 0, 0, 0])
|
||||||
|
|
||||||
|
const getOathUpgradeValue = (index: number) => oath_upgrade.value[index] ?? 0
|
||||||
|
|
||||||
|
const setOathUpgradeValue = (index: number, val: number) => {
|
||||||
|
const nextUpgrade = [...oath_upgrade.value]
|
||||||
|
nextUpgrade[index] = val
|
||||||
|
oath_upgrade.value = nextUpgrade
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -203,9 +203,9 @@ const oathSuit = computed(() => {
|
|||||||
return props.suits.oath
|
return props.suits.oath
|
||||||
})
|
})
|
||||||
|
|
||||||
const correction = computed(() => {
|
// const correction = computed(() => {
|
||||||
return props.suits.correction ?? 0
|
// return props.suits.correction ?? 0
|
||||||
})
|
// })
|
||||||
|
|
||||||
const changeSkillId = (skill: { skillId: string; enable: boolean }) => {
|
const changeSkillId = (skill: { skillId: string; enable: boolean }) => {
|
||||||
// console.log(skill)
|
// console.log(skill)
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ export interface IConfigEquip {
|
|||||||
export interface IConfigOath {
|
export interface IConfigOath {
|
||||||
id: string
|
id: string
|
||||||
adaptation: number
|
adaptation: number
|
||||||
|
upgrade: number[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IConfigEmblem {
|
export interface IConfigEmblem {
|
||||||
@@ -100,6 +101,7 @@ const defaultAvatarConfig = {
|
|||||||
const defaultOathConfig = {
|
const defaultOathConfig = {
|
||||||
id: '',
|
id: '',
|
||||||
adaptation: 0,
|
adaptation: 0,
|
||||||
|
upgrade: [0, 0, 0, 0],
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultEmblemConfig = {
|
const defaultEmblemConfig = {
|
||||||
|
|||||||
Reference in New Issue
Block a user