九宫格光环

This commit is contained in:
ckcz123 2020-05-27 22:57:12 +08:00
parent d9c906ecb9
commit a3c87370a6

View File

@ -531,8 +531,14 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 检查【光环】技能数字25
if (enemy && core.hasSpecial(enemy.special, 25)) {
// 检查是否是范围光环
var inRange = enemy.range == null ||
(x != null && y != null && Math.abs(block.x - x) <= enemy.range && Math.abs(block.y - y) <= enemy.range);
var inRange = enemy.range == null;
if (enemy.range != null && x != null && y != null) {
var dx = Math.abs(block.x - x),
dy = Math.abs(block.y - y);
// 检查十字和九宫格光环
if (dx + dy <= enemy.range) inRange = true;
if (enemy.zoneSquare && dx <= enemy.range && dy <= enemy.range) inRange = true;
}
// 检查是否可叠加
if (inRange && (enemy.add || cnt == 0)) {
hp_buff += enemy.value || 0;