diff --git a/public/libs/control.js b/public/libs/control.js index 09790dd..494dea8 100644 --- a/public/libs/control.js +++ b/public/libs/control.js @@ -1342,7 +1342,6 @@ control.prototype.startReplay = function (list) { core.status.replay.totalList = core.status.route.concat(list); core.status.replay.steps = 0; core.status.replay.save = []; - Mota.Plugin.require('replay_g').ready(); core.createCanvas('replay', 0, core._PY_ - 40, core._PX_, 40, 199); core.setOpacity('replay', 0.6); this._replay_drawProgress(); diff --git a/src/plugin/game/replay.ts b/src/plugin/game/replay.ts index 7ba9c03..8df0af0 100644 --- a/src/plugin/game/replay.ts +++ b/src/plugin/game/replay.ts @@ -141,13 +141,14 @@ export function init() { HeroSkill.toggleSkill(num); } core.updateStatusBar(); + core.status.route.push(`skill:${toEmit}`); core.replay(); return true; } core.registerReplayAction('skill', name => { if (!name.startsWith('skill:')) return false; - const [type, skill] = name.split(':'); + const [, skill] = name.split(':'); return skillAction(skill); }); @@ -157,13 +158,10 @@ export function init() { const key = parseInt(name.slice(4)); if (key === 49) { - core.status.route.push(`skill:1`); return skillAction('1'); } else if (key === 50) { - core.status.route.push(`skill:2`); return skillAction('2'); } else if (key === 51) { - core.status.route.push(`skill:3`); return skillAction('3'); }