mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-19 22:54:31 +08:00
第二章技能树,修复小地图的bug
This commit is contained in:
1 parent
14486f970f
commit
0b9360e55a
30 files changed
+549
-103
No files matched your search
+16
-3
@@ -30,7 +30,9 @@
|
||||
id="divider-vertical"
|
||||
></a-divider>
|
||||
<div id="skill-upgrade-info">
|
||||
<span id="skill-level">当前等级:{{ level }}</span>
|
||||
<span id="skill-level"
|
||||
>当前等级:{{ level }} / {{ skill.max }}</span
|
||||
>
|
||||
<a-divider dashed class="upgrade-divider"></a-divider>
|
||||
<span
|
||||
v-if="level < skill.max"
|
||||
@@ -88,11 +90,17 @@ const chapter = ref<Chapter>('chapter1');
|
||||
const update = ref(false);
|
||||
|
||||
const chapterDict = {
|
||||
chapter1: '第一章'
|
||||
chapter1: '第一章',
|
||||
chapter2: '第二章'
|
||||
};
|
||||
|
||||
flags.skillTree ??= 0;
|
||||
|
||||
const chapterList = Object.keys(core.plugin.skills) as Chapter[];
|
||||
|
||||
selected.value = core.plugin.skills[chapterList[flags.skillTree]][0].index;
|
||||
chapter.value = chapterList[flags.skillTree];
|
||||
|
||||
watch(selected, draw);
|
||||
watch(update, () => (mdef.value = core.status.hero.mdef));
|
||||
|
||||
@@ -276,8 +284,13 @@ onUnmounted(() => {
|
||||
function selectChapter(delta: number) {
|
||||
const now = chapterList.indexOf(chapter.value);
|
||||
const to = now + delta;
|
||||
if (has(chapterList[to])) {
|
||||
|
||||
if (has(chapterList[to]) && flags.chapter > to) {
|
||||
selected.value = core.plugin.skills[chapterList[to]][0].index;
|
||||
chapter.value = chapterList[to];
|
||||
update.value = !update.value;
|
||||
flags.skillTree = to;
|
||||
draw();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user