mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-15 03:04:30 +08:00
feat: 修改学习与胜利之号技能
This commit is contained in:
1 parent
5871558b15
commit
d11699e06e
5 files changed
+93
-77
No files matched your search
+5
-13
@@ -87,6 +87,7 @@ import { sleep } from 'mutate-animate';
|
||||
import { gameKey } from '@/core/main/custom/hotkey';
|
||||
import { GameUi } from '@/core/main/custom/ui';
|
||||
import { mainUi } from '@/core/main/init/ui';
|
||||
import type { Chapter } from '@/plugin/game/skillTree';
|
||||
|
||||
const props = defineProps<{
|
||||
num: number;
|
||||
@@ -143,19 +144,10 @@ const desc = computed(() => {
|
||||
|
||||
const effect = computed(() => {
|
||||
return [0, 1].map(v => {
|
||||
return eval(
|
||||
'`' +
|
||||
`${v === 0 ? '当前效果:' : '下一级效果:'}` +
|
||||
skill.value.effect
|
||||
.join('')
|
||||
.replace(/level(:\d+)?/g, (str, $1) => {
|
||||
if ($1)
|
||||
return `(skillTree.getSkillLevel(${$1}) + ${v})`;
|
||||
else
|
||||
return `(skillTree.getSkillLevel(${skill.value.index}) + ${v})`;
|
||||
}) +
|
||||
'`'
|
||||
);
|
||||
const prefix = v === 0 ? '当前效果:' : '下一级效果:';
|
||||
const level = skillTree.getSkillLevel(skill.value.index);
|
||||
const content = skill.value.effect(level);
|
||||
return prefix + content.join('');
|
||||
}) as [string, string];
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user