From 256581126617290fca7c3277e7a51325559b4627 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Sat, 14 Aug 2021 23:45:22 +0800 Subject: [PATCH] V281 --- README.md | 17 +++++++++++++++++ libs/enemys.js | 10 +++++----- libs/ui.js | 4 ++++ main.js | 6 +++--- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d2dc08ae..b5c6c71f 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,23 @@ HTML5 canvas制作的魔塔样板,支持全平台游戏! ## 更新说明 +### 2021.8.14 HTML5魔塔样板V2.8.1 + +* [x] 支持任意尺寸和任意朝向的怪物和NPC素材。 +* [x] 编辑器中支持对话框预览。 +* [x] 支持多个对话框同时显示。 +* [x] 支持对话框任意定位位置和大小。 +* [x] 事件:锁定视角;移动对话框;图片放缩。 +* [x] 新增横屏时工具栏移动到画布底部的选项,解放状态栏。 +* [x] 未破防的怪物也可以正确显示临界了。 +* [x] 点击状态栏的楼梯图标也可以浏览地图了。 +* [x] 瞬间移动不再聚集跟随者。 +* [x] 新增registerWeather函数可注册一个天气。 +* [x] 编辑器新增可通行度显示。 +* [x] 更新便捷PS工具,支持高度16像素,及更多快捷键。 +* [x] 更新大量默认素材和系统音效。 +* [x] 大量细节优化,修复了所有已知bug。 + ### 2021.7.31 HTML5魔塔样板V2.8 * [x] 现在可以在编辑器中删除不需要的素材了。 diff --git a/libs/enemys.js b/libs/enemys.js index 23fff03f..0fb5e49d 100644 --- a/libs/enemys.js +++ b/libs/enemys.js @@ -270,11 +270,11 @@ enemys.prototype._nextCriticals_useLoop = function (enemy, info, number, x, y, f list.push([info.__overAtk__, -info.damage]); } for (var atk = start_atk + 1; atk <= mon_hp + mon_def; atk++) { - var nextInfo = this.getDamageInfo(enemy, {"atk": atk}, x, y, floorId); + var nextInfo = this.getDamageInfo(enemy, {"atk": Math.ceil(atk / core.getBuff('atk'))}, x, y, floorId); if (nextInfo == null || (typeof nextInfo == 'number')) break; if (pre > nextInfo.damage) { pre = nextInfo.damage; - list.push([atk - hero_atk, info.damage - nextInfo.damage]); + list.push([Math.ceil(atk / core.getBuff('atk')) - hero_atk, info.damage - nextInfo.damage]); if (nextInfo.damage <= 0 && !core.flags.enableNegativeDamage) break; if (list.length >= number) break; } @@ -298,12 +298,12 @@ enemys.prototype._nextCriticals_useBinarySearch = function (enemy, info, number, while (start < end) { var mid = Math.floor((start + end) / 2); if (mid - start > end - mid) mid--; - var nextInfo = core.enemys.getDamageInfo(enemy, {"atk": mid}, x, y, floorId); + var nextInfo = core.enemys.getDamageInfo(enemy, {"atk": Math.ceil(mid / core.getBuff('atk'))}, x, y, floorId); if (nextInfo == null || (typeof nextInfo == 'number')) return null; if (pre > nextInfo.damage) end = mid; else start = mid + 1; } - var nextInfo = core.enemys.getDamageInfo(enemy, {"atk": start}, x, y, floorId); + var nextInfo = core.enemys.getDamageInfo(enemy, {"atk": Math.ceil(start / core.getBuff('atk'))}, x, y, floorId); return nextInfo == null || (typeof nextInfo == 'number') || nextInfo.damage >= pre ? null : [start, nextInfo.damage]; } var currAtk = start_atk; @@ -312,7 +312,7 @@ enemys.prototype._nextCriticals_useBinarySearch = function (enemy, info, number, if (next == null) break; currAtk = next[0]; pre = next[1]; - list.push([currAtk - hero_atk, info.damage - pre]); + list.push([Math.ceil(currAtk / core.getBuff('atk')) - hero_atk, info.damage - pre]); if (pre <= 0 && !core.flags.enableNegativeDamage) break; if (list.length >= number) break; } diff --git a/libs/ui.js b/libs/ui.js index 6d714a94..a359e5a4 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -2513,6 +2513,10 @@ ui.prototype.drawFly = function(page) { core.setTextAlign('ui', 'center'); core.fillText('ui', '楼层跳跃', this.HPIXEL, 60, '#FFFFFF', this._buildFont(28, true)); core.fillText('ui', '返回游戏', this.HPIXEL, this.PIXEL - 13, null, this._buildFont(15, true)) + core.setTextAlign('ui', 'right'); + core.fillText('ui', '浏览地图时也', this.PIXEL - 10, this.PIXEL - 23, '#aaaaaa', this._buildFont(10, false)); + core.fillText('ui', '可楼层跳跃!', this.PIXEL - 10, this.PIXEL - 11, null, this._buildFont(10, false)); + core.setTextAlign('ui', 'center'); var middle = this.HPIXEL + 39; diff --git a/main.js b/main.js index e2791d5a..88379e9d 100644 --- a/main.js +++ b/main.js @@ -2,7 +2,7 @@ function main() { //------------------------ 用户修改内容 ------------------------// - this.version = "2.8"; // 游戏版本号;如果更改了游戏内容建议修改此version以免造成缓存问题。 + this.version = "2.8.1"; // 游戏版本号;如果更改了游戏内容建议修改此version以免造成缓存问题。 this.useCompress = false; // 是否使用压缩文件 // 当你即将发布你的塔时,请使用“JS代码压缩工具”将所有js代码进行压缩,然后将这里的useCompress改为true。 @@ -188,8 +188,8 @@ function main() { this.floors = {} this.canvas = {}; - this.__VERSION__ = "2.8"; - this.__VERSION_CODE__ = 402; + this.__VERSION__ = "2.8.1"; + this.__VERSION_CODE__ = 443; } main.prototype.init = function (mode, callback) {