support 48x32

This commit is contained in:
oc 2018-03-13 01:50:00 +08:00
parent 817e95c225
commit a248349739
19 changed files with 307 additions and 239 deletions

View File

@ -106,8 +106,9 @@
<div id="curtain"></div> <div id="curtain"></div>
<canvas class='gameCanvas' id='bg' width='416' height='416'></canvas> <canvas class='gameCanvas' id='bg' width='416' height='416'></canvas>
<canvas class='gameCanvas' id='event' width='416' height='416'></canvas> <canvas class='gameCanvas' id='event' width='416' height='416'></canvas>
<canvas class='gameCanvas' id='fg' width='416' height='416'></canvas>
<canvas class='gameCanvas' id='hero' width='416' height='416'></canvas> <canvas class='gameCanvas' id='hero' width='416' height='416'></canvas>
<canvas class='gameCanvas' id='event2' width='416' height='416'></canvas>
<canvas class='gameCanvas' id='fg' width='416' height='416'></canvas>
<canvas class='gameCanvas' id='animate' width='416' height='416'></canvas> <canvas class='gameCanvas' id='animate' width='416' height='416'></canvas>
<canvas class='gameCanvas' id='weather' width='416' height='416'></canvas> <canvas class='gameCanvas' id='weather' width='416' height='416'></canvas>
<canvas class='gameCanvas' id='ui' width='416' height='416'></canvas> <canvas class='gameCanvas' id='ui' width='416' height='416'></canvas>

View File

@ -54,8 +54,7 @@ control.prototype.setRequestAnimationFrame = function () {
var draw = function(timestamp) { var draw = function(timestamp) {
core.animateFrame.twoTime = core.animateFrame.twoTime||timestamp; core.animateFrame.globalTime = core.animateFrame.globalTime||timestamp;
core.animateFrame.fourTime = core.animateFrame.fourTime||timestamp;
core.animateFrame.boxTime = core.animateFrame.boxTime||timestamp; core.animateFrame.boxTime = core.animateFrame.boxTime||timestamp;
core.animateFrame.moveTime = core.animateFrame.moveTime||timestamp; core.animateFrame.moveTime = core.animateFrame.moveTime||timestamp;
core.animateFrame.weather.time = core.animateFrame.weather.time||timestamp; core.animateFrame.weather.time = core.animateFrame.weather.time||timestamp;
@ -63,29 +62,16 @@ control.prototype.setRequestAnimationFrame = function () {
// Global Animate // Global Animate
if (core.animateFrame.globalAnimate && core.isPlaying()) { if (core.animateFrame.globalAnimate && core.isPlaying()) {
if (timestamp-core.animateFrame.twoTime>core.animateFrame.speed && core.isset(core.status.twoAnimateObjs)) { if (timestamp-core.animateFrame.globalTime>core.animateFrame.speed && core.isset(core.status.globalAnimateObjs)) {
for (var a = 0; a < core.status.twoAnimateObjs.length; a++) { for (var a = 0; a < core.status.globalAnimateObjs.length; a++) {
var obj = core.status.twoAnimateObjs[a]; var obj = core.status.globalAnimateObjs[a];
obj.status = (obj.status+1)%2; obj.status = (obj.status+1)%(obj.event.animate||1);
core.canvas.event.clearRect(obj.x, obj.y, 32, 32); core.drawBlock(obj, obj.status);
core.canvas.event.drawImage(obj.image, obj.status * 32, obj.loc * 32, 32, 32, obj.x, obj.y, 32, 32);
} }
core.animateFrame.twoTime = timestamp; core.animateFrame.globalTime = timestamp;
} }
if (timestamp-core.animateFrame.fourTime>core.animateFrame.speed/2 && core.isset(core.status.fourAnimateObjs)) {
for (var a = 0; a < core.status.fourAnimateObjs.length; a++) {
var obj=core.status.fourAnimateObjs[a];
obj.status = (obj.status+1)%4;
core.canvas.event.clearRect(obj.x, obj.y, 32, 32);
core.canvas.event.drawImage(obj.image, obj.status * 32, obj.loc * 32, 32, 32, obj.x, obj.y, 32, 32);
}
// fourtime = timestamp % fourDelta;
core.animateFrame.fourTime = timestamp;
}
} }
// Box // Box
@ -882,7 +868,7 @@ control.prototype.updateCheckBlock = function() {
core.status.checkBlock.map = []; // 记录怪物地图 core.status.checkBlock.map = []; // 记录怪物地图
for (var n=0;n<blocks.length;n++) { for (var n=0;n<blocks.length;n++) {
var block = blocks[n]; var block = blocks[n];
if (core.isset(block.event) && !(core.isset(block.enable) && !block.enable) && block.event.cls=='enemys') { if (core.isset(block.event) && !(core.isset(block.enable) && !block.enable) && block.event.cls.indexOf('enemy')==0) {
var id = block.event.id, enemy = core.enemys.getEnemys(id); var id = block.event.id, enemy = core.enemys.getEnemys(id);
if (core.isset(enemy)) { if (core.isset(enemy)) {
core.status.checkBlock.map[13*block.x+block.y]=id; core.status.checkBlock.map[13*block.x+block.y]=id;
@ -1044,8 +1030,13 @@ control.prototype.snipe = function (snipes) {
var block = core.getBlock(x,y).block; var block = core.getBlock(x,y).block;
snipe.blockIcon = core.material.icons[block.event.cls][block.event.id]; var cls = block.event.cls;
snipe.blockImage = core.material.images[block.event.cls]; var height = block.event.height || 32;
snipe.animate = block.event.animate || 1;
snipe.blockIcon = core.material.icons[cls][block.event.id];
snipe.blockImage = core.material.images[cls];
snipe.height = height;
var damage = core.enemys.getDamage(block.event.id); var damage = core.enemys.getDamage(block.event.id);
var color = "#000000"; var color = "#000000";
@ -1069,8 +1060,8 @@ control.prototype.snipe = function (snipes) {
var nBlock = core.clone(t.block); var nBlock = core.clone(t.block);
nBlock.x = t.nx; nBlock.y = t.ny; nBlock.x = t.nx; nBlock.y = t.ny;
core.status.thisMap.blocks.push(nBlock); core.status.thisMap.blocks.push(nBlock);
core.addGlobalAnimate(2, 32*t.nx, 32*t.ny, t.blockIcon, t.blockImage); core.drawBlock(nBlock);
core.canvas.event.drawImage(t.blockImage, 0, t.blockIcon*32, 32, 32, 32*t.nx, 32*t.ny, 32, 32); core.addGlobalAnimate(nBlock);
}); });
core.syncGlobalAnimate(); core.syncGlobalAnimate();
core.updateStatusBar(); core.updateStatusBar();
@ -1087,7 +1078,6 @@ control.prototype.snipe = function (snipes) {
var time = 500, step = 0; var time = 500, step = 0;
var animateValue = 2;
var animateCurrent = 0; var animateCurrent = 0;
var animateTime = 0; var animateTime = 0;
@ -1097,22 +1087,23 @@ control.prototype.snipe = function (snipes) {
step++; step++;
animateTime += time / 16; animateTime += time / 16;
if (animateTime >= core.values.animateSpeed * 2 / animateValue) { if (animateTime >= core.values.animateSpeed) {
animateCurrent++; animateCurrent++;
animateTime = 0; animateTime = 0;
if (animateCurrent>=animateValue) animateCurrent=0;
} }
snipes.forEach(function (snipe) { snipes.forEach(function (snipe) {
var x=snipe.x, y=snipe.y, direction = snipe.direction; var x=snipe.x, y=snipe.y, direction = snipe.direction;
var nowX=32*x+scan[direction].x*2*step, nowY=32*y+scan[direction].y*2*step; var dx = scan[direction].x*2*step, dy = scan[direction].y*2*step;
var nowX = 32*x+dx, nowY = 32*y+dy;
// 清空上一次 // 清空上一次
core.clearMap('event', nowX-2*scan[direction].x, nowY-2*scan[direction].y, 32, 32);
core.clearMap('fg', nowX-2*scan[direction].x, nowY-2*scan[direction].y, 32, 32); core.clearMap('fg', nowX-2*scan[direction].x, nowY-2*scan[direction].y, 32, 32);
core.canvas.event.clearRect(nowX-2*scan[direction].x, nowY-2*scan[direction].y, 32, 32);
core.canvas.event2.clearRect(nowX-2*scan[direction].x, nowY-2*scan[direction].y-32, 32, 32)
core.canvas.event.drawImage(snipe.blockImage, animateCurrent*32, snipe.blockIcon*32, 32, 32, nowX, nowY, 32, 32); core.drawBlock(snipe.block, animateCurrent, dx, dy);
if (core.hasItem('book')) { if (core.hasItem('book')) {
// drawFG // drawFG
@ -1256,7 +1247,7 @@ control.prototype.updateFg = function () {
core.canvas.fg.textAlign = 'left'; core.canvas.fg.textAlign = 'left';
for (var b = 0; b < mapBlocks.length; b++) { for (var b = 0; b < mapBlocks.length; b++) {
var x = mapBlocks[b].x, y = mapBlocks[b].y; var x = mapBlocks[b].x, y = mapBlocks[b].y;
if (core.isset(mapBlocks[b].event) && mapBlocks[b].event.cls == 'enemys' if (core.isset(mapBlocks[b].event) && mapBlocks[b].event.cls.indexOf('enemy')==0
&& !(core.isset(mapBlocks[b].enable) && !mapBlocks[b].enable)) { && !(core.isset(mapBlocks[b].enable) && !mapBlocks[b].enable)) {
// 非系统默认的战斗事件(被覆盖) // 非系统默认的战斗事件(被覆盖)

View File

@ -29,8 +29,7 @@ function core() {
this.animateFrame = { this.animateFrame = {
'background': null, 'background': null,
'globalAnimate': false, 'globalAnimate': false,
'twoTime': null, 'globalTime': null,
'fourTime': null,
'boxTime': null, 'boxTime': null,
'moveTime': null, 'moveTime': null,
'speed': null, 'speed': null,
@ -141,8 +140,7 @@ function core() {
'openingDoor': null, 'openingDoor': null,
// 动画 // 动画
'twoAnimateObjs': [], 'globalAnimateObjs': [],
'fourAnimateObjs': [],
'boxAnimateObjs': [], 'boxAnimateObjs': [],
}; };
this.status = {}; this.status = {};
@ -608,6 +606,10 @@ core.prototype.setFillStyle = function (map, style) {
core.ui.setFillStyle(map, style); core.ui.setFillStyle(map, style);
} }
core.prototype.drawBlock = function (block, animate, dx, dy) {
core.maps.drawBlock(block, animate, dx, dy);
}
////// 绘制某张地图 ////// ////// 绘制某张地图 //////
core.prototype.drawMap = function (mapName, callback) { core.prototype.drawMap = function (mapName, callback) {
core.maps.drawMap(mapName, callback); core.maps.drawMap(mapName, callback);
@ -689,8 +691,8 @@ core.prototype.removeBlockByIds = function (floorId, ids) {
} }
////// 添加一个全局动画 ////// ////// 添加一个全局动画 //////
core.prototype.addGlobalAnimate = function (animateMore, x, y, loc, image) { core.prototype.addGlobalAnimate = function (block) {
core.maps.addGlobalAnimate(animateMore, x, y, loc, image); core.maps.addGlobalAnimate(block);
} }
////// 删除一个或所有全局动画 ////// ////// 删除一个或所有全局动画 //////

View File

@ -246,7 +246,8 @@ enemys.prototype.getCurrentEnemys = function (floorId) {
var used = {}; var used = {};
var mapBlocks = core.status.maps[floorId].blocks; var mapBlocks = core.status.maps[floorId].blocks;
for (var b = 0; b < mapBlocks.length; b++) { for (var b = 0; b < mapBlocks.length; b++) {
if (core.isset(mapBlocks[b].event) && !(core.isset(mapBlocks[b].enable) && !mapBlocks[b].enable) && mapBlocks[b].event.cls == 'enemys') { if (core.isset(mapBlocks[b].event) && !(core.isset(mapBlocks[b].enable) && !mapBlocks[b].enable)
&& mapBlocks[b].event.cls.indexOf('enemy')==0) {
var monsterId = mapBlocks[b].event.id; var monsterId = mapBlocks[b].event.id;
if (core.isset(used[monsterId])) continue; if (core.isset(used[monsterId])) continue;

View File

@ -883,7 +883,7 @@ events.prototype.changeFloor = function (floorId, stair, heroLoc, time, callback
// 检查重生 // 检查重生
if (!core.isset(fromLoad)) { if (!core.isset(fromLoad)) {
core.status.maps[floorId].blocks.forEach(function(block) { core.status.maps[floorId].blocks.forEach(function(block) {
if (core.isset(block.enable) && !block.enable && core.isset(block.event) && block.event.cls=='enemys' if (core.isset(block.enable) && !block.enable && core.isset(block.event) && block.event.cls.indexOf('enemy')==0
&& core.enemys.hasSpecial(core.material.enemys[block.event.id].special, 23)) { && core.enemys.hasSpecial(core.material.enemys[block.event.id].special, 23)) {
block.enable = true; block.enable = true;
} }
@ -1098,10 +1098,7 @@ events.prototype.changeLight = function(x, y) {
// 改变为dark // 改变为dark
block.id = 166; block.id = 166;
block.event = {'cls': 'terrains', 'id': 'darkLight', 'noPass': true}; block.event = {'cls': 'terrains', 'id': 'darkLight', 'noPass': true};
// 更新地图 core.drawBlock(block);
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(x,y); this.afterChangeLight(x,y);
} }
@ -1151,18 +1148,14 @@ events.prototype.pushBox = function (data) {
if (block!=null && !(core.isset(block.block.event) && block.block.event.id=='flower')) if (block!=null && !(core.isset(block.block.event) && block.block.event.id=='flower'))
return; return;
var blockIcon;
if (block==null) { if (block==null) {
core.status.thisMap.blocks.push(core.maps.initBlock(nx, ny, 169)); core.status.thisMap.blocks.push(core.maps.initBlock(nx, ny, 169));
blockIcon=core.material.icons.terrains.box;
} }
else { else {
block.block.id=170; block.block.id=170;
block.block.event=core.maps.initBlock(null,null,170).event; block.block.event=core.maps.initBlock(null,null,170).event;
blockIcon=core.material.icons.terrains.boxed;
} }
core.canvas.event.clearRect(nx * 32, ny * 32, 32, 32); core.drawBlock(block.block);
core.canvas.event.drawImage(core.material.images.terrains, 0, blockIcon * 32, 32, 32, nx * 32, ny * 32, 32, 32);
if (data.event.id=='box') { if (data.event.id=='box') {
core.removeBlock(data.x, data.y); core.removeBlock(data.x, data.y);
@ -1170,8 +1163,7 @@ events.prototype.pushBox = function (data) {
else { else {
data.id=168; data.id=168;
data.event=core.maps.initBlock(null,null,168).event; data.event=core.maps.initBlock(null,null,168).event;
core.canvas.event.clearRect(data.x * 32, data.y * 32, 32, 32); core.drawBlock(data);
core.canvas.event.drawImage(core.material.images.terrains, 0, core.material.icons.terrains.flower * 32, 32, 32, data.x * 32, data.y * 32, 32, 32);
} }
core.updateStatusBar(); core.updateStatusBar();

View File

@ -200,7 +200,7 @@ items.prototype.canUseItem = function (itemId) {
var ids = []; var ids = [];
for (var i in core.status.thisMap.blocks) { for (var i in core.status.thisMap.blocks) {
var block = core.status.thisMap.blocks[i]; var block = core.status.thisMap.blocks[i];
if (core.isset(block.event) && !(core.isset(block.enable) && !block.enable) && block.event.cls == 'enemys' && Math.abs(block.x-core.status.hero.loc.x)+Math.abs(block.y-core.status.hero.loc.y)<=1) { if (core.isset(block.event) && !(core.isset(block.enable) && !block.enable) && block.event.cls.indexOf('enemy')==0 && Math.abs(block.x-core.status.hero.loc.x)+Math.abs(block.y-core.status.hero.loc.y)<=1) {
var enemy = core.material.enemys[block.event.id]; var enemy = core.material.enemys[block.event.id];
if (core.isset(enemy.bomb) && !enemy.bomb) continue; if (core.isset(enemy.bomb) && !enemy.bomb) continue;
if (core.flags.bombFourDirections || (block.x==core.nextX() && block.y==core.nextY())) if (core.flags.bombFourDirections || (block.x==core.nextX() && block.y==core.nextY()))
@ -217,7 +217,7 @@ items.prototype.canUseItem = function (itemId) {
// 圣锤 // 圣锤
for (var i in core.status.thisMap.blocks) { for (var i in core.status.thisMap.blocks) {
var block = core.status.thisMap.blocks[i]; var block = core.status.thisMap.blocks[i];
if (core.isset(block.event) && !(core.isset(block.enable) && !block.enable) && block.event.cls == 'enemys' && block.x==core.nextX() && block.y==core.nextY()) { if (core.isset(block.event) && !(core.isset(block.enable) && !block.enable) && block.event.cls.indexOf('enemy')==0 && block.x==core.nextX() && block.y==core.nextY()) {
var enemy = core.material.enemys[block.event.id]; var enemy = core.material.enemys[block.event.id];
if (core.isset(enemy.bomb) && !enemy.bomb) continue; if (core.isset(enemy.bomb) && !enemy.bomb) continue;
core.status.event.data = [i]; core.status.event.data = [i];

View File

@ -65,14 +65,14 @@ maps.prototype.initBlock = function (x, y, id) {
////// 添加一些信息到block上 ////// ////// 添加一些信息到block上 //////
maps.prototype.addInfo = function (block) { maps.prototype.addInfo = function (block) {
if (core.isset(block.event)) { if (core.isset(block.event)) {
if (block.event.cls == 'enemys' && block.event.trigger==undefined) { if (block.event.cls.indexOf("enemy")==0 && block.event.trigger==undefined) {
block.event.trigger = 'battle'; block.event.trigger = 'battle';
} }
if (block.event.cls == 'items' && block.event.trigger==undefined) { if (block.event.cls == 'items' && block.event.trigger==undefined) {
block.event.trigger = 'getItem'; block.event.trigger = 'getItem';
} }
if (block.event.noPass == undefined) { if (block.event.noPass == undefined) {
if (block.event.cls=='enemys' || block.event.cls=='terrains' || block.event.cls=='npcs') { if (block.event.cls.indexOf("enemy")==0 || block.event.cls.indexOf("npc")==0 || block.event.cls=='terrains') {
block.event.noPass = true; block.event.noPass = true;
} }
} }
@ -80,10 +80,13 @@ maps.prototype.addInfo = function (block) {
if (block.event.cls=='enemys' || block.event.cls=='npcs') { if (block.event.cls=='enemys' || block.event.cls=='npcs') {
block.event.animate = 2; block.event.animate = 2;
} }
if (block.event.cls == 'animates') { if (block.event.cls == 'animates' || block.event.cls == 'enemy48' || block.event.cls == 'npc48') {
block.event.animate = 4; block.event.animate = 4;
} }
} }
block.event.height = 32;
if (block.event.cls == 'enemy48' || block.event.cls == 'npc48')
block.event.height = 48;
} }
} }
@ -283,6 +286,19 @@ maps.prototype.canMoveDirectly = function (destX,destY) {
return false; return false;
} }
maps.prototype.drawBlock = function (block, animate, dx, dy) {
var cls = block.event.cls, height = block.event.height || 32;
var blockIcon = core.material.icons[cls][block.event.id];
var blockImage = core.material.images[cls];
animate=(animate||0)%(block.event.animate||1);
dx = dx || 0;
dy = dy || 0;
core.canvas.event.clearRect(block.x * 32 + dx, block.y * 32 + dy, 32, 32);
core.canvas.event2.clearRect(block.x * 32 + dx, block.y * 32 - 32 + dy, 32, 32)
core.canvas.event.drawImage(blockImage, animate * 32, blockIcon * height + height-32, 32, 32, block.x * 32 + dx, block.y * 32 + dy, 32, 32);
core.canvas.event2.drawImage(blockImage, animate * 32, blockIcon * height, 32, height-32, block.x * 32 + dx, block.y*32 + 32 - height + dy, 32, height-32);
}
////// 绘制某张地图 ////// ////// 绘制某张地图 //////
maps.prototype.drawMap = function (mapName, callback) { maps.prototype.drawMap = function (mapName, callback) {
core.clearMap('all'); core.clearMap('all');
@ -348,10 +364,8 @@ maps.prototype.drawMap = function (mapName, callback) {
} }
else { else {
if (block.event.id!='none') { if (block.event.id!='none') {
blockIcon = core.material.icons[block.event.cls][block.event.id]; core.drawBlock(block);
blockImage = core.material.images[block.event.cls]; core.addGlobalAnimate(block);
core.canvas.event.drawImage(core.material.images[block.event.cls], 0, blockIcon * 32, 32, 32, block.x * 32, block.y * 32, 32, 32);
core.addGlobalAnimate(block.event.animate, block.x * 32, block.y * 32, blockIcon, blockImage);
} }
} }
} }
@ -471,7 +485,7 @@ maps.prototype.noPass = function (x, y) {
maps.prototype.npcExists = function (x, y, floorId) { maps.prototype.npcExists = function (x, y, floorId) {
var block = this.getBlock(x,y,floorId); var block = this.getBlock(x,y,floorId);
if (block==null) return false; if (block==null) return false;
return block.block.event.cls == 'npcs'; return block.block.event.cls.indexOf('npc')==0;
} }
////// 某个点是否存在(指定的)地形 ////// ////// 某个点是否存在(指定的)地形 //////
@ -498,7 +512,7 @@ maps.prototype.nearStair = function() {
maps.prototype.enemyExists = function (x, y, id,floorId) { maps.prototype.enemyExists = function (x, y, id,floorId) {
var block = this.getBlock(x,y,floorId); var block = this.getBlock(x,y,floorId);
if (block==null) return false; if (block==null) return false;
return block.block.event.cls=='enemys' && (core.isset(id)?block.block.event.id==id:true); return block.block.event.cls.indexOf('enemy')==0 && (core.isset(id)?block.block.event.id==id:true);
} }
////// 获得某个点的block ////// ////// 获得某个点的block //////
@ -537,10 +551,11 @@ maps.prototype.moveBlock = function(x,y,steps,time,immediateHide,callback) {
block=block.block; block=block.block;
var blockIcon = core.material.icons[block.event.cls][block.event.id]; var blockIcon = core.material.icons[block.event.cls][block.event.id];
var blockImage = core.material.images[block.event.cls]; var blockImage = core.material.images[block.event.cls];
var height = block.event.height || 32;
var opacityVal = 1; var opacityVal = 1;
core.setOpacity('animate', opacityVal); core.setOpacity('animate', opacityVal);
core.canvas.animate.drawImage(blockImage, 0, blockIcon * 32, 32, 32, block.x * 32, block.y * 32, 32, 32); core.canvas.animate.drawImage(blockImage, 0, blockIcon * height, 32, height, block.x * 32, block.y * 32 +32 - height, 32, height);
// 要运行的轨迹将steps展开 // 要运行的轨迹将steps展开
var moveSteps=[]; var moveSteps=[];
@ -575,7 +590,7 @@ maps.prototype.moveBlock = function(x,y,steps,time,immediateHide,callback) {
var animate=window.setInterval(function() { var animate=window.setInterval(function() {
animateTime += time / 16 / core.status.replay.speed; animateTime += time / 16 / core.status.replay.speed;
if (animateTime >= core.values.animateSpeed * 2 / animateValue) { if (animateTime >= core.values.animateSpeed) {
animateCurrent++; animateCurrent++;
animateTime = 0; animateTime = 0;
if (animateCurrent>=animateValue) animateCurrent=0; if (animateCurrent>=animateValue) animateCurrent=0;
@ -586,8 +601,8 @@ maps.prototype.moveBlock = function(x,y,steps,time,immediateHide,callback) {
if (immediateHide) opacityVal=0; if (immediateHide) opacityVal=0;
else opacityVal -= 0.06; else opacityVal -= 0.06;
core.setOpacity('animate', opacityVal); core.setOpacity('animate', opacityVal);
core.clearMap('animate', nowX, nowY, 32, 32); core.clearMap('animate', nowX, nowY-height+32, 32, height);
core.canvas.animate.drawImage(blockImage, animateCurrent * 32, blockIcon * 32, 32, 32, nowX, nowY, 32, 32); core.canvas.animate.drawImage(blockImage, animateCurrent * 32, blockIcon * height, 32, height, nowX, nowY-height+32, 32, height);
if (opacityVal<=0) { if (opacityVal<=0) {
clearInterval(animate); clearInterval(animate);
core.clearMap('animate', 0, 0, 416, 416); core.clearMap('animate', 0, 0, 416, 416);
@ -603,7 +618,7 @@ maps.prototype.moveBlock = function(x,y,steps,time,immediateHide,callback) {
nowY+=scan[moveSteps[0]].y*2; nowY+=scan[moveSteps[0]].y*2;
core.clearMap('animate', nowX-32, nowY-32, 96, 96); core.clearMap('animate', nowX-32, nowY-32, 96, 96);
// 绘制 // 绘制
core.canvas.animate.drawImage(blockImage, animateCurrent * 32, blockIcon * 32, 32, 32, nowX, nowY, 32, 32); core.canvas.animate.drawImage(blockImage, animateCurrent * 32, blockIcon * height, 32, height, nowX, nowY-height+32, 32, height);
if (step==16) { if (step==16) {
// 该移动完毕,继续 // 该移动完毕,继续
step=0; step=0;
@ -628,7 +643,7 @@ maps.prototype.animateBlock = function (loc,type,time,callback) {
if (block==null) return; if (block==null) return;
block=block.block; block=block.block;
list.push({ list.push({
'x': t[0], 'y': t[1], 'x': t[0], 'y': t[1], 'height': block.event.height||32,
'blockIcon': core.material.icons[block.event.cls][block.event.id], 'blockIcon': core.material.icons[block.event.cls][block.event.id],
'blockImage': core.material.images[block.event.cls] 'blockImage': core.material.images[block.event.cls]
}) })
@ -642,7 +657,7 @@ maps.prototype.animateBlock = function (loc,type,time,callback) {
core.status.replay.animate=true; core.status.replay.animate=true;
var draw = function () { var draw = function () {
list.forEach(function (t) { list.forEach(function (t) {
core.canvas.animate.drawImage(t.blockImage, 0, t.blockIcon * 32, 32, 32, t.x * 32, t.y * 32, 32, 32); core.canvas.animate.drawImage(t.blockImage, 0, t.blockIcon*t.height, 32, t.height, t.x*32, t.y*32+32-t.height, 32, t.height);
}) })
} }
@ -680,11 +695,8 @@ maps.prototype.showBlock = function(x, y, floodId) {
block.enable = true; block.enable = true;
// 在本层,添加动画 // 在本层,添加动画
if (floodId == core.status.floorId && core.isset(block.event)) { if (floodId == core.status.floorId && core.isset(block.event)) {
blockIcon = core.material.icons[block.event.cls][block.event.id]; core.drawBlock(block);
blockImage = core.material.images[block.event.cls]; core.addGlobalAnimate(block);
core.canvas.event.drawImage(core.material.images[block.event.cls], 0, blockIcon * 32, 32, 32, block.x * 32, block.y * 32, 32, 32);
core.addGlobalAnimate(block.event.animate, block.x * 32, block.y * 32, blockIcon, blockImage);
// core.setGlobalAnimate(core.values.animateSpeed);
core.syncGlobalAnimate(); core.syncGlobalAnimate();
} }
core.updateStatusBar(); core.updateStatusBar();
@ -704,6 +716,7 @@ maps.prototype.removeBlock = function (x, y, floorId) {
if (floorId==core.status.floorId) { if (floorId==core.status.floorId) {
core.removeGlobalAnimate(x, y); core.removeGlobalAnimate(x, y);
core.canvas.event.clearRect(x * 32, y * 32, 32, 32); core.canvas.event.clearRect(x * 32, y * 32, 32, 32);
core.canvas.event2.clearRect(x * 32, y * 32 - 32, 32, 32);
} }
// 删除Index // 删除Index
@ -724,7 +737,7 @@ maps.prototype.removeBlockById = function (index, floorId) {
// 检查是否存在重生 // 检查是否存在重生
var isReborn = false; var isReborn = false;
if (core.isset(block.event) && block.event.cls=='enemys' if (core.isset(block.event) && block.event.cls.indexOf('enemy')==0
&& core.enemys.hasSpecial(core.material.enemys[block.event.id].special, 23)) && core.enemys.hasSpecial(core.material.enemys[block.event.id].special, 23))
isReborn = true; isReborn = true;
@ -744,46 +757,29 @@ maps.prototype.removeBlockByIds = function (floorId, ids) {
} }
////// 添加一个全局动画 ////// ////// 添加一个全局动画 //////
maps.prototype.addGlobalAnimate = function (animateMore, x, y, loc, image) { maps.prototype.addGlobalAnimate = function (b) {
if (main.mode=='editor' && main.editor.disableGlobalAnimate) return; if (main.mode=='editor' && main.editor.disableGlobalAnimate) return;
if (animateMore == 2) { if (!core.isset(b.event) || !core.isset(b.event.animate) || b.event.animate==1) return;
core.status.twoAnimateObjs.push({
'x': x, var block = core.clone(b);
'y': y, block.status = 0;
'status': 0,
'loc': loc, core.status.globalAnimateObjs.push(block);
'image': image
});
}
else if (animateMore == 4) {
core.status.fourAnimateObjs.push({
'x': x,
'y': y,
'status': 0,
'loc': loc,
'image': image
});
}
} }
////// 删除一个或所有全局动画 ////// ////// 删除一个或所有全局动画 //////
maps.prototype.removeGlobalAnimate = function (x, y, all) { maps.prototype.removeGlobalAnimate = function (x, y, all) {
if (all == true) {
core.status.twoAnimateObjs = [];
core.status.fourAnimateObjs = [];
}
if (main.mode=='editor' && main.editor.disableGlobalAnimate) return; if (main.mode=='editor' && main.editor.disableGlobalAnimate) return;
for (var t = 0; t < core.status.twoAnimateObjs.length; t++) { if (all) {
if (core.status.twoAnimateObjs[t].x == x * 32 && core.status.twoAnimateObjs[t].y == y * 32) { core.status.globalAnimateObjs = [];
core.status.twoAnimateObjs.splice(t, 1); return;
return;
}
} }
for (var f = 0; f < core.status.fourAnimateObjs.length; f++) {
if (core.status.fourAnimateObjs[f].x == x * 32 && core.status.fourAnimateObjs[f].y == y * 32) { for (var t = 0; t < core.status.globalAnimateObjs.length; t++) {
core.status.fourAnimateObjs.splice(f, 1); if (core.status.globalAnimateObjs[t].x == x && core.status.globalAnimateObjs[t].y == y) {
core.status.globalAnimateObjs.splice(t, 1);
return; return;
} }
} }
@ -799,10 +795,7 @@ maps.prototype.setGlobalAnimate = function (speed) {
////// 同步所有的全局动画效果 ////// ////// 同步所有的全局动画效果 //////
maps.prototype.syncGlobalAnimate = function () { maps.prototype.syncGlobalAnimate = function () {
core.status.twoAnimateObjs.forEach(function (t) { core.status.globalAnimateObjs.forEach(function (t) {
t.status=0;
})
core.status.fourAnimateObjs.forEach(function (t) {
t.status=0; t.status=0;
}) })
} }
@ -811,11 +804,11 @@ maps.prototype.syncGlobalAnimate = function () {
maps.prototype.drawBoxAnimate = function () { maps.prototype.drawBoxAnimate = function () {
for (var a = 0; a < core.status.boxAnimateObjs.length; a++) { for (var a = 0; a < core.status.boxAnimateObjs.length; a++) {
var obj = core.status.boxAnimateObjs[a]; var obj = core.status.boxAnimateObjs[a];
obj.status = ((obj.status||0)+1)%2; obj.status = ((obj.status||0)+1)%obj.animate;
core.clearMap('ui', obj.bgx, obj.bgy, obj.bgsize, obj.bgsize); core.clearMap('ui', obj.bgx, obj.bgy, obj.bgWidth, obj.bgHeight);
core.fillRect('ui', obj.bgx, obj.bgy, obj.bgsize, obj.bgsize, core.animateFrame.background); core.fillRect('ui', obj.bgx, obj.bgy, obj.bgWidth, obj.bgHeight, core.animateFrame.background);
core.canvas.ui.drawImage(obj.image, obj.status * 32, obj.icon * 32, core.canvas.ui.drawImage(obj.image, obj.status * 32, obj.pos,
32, 32, obj.x, obj.y, 32, 32); 32, obj.height, obj.x, obj.y, 32, obj.height);
} }
} }

View File

@ -266,7 +266,7 @@ ui.prototype.drawTextBox = function(content) {
clearInterval(core.status.event.interval); clearInterval(core.status.event.interval);
// 获得name, image, icon // 获得name, image, icon
var id=null, name=null, image=null, icon=null; var id=null, name=null, image=null, icon=null, iconHeight=32, animate=null;
if (content.indexOf("\t[")==0 || content.indexOf("\\t[")==0) { if (content.indexOf("\t[")==0 || content.indexOf("\\t[")==0) {
var index = content.indexOf("]"); var index = content.indexOf("]");
if (index>=0) { if (index>=0) {
@ -279,11 +279,21 @@ ui.prototype.drawTextBox = function(content) {
id=ss[0]; id=ss[0];
// monster // monster
if (id!='hero') { if (id!='hero') {
var enemys = core.material.enemys[id]; if (core.isset(core.material.enemys[id])) {
if (core.isset(enemys)) {
name = core.material.enemys[id].name; name = core.material.enemys[id].name;
image = core.material.images.enemys;
icon = core.material.icons.enemys[id]; if (core.isset(core.material.icons.enemy48[id])) {
image = core.material.images.enemy48;
icon = core.material.icons.enemy48[id];
iconHeight = 48;
animate=4;
}
else {
image = core.material.images.enemys;
icon = core.material.icons.enemys[id];
iconHeight = 32;
animate=2;
}
} }
else { else {
name=id; name=id;
@ -296,8 +306,18 @@ ui.prototype.drawTextBox = function(content) {
else { else {
id='npc'; id='npc';
name=ss[0]; name=ss[0];
image=core.material.images.npcs; if (core.isset(core.material.icons.npc48[ss[1]])) {
icon=core.material.icons.npcs[ss[1]]; image = core.material.images.npc48;
icon = core.material.icons.npc48[ss[1]];
iconHeight = 48;
animate=4;
}
else {
image = core.material.images.npcs;
icon = core.material.icons.npcs[ss[1]];
iconHeight = 32;
animate=2;
}
} }
} }
} }
@ -306,7 +326,7 @@ ui.prototype.drawTextBox = function(content) {
var textAttribute = core.status.textAttribute || core.initStatus.textAttribute; var textAttribute = core.status.textAttribute || core.initStatus.textAttribute;
var position = textAttribute.position, px=null, py=null, ydelta=0; var position = textAttribute.position, px=null, py=null, ydelta=iconHeight-32;
if (content.indexOf("\b[")==0 || content.indexOf("\\b[")==0) { if (content.indexOf("\b[")==0 || content.indexOf("\\b[")==0) {
var index = content.indexOf("]"); var index = content.indexOf("]");
if (index>=0) { if (index>=0) {
@ -355,7 +375,7 @@ ui.prototype.drawTextBox = function(content) {
if (textAttribute.bold) font = "bold "+font; if (textAttribute.bold) font = "bold "+font;
var contents = core.splitLines("ui", content, validWidth, font); var contents = core.splitLines("ui", content, validWidth, font);
var height = 20 + 21*(contents.length+1) + (id=='hero'?core.material.icons.hero.height-10:core.isset(name)?32-10:0); var height = 20 + 21*(contents.length+1) + (id=='hero'?core.material.icons.hero.height-10:core.isset(name)?iconHeight-10:0);
var xoffset = 6, yoffset = 22; var xoffset = 6, yoffset = 22;
@ -447,12 +467,16 @@ ui.prototype.drawTextBox = function(content) {
else { else {
core.fillText('ui', name, content_left, top + 30, null, 'bold 22px Verdana'); core.fillText('ui', name, content_left, top + 30, null, 'bold 22px Verdana');
if (core.isset(icon)) { if (core.isset(icon)) {
core.strokeRect('ui', left + 15 - 1, top + 40 - 1, 34, 34, null, 2);
core.strokeRect('ui', left + 15 - 1, top + 40 - 1, 34, iconHeight + 2, null, 2);
core.status.boxAnimateObjs = []; core.status.boxAnimateObjs = [];
core.status.boxAnimateObjs.push({ core.status.boxAnimateObjs.push({
'bgx': left + 15, 'bgy': top + 40, 'bgsize': 32, 'bgx': left + 15, 'bgy': top + 40, 'bgWidth': 32, 'bgHeight': iconHeight,
'image': image, 'x': left + 15, 'y': top + 40, 'icon': icon 'x': left+15, 'y': top+40, 'height': iconHeight, 'animate': animate,
'image': image,
'pos': icon*iconHeight
}); });
core.drawBoxAnimate(); core.drawBoxAnimate();
} }
} }
@ -510,7 +534,7 @@ ui.prototype.drawChoices = function(content, choices) {
if (length%2==0) bottom+=16; if (length%2==0) bottom+=16;
var choice_top = bottom-height+56; var choice_top = bottom-height+56;
var id=null, name=null, image=null, icon=null; var id=null, name=null, image=null, icon=null, iconHeight=32, animate=null;
var contents = null; var contents = null;
var content_left = left + 15; var content_left = left + 15;
@ -528,11 +552,21 @@ ui.prototype.drawChoices = function(content, choices) {
id=ss[0]; id=ss[0];
// monster // monster
if (id!='hero') { if (id!='hero') {
var enemys = core.material.enemys[id]; if (core.isset(core.material.enemys[id])) {
if (core.isset(enemys)) {
name = core.material.enemys[id].name; name = core.material.enemys[id].name;
image = core.material.images.enemys;
icon = core.material.icons.enemys[id]; if (core.isset(core.material.icons.enemy48[id])) {
image = core.material.images.enemy48;
icon = core.material.icons.enemy48[id];
iconHeight = 48;
animate=4;
}
else {
image = core.material.images.enemys;
icon = core.material.icons.enemys[id];
iconHeight = 32;
animate=2;
}
} }
else { else {
name=id; name=id;
@ -545,8 +579,18 @@ ui.prototype.drawChoices = function(content, choices) {
else { else {
id='npc'; id='npc';
name=ss[0]; name=ss[0];
image=core.material.images.npcs; if (core.isset(core.material.icons.npc48[ss[1]])) {
icon=core.material.icons.npcs[ss[1]]; image = core.material.images.npc48;
icon = core.material.icons.npc48[ss[1]];
iconHeight = 48;
animate=4;
}
else {
image = core.material.images.npcs;
icon = core.material.icons.npcs[ss[1]];
iconHeight = 32;
animate=2;
}
} }
} }
} }
@ -595,11 +639,13 @@ ui.prototype.drawChoices = function(content, choices) {
else { else {
core.fillText('ui', name, title_offset, top + 27, '#FFD700', 'bold 19px Verdana'); core.fillText('ui', name, title_offset, top + 27, '#FFD700', 'bold 19px Verdana');
if (core.isset(icon)) { if (core.isset(icon)) {
core.strokeRect('ui', left + 15 - 1, top + 30 - 1, 34, 34, '#DDDDDD', 2); core.strokeRect('ui', left + 15 - 1, top + 30 - 1, 34, iconHeight + 2, '#DDDDDD', 2);
core.status.boxAnimateObjs = []; core.status.boxAnimateObjs = [];
core.status.boxAnimateObjs.push({ core.status.boxAnimateObjs.push({
'bgx': left + 15, 'bgy': top + 30, 'bgsize': 32, 'bgx': left + 15, 'bgy': top + 30, 'bgWidth': 32, 'bgHeight': iconHeight,
'image': image, 'x': left + 15, 'y': top + 30, 'icon': icon 'x': left+15, 'y': top+30, 'height': iconHeight, 'animate': animate,
'image': image,
'pos': icon*iconHeight
}); });
core.drawBoxAnimate(); core.drawBoxAnimate();
} }
@ -809,19 +855,28 @@ ui.prototype.drawBattleAnimate = function(monsterId, callback) {
var margin = 35; var margin = 35;
var boxWidth = 40; var boxWidth = 40;
var monsterHeight = 32, animate=2;
var image = core.material.images.enemys, icon = core.material.icons.enemys;
if (core.isset(core.material.icons.enemy48[monsterId])) {
image = core.material.images.enemy48;
icon = core.material.icons.enemy48;
monsterHeight = 48;
animate=4;
}
// 方块 // 方块
var heroHeight = core.material.icons.hero.height; var heroHeight = core.material.icons.hero.height;
core.strokeRect('ui', left + margin - 1, top + margin - 1, boxWidth+2, heroHeight+boxWidth-32+2, '#FFD700', 2); core.strokeRect('ui', left + margin - 1, top + margin - 1, boxWidth+2, heroHeight+boxWidth-32+2, '#FFD700', 2);
core.strokeRect('ui', left + right - margin - boxWidth - 1 , top+margin-1, boxWidth+2, boxWidth+2); core.strokeRect('ui', left + right - margin - boxWidth - 1 , top+margin-1, boxWidth+2, monsterHeight+boxWidth-32+2);
// 名称 // 名称
core.canvas.ui.textAlign='center'; core.canvas.ui.textAlign='center';
core.fillText('ui', core.status.hero.name, left+margin+boxWidth/2, top+margin+heroHeight+40, '#FFD700', 'bold 22px Verdana'); core.fillText('ui', core.status.hero.name, left+margin+boxWidth/2, top+margin+heroHeight+40, '#FFD700', 'bold 22px Verdana');
core.fillText('ui', "怪物", left+right-margin-boxWidth/2, top+margin+32+40); core.fillText('ui', "怪物", left+right-margin-boxWidth/2, top+margin+monsterHeight+40);
for (var i=0, j=0; i<specialTexts.length;i++) { for (var i=0, j=0; i<specialTexts.length;i++) {
if (specialTexts[i]!='') { if (specialTexts[i]!='') {
core.fillText('ui', specialTexts[i], left+right-margin-boxWidth/2, top+margin+32+44+20*(++j), '#FF6A6A', '15px Verdana'); core.fillText('ui', specialTexts[i], left+right-margin-boxWidth/2, top+margin+monsterHeight+44+20*(++j), '#FF6A6A', '15px Verdana');
} }
} }
@ -833,11 +888,11 @@ ui.prototype.drawBattleAnimate = function(monsterId, callback) {
// 怪物的 // 怪物的
core.status.boxAnimateObjs = []; core.status.boxAnimateObjs = [];
core.status.boxAnimateObjs.push({ core.status.boxAnimateObjs.push({
'bgx': left + right - margin - 40, 'bgy': top+margin, 'bgsize': boxWidth, 'bgx': left+right-margin-40, 'bgy': top+margin, 'bgWidth': boxWidth, 'bgHeight': monsterHeight+boxWidth-32,
'image': core.material.images.enemys, 'x': left + right - margin - 40 + (boxWidth-32)/2, 'y': top + margin + (boxWidth-32)/2, 'icon': core.material.icons.enemys[monsterId] 'x': left + right - margin - 40 + (boxWidth-32)/2, 'y': top + margin + (boxWidth-32)/2, 'height': monsterHeight,
}); 'image': image, 'pos': monsterHeight*icon[monsterId], 'animate': animate
})
core.drawBoxAnimate(); core.drawBoxAnimate();
var lineWidth = 80; var lineWidth = 80;
var left_start = left + margin + boxWidth + 10; var left_start = left + margin + boxWidth + 10;
@ -928,11 +983,11 @@ ui.prototype.drawBattleAnimate = function(monsterId, callback) {
if (turn==0) { if (turn==0) {
// 勇士攻击 // 勇士攻击
core.drawLine('data', left + right - margin - boxWidth + 6, top+margin+boxWidth-6, core.drawLine('data', left + right - margin - boxWidth + 6, top+margin+monsterHeight+boxWidth-32-6,
left+right-margin-6, top+margin+6, '#FF0000', 4); left+right-margin-6, top+margin+6, '#FF0000', 4);
setTimeout(function() { setTimeout(function() {
core.clearMap('data', left + right - margin - boxWidth, top+margin, core.clearMap('data', left + right - margin - boxWidth, top+margin,
boxWidth, boxWidth); boxWidth, boxWidth+monsterHeight-32);
}, 250); }, 250);
if (hero_atk-mon_def>0) if (hero_atk-mon_def>0)
@ -1166,11 +1221,18 @@ ui.prototype.drawBook = function (index) {
var enemy = enemys[i]; var enemy = enemys[i];
core.strokeRect('ui', 22, 62 * i + 22, 42, 42, '#DDDDDD', 2); core.strokeRect('ui', 22, 62 * i + 22, 42, 42, '#DDDDDD', 2);
var cls = 'enemys';
if (core.isset(core.material.icons.enemy48[enemy.id]))
cls = 'enemy48';
var height = cls=='enemy48'?48:32;
var animate = cls=='enemy48'?4:2;
// 怪物 // 怪物
core.status.boxAnimateObjs.push({ core.status.boxAnimateObjs.push({
'bgx': 22, 'bgy': 62 * i + 22, 'bgsize': 42, 'bgx': 22, 'bgy': 62 * i + 22, 'bgWidth': 42, 'bgHeight': 42,
'image': core.material.images.enemys, 'x': 27, 'y': 62 * i + 27, 'height': 32, 'animate': animate,
'x': 27, 'y': 62 * i + 27, 'icon': core.material.icons.enemys[enemy.id] 'image': core.material.images[cls],
'pos': core.material.icons[cls][enemy.id] * height
}); });
// 数据 // 数据
@ -1558,12 +1620,6 @@ ui.prototype.drawThumbnail = function(floorId, canvas, blocks, x, y, size, heroL
if (core.isset(core.floors[floorId].png)) { if (core.isset(core.floors[floorId].png)) {
var png = core.floors[floorId].png; var png = core.floors[floorId].png;
/*
if (core.isset(core.material.images.pngs[png])) {
core.canvas.ui.drawImage(core.material.images.pngs[png], x, y, size, size);
}
*/
var ratio = size/416; var ratio = size/416;
if (typeof png == 'string') { if (typeof png == 'string') {
@ -1596,7 +1652,8 @@ ui.prototype.drawThumbnail = function(floorId, canvas, blocks, x, y, size, heroL
if (block.event.id!='none') { if (block.event.id!='none') {
var blockIcon = core.material.icons[block.event.cls][block.event.id]; var blockIcon = core.material.icons[block.event.cls][block.event.id];
var blockImage = core.material.images[block.event.cls]; var blockImage = core.material.images[block.event.cls];
core.canvas[canvas].drawImage(blockImage, 0, blockIcon * 32, 32, 32, x + block.x * persize, y + block.y * persize, persize, persize); var height = block.event.height || 32;
core.canvas[canvas].drawImage(blockImage, 0, blockIcon * height, 32, height, x + block.x * persize, y + block.y * persize + (persize-persize*height/32), persize, persize * height/32);
} }
} }
} }

View File

@ -59,7 +59,7 @@ function main() {
"data","enemys","icons","maps","items","functions" "data","enemys","icons","maps","items","functions"
]; ];
this.images = [ this.images = [
'animates', 'enemys', 'hero', 'items', 'npcs', 'terrains' 'animates', 'enemys', 'hero', 'items', 'npcs', 'terrains', 'enemy48', 'npc48'
]; ];
this.statusBar = { this.statusBar = {

View File

@ -30,7 +30,7 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
'defValue':'退化时勇士下降的防御力点数\n$range(thiseval==~~thiseval||thiseval==null)$end', 'defValue':'退化时勇士下降的防御力点数\n$range(thiseval==~~thiseval||thiseval==null)$end',
'damage':'战前扣血的点数\n$range(thiseval==~~thiseval||thiseval==null)$end' 'damage':'战前扣血的点数\n$range(thiseval==~~thiseval||thiseval==null)$end'
}, },
"enemys_template" : {'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0}, "enemys_template" : {'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
"floors" : { "floors" : {
'floor' : { 'floor' : {
"floorId": "文件名和floorId需要保持完全一致 \n楼层唯一标识符仅能由字母、数字、下划线组成且不能由数字开头 \n推荐用法第20层就用MT20第38层就用MT38地下6层就用MT_6用下划线代替负号隐藏3层用MT3hh表示隐藏等等 \n楼层唯一标识符需要和名字完全一致 \n这里不能更改floorId,请通过另存为来实现\n$range(false)$end", "floorId": "文件名和floorId需要保持完全一致 \n楼层唯一标识符仅能由字母、数字、下划线组成且不能由数字开头 \n推荐用法第20层就用MT20第38层就用MT38地下6层就用MT_6用下划线代替负号隐藏3层用MT3hh表示隐藏等等 \n楼层唯一标识符需要和名字完全一致 \n这里不能更改floorId,请通过另存为来实现\n$range(false)$end",

View File

@ -131,7 +131,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
'counterAttack': 0.1, 'counterAttack': 0.1,
'purify': 3, 'purify': 3,
'hatred': 2, 'hatred': 2,
'animateSpeed': 500, 'animateSpeed': 300,
}, },
"flags" : { "flags" : {

View File

@ -1,63 +1,67 @@
enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
{ {
'greenSlime': {'name': '绿头怪', 'hp': 100, 'atk': 120, 'def': 0, 'money': 1, 'experience': 1, 'point': 0, 'special': [1,5,7,8]}, 'greenSlime': {'name': '绿头怪', 'hp': 100, 'atk': 120, 'def': 0, 'money': 1, 'experience': 1, 'point': 0, 'special': [1,5,7,8]},
'redSlime': {'name': '红头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'redSlime': {'name': '红头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'blackSlime': {'name': '青头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'blackSlime': {'name': '青头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'slimelord': {'name': '怪王', 'hp': 100, 'atk': 120, 'def': 0, 'money': 10, 'experience': 0, 'point': 0, 'special': [1,9]}, 'slimelord': {'name': '怪王', 'hp': 100, 'atk': 120, 'def': 0, 'money': 10, 'experience': 0, 'point': 0, 'special': [1,9]},
'bat': {'name': '小蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 2, 'experience': 0, 'point': 0, 'special': 1}, 'bat': {'name': '小蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 2, 'experience': 0, 'point': 0, 'special': 1},
'bigBat': {'name': '大蝙蝠', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'bigBat': {'name': '大蝙蝠', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'redBat': {'name': '红蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 5, 'experience': 0, 'point': 0, 'special': 4}, 'redBat': {'name': '红蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 5, 'experience': 0, 'point': 0, 'special': 4},
'vampire': {'name': '冥灵魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'vampire': {'name': '冥灵魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'skeleton': {'name': '骷髅人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'skeleton': {'name': '骷髅人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'skeletonSoilder': {'name': '骷髅士兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'skeletonSoilder': {'name': '骷髅士兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'skeletonCaptain': {'name': '骷髅队长', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'skeletonCaptain': {'name': '骷髅队长', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'ghostSkeleton': {'name': '冥队长', 'hp': 100, 'atk': 120, 'def': 0, 'money': 8, 'experience': 0, 'point': 0, 'special': 7}, 'ghostSkeleton': {'name': '冥队长', 'hp': 100, 'atk': 120, 'def': 0, 'money': 8, 'experience': 0, 'point': 0, 'special': 7},
'zombie': {'name': '兽人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'zombie': {'name': '兽人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'zombieKnight': {'name': '兽人武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'zombieKnight': {'name': '兽人武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'rock': {'name': '石头人', 'hp': 100, 'atk': 120, 'def': 0, 'money': 4, 'experience': 0, 'point': 0, 'special': 3}, 'rock': {'name': '石头人', 'hp': 100, 'atk': 120, 'def': 0, 'money': 4, 'experience': 0, 'point': 0, 'special': 3},
'slimeMan': {'name': '影子战士', 'hp': 100, 'atk': 0, 'def': 0, 'money': 11, 'experience': 0, 'point': 0, 'special': [10,21], 'atkValue': 2, 'defValue': 3}, // 退化怪可以在后面写atkValue和defValue表示退化的数值 'slimeMan': {'name': '影子战士', 'hp': 100, 'atk': 0, 'def': 0, 'money': 11, 'experience': 0, 'point': 0, 'special': [10,21], 'atkValue': 2, 'defValue': 3}, // 退化怪可以在后面写atkValue和defValue表示退化的数值
'bluePriest': {'name': '初级法师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 3, 'experience': 0, 'point': 1, 'special': 2}, 'bluePriest': {'name': '初级法师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 3, 'experience': 0, 'point': 1, 'special': 2},
'redPriest': {'name': '高级法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'redPriest': {'name': '高级法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'brownWizard': {'name': '初级巫师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 16, 'experience': 0, 'point': 0, 'special': 15, 'value': 100, 'range': 2}, // 领域怪需要加value表示领域伤害的数值range可选代表领域伤害的范围不加默认为1 'brownWizard': {'name': '初级巫师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 16, 'experience': 0, 'point': 0, 'special': 15, 'value': 100, 'range': 2}, // 领域怪需要加value表示领域伤害的数值range可选代表领域伤害的范围不加默认为1
'redWizard': {'name': '高级巫师', 'hp': 1000, 'atk': 1200, 'def': 0, 'money': 160, 'experience': 0, 'point': 0, 'special': 15, 'value': 200, 'zoneSquare': true}, // zoneSquare可选代表是否九宫格伤害true为是九宫格伤害false或不设置为十字伤害 'redWizard': {'name': '高级巫师', 'hp': 1000, 'atk': 1200, 'def': 0, 'money': 160, 'experience': 0, 'point': 0, 'special': 15, 'value': 200, 'zoneSquare': true}, // zoneSquare可选代表是否九宫格伤害true为是九宫格伤害false或不设置为十字伤害
'yellowGuard': {'name': '初级卫兵', 'hp': 100, 'atk': 120, 'def': 0, 'money': 10, 'experience': 0, 'point': 0, 'special': 0}, 'yellowGuard': {'name': '初级卫兵', 'hp': 100, 'atk': 120, 'def': 0, 'money': 10, 'experience': 0, 'point': 0, 'special': 0},
'blueGuard': {'name': '中级卫兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'blueGuard': {'name': '中级卫兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'redGuard': {'name': '高级卫兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'redGuard': {'name': '高级卫兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'swordsman': {'name': '双手剑士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 6, 'experience': 0, 'point': 0, 'special': [5,23]}, 'swordsman': {'name': '双手剑士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 6, 'experience': 0, 'point': 0, 'special': [5,23]},
'soldier': {'name': '冥战士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'soldier': {'name': '冥战士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'yellowKnight': {'name': '金骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'yellowKnight': {'name': '金骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'redKnight': {'name': '红骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'redKnight': {'name': '红骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'darkKnight': {'name': '黑骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'darkKnight': {'name': '黑骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'blackKing': {'name': '黑衣魔王', 'hp': 1000, 'atk': 500, 'def': 0, 'money': 1000, 'experience': 1000, 'point': 0, 'special': 0, 'bomb': false}, // 加入 'bomb': false 代表该怪物不可被炸弹或圣锤炸掉 'blackKing': {'name': '黑衣魔王', 'hp': 1000, 'atk': 500, 'def': 0, 'money': 1000, 'experience': 1000, 'point': 0, 'special': 0, 'bomb': false}, // 加入 'bomb': false 代表该怪物不可被炸弹或圣锤炸掉
'yellowKing': {'name': '黄衣魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'yellowKing': {'name': '黄衣魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'greenKing': {'name': '青衣武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'greenKing': {'name': '青衣武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'blueKnight': {'name': '蓝骑士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 9, 'experience': 0, 'point': 0, 'special': 8}, 'blueKnight': {'name': '蓝骑士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 9, 'experience': 0, 'point': 0, 'special': 8},
'goldSlime': {'name': '黄头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'goldSlime': {'name': '黄头怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'poisonSkeleton': {'name': '紫骷髅', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'poisonSkeleton': {'name': '紫骷髅', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'poisonBat': {'name': '紫蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 14, 'experience': 0, 'point': 0, 'special': 13}, 'poisonBat': {'name': '紫蝙蝠', 'hp': 100, 'atk': 120, 'def': 0, 'money': 14, 'experience': 0, 'point': 0, 'special': 13},
'steelRock': {'name': '铁面人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'steelRock': {'name': '铁面人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'skeletonPriest': {'name': '骷髅法师', 'hp': 100, 'atk': 100, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 18, 'value': 20}, 'skeletonPriest': {'name': '骷髅法师', 'hp': 100, 'atk': 100, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 18, 'value': 20},
'skeletonKing': {'name': '骷髅王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'skeletonKing': {'name': '骷髅王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'skeletonWizard': {'name': '骷髅巫师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'skeletonWizard': {'name': '骷髅巫师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'redSkeletonCaption': {'name': '骷髅武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'redSkeletonCaption': {'name': '骷髅武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'badHero': {'name': '迷失勇者', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'badHero': {'name': '迷失勇者', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'demon': {'name': '魔神武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'demon': {'name': '魔神武士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'demonPriest': {'name': '魔神法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'demonPriest': {'name': '魔神法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'goldHornSlime': {'name': '金角怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'goldHornSlime': {'name': '金角怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'redKing': {'name': '红衣魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'redKing': {'name': '红衣魔王', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'whiteKing': {'name': '白衣武士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 17, 'experience': 0, 'point': 0, 'special': 16}, 'whiteKing': {'name': '白衣武士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 17, 'experience': 0, 'point': 0, 'special': 16},
'blackMagician': {'name': '黑暗大法师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 12, 'experience': 0, 'point': 0, 'special': 11, 'value': 1/3, 'add': true, 'bomb': false}, // 吸血怪需要在后面添加value代表吸血比例添加add: true可以将吸血的伤害加到自身 'blackMagician': {'name': '黑暗大法师', 'hp': 100, 'atk': 120, 'def': 0, 'money': 12, 'experience': 0, 'point': 0, 'special': 11, 'value': 1/3, 'add': true, 'bomb': false}, // 吸血怪需要在后面添加value代表吸血比例添加add: true可以将吸血的伤害加到自身
'silverSlime': {'name': '银头怪', 'hp': 100, 'atk': 120, 'def': 0, 'money': 15, 'experience': 0, 'point': 0, 'special': 14}, 'silverSlime': {'name': '银头怪', 'hp': 100, 'atk': 120, 'def': 0, 'money': 15, 'experience': 0, 'point': 0, 'special': 14},
'swordEmperor': {'name': '剑圣', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'swordEmperor': {'name': '剑圣', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'whiteHornSlime': {'name': '尖角怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'whiteHornSlime': {'name': '尖角怪', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'badPrincess': {'name': '痛苦魔女', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'badPrincess': {'name': '痛苦魔女', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'badFairy': {'name': '黑暗仙子', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'badFairy': {'name': '黑暗仙子', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'grayPriest': {'name': '中级法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'grayPriest': {'name': '中级法师', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'redSwordsman': {'name': '剑王', 'hp': 100, 'atk': 120, 'def': 0, 'money': 7, 'experience': 0, 'point': 0, 'special': 6, 'n': 8}, // 多连击需要在后面指定n代表是几连击 'redSwordsman': {'name': '剑王', 'hp': 100, 'atk': 120, 'def': 0, 'money': 7, 'experience': 0, 'point': 0, 'special': 6, 'n': 8}, // 多连击需要在后面指定n代表是几连击
'whiteGhost': {'name': '水银战士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'whiteGhost': {'name': '水银战士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'poisonZombie': {'name': '绿兽人', 'hp': 100, 'atk': 120, 'def': 0, 'money': 13, 'experience': 0, 'point': 0, 'special': 12}, 'poisonZombie': {'name': '绿兽人', 'hp': 100, 'atk': 120, 'def': 0, 'money': 13, 'experience': 0, 'point': 0, 'special': 12},
'magicDragon': {'name': '魔龙', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'magicDragon': {'name': '魔龙', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'octopus': {'name': '血影', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'octopus': {'name': '血影', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'darkFairy': {'name': '仙子', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'darkFairy': {'name': '仙子', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'greenKnight': {'name': '强盾骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0}, 'greenKnight': {'name': '强盾骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'angel': {'name': '天使', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'elemental': {'name': '元素生物', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 0},
'steelGuard': {'name': '铁守卫', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': 18, 'value': 20},
'evilBat': {'name': '邪恶蝙蝠', 'hp': 1000, 'atk': 1, 'def': 0, 'money': 0, 'experience': 0, 'point': 0, 'special': [2,3]},
} }

View File

@ -19,13 +19,13 @@ main.floors.sample0 =
[0, 246, 0, 246, 0, 20, 0, 3, 58, 59, 60, 61, 41], [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], [219, 0, 0, 0, 219, 20, 0, 3, 57, 26, 62, 63, 40],
[20, 20, 125, 20, 20, 20, 0, 3, 53, 54, 55, 56, 39], [20, 20, 125, 20, 20, 20, 0, 3, 53, 54, 55, 56, 39],
[216, 247, 256, 235, 248, 6, 0, 3, 49, 50, 51, 52, 38], [216, 247, 263, 235, 248, 6, 0, 3, 49, 50, 51, 52, 38],
[6, 6, 125, 6, 6, 6, 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], [224, 254, 212, 262, 204, 5, 0, 1, 31, 32, 34, 33, 36],
[201, 205, 217, 215, 207, 5, 0, 1, 27, 28, 29, 30, 35], [201, 261, 217, 215, 207, 5, 263, 1, 27, 28, 29, 30, 35],
[5, 5, 125, 5, 5, 5, 0, 1, 21, 22, 23, 24, 25], [5, 5, 125, 5, 5, 5, 0, 1, 21, 22, 23, 24, 25],
[0, 0, 237, 0, 0, 0, 45, 1, 1, 1, 121, 1, 1], [0, 0, 237, 0, 0, 0, 45, 1, 1, 1, 121, 1, 1],
[4, 4, 126, 4, 4, 4, 0, 0, 0, 0, 0, 85, 124], [4, 4, 133, 4, 4, 4, 0, 0, 0, 0, 0, 85, 124],
[87, 11, 12, 13, 14, 4, 4, 2, 2, 2, 122, 2, 2], [87, 11, 12, 13, 14, 4, 4, 2, 2, 2, 122, 2, 2],
[88, 89, 90, 91, 92, 93, 94, 2, 81, 82, 83, 84, 86], [88, 89, 90, 91, 92, 93, 94, 2, 81, 82, 83, 84, 86],
], ],
@ -49,9 +49,9 @@ main.floors.sample0 =
{"type": "hide", "time": 500} {"type": "hide", "time": 500}
], ],
"2,10": [ // 守着楼梯、传送门、路障的老人 "2,10": [ // 守着楼梯、传送门、路障的老人
"\t[老人,womanMagician]这些是路障、楼梯、传送门。", "\t[少女,npc0]这些是路障、楼梯、传送门。",
"\t[老人,womanMagician]血网的伤害数值、中毒后每步伤害数值、衰弱时攻防下降的数值,都在 data.js 内定义。\n\n路障同样会尽量被自动寻路绕过。", "\t[少女,npc0]血网的伤害数值、中毒后每步伤害数值、衰弱时攻防下降的数值,都在 data.js 内定义。\n\n路障同样会尽量被自动寻路绕过。",
"\t[老人,womanMagician]楼梯和传送门需要在changeFloor中定义目标楼层和位置可参见样板里已有的的写法。", "\t[少女,npc0]楼梯和传送门需要在changeFloor中定义目标楼层和位置可参见样板里已有的的写法。",
{"type": "hide", "time": 500} {"type": "hide", "time": 500}
], ],
"2,8": [ // 守着第一批怪物的老人 "2,8": [ // 守着第一批怪物的老人

View File

@ -101,6 +101,13 @@ icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
'blueShop': 10, 'blueShop': 10,
'princess': 11 'princess': 11
}, },
'npc48': {
'npc0': 0,
'npc1': 1,
'npc2': 2,
'npc3': 3,
'npc4': 4,
},
'enemys': { 'enemys': {
'greenSlime': 0, 'greenSlime': 0,
'redSlime': 1, 'redSlime': 1,
@ -163,6 +170,12 @@ icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
'darkFairy': 58, 'darkFairy': 58,
'greenKnight': 59, 'greenKnight': 59,
}, },
'enemy48': {
'angel': 0,
'elemental': 1,
'steelGuard': 2,
'evilBat': 3,
},
'items': { 'items': {
'yellowKey': 0, 'yellowKey': 0,
'blueKey': 1, 'blueKey': 1,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 29 KiB

BIN
project/images/enemy48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
project/images/npc48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@ -112,6 +112,12 @@ maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
'130':{'cls': 'npcs', 'id': 'pinkShop'}, '130':{'cls': 'npcs', 'id': 'pinkShop'},
'131':{'cls': 'npcs', 'id': 'blueShop'}, '131':{'cls': 'npcs', 'id': 'blueShop'},
'132':{'cls': 'npcs', 'id': 'princess'}, '132':{'cls': 'npcs', 'id': 'princess'},
'133':{'cls': 'npc48', 'id': 'npc0'},
'134':{'cls': 'npc48', 'id': 'npc1'},
'135':{'cls': 'npc48', 'id': 'npc2'},
'136':{'cls': 'npc48', 'id': 'npc3'},
'137':{'cls': 'npc48', 'id': 'npc4'},
////////////////////////// 其他部分 ////////////////////////// ////////////////////////// 其他部分 //////////////////////////
@ -192,6 +198,10 @@ maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
'259':{'cls': 'enemys', 'id': 'darkFairy'}, '259':{'cls': 'enemys', 'id': 'darkFairy'},
'260':{'cls': 'enemys', 'id': 'greenKnight'}, '260':{'cls': 'enemys', 'id': 'greenKnight'},
'261':{'cls': 'enemy48', 'id': 'angel'},
'262':{'cls': 'enemy48', 'id': 'elemental'},
'263':{'cls': 'enemy48', 'id': 'steelGuard'},
'264':{'cls': 'enemy48', 'id': 'evilBat'},
////////////////////////// 待定... ////////////////////////// ////////////////////////// 待定... //////////////////////////
// 目前ID暂时不要超过400
} }

View File

@ -32,7 +32,7 @@
left: 0; left: 0;
background-color: #fff; background-color: #fff;
overflow: hidden; overflow: hidden;
z-index: 11; z-index: 12;
} }
#startTop { #startTop {
@ -142,7 +142,7 @@
display: none; display: none;
color: #fff; color: #fff;
background-color: #000; background-color: #000;
z-index: 10; z-index: 11;
} }
#logoLabel { #logoLabel {
@ -234,7 +234,7 @@ span#poison, span#weak, span#curse {
} }
#curtain { #curtain {
z-index: 7; z-index: 8;
position: absolute; position: absolute;
opacity: 0; opacity: 0;
background: #000000; background: #000000;
@ -248,28 +248,32 @@ span#poison, span#weak, span#curse {
z-index: 2; z-index: 2;
} }
#fg { #hero {
z-index: 3; z-index: 3;
} }
#hero { #event2 {
z-index: 4; z-index: 4;
} }
#animate { #fg {
z-index: 5; z-index: 5;
} }
#weather { #animate {
z-index: 6; z-index: 6;
} }
#weather {
z-index: 7;
}
#ui { #ui {
z-index: 8; z-index: 9;
} }
#data { #data {
z-index: 9; z-index: 10;
} }
.clearfix:before, .clearfix:before,