dev
This commit is contained in:
@@ -557,6 +557,10 @@ class Character(CharacterProperty):
|
|||||||
skill = self.GetSkillByID(key)
|
skill = self.GetSkillByID(key)
|
||||||
if skill is not None:
|
if skill is not None:
|
||||||
skill.lv += skills[key].get('lv', 0)
|
skill.lv += skills[key].get('lv', 0)
|
||||||
|
if skill.hasReinforce:
|
||||||
|
skill.reinforce = skills[key].get('reinforce', 0)
|
||||||
|
if skill.hasVP:
|
||||||
|
skill.vp = skills[key].get('vp', 0)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def load_skills(self) -> None:
|
def load_skills(self) -> None:
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ class ActiveSkill(Skill):
|
|||||||
|
|
||||||
def skillInfo(self, mode: str | None = None):
|
def skillInfo(self, mode: str | None = None):
|
||||||
basic = deepcopy(self)
|
basic = deepcopy(self)
|
||||||
|
basic.setReinforce()
|
||||||
if mode is not None:
|
if mode is not None:
|
||||||
basic.currentMode = mode
|
basic.currentMode = mode
|
||||||
basic.setMode(mode)
|
basic.setMode(mode)
|
||||||
|
|||||||
@@ -69,8 +69,9 @@ export default defineComponent({
|
|||||||
display: flex;
|
display: flex;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
border-bottom: 1px solid #4f4838;
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 25px;
|
||||||
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
@@ -97,12 +98,17 @@ export default defineComponent({
|
|||||||
.i-tab {
|
.i-tab {
|
||||||
// font-size: 12px;
|
// font-size: 12px;
|
||||||
margin-left: 1px;
|
margin-left: 1px;
|
||||||
|
width: fit-content;
|
||||||
width: 120px;
|
padding:0px 10px;
|
||||||
|
padding-bottom: 2px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
line-height: 20px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
display: flex;
|
||||||
|
align-items: end;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
text-shadow: none;
|
||||||
|
|
||||||
&:visited {
|
&:visited {
|
||||||
color: currentColor;
|
color: currentColor;
|
||||||
@@ -119,8 +125,10 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
|
margin-bottom: -1px;
|
||||||
background: linear-gradient(#574d38, #25221d);
|
background: linear-gradient(#574d38, #25221d);
|
||||||
border-image: url('@/assets/img/control/active_top.png') 1 fill stretch;
|
border-image: url('@/assets/img/control/active_top.png') 1 fill stretch;
|
||||||
|
height: 22px;
|
||||||
// color: #ffb400;
|
// color: #ffb400;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 77 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 95 KiB |
@@ -22,68 +22,156 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const lvInfo = useVModel(props, 'lvInfo')
|
const lvInfo = useVModel(props, 'lvInfo')
|
||||||
const skills = computed(() =>
|
|
||||||
props.skills.filter((a) => a.hasReinforce && (!lvInfo.value[a.id]?.reinforce || lvInfo.value[a.id]?.reinforce == 0)).sort((a, b) => a.learnLv - b.learnLv),
|
|
||||||
)
|
|
||||||
|
|
||||||
const reinforce = (type: number, id: number) => {
|
const skills = (index: number = 0) => {
|
||||||
return computed({
|
index -= 1
|
||||||
|
const reinforceList = Object.keys(lvInfo.value).filter(
|
||||||
|
(a) => !!lvInfo.value[a].reinforce && lvInfo.value[a].reinforce > 0,
|
||||||
|
)
|
||||||
|
const currentReinforceSkill = index >= 0 ? reinforceList[index] : undefined
|
||||||
|
return computed(() =>
|
||||||
|
props.skills
|
||||||
|
.filter(
|
||||||
|
(a) =>
|
||||||
|
a.id.toString() === currentReinforceSkill ||
|
||||||
|
(a.hasReinforce &&
|
||||||
|
(!lvInfo.value[a.id]?.reinforce || lvInfo.value[a.id]?.reinforce == 0) && lvInfo.value[a.id].lv > 0),
|
||||||
|
)
|
||||||
|
.sort((a, b) => a.learnLv - b.learnLv),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const itemChecked = (index: number, reinforce: number) => {
|
||||||
|
index -= 1
|
||||||
|
return computed<string | undefined>({
|
||||||
get() {
|
get() {
|
||||||
return lvInfo.value[id].reinforce
|
const reinforceList = Object.keys(lvInfo.value).filter(
|
||||||
|
(a) => !!lvInfo.value[a].reinforce && lvInfo.value[a].reinforce > 0,
|
||||||
|
)
|
||||||
|
const currentReinforceSkill = reinforceList[index]
|
||||||
|
const currentReinforce = lvInfo.value[currentReinforceSkill]?.reinforce
|
||||||
|
console.log(currentReinforce, reinforce)
|
||||||
|
return currentReinforce == reinforce ? currentReinforceSkill : undefined
|
||||||
|
},
|
||||||
|
set(value: string | undefined) {
|
||||||
|
if (!value) return
|
||||||
|
const reinforceList = Object.keys(lvInfo.value).filter(
|
||||||
|
(a) => !!lvInfo.value[a].reinforce && lvInfo.value[a].reinforce > 0,
|
||||||
|
)
|
||||||
|
const currentReinforceSkill = reinforceList[index]
|
||||||
|
currentReinforceSkill && (lvInfo.value[currentReinforceSkill].reinforce = 0)
|
||||||
|
if (!value) {
|
||||||
|
currentReinforceSkill && (lvInfo.value[currentReinforceSkill].reinforce = 0)
|
||||||
|
} else {
|
||||||
|
lvInfo.value[value].reinforce = reinforce
|
||||||
|
}
|
||||||
},
|
},
|
||||||
set(value) {},
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const exchange = (index: number) => {
|
||||||
|
const skill = itemChecked(index, 1).value || itemChecked(index, 2).value
|
||||||
|
if (!skill) return
|
||||||
|
lvInfo.value[skill].reinforce = lvInfo.value[skill].reinforce == 1 ? 2 : 1
|
||||||
|
}
|
||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<>
|
<>
|
||||||
<div class="flex pt-10px bg-black">
|
{lvInfo.value && Object.keys(lvInfo.value).length > 0 ? (
|
||||||
<div class="skill-reinforce relative">
|
<div class="flex pt-10px bg-black">
|
||||||
<div class="absolute left-55px top-150px w-250px flex flex-col gap-25px">
|
<div class="skill-reinforce relative">
|
||||||
{renderList(3, (index) => (
|
<div class="absolute left-76px top-137px w-250px flex flex-col gap-21.5px">
|
||||||
<>
|
{renderList(3, (index) => (
|
||||||
<div class="w-180px h-40px flex items-center justify-between pl-10px pr-10px">
|
<>
|
||||||
<CaclIconSelect class="!mt-3px !ml--1px !bg-white/0 !border-white/0" columnNum={4} >
|
<div class="w-169px h-36px flex items-center justify-between">
|
||||||
{renderList(skills.value, (item) => (
|
<div class="m-4px w-28px h-28px">
|
||||||
<>
|
<CaclIconSelect
|
||||||
<CalcOption value={item.id} key={item.id}>
|
v-model:modelValue={itemChecked(index, 1).value}
|
||||||
<img src={getImageURL(item.icon)} alt={item.name} />
|
class="!bg-white/0 !border-white/0 m-4px"
|
||||||
</CalcOption>
|
columnNum={4}
|
||||||
</>
|
>
|
||||||
))}
|
{renderList(skills(index).value, (item) => (
|
||||||
</CaclIconSelect>
|
<>
|
||||||
<CalcButton icon="exchange"></CalcButton>
|
<CalcOption value={item.id.toString()}>
|
||||||
<CaclIconSelect class="!mt-3px !bg-white/0 !border-white/0" columnNum={4} >
|
<img src={getImageURL(item.icon)} alt={item.name} />
|
||||||
{renderList(skills.value, (item) => (
|
</CalcOption>
|
||||||
<>
|
</>
|
||||||
<CalcOption value={item.id} key={item.id}>
|
))}
|
||||||
<img src={getImageURL(item.icon)} alt={item.name} />
|
</CaclIconSelect>
|
||||||
</CalcOption>
|
</div>
|
||||||
</>
|
<CalcButton icon="exchange" onClick={() => exchange(index)}></CalcButton>
|
||||||
))}
|
<div class="m-4px w-28px h-28px">
|
||||||
</CaclIconSelect>
|
<CaclIconSelect
|
||||||
</div>
|
v-model:modelValue={itemChecked(index, 2).value}
|
||||||
</>
|
class=" !bg-white/0 !border-white/0"
|
||||||
))}
|
columnNum={4}
|
||||||
</div>
|
>
|
||||||
<div class="absolute top-80px left-300px w-320px h-270px flex flex-wrap content-start gap-15px py-5px px-30px box-border">
|
{renderList(skills(index).value, (item) => (
|
||||||
{renderList(skills.value, (item) => (
|
<>
|
||||||
<div
|
<CalcOption value={item.id.toString()}>
|
||||||
key={item.id}
|
<img src={getImageURL(item.icon)} alt={item.name} />
|
||||||
class="w-28px h-28px border-1px border-solid border-#3C2E1D rounded-4px"
|
</CalcOption>
|
||||||
>
|
</>
|
||||||
<img src={getImageURL(item.icon)} alt={item.name} />
|
))}
|
||||||
|
</CaclIconSelect>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<div class="absolute top-70px left-310px w-320px h-270px py-5px px-30px box-border flex flex-col">
|
||||||
|
<div class="flex flex-wrap gap-10px content-start h-120px overflow-y-auto mb-10px">
|
||||||
|
{renderList(skills().value, (item) => (
|
||||||
|
<div
|
||||||
|
key={item.id}
|
||||||
|
class="w-[28px] h-[28px] rounded-[1px] border-[1px] border-solid border-[#6d4e2b] bg-[linear-gradient(180deg,_#191919_0%,_#000000_100%)] [box-shadow:0px_4px_4px_#00000040_inset] rounded-4px"
|
||||||
|
>
|
||||||
|
<img src={getImageURL(item.icon)} alt={item.name} />
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
{renderList(36 - skills().value.length, (item) => (
|
||||||
|
<div
|
||||||
|
key={item}
|
||||||
|
class="w-[28px] h-[28px] rounded-[1px] border-[1px] border-solid border-[#6d4e2b] bg-[linear-gradient(180deg,_#191919_0%,_#000000_100%)] [box-shadow:0px_4px_4px_#00000040_inset] rounded-4px"
|
||||||
|
></div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
))}
|
<div class="flex flex-col gap-10px">
|
||||||
{renderList(36 - skills.value.length, (item) => (
|
{renderList(
|
||||||
<div
|
Object.keys(lvInfo.value).filter(
|
||||||
key={item}
|
(a) => !!lvInfo.value[a].reinforce && lvInfo.value[a].reinforce > 0,
|
||||||
class="w-28px h-28px border-1px border-solid border-#3C2E1D rounded-4px bg-#0B0D0A"
|
),
|
||||||
></div>
|
(index) => {
|
||||||
))}
|
const skill = props.skills.find((a) => a.id.toString() === index)
|
||||||
|
let tooltip = ''
|
||||||
|
if (skill) {
|
||||||
|
if (lvInfo.value[skill.id.toString()].reinforce == 1) {
|
||||||
|
tooltip = `技能攻击力 +${skill.learnLv < 35 ? '60' : 55}%`
|
||||||
|
}
|
||||||
|
if (lvInfo.value[skill.id.toString()].reinforce == 2) {
|
||||||
|
tooltip = `技能攻击力 +${skill.learnLv < 35 ? '43' : 38}%<br/>技能冷却时间 -15%`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return skill ? (
|
||||||
|
<div class="flex gap-5px items-center">
|
||||||
|
<div class="w-[28px] h-[28px] rounded-[1px] border-[1px] border-solid border-[#6d4e2b] bg-[linear-gradient(180deg,_#191919_0%,_#000000_100%)] [box-shadow:0px_4px_4px_#00000040_inset] rounded-4px">
|
||||||
|
<img src={getImageURL(skill?.icon)} alt={skill.name} />
|
||||||
|
</div>
|
||||||
|
<div class="text-#947E4E" v-html={tooltip}></div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
) : (
|
||||||
|
<></>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.skill-reinforce {
|
.skill-reinforce {
|
||||||
width: 620px;
|
width: 620px;
|
||||||
height: 375px;
|
height: 334px;
|
||||||
background-image: url('./img/bg.png');
|
background-image: url('./img/bg.png');
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export default defineComponent({
|
|||||||
<>
|
<>
|
||||||
<div class="h-auto py-2 flex flex-col bg-#080808 box-content">
|
<div class="h-auto py-2 flex flex-col bg-#080808 box-content">
|
||||||
{renderList(skills.value, (item) => (
|
{renderList(skills.value, (item) => (
|
||||||
<div class="h-140px flex items-center vp">
|
<div class="h-140px flex items-center vp pl-26px pr-16px box-content">
|
||||||
<div class="w-30px text-center text-#816f4c">{item.learnLv}</div>
|
<div class="w-30px text-center text-#816f4c">{item.learnLv}</div>
|
||||||
<div class="w-200px flex gap-5px items-center">
|
<div class="w-200px flex gap-5px items-center">
|
||||||
<div class="border-1px border-solid border-#3F382E rounded-4px w-28px h-28px">
|
<div class="border-1px border-solid border-#3F382E rounded-4px w-28px h-28px">
|
||||||
@@ -65,7 +65,7 @@ export default defineComponent({
|
|||||||
</div>
|
</div>
|
||||||
{renderList(2, (index) => (
|
{renderList(2, (index) => (
|
||||||
<div
|
<div
|
||||||
class="flex justify-center vp-item ml-5px"
|
class={["flex justify-center vp-item ", index == 1 ? 'ml-auto' : 'ml-2px']}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
itemChecked(item.id.toString(), index).value = !itemChecked(
|
itemChecked(item.id.toString(), index).value = !itemChecked(
|
||||||
item.id.toString(),
|
item.id.toString(),
|
||||||
|
|||||||
@@ -39,8 +39,8 @@
|
|||||||
></SkillTree>
|
></SkillTree>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="tab === 1" class="flex flex-col overflow-y-hidden h-full">
|
<div v-if="tab === 1" class="flex flex-col overflow-y-hidden h-full">
|
||||||
<SkillReinforce
|
<SkillReinforce
|
||||||
class="flex-1"
|
class="flex-1"
|
||||||
:skills="infoStore.skills"
|
:skills="infoStore.skills"
|
||||||
v-model:lvInfo="configStore.config.skills"
|
v-model:lvInfo="configStore.config.skills"
|
||||||
v-model:bindAwake="configStore.config.bindAwake"
|
v-model:bindAwake="configStore.config.bindAwake"
|
||||||
|
|||||||
Reference in New Issue
Block a user