Update Snipe
This commit is contained in:
parent
dab6656720
commit
8dcb6cb61a
19
libs/core.js
19
libs/core.js
@ -2337,7 +2337,13 @@ core.prototype.updateCheckBlock = function() {
|
||||
}
|
||||
// 存在阻击
|
||||
if (core.enemys.hasSpecial(enemy.special, 18)) {
|
||||
|
||||
for (var dx=-1;dx<=1;dx++) {
|
||||
for (var dy=-1;dy<=1;dy++) {
|
||||
var nx=x+dx, ny=y+dy;
|
||||
if (nx<0 || nx>12 || ny<0 || ny>12 || Math.abs(dx)+Math.abs(dy)>1) continue;
|
||||
core.status.checkBlock.damage[13*nx+ny]+=enemy.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2389,6 +2395,17 @@ core.prototype.checkBlock = function () {
|
||||
|
||||
// 检查阻击事件
|
||||
var snipe = [];
|
||||
var scan = {
|
||||
'up': {'x': 0, 'y': -1},
|
||||
'left': {'x': -1, 'y': 0},
|
||||
'down': {'x': 0, 'y': 1},
|
||||
'right': {'x': 1, 'y': 0}
|
||||
}
|
||||
for (var direction in scan) {
|
||||
var nx = x+scan[direction].x, ny=y+scan[direction].y;
|
||||
if (nx<0 || nx>12 || ny<0 || ny>12) continue;
|
||||
}
|
||||
|
||||
|
||||
if (core.status.checkBlock.betweenAttack[13*x+y]) {
|
||||
core.drawTip('受到夹击,生命变成一半');
|
||||
|
||||
@ -7,7 +7,7 @@ data.prototype.init = function() {
|
||||
"title": "魔塔样板", // 游戏名,将显示在标题页面以及切换楼层的界面中
|
||||
"name": "template", // 游戏的唯一英文标识符。由英文、数字、下划线组成,不能超过20个字符。
|
||||
"version": "Ver 1.0.0 (Beta)", // 当前游戏版本;版本不一致的存档不能通用。
|
||||
"floorId": "sample0", // 初始楼层ID
|
||||
"floorId": "test", // 初始楼层ID
|
||||
"hero": { // 勇士初始数据
|
||||
"name": "阳光", // 勇士名;可以改成喜欢的
|
||||
'lv': 1, // 初始等级,该项必须为正整数
|
||||
|
||||
@ -41,7 +41,7 @@ enemys.prototype.init = function () {
|
||||
'poisonSkeleton': {'name': '紫骷髅', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
|
||||
'poisonBat': {'name': '紫蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 14, 'experience': 0, 'special': 13},
|
||||
'steelRock': {'name': '铁面人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
|
||||
'skeletonPriest': {'name': '骷髅法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
|
||||
'skeletonPriest': {'name': '骷髅法师', 'hp': 100, 'atk': 100, 'def': 0, 'money': 0, 'experience': 0, 'special': 18, 'value': 20},
|
||||
'skeletonKing': {'name': '骷髅王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
|
||||
'skeletonWizard': {'name': '骷髅巫师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
|
||||
'redSkeletonCaption': {'name': '骷髅武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'special': 0},
|
||||
|
||||
@ -16,8 +16,8 @@ main.floors.sample0 = {
|
||||
[216, 247, 256, 235, 248, 6, 0, 3, 49, 50, 51, 52, 38],
|
||||
[6, 6, 125, 6, 6, 6, 0, 1, 45, 46, 47, 48, 37],
|
||||
[224, 254, 212, 232, 204, 5, 0, 1, 31, 32, 34, 33, 36],
|
||||
[201, 205, 217, 215, 207, 5, 50, 1, 27, 28, 29, 30, 35],
|
||||
[5, 5, 125, 5, 5, 5, 50, 1, 21, 22, 23, 24, 25],
|
||||
[201, 205, 217, 215, 207, 5, 0, 1, 27, 28, 29, 30, 35],
|
||||
[5, 5, 125, 5, 5, 5, 0, 1, 21, 22, 23, 24, 25],
|
||||
[0, 0, 0, 0, 0, 0, 45, 1, 1, 1, 121, 1, 1],
|
||||
[4, 4, 126, 4, 4, 4, 0, 0, 0, 0, 0, 85, 124],
|
||||
[87, 11, 12, 13, 14, 4, 4, 2, 2, 2, 122, 2, 2],
|
||||
|
||||
@ -9,19 +9,19 @@ main.floors.test = {
|
||||
"canUseQuickShop": true, // 该层是否允许使用快捷商店
|
||||
"defaultGround": "ground", // 默认地面的图块ID(terrains中)
|
||||
"map": [ // 地图数据,需要是13x13,建议使用地图生成器来生成
|
||||
[201,201,201,201,201,201,201,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201,201,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201,201,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201,201,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201,201,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201,201,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201,201,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201,201,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201,201,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201,201,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201,201,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201, 45,201,201,201,201,201,201],
|
||||
[201,201,201,201,201,201, 0,201,201,201,201,201,201]
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0,237, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
],
|
||||
"firstArrive": [ // 第一次到该楼层触发的事件
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user