修改主对象的名称

This commit is contained in:
AncTe committed 2023-09-06 11:59:44 +08:00
1 parent e6d96f6e2a
commit 7073ac92c6
35 files changed
+122 -134

No files matched your search

+1 -1
View File
@@ -175,7 +175,7 @@ core.events.afterBattle = function (
canvas.width = 32;
canvas.height = 32;
core.drawIcon(canvas, enemy.id, 0, 0, 32, 32, frame);
const manager = ancTe.plugin.frag.applyFragWith(canvas);
const manager = mota.plugin.frag.applyFragWith(canvas);
const frag = manager.canvas;
frag.style.imageRendering = 'pixelated';
frag.style.width = `${frag.width * core.domStyle.scale}px`;
+1 -1
View File
@@ -10,7 +10,7 @@ control.prototype.checkBlock = function (forceMockery: boolean = false) {
const damage = info?.damage;
if (damage) {
if (!main.replayChecking) {
ancTe.plugin.pop.addPop(
mota.plugin.pop.addPop(
(x - core.bigmap.offsetX / 32) * 32 + 12,
(y - core.bigmap.offsetY / 32) * 32 + 20,
(-damage).toString()
+1 -1
View File
@@ -36,7 +36,7 @@ export function removeMaps(fromId, toId, force) {
deleted = true;
}
if (deleted && !main.replayChecking) {
ancTe.plugin.fly.splitArea();
mota.plugin.fly.splitArea();
}
}
+1 -1
View File
@@ -227,7 +227,7 @@ export function getSkillConsume(skill) {
export function openTree() {
if (main.replayChecking) return;
ancTe.plugin.ui.skillTreeOpened.value = true;
mota.plugin.ui.skillTreeOpened.value = true;
}
/**
+8 -16
View File
@@ -496,11 +496,7 @@ function intelligentArrow(fromSelf) {
damaged[loc + direction] = true;
core.drawHeroAnimate('hand');
core.status.hero.hp -= 1000;
ancTe.plugin.pop.addPop(
x * 32 + 16,
y * 32 + 16,
-1000
);
mota.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -1000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
clearInterval(skill1);
@@ -515,11 +511,7 @@ function intelligentArrow(fromSelf) {
damaged[loc + direction] = true;
core.drawHeroAnimate('hand');
core.status.hero.hp -= 1000;
ancTe.plugin.pop.addPop(
x * 32 + 16,
y * 32 + 16,
-1000
);
mota.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -1000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
clearInterval(skill1);
@@ -645,7 +637,7 @@ function icyMomentem() {
if (x == locs[index][0] && y == locs[index][1]) {
core.drawHeroAnimate('hand');
core.status.hero.hp -= 5000;
ancTe.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -5000);
mota.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -5000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
core.status.hero.hp = 0;
@@ -820,7 +812,7 @@ function getThunderDamage(x, y, power) {
hy = core.status.hero.loc.y;
if (Math.abs(hx - x) <= 1 && Math.abs(hy - y) <= 1) {
core.status.hero.hp -= 3000 * power;
ancTe.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -3000 * power);
mota.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -3000 * power);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
core.status.hero.hp = 0;
@@ -984,7 +976,7 @@ function ballThunder() {
) {
damaged[i] = true;
core.status.hero.hp -= 3000;
ancTe.plugin.pop.addPop(
mota.plugin.pop.addPop(
x * 32 + 16,
y * 32 + 16,
-3000
@@ -1494,7 +1486,7 @@ function boomingAnimate() {
hy = core.status.hero.loc.y;
if (loc[0] == hx && loc[1] == hy) {
core.status.hero.hp -= 3000;
ancTe.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -3000);
mota.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -3000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
core.status.hero.hp = 0;
@@ -1533,7 +1525,7 @@ function lineDamage(x1, y1, x2, y2, damage) {
n2 = ((y2 - y1) / (x2 - x1)) * (loc2[0] - x1) + y1 - loc2[1];
if (n1 * n2 <= 0) {
core.status.hero.hp -= damage;
ancTe.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -damage);
mota.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -damage);
core.updateStatusBar();
core.playSound('electron.mp3');
if (core.status.hero.hp < 0) {
@@ -1553,7 +1545,7 @@ function lineDamage(x1, y1, x2, y2, damage) {
n2 = ((y2 - y1) / (x2 - x1)) * (loc2[0] - x1) + y1 - loc2[1];
if (n1 * n2 <= 0) {
core.status.hero.hp -= damage;
ancTe.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -damage);
mota.plugin.pop.addPop(x * 32 + 16, y * 32 + 16, -damage);
core.updateStatusBar();
core.playSound('electron.mp3');
if (core.status.hero.hp < 0) {
+13 -14
View File
@@ -12,35 +12,34 @@ export {};
function openItemShop(itemShopId) {
if (!core.isReplaying()) {
core.plugin.openedShopId = itemShopId;
ancTe.plugin.ui.shopOpened.value = true;
mota.plugin.ui.shopOpened.value = true;
}
}
function updateVueStatusBar() {
if (main.replayChecking) return;
ancTe.plugin.status.statusBarStatus.value =
!ancTe.plugin.status.statusBarStatus.value;
ancTe.plugin.mark.checkMarkedEnemy();
mota.plugin.status.statusBarStatus.value =
!mota.plugin.status.statusBarStatus.value;
mota.plugin.mark.checkMarkedEnemy();
}
ui.prototype.drawBook = function () {
if (!core.isReplaying())
return (ancTe.plugin.ui.bookOpened.value = true);
return (mota.plugin.ui.bookOpened.value = true);
};
ui.prototype._drawToolbox = function () {
if (!core.isReplaying())
return (ancTe.plugin.ui.toolOpened.value = true);
return (mota.plugin.ui.toolOpened.value = true);
};
ui.prototype._drawEquipbox = function () {
if (!core.isReplaying())
return (ancTe.plugin.ui.equipOpened.value = true);
return (mota.plugin.ui.equipOpened.value = true);
};
ui.prototype.drawFly = function () {
if (!core.isReplaying())
return (ancTe.plugin.ui.flyOpened.value = true);
if (!core.isReplaying()) return (mota.plugin.ui.flyOpened.value = true);
};
control.prototype.updateStatusBar_update = function () {
@@ -58,7 +57,7 @@ export {};
control.prototype.showStatusBar = function () {
if (main.mode == 'editor') return;
core.removeFlag('hideStatusBar');
ancTe.plugin.ui.showStatusBar.value = true;
mota.plugin.ui.showStatusBar.value = true;
core.dom.tools.hard.style.display = 'block';
core.dom.toolBar.style.display = 'block';
};
@@ -69,7 +68,7 @@ export {};
// 如果原本就是隐藏的,则先显示
if (!core.domStyle.showStatusBar) this.showStatusBar();
if (core.isReplaying()) showToolbox = true;
ancTe.plugin.ui.showStatusBar.value = false;
mota.plugin.ui.showStatusBar.value = false;
var toolItems = core.dom.tools;
core.setFlag('hideStatusBar', true);
@@ -88,13 +87,13 @@ export {};
function showChapter(chapter) {
if (core.isReplaying()) return;
ancTe.plugin.chapter.chapterContent.value = chapter;
ancTe.plugin.chapter.chapterShowed.value = true;
mota.plugin.chapter.chapterContent.value = chapter;
mota.plugin.chapter.chapterShowed.value = true;
}
function openSkill() {
if (core.isReplaying()) return;
ancTe.plugin.ui.skillOpened.value = true;
mota.plugin.ui.skillOpened.value = true;
}
core.plugin.gameUi = {