refactor: 勇士属性

This commit is contained in:
unanmed 2024-02-02 17:29:43 +08:00
parent a9c64565e1
commit fa73b47d02
5 changed files with 6 additions and 13 deletions

View File

@ -1,4 +1,4 @@
import { getHeroStatusOf, getHeroStatusOn } from '@/plugin/game/hero';
import { getHeroStatusOf, getHeroStatusOn } from '@/game/hero';
import { Range, RangeCollection } from '@/plugin/game/range';
import {
checkV2,

View File

@ -1,4 +1,4 @@
import { getHeroStatusOn } from '@/plugin/game/hero';
import { getHeroStatusOn } from '@/game/hero';
export interface SpecialDeclaration {
code: number;

View File

@ -111,12 +111,3 @@ function getRealStatus(
if (typeof s === 'number') s = Math.floor(s);
return s;
}
declare global {
interface PluginDeclaration {
hero: {
getHeroStatusOf: typeof getHeroStatusOf;
getHeroStatusOn: typeof getHeroStatusOn;
};
}
}

View File

@ -516,7 +516,9 @@ function rewrite<O, K extends SelectKey<O, _Func>, T = O>(
/**
* 在渲染进程包裹下执行一段代码,该段代码不会在录像验证中执行,因此里面的内容一定不会引起录像报错
* 一般特效,或者是ui显示、内容显示、交互监听等内容应当在渲染进程包裹下执行
* 一般特效,或者是ui显示、内容显示、交互监听等内容应当在渲染进程包裹下执行。
* 无法获取到执行内容的返回值,因为渲染进程中的值不应当直接出现在游戏进程中,否则很可能导致录像出错,
* 如果需要其返回值,应当直接在函数后面新增内容,而不是在游戏进程中使用
* @param fn 要执行的函数,传入一个参数,表示所有的第三方库,也就是`Mota.Package.requireAll()`的内容
* @param thisArg 函数的执行上下文,即函数中`this`指向
*/

View File

@ -6,7 +6,7 @@ import * as replay from './replay';
import * as ui from './ui';
import * as rewrite from './fx/rewrite';
import * as halo from './fx/halo';
import * as hero from './hero';
import * as hero from '../../game/hero';
import * as loopMap from './loopMap';
import * as removeMap from './removeMap';
import * as shop from './shop';