Update commments

This commit is contained in:
oc 2018-04-21 00:56:57 +08:00
parent bbe77b13b0
commit 3ba0473078
9 changed files with 53 additions and 38 deletions

View File

@ -83,8 +83,8 @@
</h3> </h3>
<div class="leftTabContent"> <div class="leftTabContent">
<div id='newIdIdnum'><!-- id and idnum --> <div id='newIdIdnum'><!-- id and idnum -->
<input placeholder="输入新id唯一标识符"/> <input placeholder="新id唯一标识符"/>
<input placeholder="输入新idnum数字,1000以内"/> <input placeholder="新idnum1000以内数字"/>
<button>save</button> <button>save</button>
</div> </div>
<div><!-- enemy and item --> <div><!-- enemy and item -->
@ -154,8 +154,8 @@
<option value="firstArrive">firstArrive</option> <option value="firstArrive">firstArrive</option>
</select> </select>
<button onclick="editor_blockly.confirm()">confirm</button> <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.parse()">parse</button>
<button onclick="editor_blockly.cancel()">cancel</button>
<xml id="toolbox" style="display:none"> <xml id="toolbox" style="display:none">
<category name="entry"></category> <category name="entry"></category>
<category name="statement"></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='_server/vendor/vue.min.js'></script>
<!-- <script src="https://cdn.bootcss.com/vue/2.5.13/vue.js"></script> --> <!-- <script src="https://cdn.bootcss.com/vue/2.5.13/vue.js"></script> -->
<script src='_server/vendor/polyfill.min.js'></script> <script src='_server/vendor/polyfill.min.js'></script>

View File

@ -775,7 +775,7 @@ control.prototype.moveOneStep = function() {
if (core.status.hero.hp<=0) { if (core.status.hero.hp<=0) {
core.status.hero.hp=0; core.status.hero.hp=0;
core.updateStatusBar(); core.updateStatusBar();
core.events.lose('poison'); core.events.lose();
return; return;
} }
core.updateStatusBar(); core.updateStatusBar();
@ -998,7 +998,7 @@ control.prototype.checkBlock = function () {
if (core.status.hero.hp<=0) { if (core.status.hero.hp<=0) {
core.status.hero.hp=0; core.status.hero.hp=0;
core.updateStatusBar(); core.updateStatusBar();
core.events.lose('zone'); core.events.lose();
return; return;
} }
snipe = snipe.filter(function (t) { snipe = snipe.filter(function (t) {

View File

@ -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); 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; 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); 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; 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 是勇士攻击次数 // turn 是勇士攻击次数
if (turn<=1) return 0; // 攻杀 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; var nextAtk = Math.ceil(mon_hp/(turn-1)) + mon_def;

View File

@ -559,7 +559,7 @@ events.prototype.doAction = function() {
if (core.status.hero.hp<=0) { if (core.status.hero.hp<=0) {
core.status.hero.hp=0; core.status.hero.hp=0;
core.updateStatusBar(); core.updateStatusBar();
core.events.lose('damage'); core.events.lose();
} }
else { else {
core.updateStatusBar(); core.updateStatusBar();
@ -1163,7 +1163,7 @@ events.prototype.passNet = function (data) {
if (core.status.hero.hp<=0) { if (core.status.hero.hp<=0) {
core.status.hero.hp=0; core.status.hero.hp=0;
core.updateStatusBar(); core.updateStatusBar();
core.events.lose('lava'); core.events.lose();
return; return;
} }
core.drawTip('经过血网,生命-'+core.values.lavaDamage); core.drawTip('经过血网,生命-'+core.values.lavaDamage);

View File

@ -2,7 +2,7 @@ function main() {
//------------------------ 用户修改内容 ------------------------// //------------------------ 用户修改内容 ------------------------//
this.version = "2.0"; // 游戏版本号如果更改了游戏内容建议修改此version以免造成缓存问题。 this.version = "2.1"; // 游戏版本号如果更改了游戏内容建议修改此version以免造成缓存问题。
this.useCompress = false; // 是否使用压缩文件 this.useCompress = false; // 是否使用压缩文件
// 当你即将发布你的塔时请使用“JS代码压缩工具”将所有js代码进行压缩然后将这里的useCompress改为true。 // 当你即将发布你的塔时请使用“JS代码压缩工具”将所有js代码进行压缩然后将这里的useCompress改为true。

View File

@ -38,7 +38,7 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true, "_leaf": true,
"_type": "checkbox", "_type": "checkbox",
"_bool": "bool", "_bool": "bool",
"_data": "物品是否属于装备(仅在core.flags.equipment时有效)" "_data": "物品是否属于装备(仅在全塔属性的equipment为true时有效)"
} }
} }
}, },
@ -266,7 +266,7 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"images": { "images": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "背景/前景图;你可以选择张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。" "_data": "背景/前景图;你可以选择若干张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。"
}, },
"color": { "color": {
"_leaf": true, "_leaf": true,
@ -305,36 +305,36 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true, "_leaf": true,
"_type": "event", "_type": "event",
"_event": "event", "_event": "event",
"_data": "该楼的所有可能事件列表" "_data": "该点的可能事件列表"
}, },
"changeFloor": { "changeFloor": {
"_leaf": true, "_leaf": true,
"_type": "event", "_type": "event",
"_event": "changeFloor", "_event": "changeFloor",
"_data": "楼层转换事件该事件不能和上面的events有冲突(同位置点),否则会被覆盖" "_data": "该点楼层转换事件该事件不能和上面的events同时出现,否则会被覆盖"
}, },
"afterBattle": { "afterBattle": {
"_leaf": true, "_leaf": true,
"_type": "event", "_type": "event",
"_event": "afterBattle", "_event": "afterBattle",
"_data": "战斗后可能触发的事件列表" "_data": "该点战斗后可能触发的事件列表"
}, },
"afterGetItem": { "afterGetItem": {
"_leaf": true, "_leaf": true,
"_type": "event", "_type": "event",
"_event": "afterGetItem", "_event": "afterGetItem",
"_data": "获得道具后可能触发的事件列表" "_data": "该点获得道具后可能触发的事件列表"
}, },
"afterOpenDoor": { "afterOpenDoor": {
"_leaf": true, "_leaf": true,
"_type": "event", "_type": "event",
"_event": "afterOpenDoor", "_event": "afterOpenDoor",
"_data": "开完门后可能触发的事件列表" "_data": "该点开完门后可能触发的事件列表"
}, },
"cannotMove": { "cannotMove": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "每个图块不可通行的方向 \n 可以在这里定义每个点不能前往哪个方向,例如悬崖边不能跳下去 \n'x,y': ['up', 'left'], // (x,y)点不能往上和左走" "_data": "该点不可通行的方向 \n 可以在这里定义该点不能前往哪个方向,例如悬崖边不能跳下去 \n'x,y': ['up', 'left'], // (x,y)点不能往上和左走"
} }
} }
} }

View File

@ -130,17 +130,17 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"keys": { "keys": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "初始道具个数" "_data": "初始三种钥匙个数"
}, },
"constants": { "constants": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "" "_data": "初始永久道具个数,例如初始送手册可以写 {'book': true}"
}, },
"tools": { "tools": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "" "_data": "初始消耗道具个数,例如初始有两破可以写 {'pickaxe': 2}"
} }
} }
}, },
@ -156,17 +156,17 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"direction": { "direction": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "勇士初始位置" "_data": "勇士初始方向"
}, },
"x": { "x": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "" "_data": "勇士初始x坐标"
}, },
"y": { "y": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "" "_data": "勇士初始y坐标"
} }
} }
}, },
@ -191,7 +191,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"shops": { "shops": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_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": { "levelUp": {
"_leaf": true, "_leaf": true,
@ -207,7 +207,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"lavaDamage": { "lavaDamage": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "各种数值;一些数值可以在这里设置\n /****** 角色相关 ******/ \n 经过血网受到的伤害" "_data": "经过血网受到的伤害"
}, },
"poisonDamage": { "poisonDamage": {
"_leaf": true, "_leaf": true,
@ -222,7 +222,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"redJewel": { "redJewel": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "/****** 道具相关 ******/ \n 红宝石加攻击的数值" "_data": "红宝石加攻击的数值"
}, },
"blueJewel": { "blueJewel": {
"_leaf": true, "_leaf": true,
@ -322,7 +322,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"breakArmor": { "breakArmor": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "/****** 怪物相关 ******/ \n 破甲的比例战斗前怪物附加角色防御的x%作为伤害)" "_data": "破甲的比例战斗前怪物附加角色防御的x%作为伤害)"
}, },
"counterAttack": { "counterAttack": {
"_leaf": true, "_leaf": true,
@ -342,7 +342,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"animateSpeed": { "animateSpeed": {
"_leaf": true, "_leaf": true,
"_type": "textarea", "_type": "textarea",
"_data": "/****** 系统相关 ******/ \n 动画时间" "_data": "动画时间"
} }
} }
}, },
@ -354,7 +354,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true, "_leaf": true,
"_type": "checkbox", "_type": "checkbox",
"_bool": "bool", "_bool": "bool",
"_data": "系统FLAG在游戏运行中中请不要修改它。 /****** 状态栏相关 ******/ \n 是否在状态栏显示当前楼层" "_data": "是否在状态栏显示当前楼层"
}, },
"enableLv": { "enableLv": {
"_leaf": true, "_leaf": true,
@ -396,13 +396,13 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true, "_leaf": true,
"_type": "checkbox", "_type": "checkbox",
"_bool": "bool", "_bool": "bool",
"_data": "是否涉及毒衰咒如果此项为false则不会在状态栏中显示毒衰咒的debuff ////// 上述的几个开关将直接影响状态栏的显示效果 //////" "_data": "是否涉及毒衰咒如果此项为false则不会在状态栏中显示毒衰咒的debuff"
}, },
"flyNearStair": { "flyNearStair": {
"_leaf": true, "_leaf": true,
"_type": "checkbox", "_type": "checkbox",
"_bool": "bool", "_bool": "bool",
"_data": "/****** 道具相关 ******/ \n 是否需要在楼梯边使用传送器" "_data": "是否需要在楼梯边使用传送器"
}, },
"pickaxeFourDirections": { "pickaxeFourDirections": {
"_leaf": true, "_leaf": true,
@ -438,7 +438,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true, "_leaf": true,
"_type": "checkbox", "_type": "checkbox",
"_bool": "bool", "_bool": "bool",
"_data": "/****** 怪物相关 ******/ \n 是否支持加点" "_data": "是否支持加点"
}, },
"enableNegativeDamage": { "enableNegativeDamage": {
"_leaf": true, "_leaf": true,
@ -462,7 +462,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_leaf": true, "_leaf": true,
"_type": "checkbox", "_type": "checkbox",
"_bool": "bool", "_bool": "bool",
"_data": "/****** 系统相关 ******/ \n 点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面" "_data": "点击“开始游戏”后是否立刻开始游戏而不显示难度选择界面"
}, },
"canOpenBattleAnimate": { "canOpenBattleAnimate": {
"_leaf": true, "_leaf": true,

View File

@ -23,7 +23,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"firstData" : { "firstData" : {
"title": "魔塔样板", "title": "魔塔样板",
"name": "template", "name": "template",
"version": "Ver 2.0", "version": "Ver 2.1",
"floorId": "sample0", "floorId": "sample0",
"hero": { "hero": {
"name": "阳光", "name": "阳光",

View File

@ -124,7 +124,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
if (core.status.hero.hp<=0) { if (core.status.hero.hp<=0) {
core.status.hero.hp=0; core.status.hero.hp=0;
core.updateStatusBar(); core.updateStatusBar();
core.events.lose('battle'); core.events.lose('战斗失败');
return; return;
} }
// 获得金币和经验 // 获得金币和经验