From a99351aae6b33617ba2c637083ec4619886e6d18 Mon Sep 17 00:00:00 2001
From: ckcz123
Date: Sun, 1 Nov 2020 21:34:46 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4266->2.7=E5=85=BC=E5=AE=B9?=
=?UTF-8?q?=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
libs/events.js | 9 +-
libs/utils.js | 13 -
main.js | 7 -
migration.html | 605 -------------------------------------------
project/functions.js | 4 -
5 files changed, 3 insertions(+), 635 deletions(-)
delete mode 100644 migration.html
diff --git a/libs/events.js b/libs/events.js
index 61cf2ecd..dbc24147 100644
--- a/libs/events.js
+++ b/libs/events.js
@@ -1856,12 +1856,8 @@ events.prototype._action_choices = function (data, x, y, prefix) {
if (data.choices.length == 0) return this.doAction();
if (core.isReplaying()) {
var action = core.status.replay.toReplay.shift();
- // --- 忽略可能的turn事件
- if (action == 'turn') action = core.status.replay.toReplay.shift();
- if (core.hasFlag('@temp@shop') && action.startsWith('shop:')) action = core.status.replay.toReplay.shift();
if (action.indexOf('choices:') == 0) {
var index = action.substring(8);
- if (index == "-1") index = data.choices.length - 1;
if (index == 'none' || ((index = parseInt(index)) >= 0) && index % 100 < data.choices.length) {
if (index != 'none') {
var timeout = Math.floor(index / 100) || 0;
@@ -1883,6 +1879,9 @@ events.prototype._action_choices = function (data, x, y, prefix) {
core.doAction();
}, core.status.replay.speed == 24 ? 1 : 750 / Math.max(1, core.status.replay.speed));
}
+ } else {
+ core.control._replay_error(action);
+ return;
}
} else {
if (data.timeout) {
@@ -1911,8 +1910,6 @@ events.prototype._action_confirm = function (data, x, y, prefix) {
core.status.event.ui = {"text": core.replaceText(data.text, prefix), "yes": data.yes, "no": data.no};
if (core.isReplaying()) {
var action = core.status.replay.toReplay.shift();
- // --- 忽略可能的turn事件
- if (action == 'turn') action = core.status.replay.toReplay.shift();
if (action.indexOf('choices:') == 0) {
var index = action.substring(8);
if (index == 'none' || ((index = parseInt(index)) >= 0) && index % 100 < 2) {
diff --git a/libs/utils.js b/libs/utils.js
index c0163326..953af106 100644
--- a/libs/utils.js
+++ b/libs/utils.js
@@ -634,19 +634,6 @@ utils.prototype._decodeRoute_decodeOne = function (decodeObj, c) {
break;
case "S":
decodeObj.ans.push("shop:" + nxt);
- // V266->V2.7商店录像兼容性
- if (core.initStatus.shops[nxt]) {
- if (!isNaN(decodeObj.route.charAt(decodeObj.index))) {
- var selections = this._decodeRoute_getNumber(decodeObj, true);
- // 只接普通商店
- if (!core.initStatus.shops[nxt].item && !core.initStatus.shops[nxt].commonEvent) {
- decodeObj.ans = decodeObj.ans.concat(selections.split("").map(function (one) {
- return 'choices:' + one;
- }));
- decodeObj.ans.push("choices:-1");
- }
- }
- }
break;
case "T":
decodeObj.ans.push("turn");
diff --git a/main.js b/main.js
index f620acfb..eda3f63f 100644
--- a/main.js
+++ b/main.js
@@ -197,13 +197,6 @@ main.prototype.init = function (mode, callback) {
main.mode = mode;
main.loadJs('project', main.pureData, function(){
- if (items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a.itemEffect
- && items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a.itemEffectTip) {
- alert('即将跳转到接档工具...');
- window.location = 'migration.html';
- return;
- }
-
var mainData = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main;
for(var ii in mainData)main[ii]=mainData[ii];
diff --git a/migration.html b/migration.html
deleted file mode 100644
index 7ed14fe6..00000000
--- a/migration.html
+++ /dev/null
@@ -1,605 +0,0 @@
-
-
-
-
-
-
-
- HTML5魔塔样板V2.7接档工具
-
-
-HTML5魔塔样板V2.7接档工具
-
-
-
-
-
-
-
-
-
-
-
-
-请严格按照如下流程,一步步进行接档操作。请勿随意增删接档过程,以免出现编辑器白屏、闪退等情况。
-
-
-
- - 做好备份,做好备份,做好备份!!!接档前请一定先做好备份!
- - 使用RM转H5刻塔器所刻的塔不适用于此接档工具。
- - 将V2.6.6样板中project目录下,除了
project/functions.js和project/plugins.js以外的其他文件和文件夹,直接复制到最新的V2.7样板中,然后打开本接档工具。
- - 点击上述的「点此一键接档」,并看到红字提示接档成功。此时编辑器应该可以正常打开。若此时无法打开编辑器请联系小艾处理。
- - 下拉框切到「全塔属性」,并注意以下内容:
-
- - 现在素材和使用的其他图片等在文件夹中被拆分,请检查对应的图片文件已经正确移动到对应的文件夹。
- - 「难度选择项」的逻辑在V2.7中被修改;请重新制作。
- - 「全局商店」的结构在V2.7中被修改;请重新制作。
- - 部分方框进行了合并,请一个个仔细检查是否存在问题。
-
-
- - 素材区的如下图块有所变动:
-
- - 三色墙和六色门从terrains中解除引用;请用animates中的进行绘制。
- - 如下图块的图块属性已被重置:三色墙、六色门、四色网、四个单向箭头、亮灯。
- - 所有的
noPass:false都改成canPass:true;请仔细检查可通行性。
- - 如下道具的道具属性已被重置,请仔细检查:三色钥匙、四色宝石(已改名Gem)、四色血瓶、破墙、破冰、炸弹、地震、冰冻、大黄门钥匙、上下楼器。
- - 即时道具获得的说明和提示文字均改成了
${}计算,ratio需写明全称(参见宝石血瓶写法),请自行处理。
- - npc48的默认动画帧数
null改回为4;如需静止状态请手动改成1。
-
-
- - 下拉框切到「楼层属性」,并注意以下内容:
-
- item_ratio被重命名为ratio,请自行修改。
- - (你也可以直接改宝石和血瓶的效果,将
core.status.thisMap.ratio改成core.status.thisMap.item_ratio。)
- - 楼层贴图的结构在V2.7中被修改;请重新制作。
-
-
- - 下拉框切换到「脚本编辑」,并请重新编辑各个自己改过的函数(可以双开一个原版V266项目和当前接档的项目进行处理)。
-
- - 请注意:V2.7中的经验全部从
experience替换成简写的exp;写伤害计算等时请尤其注意。
- - 部分文案有所改变,如「阻击」从
snipe改名repulse,shoes改名amulet等等,请自行处理。
- setInitData已被删除,请将需要的额外初始化代码写入startText中。
- afterChangeLight, afterUseBomb, afterPassNet已被删除,请去对应图块属性内修改。
- - 其他基本每个函数都有大幅修改,请勿直接拿原来的脚本整体覆盖,而是重新对函数进行需要的编辑!
-
-
- - 下拉框切换到「插件编写」,并重新新增自己加过的插件。
-
- - V2.7不能保证插件的兼容性,请谨慎测试。
- - 如果插件出现不可用问题,请自行联系插件原作者更新插件到支持V2.7的版本。
-
-
- - 请仔细检查每个道具的道具效果、每个怪物的属性、每个楼层属性、以及每个点的事件(建议双开对比)。主要变动如下:
-
- - 「数值增减」事件已被删除并被数值操作+运算符替代,编辑器将解析为自定义事件;但是游戏中仍然可以正确执行(你可以选择替换与否)。
- - 「隐藏事件」将不再默认删除该点(而只是纯粹的隐藏);请给有需要的「隐藏事件」勾选「同时删除」选项。
- - 「绘制圆」「绘制圆边框」「重启当前事件」已经被删除,并且无法再在游戏中使用,请替换成等价的写法。
-
-
- - 其他
-
- - V2.7默认采用新版图标;如果觉得不合适可以将
materials目录下的icons_old.png替换掉icons.png以使用原版图标。
-
-
- - 接档后请做好充分的测试!最好能跑通录像以确认接档无误!
-
-
-
-
-
-
-
diff --git a/project/functions.js b/project/functions.js
index 8d52dfa4..014690ac 100644
--- a/project/functions.js
+++ b/project/functions.js
@@ -133,10 +133,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// ---------- 重绘新地图;这一步将会设置core.status.floorId ---------- //
core.drawMap(floorId);
- // item_ratio兼容性...
- if (core.status.thisMap.ratio == null && core.status.thisMap.item_ratio != null) {
- core.status.thisMap.ratio = core.status.thisMap.item_ratio;
- }
// 切换楼层BGM
if (core.status.maps[floorId].bgm) {