This commit is contained in:
ckcz123 2020-07-15 19:37:30 +08:00
parent a216caf004
commit bd6ff37811
4 changed files with 24 additions and 4 deletions

View File

@ -35,9 +35,14 @@ HTML5 canvas制作的魔塔样板支持全平台游戏
│ └─ utils.js # 工具类
├── /project/ # 项目目录,用户需要在这里做自己的塔
│ ├─ /animates/ # 动画目录
│ ├─ /autotiles/ # 使用到的自动元件
│ ├─ /bgms/ # 使用到的背景音乐
│ ├─ /floors/ # 剧本文件,记录了每个地图的数据和事件
│ ├─ /images/ # 所有图片素材目录
│ ├─ /fonts/ # 字体目录
│ ├─ /images/ # 游戏中使用到的图片目录
│ ├─ /materials/ # 系统素材目录
│ ├─ /sounds/ # 音效目录
│ ├─ /tilesets/ # 额外素材目录
│ ├─ data.js # 全局变量信息
│ ├─ enemys.js # 怪物属性数据
│ ├─ events.js # 公共事件
@ -50,13 +55,27 @@ HTML5 canvas制作的魔塔样板支持全平台游戏
├── editor.html # 可视化地图编辑工具
├── editor-mobile.html # 可视化地图编辑工具(手机版)
├── index.html # 主程序,游戏的入口
├── logo.png # 启动游戏时显示的logo图标
├── main.js # JS程序的入口将动态对所需JS进行加载
├── runtime.d.js # 样板运行时的类型标注
├── server.py # 使用python编写的启动服务
├── style.css # 游戏所需要用到的样式表
└── 启动服务.exe # 一个本地的HTTP服务器也能支撑前端的一些POST请求从而能拓展JS的IO功能。
```
## 更新说明
### 2020.7.15 HTML5魔塔样板V2.7.2
* [x] 超大地图支持现在最大能支持128x128的地图了。
* [x] 从底层重写地图绘制相关逻辑,超大地图在手机端也不会卡顿!
* [x] 现在编辑器的大地图模式下也可以进行绘图。
* [x] 事件编辑器的折叠状态会被保留,方便超长事件页的编写不卡顿。
* [x] 可以给显示选择项事件的每个选项设置启用条件。
* [x] 新增剧情文本\g改变绘制字体。
* [x] 增加图块数字的新值块;增加一元操作值块
* [x] 优化部分API调用修复已知bug
### 2020.6.20 HTML5魔塔样板V2.7.1
* [x] 编辑器中支持直接对大地图进行编辑

View File

@ -601,7 +601,7 @@ events.prototype.getNextItem = function (noRoute) {
var directions = ["up", "down", "left", "right"].filter(function (dir) {
return core.events._canGetNextItem(dir);
});
return directions.length == 1 ? this._getNextItem(directions[0], noRoute) : false;
return directions.length > 0 ? this._getNextItem(directions[0], noRoute) : false;
}
events.prototype._canGetNextItem = function (direction) {
@ -610,7 +610,7 @@ events.prototype._canGetNextItem = function (direction) {
var nx = core.getHeroLoc('x') + core.utils.scan[direction].x;
var ny = core.getHeroLoc('y') + core.utils.scan[direction].y;
var block = core.getBlock(nx, ny);
return block != null && block.event.trigger == 'getItem';
return block != null && !block.event.script && block.event.trigger == 'getItem';
}
events.prototype._getNextItem = function (direction, noRoute) {

View File

@ -187,7 +187,7 @@ function main() {
this.canvas = {};
this.__VERSION__ = "2.7.2";
this.__VERSION_CODE__ = 201;
this.__VERSION_CODE__ = 233;
}
main.prototype.init = function (mode, callback) {

View File

@ -745,6 +745,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
page = 0;
selectItem = null;
selectCount = 0;
core.isShopVisited(itemShopId);
shopInfo = flags.__shops__[shopId];
if (shopInfo.choices == null) shopInfo.choices = core.clone(core.status.shops[shopId].choices);
choices = shopInfo.choices;