From 187d81d934ce52162fffcac8ec2374a06cc941e0 Mon Sep 17 00:00:00 2001 From: oc Date: Fri, 23 Mar 2018 22:40:58 +0800 Subject: [PATCH 1/4] Fix Bug --- README.md | 3 +-- libs/events.js | 1 + 更新说明.txt | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e2602795..50ed514c 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ HTML5 canvas制作的魔塔样板,支持全平台游戏! ### 2018.3.17 V2.0.1 * [x] 道具使用效果的进一步分离 -* [x] 现在可以自己给样板写插件了 +* [x] 支持插件编写,用户可以根据需求来写插件了 * [x] 文本编辑器支持自动补全和代码纠错 * [x] 部分UI界面发生变化,更加方便和美观 * [x] 所有已知Bug的修复 @@ -75,7 +75,6 @@ HTML5 canvas制作的魔塔样板,支持全平台游戏! * [x] 全GUI造塔,现在用户无需打开任何文件直接编辑JS代码了。 * [x] 整体改变目录架构,将数据和逻辑进行分离 * [x] 支持48x32的怪物和NPC素材 -* [x] 支持插件编写,用户可以根据需求来写插件了 * [x] 加点改成系统开关进行处理,怪物手册会列出加点值 * [x] 支持带有血量上限的塔 * [x] 增加前景图片绘制 diff --git a/libs/events.js b/libs/events.js index 7c4ff93f..0b6edaad 100644 --- a/libs/events.js +++ b/libs/events.js @@ -197,6 +197,7 @@ events.prototype.gameOver = function (ending, fromReplay) { ////// 转换楼层结束的事件 ////// events.prototype.afterChangeFloor = function (floorId) { + if (main.mode!='play') return; return this.eventdata.afterChangeFloor(floorId); } diff --git a/更新说明.txt b/更新说明.txt index c83b449f..10d8a0d8 100644 --- a/更新说明.txt +++ b/更新说明.txt @@ -1,7 +1,7 @@ HTML5魔塔样板V2.0.1 道具使用效果的进一步分离 -现在可以自己给样板写插件了 +支持插件编写,用户可以根据需求来写插件了 文本编辑器支持自动补全和代码纠错 部分UI界面发生变化,更加方便和美观 所有已知Bug的修复 @@ -13,7 +13,6 @@ HTML5魔塔样板V2.0 全GUI造塔,现在用户无需打开任何文件直接编辑JS代码了。 整体改变目录架构,将数据和逻辑进行分离 支持48x32的怪物和NPC素材 -支持插件编写,用户可以根据需求来写插件了 加点改成系统开关进行处理,怪物手册会列出加点值 支持带有血量上限的塔 增加前景图片绘制 From a5ffe951523fd836ce025fedf1f2f4d4e770ce9f Mon Sep 17 00:00:00 2001 From: oc Date: Tue, 27 Mar 2018 21:47:29 +0800 Subject: [PATCH 2/4] update --- libs/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ui.js b/libs/ui.js index 8a75c0f3..e01d802f 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -1325,7 +1325,7 @@ ui.prototype.drawBookDetail = function (index) { var enemy = enemys[index]; var enemyId=enemy.id; - var hints=core.enemys.getSpecialHint(core.enemys.getEnemys(enemyId)); + var hints=core.enemys.getSpecialHint(core.material.enemys[enemyId]); if (hints.length==0) { core.drawTip("该怪物无特殊属性!"); From f92f4e742904ab12894c76f6f0e9c3bdf85e72f8 Mon Sep 17 00:00:00 2001 From: oc Date: Wed, 28 Mar 2018 22:30:36 +0800 Subject: [PATCH 3/4] Fix CheckBlock --- libs/control.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/control.js b/libs/control.js index cbf3e9ca..0bae3a0d 100644 --- a/libs/control.js +++ b/libs/control.js @@ -990,8 +990,10 @@ control.prototype.checkBlock = function () { core.drawTip('受到领域伤害'+damage+'点'); } - core.playSound('zone.ogg'); - core.drawAnimate("zone", x, y); + if (damage>0) { + core.playSound('zone.ogg'); + core.drawAnimate("zone", x, y); + } if (core.status.hero.hp<=0) { core.status.hero.hp=0; From 72f1e2f3ae8c5b48f6c87d3ba7c4bcccae4ce9b8 Mon Sep 17 00:00:00 2001 From: oc Date: Wed, 4 Apr 2018 13:37:07 +0800 Subject: [PATCH 4/4] Fix PushBox Bug --- libs/events.js | 10 ++++++---- project/floors/sample0.js | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/libs/events.js b/libs/events.js index 0b6edaad..bac028d1 100644 --- a/libs/events.js +++ b/libs/events.js @@ -1173,12 +1173,14 @@ events.prototype.pushBox = function (data) { } core.updateStatusBar(); - core.lockControl(); - core.eventMoveHero([direction], null, function () { - core.unLockControl(); + + core.status.replay.animate = true; + core.moveHero(direction, function() { + core.status.replay.animate = false; + core.status.route.pop(); core.events.afterPushBox(); core.replay(); - }) + }); } diff --git a/project/floors/sample0.js b/project/floors/sample0.js index 804dee94..656f254a 100644 --- a/project/floors/sample0.js +++ b/project/floors/sample0.js @@ -24,8 +24,8 @@ main.floors.sample0 = [224, 254, 212, 262, 204, 5, 0, 1, 31, 32, 34, 33, 36], [201, 261, 217, 264, 207, 5, 0, 1, 27, 28, 29, 30, 35], [5, 5, 125, 5, 5, 5, 0, 1, 21, 22, 23, 24, 25], - [0, 0, 237, 0, 0, 0, 45, 1, 1, 1, 121, 1, 1], - [4, 4, 133, 4, 4, 4, 0, 0, 0, 0, 0, 85, 124], + [0, 0, 237, 0, 0, 237, 169, 1, 1, 1, 121, 1, 1], + [4, 4, 133, 4, 4, 4, 0, 45, 0, 0, 0, 85, 124], [87, 11, 12, 13, 14, 4, 4, 2, 2, 2, 122, 2, 2], [88, 89, 90, 91, 92, 93, 94, 2, 81, 82, 83, 84, 86], ],