Update commments
This commit is contained in:
parent
bbe77b13b0
commit
3ba0473078
12
editor.html
12
editor.html
@ -83,8 +83,8 @@
|
||||
</h3>
|
||||
<div class="leftTabContent">
|
||||
<div id='newIdIdnum'><!-- id and idnum -->
|
||||
<input placeholder="输入新id(唯一标识符)"/>
|
||||
<input placeholder="输入新idnum(数字,1000以内)"/>
|
||||
<input placeholder="新id(唯一标识符)"/>
|
||||
<input placeholder="新idnum(1000以内数字)"/>
|
||||
<button>save</button>
|
||||
</div>
|
||||
<div><!-- enemy and item -->
|
||||
@ -154,8 +154,8 @@
|
||||
<option value="firstArrive">firstArrive</option>
|
||||
</select>
|
||||
<button onclick="editor_blockly.confirm()">confirm</button>
|
||||
<button onclick="editor_blockly.cancel()">cancel</button>
|
||||
<button onclick="editor_blockly.parse()">parse</button>
|
||||
<button onclick="editor_blockly.cancel()">cancel</button>
|
||||
<xml id="toolbox" style="display:none">
|
||||
<category name="entry"></category>
|
||||
<category name="statement"></category>
|
||||
@ -386,6 +386,12 @@
|
||||
|
||||
<!-- =========================================================== -->
|
||||
|
||||
<script>
|
||||
if (location.protocol.indexOf("http")!=0) {
|
||||
alert("请在启动服务中打开本编辑器!不然包括编辑在内的绝大多数功能都无法使用。");
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src='_server/vendor/vue.min.js'></script>
|
||||
<!-- <script src="https://cdn.bootcss.com/vue/2.5.13/vue.js"></script> -->
|
||||
<script src='_server/vendor/polyfill.min.js'></script>
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -142,7 +142,12 @@ enemys.prototype.getCritical = function (monsterId) {
|
||||
|
||||
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,14 +165,18 @@ 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;
|
||||
|
||||
// turn 是勇士攻击次数
|
||||
if (turn<=1) return 0; // 攻杀
|
||||
|
||||
var mon_hp = info.mon_hp, hero_atk = core.status.hero.atk, mon_def = monster.def, turn = info.turn;
|
||||
|
||||
// 每回合最小伤害 = ⎡怪物生命/勇士攻击次数⎤
|
||||
var nextAtk = Math.ceil(mon_hp/(turn-1)) + mon_def;
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
2
main.js
2
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。
|
||||
|
||||
@ -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)点不能往上和左走"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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": "阳光",
|
||||
|
||||
@ -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;
|
||||
}
|
||||
// 获得金币和经验
|
||||
|
||||
Loading…
Reference in New Issue
Block a user