处理完毕所有需要删除的todo

This commit is contained in:
AncTe committed 2023-08-06 22:43:58 +08:00
1 parent 993ff3c669
commit 1854389966
17 files changed
+66 -951

No files matched your search

+7
View File
@@ -115,6 +115,13 @@ function getRealStatus(
return s;
}
declare global {
interface PluginDeclaration {
getHeroStatusOf: typeof getHeroStatusOf;
getHeroStatusOn: typeof getHeroStatusOn;
}
}
core.plugin.hero = {
getHeroStatusOf,
getHeroStatusOn
+14 -14
View File
@@ -45,20 +45,20 @@ core.registerReplayAction('upgradeSkill', name => {
});
core.registerReplayAction('study', name => {
// todo: 删除getEnemyInfo
if (!name.startsWith('study:')) return false;
const [num, x, y] = name
.slice(6)
.split(',')
.map(v => parseInt(v));
if (!canStudySkill(num)) return false;
const id = core.getBlockId(x, y);
const enemy = core.getEnemyInfo(id, void 0, x, y);
if (!enemy.special.includes(num)) return false;
studySkill(enemy, num);
core.status.route.push(name);
core.replay();
return true;
// todo
// if (!name.startsWith('study:')) return false;
// const [num, x, y] = name
// .slice(6)
// .split(',')
// .map(v => parseInt(v));
// if (!canStudySkill(num)) return false;
// const id = core.getBlockId(x, y);
// const enemy = core.getEnemyInfo(id, void 0, x, y);
// if (!enemy.special.includes(num)) return false;
// studySkill(enemy, num);
// core.status.route.push(name);
// core.replay();
// return true;
});
// 商店