From ea990f9f2b1e771a4ce7a743817b492acd2a953c Mon Sep 17 00:00:00 2001
From: unanmed <1319491857@qq.com>
Date: Fri, 21 Apr 2023 11:33:03 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8A=A0=E8=BD=BD=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 2 +-
public/main.js | 31 +++++++++------
public/project/data.js | 4 --
public/project/floors/MT14.js | 4 +-
public/project/floors/MT17.js | 2 +-
public/project/floors/MT36.js | 2 +-
public/project/floors/MT41.js | 6 ++-
public/project/floors/MT47.js | 62 ++++++++++++++++++++++++------
public/project/floors/tower5.js | 4 +-
public/project/functions.js | 54 ++------------------------
public/project/plugin/skillTree.js | 1 +
src/data/achievement.json | 8 ++++
src/source/data.d.ts | 4 --
src/types/ui.d.ts | 2 +-
src/ui/statusBar.vue | 2 +
15 files changed, 96 insertions(+), 92 deletions(-)
diff --git a/package.json b/package.json
index 90eee62..d90831e 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "mota-ts",
"private": true,
- "version": "0.0.0",
+ "version": "1.0.0-alpha",
"type": "module",
"scripts": {
"dev": "vite",
diff --git a/public/main.js b/public/main.js
index 0ccb4c3..3781901 100644
--- a/public/main.js
+++ b/public/main.js
@@ -224,8 +224,9 @@ main.prototype.loadScript = async function (src, module) {
script.src = src;
if (module) script.type = 'module';
document.body.appendChild(script);
- await new Promise(res => {
+ await new Promise((res, rej) => {
script.addEventListener('load', res);
+ script.addEventListener('error', rej);
});
};
@@ -285,21 +286,27 @@ main.prototype.init = async function (mode, callback) {
await main.loadScript(`project/floors.min.js?v=${main.version}`);
main.dom.mainTips.style.display = 'none';
} else {
- try {
- await main.loadScript(
+ await new Promise(res => {
+ main.loadScript(
`/all/__all_floors__.js?v=${
main.version
}&id=${main.floorIds.join(',')}`
+ ).then(
+ () => {
+ main.dom.mainTips.style.display = 'none';
+ main.supportBunch = true;
+ res();
+ },
+ async () => {
+ await Promise.all(
+ mainData.floorIds.map(v =>
+ main.loadScript(`project/floors/${v}.js`)
+ )
+ );
+ res();
+ }
);
- main.dom.mainTips.style.display = 'none';
- main.supportBunch = true;
- } catch {
- await Promise.all(
- mainData.floorIds.map(v =>
- main.loadScript(`project/floors/${v}.js`)
- )
- );
- }
+ });
}
// 初始化core
diff --git a/public/project/data.js b/public/project/data.js
index d5018f6..bd0da08 100644
--- a/public/project/data.js
+++ b/public/project/data.js
@@ -147,14 +147,10 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
],
"bgms": [
"beforeBoss.mp3",
- "beforeNight.mp3",
"cave.mp3",
"escape.mp3",
"grass.mp3",
"mount.mp3",
- "night.mp3",
- "palaceNorth.mp3",
- "palaceSouth.mp3",
"plot1.mp3",
"road.mp3",
"title.mp3",
diff --git a/public/project/floors/MT14.js b/public/project/floors/MT14.js
index 4605be8..446af01 100644
--- a/public/project/floors/MT14.js
+++ b/public/project/floors/MT14.js
@@ -379,8 +379,8 @@ main.floors.MT14=
[152,152,152,152,152,152,152, 91,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,20053, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,20075],
[152,376,482,152,482, 27,152, 0, 0,236, 0, 0, 33,152,482,378, 21,381, 0, 27,152, 34, 29,152,152,20056, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,129],
[152, 0, 28,152,381, 0,235, 21,129,152,502,152,381,492,494,152,152,152,152,482,152, 29, 34,152,152,20064,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065,20065, 0],
- [152,152, 0,152,492,152,152, 0,152, 29, 33,152, 0,152,376,482, 21,378,152, 0,498, 34, 29,152,152, 27,336, 33, 0, 28, 0,345, 33,381, 0,235,141, 27,492,376,378,403,484, 0, 22,141, 21,336, 27, 28,381, 0, 34,502, 34,141,141,141,376,403,403, 0,254,333, 0, 0, 32,336, 32,333,376, 0,482,403,482,503, 0, 34,378, 0,129, 34,376, 0,336, 28,492,376,378, 21,403,503, 33,503,482, 85, 0,378,375,20007,482, 0,375,494, 0,207, 0,141, 0,499, 0,141, 22, 27,345,492, 0,376,345,403, 21, 34,378,336,376,381,376,20053],
- [152,482,498, 0, 27, 0,152,482,152, 0,152,152, 0,152,482,152,371,403,152,152,152,492,254,152,152,482,498, 0,345,345, 0,345, 0,336,336, 0,381, 32,141,141,492,141,141,141,371,141, 27,336,141,141,498,141,502,333,502, 0,403,492, 34,141,333,333, 0, 32, 32, 27, 21,502, 0,333,141,141,492,141,503,141,141,141, 34, 0,336, 33,378, 0,336, 28,345,222,141,141,141, 33,336, 33,390,396, 0,482, 0,492, 0,20007, 33,20007, 34,20007, 27,141,482,141, 0,141, 28, 33,345, 0,336, 34,345, 0,340,376, 0,336, 32,378, 32,20056],
+ [152,152, 0,152,492,152,152, 0,152, 29, 33,152, 0,152,376,482, 21,378,152, 0,498, 34, 29,152,152, 27,336, 33, 0, 28, 0,345, 33,381, 0,235,141, 27,492,376,378,403,484, 0, 22,141, 21,336, 27, 28,381, 0, 34,502, 34,141,141,141,376,403,403, 0,254,333, 0, 0, 32,336, 32,333,376, 0,482,403,482,503, 0, 34,378,336,129, 34,376, 0,336, 28,492,376,378, 21,403,503, 33,503,482, 85, 0,378,375,20007,482, 0,375,494, 0,207, 0,141, 0,499, 0,141, 22, 27,345,492, 0,376,345,403, 21, 34,378,336,376,381,376,20053],
+ [152,482,498, 0, 27, 0,152,482,152, 0,152,152, 0,152,482,152,371,403,152,152,152,492,254,152,152,482,498, 0,345,345, 0,345, 0,336,336, 0,381, 32,141,141,492,141,141,141,371,141, 27,336,141,141,498,141,502,333,502, 0,403,492, 34,141,333,333, 0, 32, 32, 27, 21,502, 0,333,141,141,492,141,503,141,141,141, 34,336,336, 33,378, 0,336, 28,345,222,141,141,141, 33,336, 33,390,396, 0,482, 0,492, 0,20007, 33,20007, 34,20007, 27,141,482,141, 0,141, 28, 33,345, 0,336, 34,345, 0,340,376, 0,336, 32,378, 32,20056],
[152,492,152,482, 0,152,152,152,152,152,152, 0,502,152,152,152, 0,152,152, 0,482, 29, 0,152,152,381,336, 27,492, 27,272, 28,498, 33,336,502,141,141,141,235, 0, 34,403,492, 0,254, 33,336, 0, 27, 0,492, 34,502, 34,141, 0,371, 0,141, 0,378,211,333, 0,503,336,336,502, 0, 28, 32,498,141, 0,376,482,498,129, 0,375, 34,403, 0,336, 28,345, 0, 33,141,141,503, 33,503,403,403, 0,336,378,482,499,20007,378,20007,381,20007,381,378, 0,141, 34,141,345,381, 0,499,336, 0,345, 32,340,492,222,336,492,336,222, 0],
[152,482,152,152,235,152, 29, 34,152, 33, 0, 21,152,152,272, 0,502,482,502, 28, 0,235,152,152,152,336,336, 0,345,345, 33,345,336, 28,336, 0, 0,502, 0, 32,141,141, 0,141, 33,141, 0,381,211, 33,141,141,502,333,502,141,141,141,141,141,336,482,336,336,371,482,376,492, 33,333,502,141,381,141,375,141,141, 0,345, 0, 0, 0, 0, 0, 0,375, 0,381,371,141,141,141,141, 21,336,403,371, 0,20007,492,20007,20007, 33,20007,378,20007,141,141,141,141,378,141,345,345,492, 0, 27,503,345,345,340, 0, 0,336, 0,336, 34,336],
[152, 0, 28, 21, 0,492, 34,502, 0, 0, 27,212, 0, 0, 33, 29,152,152,152,492,152, 0, 33, 0, 85, 0,487,254, 0,340,381,340,502, 0, 0,381,333,141,141,503,141,141,498, 0, 28,141,498,492,336, 0, 28,381, 34,502, 34,141,381, 28,376, 0,503,381,492,403,403,381,482,336, 27,333, 0, 32, 0,141, 0, 32,141, 27, 33,371,345, 0,333,336,336,482,336,336, 33, 27,378,381, 33,207,403,482,340,351, 34,381,378, 34,503,20007,381,20007, 0, 0, 34,376,272,381, 33, 0, 0,371,492, 34,403, 0, 0,492, 0,381, 32,336,403, 94],
diff --git a/public/project/floors/MT17.js b/public/project/floors/MT17.js
index 3a01dda..34dc1ef 100644
--- a/public/project/floors/MT17.js
+++ b/public/project/floors/MT17.js
@@ -56,7 +56,7 @@ main.floors.MT17=
"12,6": [
{
"type": "function",
- "function": "function(){\nif (core.status.hero.hp - flags.hphphp >= 150000) {\n\tcore.completeAchievement('normal', 1);\n\tdelete flags.hphphp;\n}\n}"
+ "function": "function(){\nif (core.status.hero.hp - flags.hphphp >= 150000) {\n\tcore.completeAchievement('normal', 1);\n}\ndelete flags.hphphp;\n}"
}
]
},
diff --git a/public/project/floors/MT36.js b/public/project/floors/MT36.js
index 9c6d7da..7067c01 100644
--- a/public/project/floors/MT36.js
+++ b/public/project/floors/MT36.js
@@ -34,7 +34,7 @@ main.floors.MT36=
"从本区域开始将会出现各种光环怪,这需要你认真思考解决办法",
"注意坚固怪受到光环加成后可能无法被打败,因为会首先计算坚固属性再计算光环",
"本区域的地图较为复杂,请善用楼传的小地图功能",
- "本区域不能使用跳跃技能"
+ "由于本区域的跳跃技能表现很奇怪,因此本区域不能使用跳跃技能"
]
},
"changeFloor": {
diff --git a/public/project/floors/MT41.js b/public/project/floors/MT41.js
index 9ad0014..0ec0a78 100644
--- a/public/project/floors/MT41.js
+++ b/public/project/floors/MT41.js
@@ -70,6 +70,10 @@ main.floors.MT41=
"那我就送你回到标题界面吧!",
{
"type": "restart"
+ },
+ {
+ "type": "function",
+ "function": "function(){\ncore.completeAchievement('explore', 3);\n}"
}
]
},
@@ -108,7 +112,7 @@ main.floors.MT41=
[ 0, 0, 0, 0, 0, 0, 0, 0, 0,381, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0,603,336, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 17, 0, 0, 0, 34, 0, 0, 0, 0, 0],
- [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,381, 0, 0, 0, 0],
+ [ 0, 0, 0, 0, 0, 91, 0, 0, 0, 0,381, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,617, 0, 0, 0,336,602, 0, 0, 0, 0],
[ 0, 0,129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0,540, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
diff --git a/public/project/floors/MT47.js b/public/project/floors/MT47.js
index 8eb350a..e78ef15 100644
--- a/public/project/floors/MT47.js
+++ b/public/project/floors/MT47.js
@@ -34,26 +34,64 @@ main.floors.MT47=
}
},
"beforeBattle": {},
- "afterBattle": {},
+ "afterBattle": {
+ "6,3": [
+ {
+ "type": "setValue",
+ "name": "flag:door_MT47_7_3",
+ "operator": "+=",
+ "value": "1"
+ }
+ ],
+ "8,3": [
+ {
+ "type": "setValue",
+ "name": "flag:door_MT47_7_3",
+ "operator": "+=",
+ "value": "1"
+ }
+ ]
+ },
"afterGetItem": {},
"afterOpenDoor": {},
- "autoEvent": {},
+ "autoEvent": {
+ "7,3": {
+ "0": {
+ "condition": "flag:door_MT47_7_3==2",
+ "currentFloor": true,
+ "priority": 0,
+ "delayExecute": false,
+ "multiExecute": false,
+ "data": [
+ {
+ "type": "openDoor"
+ },
+ {
+ "type": "setValue",
+ "name": "flag:door_MT47_7_3",
+ "operator": "=",
+ "value": "null"
+ }
+ ]
+ }
+ }
+ },
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[ 0, 0,70030, 0, 0, 0,604, 91,604,70029,70029,70029,70029, 0, 0],
[ 0, 0,70030, 0,70031, 0,604, 0,604, 0, 0, 0,70028,70030,70030],
- [70030,70030,70030,70031,70031,70031, 0,608, 0,70028,70028,70028,70028, 0, 0],
- [ 0, 0, 0,70031, 0, 0, 0,604, 0, 0, 0, 0,70029,70029,70029],
- [70031, 0, 0, 0, 0, 0, 0,604, 0, 0,604, 0, 0, 0,604],
- [70031,586,586,586,586,586, 0, 0, 0, 0,604, 0,604, 0,604],
- [70031, 0, 0, 0, 0,586, 0,604, 0, 0, 0, 0,604, 0,604],
- [70031, 0, 0,585, 0, 0, 0,604, 0,587,587,587,587,587,587],
- [ 0,585,585,585, 0,586,586,586, 0,587,587, 0, 0, 0,587],
- [ 0, 0, 0, 0, 0, 0, 0,586, 0, 0, 0, 0,587, 0,587],
- [ 0, 0, 0,584,584, 0,584,584,584, 0,584, 0,585,585,585],
+ [70030,70030,70030,70031,70031,70031,604,608,604,70028,70028,70028,70028, 0, 0],
+ [ 0, 0, 0,70031, 0, 0,611, 85,611, 0, 0, 0,70029,70029,70029],
+ [70031, 0, 0, 0, 0,613, 0, 0, 0, 0,604,643, 0, 0,604],
+ [70031,586,586,586,586,586,602,604,608,604,604, 0,604, 0,604],
+ [70031, 0, 0,494, 32,586, 0,604, 0,602, 0, 0,604, 0,604],
+ [70031, 0, 0,585,592, 0, 0,604, 0,587,587,587,587,587,587],
+ [ 0,617,585,585,492,586,586,586, 0,587,587, 0,492,482,587],
+ [ 0, 0,611, 0, 0, 0, 0,492, 0, 0,602, 0,587,482,587],
+ [ 0,643,584,584,584,614,584,584,584,600,584,608,585,585,585],
[70029, 0, 0, 0,584, 0, 0,584, 0, 0,584, 0, 0, 0,585],
- [70029, 0, 0, 0,584, 0, 0, 0, 0, 0,584, 0, 0, 0,585],
+ [70029, 0, 0, 0,584, 0, 0,643, 0, 0,584, 0, 0, 0,585],
[70029,584,584,584,584,584,584, 0,584,584,584,584,584,584,584],
[70029, 0, 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, 0, 0]
],
diff --git a/public/project/floors/tower5.js b/public/project/floors/tower5.js
index 419fada..f1b1215 100644
--- a/public/project/floors/tower5.js
+++ b/public/project/floors/tower5.js
@@ -34,8 +34,8 @@ main.floors.tower5=
[527,527,527,527,527,527,527,527,527,527,527,527,527,527,527],
[527,376, 0,381,528, 0,378,528, 0, 27, 28, 0,528, 0,527],
[527, 0, 32,279, 0,381, 0,546, 0,528, 0, 32,547, 0,527],
- [527,528,528, 0,528,528,492,528,528,528,492,528,528, 28,527],
- [527, 0,492,381,528, 0,376,528, 87,528,376, 32,528, 27,527],
+ [527,528,528, 0,528,528,492,528,527,528,492,528,528, 28,527],
+ [527, 0,492,381,528, 0,376,527, 87,527,376, 32,528, 27,527],
[527,376,528, 27,556, 32, 0,528,516,528, 32,378,492, 32,527],
[527, 32,556, 28,528,550,528,528, 0,528,528,279,528,528,527],
[527, 0,528, 32,528, 0, 0, 0, 0,536, 0, 27, 32, 0,542],
diff --git a/public/project/functions.js b/public/project/functions.js
index 5aa3940..366747f 100644
--- a/public/project/functions.js
+++ b/public/project/functions.js
@@ -926,57 +926,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
// 勇士位置应该在这里进行计算,四个位置依次遍历,去重
let toMap = [];
- if (
- core.has(x) &&
- core.has(y) &&
- !(core.has(hero?.x) && core.has(hero?.y)) &&
- core.has(floorId) &&
- flags.autoLocate &&
- flags.chapter >= 2
- ) {
- const floor = core.status.maps[floorId];
- // 存在坐标,进行遍历
- for (const [dir, { x: dx, y: dy }] of Object.entries(
- core.utils.scan
- )) {
- // 只有攻击和防御和特殊光环需要注意,其他的都不会随楼层与坐标变化
- const nx = x + dx;
- const ny = y + dy;
- if (
- nx < 0 ||
- nx >= floor.width ||
- ny < 0 ||
- ny >= floor.height
- ) {
- continue;
- }
- if (
- core.noPass(nx, ny) ||
- !core.canMoveHero(nx, ny, backDir(dir), floorId)
- ) {
- continue;
- }
- const toGet = ['atk', 'def'];
- const status = core.plugin.hero.getHeroStatusOf(
- hero,
- toGet,
- nx,
- ny,
- floorId
- );
- if (
- toMap.some(v =>
- toGet.every(vv => v[1][vv] === status[vv])
- )
- ) {
- continue;
- }
- toMap.push(dir);
- }
- } else {
- // 指定了勇士坐标或者没有怪物坐标时
- toMap = ['none'];
- }
+
+ // 指定了勇士坐标或者没有怪物坐标时
+ toMap = ['none'];
function getDamage(h) {
const enemyInfo = core.getEnemyInfo(enemy, hero, x, y, floorId);
diff --git a/public/project/plugin/skillTree.js b/public/project/plugin/skillTree.js
index a5fe565..4e6650d 100644
--- a/public/project/plugin/skillTree.js
+++ b/public/project/plugin/skillTree.js
@@ -140,6 +140,7 @@ const skills = {
index: 11,
title: '学习',
desc: [
+ '当前版本此技能无效!',
'主动技能,可以消耗500智慧学习一个怪物的技能,',
'持续5场战斗,每学习一次消耗的智慧点增加250,每次升级使持续的战斗次数增加3次。更多信息可在学习后在百科全书查看。'
],
diff --git a/src/data/achievement.json b/src/data/achievement.json
index 09b9015..6966365 100644
--- a/src/data/achievement.json
+++ b/src/data/achievement.json
@@ -59,6 +59,14 @@
"percent": true,
"point": 50
},
+ {
+ "name": "源头?",
+ "text": [
+ "在冰封雪原第一个山洞的水源处使用跳跃技能,并向前一步触发剧情"
+ ],
+ "hide": "该探索成就需要你自己探索如何达成",
+ "point": 30
+ },
{
"name": "学坏了",
"text": [
diff --git a/src/source/data.d.ts b/src/source/data.d.ts
index 4bf082e..2cdadec 100644
--- a/src/source/data.d.ts
+++ b/src/source/data.d.ts
@@ -165,14 +165,10 @@ type SoundIds =
type BgmIds =
| 'beforeBoss.mp3'
- | 'beforeNight.mp3'
| 'cave.mp3'
| 'escape.mp3'
| 'grass.mp3'
| 'mount.mp3'
- | 'night.mp3'
- | 'palaceNorth.mp3'
- | 'palaceSouth.mp3'
| 'plot1.mp3'
| 'road.mp3'
| 'title.mp3'
diff --git a/src/types/ui.d.ts b/src/types/ui.d.ts
index ed0cc57..124aae0 100644
--- a/src/types/ui.d.ts
+++ b/src/types/ui.d.ts
@@ -592,7 +592,7 @@ interface Ui {
*/
drawIcon(
name: CtxRefer,
- id: AllIds | 'hero',
+ id: AllIds,
x: number,
y: number,
w?: number,
diff --git a/src/ui/statusBar.vue b/src/ui/statusBar.vue
index 00afd65..d84cfbd 100644
--- a/src/ui/statusBar.vue
+++ b/src/ui/statusBar.vue
@@ -290,6 +290,8 @@ function openStudy() {}
#status-spring {
line-height: 0;
color: rgb(167, 255, 167);
+ top: 0;
+ font-size: 1.4vw;
}
#status-key {