fix: 完成成就

This commit is contained in:
unanmed 2024-11-14 18:39:58 +08:00
parent 99402b33d8
commit 3de944fc1b
4 changed files with 5 additions and 3 deletions

View File

@ -56,7 +56,7 @@ main.floors.MT17=
"12,6": [ "12,6": [
{ {
"type": "function", "type": "function",
"function": "function(){\nif (core.status.hero.hp - flags.hphphp >= 150000) {\n\tcore.completeAchievement('normal', 1);\n}\ndelete flags.hphphp;\n}" "function": "function(){\nif (core.status.hero.hp - flags.hphphp >= 150000) {\n\tMota.Plugin.require('achievement_r').completeAchievement('normal', 1);\n}\ndelete flags.hphphp;\n}"
} }
] ]
}, },

View File

@ -70,7 +70,7 @@ main.floors.MT41=
"那我就送你回到标题界面吧!", "那我就送你回到标题界面吧!",
{ {
"type": "function", "type": "function",
"function": "function(){\ncore.completeAchievement('explore', 3);\n}" "function": "function(){\nMota.Plugin.require('achievement_r').completeAchievement('explore', 0);\n}"
}, },
{ {
"type": "restart" "type": "restart"

View File

@ -124,7 +124,7 @@ main.floors.MT6=
"4,12": [ "4,12": [
{ {
"type": "function", "type": "function",
"function": "function(){\nif (core.status.hero.hp === 1) {\n\tcore.completeAchievement('normal', 0);\n}\n}" "function": "function(){\nif (core.status.hero.hp === 1) {\n\tMota.Plugin.require('achievement_r').completeAchievement('normal', 0);\n}\n}"
} }
] ]
}, },

View File

@ -6,6 +6,7 @@ import * as frag from './fx/frag';
import * as use from './use'; import * as use from './use';
import * as gameCanvas from './fx/gameCanvas'; import * as gameCanvas from './fx/gameCanvas';
import * as animateController from './animateController'; import * as animateController from './animateController';
import * as achievement from './ui/achievement';
import './loopMap'; import './loopMap';
Mota.Plugin.register('fly_r', fly); Mota.Plugin.register('fly_r', fly);
@ -21,3 +22,4 @@ Mota.Plugin.register(
animateController.default animateController.default
); );
Mota.Plugin.register('chase_r', chase); Mota.Plugin.register('chase_r', chase);
Mota.Plugin.register('achievement_r', achievement);