From 99706cc634cd0ae4e3091a1136977c39d75373a3 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Mon, 27 Aug 2018 19:26:38 +0800 Subject: [PATCH] laser --- libs/control.js | 17 +++++++++++++---- project/functions.js | 3 ++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/libs/control.js b/libs/control.js index 19fa9a56..5b6520e0 100644 --- a/libs/control.js +++ b/libs/control.js @@ -1198,7 +1198,7 @@ control.prototype.updateCheckBlock = function() { if (core.isset(id)) { if (id=="lavaNet") { - core.status.checkBlock.damage[x+core.bigmap.width*y]+=core.values.lavaDamage; + core.status.checkBlock.damage[x+core.bigmap.width*y]+=core.values.lavaDamage||0; continue; } @@ -1214,10 +1214,19 @@ control.prototype.updateCheckBlock = function() { var nx=x+dx, ny=y+dy; if (nx<0 || nx>=core.bigmap.width || ny<0 || ny>=core.bigmap.height) continue; if (!zoneSquare && Math.abs(dx)+Math.abs(dy)>range) continue; - core.status.checkBlock.damage[nx+ny*core.bigmap.width]+=enemy.value; + core.status.checkBlock.damage[nx+ny*core.bigmap.width]+=enemy.value||0; } } } + // 存在激光 + if (core.enemys.hasSpecial(enemy.special, 24)) { + for (var nx=0;nx=core.bigmap.width || ny<0 || ny>=core.bigmap.height || Math.abs(dx)+Math.abs(dy)>1) continue; - core.status.checkBlock.damage[nx+ny*core.bigmap.width]+=enemy.value; + core.status.checkBlock.damage[nx+ny*core.bigmap.width]+=enemy.value||0; } } } @@ -1308,7 +1317,7 @@ control.prototype.checkBlock = function () { core.drawTip('受到阻击伤害'+damage+'点'); } else if (damage>0) { - core.drawTip('受到领域伤害'+damage+'点'); + core.drawTip('受到领域或激光伤害'+damage+'点'); } if (damage>0) { diff --git a/project/functions.js b/project/functions.js index 044b688f..74b7c227 100644 --- a/project/functions.js +++ b/project/functions.js @@ -342,7 +342,8 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = [20, "无敌", "勇士无法打败怪物,除非拥有十字架"], [21, "退化", function (enemy) {return "战斗后勇士永久下降"+(enemy.atkValue||0)+"点攻击和"+(enemy.defValue||0)+"点防御";}], [22, "固伤", function (enemy) {return "战斗前,怪物对勇士造成"+(enemy.damage||0)+"点固定伤害,无视勇士魔防。";}], - [23, "重生", "怪物被击败后,角色转换楼层则怪物将再次出现"] + [23, "重生", "怪物被击败后,角色转换楼层则怪物将再次出现"], + [24, "激光", function (enemy) {return "经过怪物同行或同列时自动减生命"+(enemy.value||0)+"点";}] ]; }, "getDamageInfo" : function (enemy, hero_hp, hero_atk, hero_def, hero_mdef) {