diff --git a/docs/V2.0.md b/docs/V2.0.md
index 66fa428e..2075f6d4 100644
--- a/docs/V2.0.md
+++ b/docs/V2.0.md
@@ -1,8 +1,8 @@
# V2.0版本介绍
-?> 目前版本**v2.0**,上次更新时间:* {docsify-updated} *
+?> 目前版本**v2.1**,上次更新时间:* {docsify-updated} *
-目前样板已经更新到V2.0版本,本章将对V2.0的一些内容进行介绍。
+目前样板已经更新到V2.0版本以上,本章将对V2.0的一些内容进行介绍。
请确保已经看过前面的几个文档(2.0都有部分更新),前面已经描述过的东西这里将不再赘述。
diff --git a/docs/api.md b/docs/api.md
index ec92f8a5..e78e8d9a 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -1,6 +1,6 @@
# 附录:API列表
-?> 目前版本**v1.4.1**,上次更新时间:* {docsify-updated} *
+?> 目前版本**v2.1**,上次更新时间:* {docsify-updated} *
所有系统支持的API都列在了这里。所有可能被用到的API都在前面用\*标记。
diff --git a/docs/element.md b/docs/element.md
index 0b1f5827..246dd695 100644
--- a/docs/element.md
+++ b/docs/element.md
@@ -1,6 +1,6 @@
# 元件说明
-?> 目前版本**v2.0**,上次更新时间:* {docsify-updated} *
+?> 目前版本**v2.1**,上次更新时间:* {docsify-updated} *
在本章中,将对样板里的各个元件进行说明。各个元件主要包括道具、门、怪物、楼梯等等。
diff --git a/docs/event.md b/docs/event.md
index b7ff20fd..7f10a94e 100644
--- a/docs/event.md
+++ b/docs/event.md
@@ -1,6 +1,6 @@
# 事件
-?> 目前版本**v2.0**,上次更新时间:* {docsify-updated} *
+?> 目前版本**v2.1**,上次更新时间:* {docsify-updated} *
本章内将对样板所支持的事件进行介绍。
diff --git a/docs/index.md b/docs/index.md
index 3e12451f..068f0907 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,6 +1,6 @@
# HTML5 魔塔样板说明文档
-?> 目前版本**v2.0**,上次更新时间:* {docsify-updated} *
+?> 目前版本**v2.1**,上次更新时间:* {docsify-updated} *
众所周知,魔塔的趋势是向移动端发展,贴吧中也常常能见到“求手机魔塔”的帖子。然而现有的工具中,NekoRPG有着比较大的局限性,游戏感较差,更是完全没法在iOS上运行。而一些APP的魔塔虽然可用,但是必须要下载安装,对于Android和iOS还必须开发不同的版本,非常麻烦。
diff --git a/docs/personalization.md b/docs/personalization.md
index 64550140..6fa837b5 100644
--- a/docs/personalization.md
+++ b/docs/personalization.md
@@ -1,6 +1,6 @@
# 个性化
-?> 目前版本**v2.0**,上次更新时间:* {docsify-updated} *
+?> 目前版本**v2.1**,上次更新时间:* {docsify-updated} *
有时候只靠样板本身可能是不够的。我们需要一些个性化、自定义的素材,道具效果,怪物属性,等等。
diff --git a/docs/start.md b/docs/start.md
index 07dddcde..078f587d 100644
--- a/docs/start.md
+++ b/docs/start.md
@@ -1,6 +1,6 @@
# 快速上手
-?> 目前版本**v2.0**,上次更新时间:* {docsify-updated} *
+?> 目前版本**v2.1**,上次更新时间:* {docsify-updated} *
在这一节中,将详细介绍做一部塔的流程。现在,让我们来做一部单层塔!
diff --git a/editor.html b/editor.html
index f9381ce7..2a0bf05c 100644
--- a/editor.html
+++ b/editor.html
@@ -83,8 +83,8 @@
-
-
+
+
@@ -154,8 +154,8 @@
-
+
@@ -386,6 +386,12 @@
+
+
diff --git a/libs/control.js b/libs/control.js
index 6a0e9cda..5a6dfad8 100644
--- a/libs/control.js
+++ b/libs/control.js
@@ -775,7 +775,7 @@ control.prototype.moveOneStep = function() {
if (core.status.hero.hp<=0) {
core.status.hero.hp=0;
core.updateStatusBar();
- core.events.lose('poison');
+ core.events.lose();
return;
}
core.updateStatusBar();
@@ -998,7 +998,7 @@ control.prototype.checkBlock = function () {
if (core.status.hero.hp<=0) {
core.status.hero.hp=0;
core.updateStatusBar();
- core.events.lose('zone');
+ core.events.lose();
return;
}
snipe = snipe.filter(function (t) {
diff --git a/libs/enemys.js b/libs/enemys.js
index 4127ef40..dfc4ee21 100644
--- a/libs/enemys.js
+++ b/libs/enemys.js
@@ -138,11 +138,16 @@ enemys.prototype.getCritical = function (monsterId) {
// 坚固、模仿怪物没有临界!
if (this.hasSpecial(monster.special, 3) || this.hasSpecial(monster.special, 10)) return "???";
- if (monster.def + monster.hp/2 <= 0) {
+ if (false) { // 采用回合方式
var last = this.calDamage(monster, core.status.hero.hp, core.status.hero.atk, core.status.hero.def, core.status.hero.mdef);
- if (last == null) return '???';
+ if (last == null) {
+ if (core.status.hero.atk<=monster.def)
+ return monster.def+1-core.status.hero.atk;
+
+ return '???';
+ }
if (last <= 0) return 0;
@@ -160,7 +165,11 @@ enemys.prototype.getCritical = function (monsterId) {
var info = this.getDamageInfo(monster, core.status.hero.hp, core.status.hero.atk, core.status.hero.def, core.status.hero.mdef);
- if (info == null) return '???';
+ if (info == null) {
+ if (core.status.hero.atk<=monster.def)
+ return monster.def+1-core.status.hero.atk;
+ return '???';
+ }
if (info.damage <= 0) return 0;
var mon_hp = info.mon_hp, hero_atk = core.status.hero.atk, mon_def = monster.def, turn = info.turn;
diff --git a/libs/events.js b/libs/events.js
index 823f8a43..0118fb00 100644
--- a/libs/events.js
+++ b/libs/events.js
@@ -559,7 +559,7 @@ events.prototype.doAction = function() {
if (core.status.hero.hp<=0) {
core.status.hero.hp=0;
core.updateStatusBar();
- core.events.lose('damage');
+ core.events.lose();
}
else {
core.updateStatusBar();
@@ -1163,7 +1163,7 @@ events.prototype.passNet = function (data) {
if (core.status.hero.hp<=0) {
core.status.hero.hp=0;
core.updateStatusBar();
- core.events.lose('lava');
+ core.events.lose();
return;
}
core.drawTip('经过血网,生命-'+core.values.lavaDamage);
diff --git a/main.js b/main.js
index f66c2464..e83fb164 100644
--- a/main.js
+++ b/main.js
@@ -2,7 +2,7 @@ function main() {
//------------------------ 用户修改内容 ------------------------//
- this.version = "2.0"; // 游戏版本号;如果更改了游戏内容建议修改此version以免造成缓存问题。
+ this.version = "2.1"; // 游戏版本号;如果更改了游戏内容建议修改此version以免造成缓存问题。
this.useCompress = false; // 是否使用压缩文件
// 当你即将发布你的塔时,请使用“JS代码压缩工具”将所有js代码进行压缩,然后将这里的useCompress改为true。
diff --git a/project/comment.js b/project/comment.js
index 4b81fa81..110fa113 100644
--- a/project/comment.js
+++ b/project/comment.js
@@ -38,7 +38,7 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
- "_data": "物品是否属于装备(仅在core.flags.equipment时有效)"
+ "_data": "物品是否属于装备(仅在全塔属性的equipment为true时有效)"
}
}
},
@@ -266,7 +266,7 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"images": {
"_leaf": true,
"_type": "textarea",
- "_data": "背景/前景图;你可以选择一张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。"
+ "_data": "背景/前景图;你可以选择若干张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。"
},
"color": {
"_leaf": true,
@@ -305,36 +305,36 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true,
"_type": "event",
"_event": "event",
- "_data": "该楼的所有可能事件列表"
+ "_data": "该点的可能事件列表"
},
"changeFloor": {
"_leaf": true,
"_type": "event",
"_event": "changeFloor",
- "_data": "楼层转换事件;该事件不能和上面的events有冲突(同位置点),否则会被覆盖"
+ "_data": "该点楼层转换事件;该事件不能和上面的events同时出现,否则会被覆盖"
},
"afterBattle": {
"_leaf": true,
"_type": "event",
"_event": "afterBattle",
- "_data": "战斗后可能触发的事件列表"
+ "_data": "该点战斗后可能触发的事件列表"
},
"afterGetItem": {
"_leaf": true,
"_type": "event",
"_event": "afterGetItem",
- "_data": "获得道具后可能触发的事件列表"
+ "_data": "该点获得道具后可能触发的事件列表"
},
"afterOpenDoor": {
"_leaf": true,
"_type": "event",
"_event": "afterOpenDoor",
- "_data": "开完门后可能触发的事件列表"
+ "_data": "该点开完门后可能触发的事件列表"
},
"cannotMove": {
"_leaf": true,
"_type": "textarea",
- "_data": "每个图块不可通行的方向 \n 可以在这里定义每个点不能前往哪个方向,例如悬崖边不能跳下去 \n'x,y': ['up', 'left'], // (x,y)点不能往上和左走"
+ "_data": "该点不可通行的方向 \n 可以在这里定义该点不能前往哪个方向,例如悬崖边不能跳下去 \n'x,y': ['up', 'left'], // (x,y)点不能往上和左走"
}
}
}
diff --git a/project/data.comment.js b/project/data.comment.js
index 464163fa..c33ab63e 100644
--- a/project/data.comment.js
+++ b/project/data.comment.js
@@ -130,17 +130,17 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"keys": {
"_leaf": true,
"_type": "textarea",
- "_data": "初始道具个数"
+ "_data": "初始三种钥匙个数"
},
"constants": {
"_leaf": true,
"_type": "textarea",
- "_data": ""
+ "_data": "初始永久道具个数,例如初始送手册可以写 {'book': true}"
},
"tools": {
"_leaf": true,
"_type": "textarea",
- "_data": ""
+ "_data": "初始消耗道具个数,例如初始有两破可以写 {'pickaxe': 2}"
}
}
},
@@ -156,17 +156,17 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"direction": {
"_leaf": true,
"_type": "textarea",
- "_data": "勇士初始位置"
+ "_data": "勇士初始方向"
},
"x": {
"_leaf": true,
"_type": "textarea",
- "_data": ""
+ "_data": "勇士初始x坐标"
},
"y": {
"_leaf": true,
"_type": "textarea",
- "_data": ""
+ "_data": "勇士初始y坐标"
}
}
},
@@ -191,7 +191,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"shops": {
"_leaf": true,
"_type": "textarea",
- "_data": "全局商店"
+ "_data": "全局商店,是一个数组 \n 每一项是一个Object代表一个全局商店 \n id 为商店的唯一标识符(ID),请确保任何两个商店的id都不相同 \n name 为商店的名称(打开商店后的标题) \n icon 为商店的图标,在icons.js的npcs中定义。如blueShop可代表蓝色商店。 \n textInList 为其在快捷商店栏中显示的名称,如\"3楼金币商店\"等 \n use 为消耗的类型,是金币(money)还是经验(experience)。 \n need 是一个表达式,计算商店所需要用到的数值,可以以times作为参数。 \n text 为商店所说的话。可以用${need}表示需要的数值。\n choices 为商店的各个选项,是一个list,每一项是一个选项,里面text为显示文字,effect为选项的效果,只能用+=,分号分开。"
},
"levelUp": {
"_leaf": true,
@@ -207,7 +207,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"lavaDamage": {
"_leaf": true,
"_type": "textarea",
- "_data": "各种数值;一些数值可以在这里设置\n /****** 角色相关 ******/ \n 经过血网受到的伤害"
+ "_data": "经过血网受到的伤害"
},
"poisonDamage": {
"_leaf": true,
@@ -222,7 +222,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"redJewel": {
"_leaf": true,
"_type": "textarea",
- "_data": "/****** 道具相关 ******/ \n 红宝石加攻击的数值"
+ "_data": "红宝石加攻击的数值"
},
"blueJewel": {
"_leaf": true,
@@ -322,7 +322,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"breakArmor": {
"_leaf": true,
"_type": "textarea",
- "_data": "/****** 怪物相关 ******/ \n 破甲的比例(战斗前,怪物附加角色防御的x%作为伤害)"
+ "_data": "破甲的比例(战斗前,怪物附加角色防御的x%作为伤害)"
},
"counterAttack": {
"_leaf": true,
@@ -342,7 +342,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"animateSpeed": {
"_leaf": true,
"_type": "textarea",
- "_data": "/****** 系统相关 ******/ \n 动画时间"
+ "_data": "动画时间"
}
}
},
@@ -354,7 +354,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
- "_data": "系统FLAG,在游戏运行中中请不要修改它。 /****** 状态栏相关 ******/ \n 是否在状态栏显示当前楼层"
+ "_data": "是否在状态栏显示当前楼层"
},
"enableLv": {
"_leaf": true,
@@ -396,13 +396,13 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
- "_data": "是否涉及毒衰咒;如果此项为false则不会在状态栏中显示毒衰咒的debuff ////// 上述的几个开关将直接影响状态栏的显示效果 //////"
+ "_data": "是否涉及毒衰咒;如果此项为false则不会在状态栏中显示毒衰咒的debuff"
},
"flyNearStair": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
- "_data": "/****** 道具相关 ******/ \n 是否需要在楼梯边使用传送器"
+ "_data": "是否需要在楼梯边使用传送器"
},
"pickaxeFourDirections": {
"_leaf": true,
@@ -438,7 +438,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
- "_data": "/****** 怪物相关 ******/ \n 是否支持加点"
+ "_data": "是否支持加点"
},
"enableNegativeDamage": {
"_leaf": true,
@@ -462,7 +462,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
- "_data": "/****** 系统相关 ******/ \n 点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面"
+ "_data": "点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面"
},
"canOpenBattleAnimate": {
"_leaf": true,
diff --git a/project/data.js b/project/data.js
index 1bf2802b..1d14035d 100644
--- a/project/data.js
+++ b/project/data.js
@@ -23,7 +23,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"firstData" : {
"title": "魔塔样板",
"name": "template",
- "version": "Ver 2.0",
+ "version": "Ver 2.1",
"floorId": "sample0",
"hero": {
"name": "阳光",
diff --git a/project/functions.js b/project/functions.js
index aac75ee7..0f33a232 100644
--- a/project/functions.js
+++ b/project/functions.js
@@ -124,7 +124,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
if (core.status.hero.hp<=0) {
core.status.hero.hp=0;
core.updateStatusBar();
- core.events.lose('battle');
+ core.events.lose('战斗失败');
return;
}
// 获得金币和经验