diff --git a/idea.md b/idea.md index 3888ba8..3542621 100644 --- a/idea.md +++ b/idea.md @@ -17,8 +17,6 @@ 玩法:一个会转动的圆盘,带有一个伸出去的把手,boss 从四面八方射子弹,当子弹恰好落到把手前端时,点击按键或屏幕,可以抵挡子弹,简单难度 3 条命,困难 1 条。简单难度音符密度低。困难难度为冰与火之舞的节奏。简单难度判定时间为前后各 100ms,困难为 50ms -### 第三章 战争 - ## 主角 - 反抢夺:1 级反 1.0,2 级反 2.0,3 级反 3.0,用智慧点点 @@ -26,6 +24,8 @@ - 铸剑为盾:主动技能,减少攻击,增加防御 - 血之代偿:消耗一定血量,战前对怪物造成同等数值的伤害 +### 第三章 战争 + ## 机制 ### 通用 diff --git a/public/libs/items.js b/public/libs/items.js index 06ca34f..23d00bf 100644 --- a/public/libs/items.js +++ b/public/libs/items.js @@ -77,7 +77,10 @@ items.prototype.getItemEffectTip = function (itemId) { ////// 使用道具 ////// items.prototype.useItem = function (itemId, noRoute, callback) { const ignore = ['I560', 'I559']; - if (!this.canUseItem(itemId) || ignore.includes(itemId)) { + if ( + !this.canUseItem(itemId) || + (ignore.includes(itemId) && core.isReplaying()) + ) { if (callback) callback(); return; } @@ -86,7 +89,8 @@ items.prototype.useItem = function (itemId, noRoute, callback) { // 执行完毕 this._afterUseItem(itemId); // 记录路线 - if (!noRoute) core.status.route.push('item:' + itemId); + if (!noRoute && !ignore.includes(itemId)) + core.status.route.push('item:' + itemId); if (callback) callback(); }; diff --git a/public/project/floors/MT6.js b/public/project/floors/MT6.js index cd6a0e2..805f874 100644 --- a/public/project/floors/MT6.js +++ b/public/project/floors/MT6.js @@ -131,6 +131,7 @@ main.floors.MT6= "你可以通过拾取绿宝石来获取智慧,拥有足够的智慧后请尽快加点", "合理分配技能是该塔的关键,所以请加点时慎重选择", "按J或者点击状态栏的技能树可以打开技能树", + "现在技能树已经可以在百科全书中查看", "祝您游戏愉快!", { "type": "openDoor", diff --git a/src/plugin/pop.ts b/src/plugin/pop.ts index 8fea5ba..f828b3c 100644 --- a/src/plugin/pop.ts +++ b/src/plugin/pop.ts @@ -29,7 +29,15 @@ function popValue() { // 绘制 if (one.frame >= 60) core.setAlpha(ctx, 3 - one.frame / 30); else core.setAlpha(ctx, 1); - core.fillBoldText(ctx, one.value, one.px, one.py); + core.fillBoldText( + ctx, + one.value, + one.px, + one.py, + '#f22', + '#000', + '24px normal' + ); if (one.frame >= 90) count++; }); if (count > 0) pop.splice(0, count); diff --git a/src/ui/desc.vue b/src/ui/desc.vue index 61056ba..ba0dd5f 100644 --- a/src/ui/desc.vue +++ b/src/ui/desc.vue @@ -2,13 +2,14 @@ { return splitText(desc[selected.value].desc); }); + +function click(key: DescKey) { + if (!eval(desc[key].condition)) return; + selected.value = key; +} + +function show(condition: string) { + return eval(condition); +} diff --git a/src/ui/skillTree.vue b/src/ui/skillTree.vue index 2549ea9..f8d1d54 100644 --- a/src/ui/skillTree.vue +++ b/src/ui/skillTree.vue @@ -168,17 +168,19 @@ function draw() { const d = dict.value; const w = canvas.width; const per = w / 11; + ctx.clearRect(0, 0, canvas.width, canvas.height); skills.value.forEach(v => { const [x, y] = v.loc.map(v => v * 2 - 1); // 技能连线 - v.front.forEach(([skill]) => { + v.front.forEach(([skill], i) => { const s = skills.value[d[skill]]; ctx.beginPath(); ctx.moveTo(x * per + per / 2, y * per + per / 2); ctx.lineTo( ...(s.loc.map(v => (v * 2 - 1) * per + per / 2) as LocArr) ); - if (core.getSkillLevel(s.index) === 0) ctx.strokeStyle = '#aaa'; + if (core.getSkillLevel(s.index) < v.front[i][1]) + ctx.strokeStyle = '#aaa'; else ctx.strokeStyle = '#0f8'; ctx.lineWidth = devicePixelRatio; ctx.stroke(); @@ -249,6 +251,7 @@ function selectChapter(delta: number) { font-size: 2.8vh; display: flex; flex-direction: column; + user-select: none; } #skill-title {