diff --git a/images/autotile.png b/images/autotile.png
new file mode 100644
index 00000000..18e92ecf
Binary files /dev/null and b/images/autotile.png differ
diff --git a/images/terrains.png b/images/terrains.png
index 594ea615..a28642a0 100644
Binary files a/images/terrains.png and b/images/terrains.png differ
diff --git a/index.html b/index.html
index f474ad47..fb79075f 100644
--- a/index.html
+++ b/index.html
@@ -35,7 +35,6 @@
关于本塔
-
简单
普通
困难
diff --git a/libs/core.js b/libs/core.js
index 8accfd29..a781d388 100644
--- a/libs/core.js
+++ b/libs/core.js
@@ -425,49 +425,48 @@ core.prototype.keyDown = function(keyCode) {
}
core.prototype.keyUp = function(keyCode) {
- if(!core.status.played) {
- return;
-}
+ if(!core.status.played)
+ return;
-if (core.status.lockControl) {
- if (core.status.event.id == 'book' && (keyCode==27 || keyCode==88))
- core.ui.closePanel(true);
- if (core.status.event.id == 'fly' && (keyCode==71 || keyCode==27))
- core.ui.closePanel();
- if (core.status.event.id == 'fly' && keyCode==13) {
- var index=core.status.hero.flyRange.indexOf(core.status.floorId);
- var stair=core.status.event.data12 || y<0 || y>12) return 0;
+ return autotileMaps[13*x+y]?1:0;
+ }
+ for (var xx=0;xx<13;xx++) {
+ for (var yy=0;yy<13;yy++) {
+ if (isAutotile(xx, yy)) {
+ // 绘制autotile
+ var id=isAutotile(xx, yy - 1) + 2 * isAutotile(xx - 1, yy) + 4 * isAutotile(xx, yy + 1) + 8 * isAutotile(xx + 1, yy);
+ core.drawAutotileBlock(canvas, left + xx * size, top + yy * size, size, core.material.images.autotile, id);
+ }
+ }
+ }
+ for (var xx=0;xx<13;xx++) {
+ for (var yy=0;yy<13;yy++) {
+ if (isAutotile(xx, yy) + isAutotile(xx + 1, yy) + isAutotile(xx + 1, yy + 1) + isAutotile(xx, yy + 1) != 3) continue;
+ if (!isAutotile(xx, yy)) {
+ core.drawAutotileBlock(canvas, left + xx * size + size, top + yy * size + size, size, core.material.images.autotile, 16);
+ }
+ if (!isAutotile(xx + 1, yy)) {
+ core.drawAutotileBlock(canvas, left + xx * size + size / 2, top + yy * size + size, size, core.material.images.autotile, 17);
+ }
+ if (!isAutotile(xx + 1, yy + 1)) {
+ core.drawAutotileBlock(canvas, left + xx * size + size / 2, top + yy * size + size / 2, size, core.material.images.autotile, 18);
+ }
+ if (!isAutotile(xx, yy + 1)) {
+ core.drawAutotileBlock(canvas, left + xx * size + size, top + yy * size + size / 2, size, core.material.images.autotile, 19);
+ }
+ }
+ }
+}
+
+core.prototype.drawAutotileBlock = function (map, x, y, size, autotile, index) {
+ var canvas = core.canvas[map];
+ var blockIcon = core.material.icons.terrains.ground;
+ var blockImage = core.material.images.terrains;
+ switch (index) {
+ case 0:
+ canvas.drawImage(autotile, 0, 0, 32, 32, x, y, size, size);
+ break;
+ case 1:
+ canvas.drawImage(autotile, 0, 3 * 32, 16, 32, x, y, size / 2, size);
+ canvas.drawImage(autotile, 2 * 32 + 16, 3 * 32, 16, 32, x + size / 2, y, size / 2, size);
+ break;
+ case 2:
+ canvas.drawImage(autotile, 2 * 32, 32, 32, 16, x, y, size, size / 2);
+ canvas.drawImage(autotile, 2 * 32, 3 * 32 + 16, 32, 16, x, y + size / 2, size, size / 2);
+ break;
+ case 3:
+ canvas.drawImage(autotile, 2 * 32, 3 * 32, 32, 32, x, y, size, size);
+ break;
+ case 4:
+ canvas.drawImage(autotile, 0, 1 * 32, 16, 32, x, y, size / 2, size);
+ canvas.drawImage(autotile, 2 * 32 + 16, 1 * 32, 16, 32, x + size / 2, y, size / 2, size);
+ break;
+ case 5:
+ canvas.drawImage(autotile, 0, 2 * 32, 16, 32, x, y, size / 2, size);
+ canvas.drawImage(autotile, 2 * 32 + 16, 2 * 32, 16, 32, x + size / 2, y, size / 2, size);
+ break;
+ case 6:
+ canvas.drawImage(autotile, 2 * 32, 1 * 32, 32, 32, x, y, size, size);
+ break;
+ case 7:
+ canvas.drawImage(autotile, 2 * 32, 2 * 32, 32, 32, x, y, size, size);
+ break;
+ case 8:
+ canvas.drawImage(autotile, 0, 32, 32, 16, x, y, size, size / 2);
+ canvas.drawImage(autotile, 0, 3 * 32 + 16, 32, 16, x, y + size / 2, size, size / 2);
+ break;
+ case 9:
+ canvas.drawImage(autotile, 0, 3 * 32, 32, 32, x, y, size, size);
+ break;
+ case 10:
+ canvas.drawImage(autotile, 32, 32, 32, 16, x, y, size, size / 2);
+ canvas.drawImage(autotile, 32, 3 * 32 + 16, 32, 16, x, y + size / 2, size, size / 2);
+ break;
+ case 11:
+ canvas.drawImage(autotile, 32, 3 * 32, 32, 32, x, y, size, size);
+ break;
+ case 12:
+ canvas.drawImage(autotile, 0, 32, 32, 32, x, y, size, size);
+ break;
+ case 13:
+ canvas.drawImage(autotile, 0, 2 * 32, 32, 32, x, y, size, size);
+ break;
+ case 14:
+ canvas.drawImage(autotile, 32, 32, 32, 32, x, y, size, size);
+ break;
+ case 15:
+ canvas.drawImage(autotile, 32, 2 * 32, 32, 32, x, y, size, size);
+ break;
+ case 16:
+ canvas.clearRect(x, y, size / 2, size / 2);
+ canvas.drawImage(blockImage, 0, blockIcon * 32, 16, 16, x, y, size / 2, size / 2);
+ canvas.drawImage(autotile, 2 * 32, 0, 16, 16, x, y, size / 2, size / 2);
+ break;
+ case 17:
+ canvas.clearRect(x, y, size / 2, size / 2);
+ canvas.drawImage(blockImage, 0, blockIcon * 32, 16, 16, x, y, size / 2, size / 2);
+ canvas.drawImage(autotile, 2 * 32 + 16, 0, 16, 16, x, y, size / 2, size / 2);
+ break;
+ case 18:
+ canvas.clearRect(x, y, size / 2, size / 2);
+ canvas.drawImage(blockImage, 0, blockIcon * 32, 16, 16, x, y, size / 2, size / 2);
+ canvas.drawImage(autotile, 2 * 32 + 16, 16, 16, 16, x, y, size / 2, size / 2);
+ break;
+ case 19:
+ canvas.clearRect(x, y, size / 2, size / 2);
+ canvas.drawImage(blockImage, 0, blockIcon * 32, 16, 16, x, y, size / 2, size / 2);
+ canvas.drawImage(autotile, 2 * 32, 16, 16, 16, x, y, size / 2, size / 2);
+ break;
+ }
+}
+
core.prototype.noPassExists = function (x, y, floorId) {
var block = core.getBlock(x,y,floorId);
if (block==null) return false;
diff --git a/libs/data.js b/libs/data.js
index 49b1f360..7916671f 100644
--- a/libs/data.js
+++ b/libs/data.js
@@ -107,9 +107,12 @@ data.prototype.init = function() {
"sword5": 160, // 神圣剑加攻数值
"shield5": 160, // 神圣盾加防数值
"moneyPocket": 500, // 金钱袋加金币的数值
-
+ /****** 怪物相关 ******/
+ 'breakArmor': 0.9, // 破甲的比例(战斗前,怪物附加角色防御的x%作为伤害)
+ 'counterAttack': 0.1, // 反击的比例(战斗时,怪物每回合附加角色攻击的x%作为伤害,无视角色防御)
+ 'purify': 3, // 净化的比例(战斗前,怪物附加勇士魔防的x倍作为伤害)
/****** 系统相关 ******/
- 'animateSpeed': 500,
+ 'animateSpeed': 500, // 动画时间
}
// 系统FLAG,在游戏运行中中请不要修改它。
this.flags = {
diff --git a/libs/enemys.js b/libs/enemys.js
index d71a4d7a..2676753c 100644
--- a/libs/enemys.js
+++ b/libs/enemys.js
@@ -50,7 +50,7 @@ enemys.prototype.init = function () {
'demonPriest': {'name': '魔神法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
'goldHornSlime': {'name': '金角怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
'redKing': {'name': '红衣魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
- 'whiteKing': {'name': '白衣武士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 17, 'experience': 0, 'special': 16},
+ 'whiteKing': {'name': '白衣武士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 17, 'experience': 0, 'special': 15016},
'blackMagician': {'name': '黑暗大法师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 12, 'experience': 0, 'special': 11, 'value': 1/3, 'bomb': false}, // 吸血怪需要在后面添加value代表吸血比例
'silverSlime': {'name': '银头怪', 'hp': 100, 'atk': 120, 'def': 0, 'money': 15, 'experience': 0, 'special': 14},
'swordEmperor': {'name': '剑圣', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
@@ -75,26 +75,31 @@ enemys.prototype.getEnemys = function (enemyId) {
return this.enemys[enemyId];
}
+enemys.prototype.hasSpecial = function (special, test) {
+ return parseInt(special/1000) == test || special % 1000 == test;
+}
+
enemys.prototype.getSpecialText = function (enemyId) {
if (enemyId == undefined) return "";
var special = this.enemys[enemyId].special;
- if (special == 1) return "先攻";
- if (special == 2) return "魔攻";
- if (special == 3) return "坚固";
- if (special == 4) return "2连击";
- if (special == 5) return "3连击";
- if (special == 6) return "4连击";
- if (special == 7) return "破甲";
- if (special == 8) return "反击";
- if (special == 9) return "净化";
- if (special == 10) return "模仿";
- if (special == 11) return "吸血";
- if (special == 12) return "中毒";
- if (special == 13) return "衰弱";
- if (special == 14) return "诅咒";
- if (special == 15) return "领域";
- if (special == 16) return "夹击";
- return "";
+ var text = [];
+ if (this.hasSpecial(special, 1)) text.push("先攻");
+ if (this.hasSpecial(special, 2)) text.push("魔攻");
+ if (this.hasSpecial(special, 3)) text.push("坚固");
+ if (this.hasSpecial(special, 4)) text.push("2连击");
+ if (this.hasSpecial(special, 5)) text.push("3连击");
+ if (this.hasSpecial(special, 6)) text.push("4连击");
+ if (this.hasSpecial(special, 7)) text.push("破甲");
+ if (this.hasSpecial(special, 8)) text.push("反击");
+ if (this.hasSpecial(special, 9)) text.push("净化");
+ if (this.hasSpecial(special, 10)) text.push("模仿");
+ if (this.hasSpecial(special, 11)) text.push("吸血");
+ if (this.hasSpecial(special, 12)) text.push("中毒");
+ if (this.hasSpecial(special, 13)) text.push("衰弱");
+ if (this.hasSpecial(special, 14)) text.push("诅咒");
+ if (this.hasSpecial(special, 15)) text.push("领域");
+ if (this.hasSpecial(special, 16)) text.push("夹击");
+ return text.join(" ");
}
enemys.prototype.getDamage = function (monsterId) {
@@ -108,7 +113,7 @@ enemys.prototype.getDamage = function (monsterId) {
enemys.prototype.getExtraDamage = function (monster) {
var extra_damage = 0;
- if (monster.special == 11) { // 吸血
+ if (this.hasSpecial(monster.special, 11)) { // 吸血
// 吸血的比例
extra_damage = core.status.hero.hp * monster.value;
extra_damage = parseInt(extra_damage);
@@ -119,7 +124,7 @@ enemys.prototype.getExtraDamage = function (monster) {
// 临界值计算
enemys.prototype.getCritical = function (monsterId) {
var monster = core.material.enemys[monsterId];
- if (monster.special == 3 || monster.special == 10) return "???";
+ if (this.hasSpecial(monster.special, 3) || this.hasSpecial(monster.special, 10)) return "???";
var last = this.calDamage(core.status.hero.atk, core.status.hero.def, core.status.hero.mdef,
monster.hp, monster.atk, monster.def, monster.special);
if (last == 0) return 0;
@@ -160,11 +165,11 @@ enemys.prototype.getDefDamage = function (monsterId) {
enemys.prototype.calDamage = function (hero_atk, hero_def, hero_mdef, mon_hp, mon_atk, mon_def, mon_special) {
// 魔攻
- if (mon_special == 2) hero_def = 0;
+ if (this.hasSpecial(mon_special,2)) hero_def = 0;
// 坚固
- if (mon_special == 3 && mon_def < hero_atk - 1) mon_def = hero_atk - 1;
+ if (this.hasSpecial(mon_special,3) && mon_def < hero_atk - 1) mon_def = hero_atk - 1;
// 模仿
- if (mon_special == 10) {
+ if (this.hasSpecial(mon_special,10)) {
mon_atk = hero_atk;
mon_def = hero_def;
}
@@ -174,21 +179,23 @@ enemys.prototype.calDamage = function (hero_atk, hero_def, hero_mdef, mon_hp, mo
if (per_damage < 0) per_damage = 0;
// 2连击 & 3连击
- if (mon_special == 4) per_damage *= 2;
- if (mon_special == 5) per_damage *= 3;
- if (mon_special == 6) per_damage *= 4;
+ if (this.hasSpecial(mon_special, 4)) per_damage *= 2;
+ if (this.hasSpecial(mon_special, 5)) per_damage *= 3;
+ if (this.hasSpecial(mon_special, 6)) per_damage *= 4;
+
+ var counterDamage = 0;
// 反击
- if (mon_special == 8) per_damage += parseInt(0.1 * hero_atk);
+ if (this.hasSpecial(mon_special, 8)) counterDamage += parseInt(core.values.counterAttack * hero_atk);
// 先攻
var damage = mon_special == 1 ? per_damage : 0;
// 破甲
- if (mon_special == 7) damage = parseInt(0.9 * hero_def);
+ if (this.hasSpecial(mon_special, 7)) damage += parseInt(core.values.breakArmor * hero_def);
// 净化
- if (mon_special == 9) damage = 3 * hero_mdef;
+ if (this.hasSpecial(mon_special, 9)) damage = core.values.purify * hero_mdef;
var turn = parseInt((mon_hp - 1) / (hero_atk - mon_def));
- var ans = damage + turn * per_damage;
+ var ans = damage + turn * per_damage + (turn + 1) * counterDamage;
ans -= hero_mdef;
// 魔防回血
@@ -211,9 +218,9 @@ enemys.prototype.getCurrentEnemys = function () {
var monster = core.material.enemys[monsterId];
var mon_atk = monster.atk, mon_def = monster.def;
// 坚固
- if (monster.special == 3 && mon_def < core.status.hero.atk - 1)
+ if (this.hasSpecial(monster.special, 3) && mon_def < core.status.hero.atk - 1)
mon_def = core.status.hero.atk - 1;
- if (monster.special==10) {
+ if (this.hasSpecial(monster.special, 10)) {
mon_atk=core.status.hero.atk;
mon_def=core.status.hero.def;
}
diff --git a/libs/events.js b/libs/events.js
index 12fe35d4..b00e6e0e 100644
--- a/libs/events.js
+++ b/libs/events.js
@@ -39,6 +39,11 @@ events.prototype.init = function () {
if (core.isset(callback))
callback();
},
+ "changeLight": function (data, core, callback) {
+ core.events.changeLight(data.x, data.y);
+ if (core.isset(callback))
+ callback();
+ },
'action': function (data, core, callback) {
core.events.doEvents(data.event.data, data.x, data.y);
if (core.isset(callback)) callback();
@@ -124,7 +129,7 @@ events.prototype.checkBlock = function (x,y) {
// 领域
for (var i in enemys) {
- if (enemys[i]!=null && enemys[i].special==15) {
+ if (enemys[i]!=null && core.enemys.hasSpecial(enemys[i].special, 15)) {
damage+=enemys[i].value;
}
}
@@ -140,9 +145,9 @@ events.prototype.checkBlock = function (x,y) {
// 夹击
var has=false;
- if (enemys[0]!=null && enemys[2]!=null && enemys[0].id==enemys[2].id && enemys[0].special==16)
+ if (enemys[0]!=null && enemys[2]!=null && enemys[0].id==enemys[2].id && core.enemys.hasSpecial(enemys[0].special, 16))
has=true;
- if (enemys[1]!=null && enemys[3]!=null && enemys[1].id==enemys[3].id && enemys[1].special==16)
+ if (enemys[1]!=null && enemys[3]!=null && enemys[1].id==enemys[3].id && core.enemys.hasSpecial(enemys[1].special, 16))
has=true;
if (has && core.status.hero.hp>1) { // 1血夹击不死
core.status.hero.hp = parseInt(core.status.hero.hp/2);
@@ -490,19 +495,19 @@ events.prototype.afterBattle = function(enemyId,x,y,callback) {
// 毒衰咒的处理
var special = core.material.enemys[enemyId].special;
// 中毒
- if (special==12 && !core.hasFlag('poison')) {
+ if (core.enemys.hasSpecial(special, 12) && !core.hasFlag('poison')) {
core.setFlag('poison', true);
core.updateStatusBar();
}
// 衰弱
- if (special==13 && !core.hasFlag('weak')) {
+ if (core.enemys.hasSpecial(special, 13) && !core.hasFlag('weak')) {
core.setFlag('weak', true);
core.status.hero.atk-=core.values.weakValue;
core.status.hero.def-=core.values.weakValue;
core.updateStatusBar();
}
// 诅咒
- if (special==14 && !core.hasFlag('curse')) {
+ if (core.enemys.hasSpecial(special, 14) && !core.hasFlag('curse')) {
core.setFlag('curse', true);
core.updateStatusBar();
}
@@ -577,6 +582,27 @@ events.prototype.passNet = function (data) {
core.updateStatusBar();
}
+events.prototype.changeLight = function(x, y) {
+ var block = core.getBlock(x, y);
+ if (block==null) return;
+ var index = block.index;
+ block = block.block;
+ if (block.event.id != 'light') return;
+ // 改变为dark
+ block.id = 166;
+ block.event = {'cls': 'terrains', 'id': 'darkLight', 'noPass': true};
+ // 更新地图
+ core.canvas.event.clearRect(x * 32, y * 32, 32, 32);
+ var blockIcon = core.material.icons[block.event.cls][block.event.id];
+ core.canvas.event.drawImage(core.material.images[block.event.cls], 0, blockIcon * 32, 32, 32, block.x * 32, block.y * 32, 32, 32);
+ this.afterChangeLight();
+}
+
+// 改变灯后的事件
+events.prototype.afterChangeLight = function() {
+
+}
+
// 存档事件前一刻的处理
events.prototype.beforeSaveData = function(data) {
diff --git a/libs/floors/sample0.js b/libs/floors/sample0.js
index a53520b8..e31aea3f 100644
--- a/libs/floors/sample0.js
+++ b/libs/floors/sample0.js
@@ -8,12 +8,12 @@ main.floors.sample0 = {
"canFlyTo": true, // 该楼能否被楼传器飞到(不能的话在该楼也不允许使用楼传器)
"canUseQuickShop": true, // 该层是否允许使用快捷商店
"map": [ // 地图数据,需要是13x13,建议使用地图生成器来生成
- [0, 0, 220, 0, 0, 6, 87, 3, 65, 64, 44, 43, 42],
- [0, 246, 0, 246, 0, 6, 0, 3, 58, 59, 60, 61, 41],
- [219, 0, 0, 0, 219, 6, 0, 3, 57, 26, 62, 63, 40],
- [6, 6, 125, 6, 6, 6, 0, 3, 53, 54, 55, 56, 39],
+ [0, 0, 220, 0, 0, 20, 87, 3, 65, 64, 44, 43, 42],
+ [0, 246, 0, 246, 0, 20, 0, 3, 58, 59, 60, 61, 41],
+ [219, 0, 0, 0, 219, 20, 0, 3, 57, 26, 62, 63, 40],
+ [20, 20, 20, 20, 20, 20, 0, 3, 53, 54, 55, 56, 39],
[216, 247, 256, 235, 248, 6, 0, 3, 49, 50, 51, 52, 38],
- [5, 5, 125, 5, 5, 5, 0, 1, 45, 46, 47, 48, 37],
+ [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, 0, 1, 27, 28, 29, 30, 35],
[5, 5, 125, 5, 5, 5, 0, 1, 21, 22, 23, 24, 25],
diff --git a/libs/floors/sample1.js b/libs/floors/sample1.js
index ca1ae611..4104b7b1 100644
--- a/libs/floors/sample1.js
+++ b/libs/floors/sample1.js
@@ -8,11 +8,11 @@ main.floors.sample1 = {
"canFlyTo": true, // 该楼能否被楼传器飞到(不能的话在该楼也不允许使用楼传器)
"canUseQuickShop": true, // 该层是否允许使用快捷商店
"map": [ // 地图数据,需要是13x13,建议使用地图生成器来生成
- [7, 131, 8, 2, 9, 130, 10, 2, 0, 0, 132, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0],
+ [7, 131, 8, 2, 9, 130, 10, 2, 166, 165, 132, 165, 166],
+ [0, 0, 0, 0, 0, 0, 0, 2, 165, 164, 0, 162, 165],
[2, 2, 2, 2, 121, 2, 2, 2, 0, 0, 229, 0, 0],
- [43, 33, 44, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0],
- [21, 22, 21, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0],
+ [43, 33, 44, 1, 0, 0, 0, 2, 165, 161, 0, 163, 165],
+ [21, 22, 21, 1, 0, 0, 0, 2, 166, 165, 0, 165, 166],
[1, 245, 1, 1, 0, 87, 0, 2, 2, 2, 85, 2, 2],
[0, 246, 0, 1, 0, 0, 0, 2, 2, 221, 0, 221, 2],
[246, 0, 246, 1, 0, 0, 0, 121, 85, 0, 0, 0, 2],
diff --git a/libs/icons.js b/libs/icons.js
index 1fc2eac8..f35d9b86 100644
--- a/libs/icons.js
+++ b/libs/icons.js
@@ -29,7 +29,13 @@ icons.prototype.init = function () {
'blueShop-left': 15,
'blueShop-right': 16,
'pinkShop-left': 17,
- 'pinkShop-right': 18
+ 'pinkShop-right': 18,
+ 'up': 19,
+ 'down': 20,
+ 'left': 21,
+ 'right': 22,
+ 'light': 23,
+ 'darkLight': 24
},
'animates': {
'star': 0,
diff --git a/libs/maps.js b/libs/maps.js
index 7688152b..45063126 100644
--- a/libs/maps.js
+++ b/libs/maps.js
@@ -63,7 +63,7 @@ maps.prototype.getBlock = function (x, y, id) {
var tmp = {'x': x, 'y': y, 'id': id};
if (enable!=null) tmp.enable = enable;
- // 0-9 地形
+ // 0-20 地形
if (id == 1) tmp.event = {'cls': 'terrains', 'id': 'yellowWall'}; // 黄墙
if (id == 2) tmp.event = {'cls': 'terrains', 'id': 'whiteWall'}; // 白墙
if (id == 3) tmp.event = {'cls': 'terrains', 'id': 'blueWall'}; // 白墙
@@ -78,7 +78,13 @@ maps.prototype.getBlock = function (x, y, id) {
if (id == 12) tmp.event = {'cls': 'animates', 'id': 'poisonNet', 'noPass': false, 'trigger': 'passNet'}; // 毒网
if (id == 13) tmp.event = {'cls': 'animates', 'id': 'weakNet', 'noPass': false, 'trigger': 'passNet'}; // 衰网
if (id == 14) tmp.event = {'cls': 'animates', 'id': 'curseNet', 'noPass': false, 'trigger': 'passNet'}; // 咒网
+<<<<<<< HEAD
+=======
+
+ if (id == 20) tmp.event = {'cls': 'autotile', 'id': 'autotile', 'noPass': true};
+
+>>>>>>> 0de35b6258ac07977783fbb03f6a2d491faf4cf1
// 21-80 物品
if (id == 21) tmp.event = {'cls': 'items', 'id': 'yellowKey'}; // 黄钥匙
if (id == 22) tmp.event = {'cls': 'items', 'id': 'blueKey'}; // 蓝钥匙
diff --git a/libs/ui.js b/libs/ui.js
index bd62e491..d70c7551 100644
--- a/libs/ui.js
+++ b/libs/ui.js
@@ -377,28 +377,34 @@ ui.prototype.drawBattleAnimate = function(monsterId, callback) {
hero_hp -= core.enemys.getExtraDamage(monster);
- if (mon_special==2) hero_def=0; // 魔攻
- if (mon_special==3 && mon_def