diff --git a/idea.md b/idea.md index 34f9a8b..048b0bf 100644 --- a/idea.md +++ b/idea.md @@ -41,7 +41,7 @@ - 自动宝物规划,选中两个或更多宝物后自动在本地图中规划出最优拾取路线,原则是尽量减少其余宝物的捡拾,自动切换主动技能,怪物造成的伤害最低的路线 - 临界显示方式,宝石数还是数值 - 怪物目标设定(完成) -- 木牌查看系统 +- 木牌查看系统(完成) - 宝物目标设定 - 每个怪物加一个怪物说明 - 歌词展示系统 diff --git a/src/data/achievement.json b/src/data/achievement.json new file mode 100644 index 0000000..006c3bf --- /dev/null +++ b/src/data/achievement.json @@ -0,0 +1,74 @@ +{ + "challenge": [ + { + "name": "虚惊一场", + "text": [ + "打完山洞门口的兽人后只剩一滴血" + ], + "point": 30 + }, + { + "name": "逃出生天", + "text": [ + "通过山路追逐战的困难难度" + ], + "point": 20 + }, + { + "name": "真能刷", + "text": [ + "勇气之路的刷血怪刷到 15w 以上的血" + ], + "point": 30 + }, + { + "name": "冰与火之舞", + "text": [ + "完成第二章音游特殊战的困难难度" + ], + "point": 50 + } + ], + "explore": [ + { + "name": "勇气巅峰", + "text": [ + "第一章完成度达到100%" + ], + "progress": "", + "point": 50 + }, + { + "name": "你是怎么办到的?!", + "text": [ + "与山路上的若干个神秘木牌对话" + ], + "hide": "该探索成就需要你自己探索如何达成", + "point": 25 + }, + { + "name": "智慧之心", + "text": [ + "第二章完成度达到100%" + ], + "progress": "", + "point": 50 + }, + { + "name": "学坏了", + "text": [ + "学习电摇嘲讽技能" + ], + "point": 20 + }, + { + "name": "满腹经纶", + "text": [ + "把第二章中所有能学习的技能都学一遍" + ], + "hide": "该探索成就需要你自己探索如何达成", + "progress": "", + "point": 50 + } + ] +} \ No newline at end of file diff --git a/src/plugin/utils.ts b/src/plugin/utils.ts index 5339489..6083d79 100644 --- a/src/plugin/utils.ts +++ b/src/plugin/utils.ts @@ -2,7 +2,7 @@ import { message } from 'ant-design-vue'; import { MessageApi } from 'ant-design-vue/lib/message'; import { isNil } from 'lodash'; -import { Animation, TimingFn } from 'mutate-animate'; +import { Animation, sleep, TimingFn } from 'mutate-animate'; import { ComputedRef, ref } from 'vue'; import { EVENT_KEY_CODE_MAP } from './keyCodes'; @@ -191,3 +191,15 @@ export function download(content: string, name: string) { a.click(); document.body.removeChild(a); } + +/** + * 间隔一段时间调用一个函数 + * @param funcs 函数列表 + * @param interval 调用间隔 + */ +export async function doByInterval(funcs: (() => void)[], interval: number) { + for await (const fn of funcs) { + await sleep(interval); + fn(); + } +} diff --git a/src/ui/achievement.vue b/src/ui/achievement.vue new file mode 100644 index 0000000..0a63ab9 --- /dev/null +++ b/src/ui/achievement.vue @@ -0,0 +1,14 @@ + + + + +