fix: 设置

This commit is contained in:
AncTe committed 2024-02-02 20:21:17 +08:00
1 parent a825b268bc
commit c61e789ddf
11 files changed
+253 -208

No files matched your search

+4 -3
View File
@@ -25,11 +25,12 @@ const MAX_ROTATE = 0.5;
const FRAG_TIMING = linear();
export function init() {
const fn = Mota.requireAll('fn');
Mota.rewrite(fn, 'afterBattle', 'add', (_, enemy, x, y) => {
Mota.rewrite(core.events, 'afterBattle', 'add', (_, enemy, x, y) => {
// 打怪特效
const setting = Mota.require('var', 'mainSetting');
if (setting.getValue('screen.frag') && has(x) && has(y)) {
console.log(setting.getValue('fx.frag'));
if (setting.getValue('fx.frag') && has(x) && has(y)) {
const frame = core.status.globalAnimateStatus % 2;
const canvas = document.createElement('canvas');
canvas.width = 32;
+1 -1
View File
@@ -29,7 +29,7 @@ export function getDetailedEnemy(
return typeof func === 'string' ? func : func(enemy);
};
const special: [string, string, string][] = enemy.enemy.special.map(vv => {
const s = Mota.Plugin.require('special_g').special[vv];
const s = Mota.require('var', 'enemySpecials')[vv];
return [
fromFunc(s.name, enemy.enemy),
fromFunc(s.desc, enemy.enemy),