@ -81,8 +81,8 @@
|
||||
"一段普通文字",
|
||||
"\t[勇士,hero]这是一段勇士说的话",
|
||||
"\t[hero]如果使用勇士默认名称也可以直接简写hero",
|
||||
"\t[黑暗大法师,blackMagician]我是黑暗大法师",
|
||||
"\t[blackMagician]如果使用怪物的默认名称也可以简写怪物id",
|
||||
"\t[黑暗大法师,magicMaster]我是黑暗大法师",
|
||||
"\t[magicMaster]如果使用怪物的默认名称也可以简写怪物id",
|
||||
"\t[小妖精,fairy]这是一段小妖精说的话,使用仙子(fairy)的图标",
|
||||
"\t[你赢了]直接显示标题为【你赢了】",
|
||||
"\t[1.png]绘制1.png这个头像图",
|
||||
|
||||
@ -385,6 +385,7 @@ action
|
||||
| screenFlash_s
|
||||
| setWeather_s
|
||||
| move_s
|
||||
| moveAction_s
|
||||
| moveHero_s
|
||||
| jump_s
|
||||
| jumpHero_s
|
||||
@ -732,16 +733,19 @@ return code;
|
||||
*/;
|
||||
|
||||
trigger_s
|
||||
: '触发事件' 'x' PosString ',' 'y' PosString '不结束当前事件' Bool Newline
|
||||
: '触发系统事件' 'x' PosString? ',' 'y' PosString? Newline
|
||||
|
||||
|
||||
/* trigger_s
|
||||
tooltip : trigger: 立即触发另一个地点的事件
|
||||
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=trigger%EF%BC%9A%E7%AB%8B%E5%8D%B3%E8%A7%A6%E5%8F%91%E5%8F%A6%E4%B8%80%E4%B8%AA%E5%9C%B0%E7%82%B9%E7%9A%84%E4%BA%8B%E4%BB%B6
|
||||
default : ["0","0",false]
|
||||
default : ["",""]
|
||||
colour : this.eventColor
|
||||
Bool_0 = Bool_0 ?', "keep": true':'';
|
||||
var code = '{"type": "trigger", "loc": ['+PosString_0+','+PosString_1+']'+Bool_0+'},\n';
|
||||
var floorstr = '';
|
||||
if (PosString_0 && PosString_1) {
|
||||
floorstr = ', "loc": ['+PosString_0+','+PosString_1+']';
|
||||
}
|
||||
var code = '{"type": "trigger"'+floorstr+'},\n';
|
||||
return code;
|
||||
*/;
|
||||
|
||||
@ -764,7 +768,7 @@ return code;
|
||||
*/;
|
||||
|
||||
insert_2_s
|
||||
: '插入事件' 'x' PosString ',' 'y' PosString Event_List? '楼层' IdString? '参数列表' JsonEvalString? Newline
|
||||
: '插入事件' 'x' PosString? ',' 'y' PosString? Event_List? '楼层' IdString? '参数列表' JsonEvalString? Newline
|
||||
|
||||
|
||||
/* insert_2_s
|
||||
@ -781,7 +785,11 @@ if (JsonEvalString_0) {
|
||||
if (Event_List_0 && Event_List_0 !=='null')
|
||||
Event_List_0 = ', "which": "'+Event_List_0+'"';
|
||||
else Event_List_0 = '';
|
||||
var code = '{"type": "insert", "loc": ['+PosString_0+','+PosString_1+']'+Event_List_0+IdString_0+JsonEvalString_0+'},\n';
|
||||
var floorstr = '';
|
||||
if (PosString_0 && PosString_1) {
|
||||
floorstr = ', "loc": ['+PosString_0+','+PosString_1+']';
|
||||
}
|
||||
var code = '{"type": "insert"'+floorstr+Event_List_0+IdString_0+JsonEvalString_0+'},\n';
|
||||
return code;
|
||||
*/;
|
||||
|
||||
@ -1566,8 +1574,21 @@ var code = '{"type": "move"'+floorstr+IntString_0+Bool_0+Bool_1+', "steps": '+JS
|
||||
return code;
|
||||
*/;
|
||||
|
||||
moveAction_s
|
||||
: '勇士前进一格或撞击' Newline
|
||||
|
||||
|
||||
/* moveAction_s
|
||||
tooltip : moveAction: 前进一格或撞击
|
||||
helpUrl : https://h5mota.com/games/template/_docs/#/event?id=move%EF%BC%9A%E8%AE%A9%E6%9F%90%E4%B8%AAnpc%E6%80%AA%E7%89%A9%E7%A7%BB%E5%8A%A8
|
||||
colour : this.dataColor
|
||||
return '{"type": "moveAction"},\n';
|
||||
*/;
|
||||
|
||||
|
||||
|
||||
moveHero_s
|
||||
: '移动勇士' '动画时间' IntString? '不等待执行完毕' Bool BGNL? StepString Newline
|
||||
: '无视地形移动勇士' '动画时间' IntString? '不等待执行完毕' Bool BGNL? StepString Newline
|
||||
|
||||
|
||||
/* moveHero_s
|
||||
@ -3187,7 +3208,10 @@ ActionParser.prototype.parseAction = function() {
|
||||
this.next = MotaActionBlocks['move_s'].xmlText([
|
||||
data.loc[0],data.loc[1],data.time,data.keep||false,data.async||false,this.StepString(data.steps),this.next]);
|
||||
break;
|
||||
case "moveHero": // 移动勇士
|
||||
case "moveAction": // 前进一格或撞击
|
||||
this.next = MotaActionBlocks['moveAction_s'].xmlText([this.next]);
|
||||
break;
|
||||
case "moveHero": // 无视地形移动勇士
|
||||
this.next = MotaActionBlocks['moveHero_s'].xmlText([
|
||||
data.time,data.async||false,this.StepString(data.steps),this.next]);
|
||||
break;
|
||||
@ -3336,9 +3360,10 @@ ActionParser.prototype.parseAction = function() {
|
||||
data.loc[0],data.loc[1],this.next]);
|
||||
}
|
||||
break;
|
||||
case "trigger": // 触发另一个事件;当前事件会被立刻结束。需要另一个地点的事件是有效的
|
||||
case "trigger": // 触发另一个事件
|
||||
data.loc = data.loc || [];
|
||||
this.next = MotaActionBlocks['trigger_s'].xmlText([
|
||||
data.loc[0],data.loc[1],data.keep,this.next]);
|
||||
data.loc[0],data.loc[1],this.next]);
|
||||
break;
|
||||
case "insert": // 强制插入另一个点的事件在当前事件列表执行,当前坐标和楼层不会改变
|
||||
if (data.args instanceof Array) {
|
||||
@ -3350,6 +3375,7 @@ ActionParser.prototype.parseAction = function() {
|
||||
data.name, data.args||"", this.next]);
|
||||
}
|
||||
else {
|
||||
data.loc = data.loc || [];
|
||||
this.next = MotaActionBlocks['insert_2_s'].xmlText([
|
||||
data.loc[0],data.loc[1],data.which,data.floorId||'',data.args||"",this.next]);
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ body {
|
||||
|
||||
#tip {
|
||||
float: right;
|
||||
width: 50%;
|
||||
width: 48%;
|
||||
height: 95%;
|
||||
padding: 5px 10px 10px 10px;
|
||||
margin-right: 0;
|
||||
|
||||
@ -26,6 +26,7 @@ function editor() {
|
||||
brushMod:document.getElementById('brushMod'),
|
||||
brushMod2:document.getElementById('brushMod2'),
|
||||
brushMod3:document.getElementById('brushMod3'),
|
||||
brushMod4:document.getElementById('brushMod4'),
|
||||
bgc : document.getElementById('bg'),
|
||||
bgCtx : document.getElementById('bg').getContext('2d'),
|
||||
fgc : document.getElementById('fg'),
|
||||
@ -39,16 +40,17 @@ function editor() {
|
||||
layerMod3:document.getElementById('layerMod3'),
|
||||
viewportButtons:document.getElementById('viewportButtons'),
|
||||
appendPicCanvas : document.getElementById('appendPicCanvas'),
|
||||
bg : document.getElementById('appendPicCanvas').children[0],
|
||||
source : document.getElementById('appendPicCanvas').children[1],
|
||||
picClick : document.getElementById('appendPicCanvas').children[2],
|
||||
sprite : document.getElementById('appendPicCanvas').children[3],
|
||||
sourceCtx:document.getElementById('appendPicCanvas').children[1].getContext('2d'),
|
||||
spriteCtx:document.getElementById('appendPicCanvas').children[3].getContext('2d'),
|
||||
appendBgCtx : document.getElementById('appendPicCanvas').children[0].getContext('2d'),
|
||||
appendSource : document.getElementById('appendPicCanvas').children[1],
|
||||
appendPicClick : document.getElementById('appendPicCanvas').children[2],
|
||||
appendSprite : document.getElementById('appendPicCanvas').children[3],
|
||||
appendSourceCtx:document.getElementById('appendPicCanvas').children[1].getContext('2d'),
|
||||
appendSpriteCtx:document.getElementById('appendPicCanvas').children[3].getContext('2d'),
|
||||
appendPicSelection : document.getElementById('appendPicSelection'),
|
||||
selectAppend : document.getElementById('selectAppend'),
|
||||
selectFileBtn :document.getElementById('selectFileBtn'),
|
||||
changeFloorId :document.getElementById('changeFloorId'),
|
||||
changeFloorSize: document.getElementById('changeFloorSize'),
|
||||
left1 : document.getElementById('left1'),
|
||||
editModeSelect :document.getElementById('editModeSelect'),
|
||||
mid2 : document.getElementById('mid2'),
|
||||
|
||||
@ -107,6 +107,7 @@ editor_blockly = function () {
|
||||
MotaActionBlocks['input_s'].xmlText(),
|
||||
MotaActionBlocks['input2_s'].xmlText(),
|
||||
MotaActionBlocks['update_s'].xmlText(),
|
||||
MotaActionBlocks['moveAction_s'].xmlText(),
|
||||
MotaActionBlocks['moveHero_s'].xmlText(),
|
||||
MotaActionBlocks['jumpHero_s'].xmlText(),
|
||||
MotaActionBlocks['changeFloor_s'].xmlText(),
|
||||
|
||||
@ -503,8 +503,77 @@ editor_datapanel_wrapper = function (editor) {
|
||||
}
|
||||
}
|
||||
|
||||
editor.uifunctions.changeFloorSize_func = function () {
|
||||
var children = editor.dom.changeFloorSize.children;
|
||||
children[4].onclick = function () {
|
||||
var width = parseInt(children[0].value);
|
||||
var height = parseInt(children[1].value);
|
||||
var x = parseInt(children[2].value);
|
||||
var y = parseInt(children[3].value);
|
||||
if (!(width >= core.__SIZE__ && height >= core.__SIZE__ && x >=0 && y >=0)) {
|
||||
printe("参数错误!宽高不得小于"+core.__SIZE__+",偏移量不得小于0");
|
||||
return;
|
||||
}
|
||||
var currentFloorData = editor.currentFloorData;
|
||||
var currWidth = currentFloorData.width;
|
||||
var currHeight = currentFloorData.height;
|
||||
if (width < currWidth) x = -x;
|
||||
if (height < currHeight) y = -y;
|
||||
// Step 1:创建一个新的地图
|
||||
var newFloorData = core.clone(currentFloorData);
|
||||
newFloorData.width = width;
|
||||
newFloorData.height = height;
|
||||
|
||||
// Step 2:更新map, bgmap和fgmap
|
||||
["bgmap", "fgmap", "map"].forEach(function (name) {
|
||||
newFloorData[name] = [];
|
||||
if (currentFloorData[name] && currentFloorData[name].length > 0) {
|
||||
for (var j = 0; j < height; ++j) {
|
||||
newFloorData[name][j] = [];
|
||||
for (var i = 0; i < width; ++i) {
|
||||
var oi = i - x;
|
||||
var oj = j - y;
|
||||
if (oi >= 0 && oi < currWidth && oj >= 0 && oj < currHeight) {
|
||||
newFloorData[name][j].push(currentFloorData[name][oj][oi]);
|
||||
} else {
|
||||
newFloorData[name][j].push(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Step 3:更新所有坐标
|
||||
["events", "afterBattle", "afterGetItem", "afterOpenDoor", "changeFloor", "autoEvent", "cannotMove"].forEach(function (name) {
|
||||
newFloorData[name] = {};
|
||||
if (!currentFloorData[name]) return;
|
||||
for (var loc in currentFloorData[name]) {
|
||||
var oxy = loc.split(','), ox = parseInt(oxy[0]), oy = parseInt(oxy[1]);
|
||||
var nx = ox + x, ny = oy + y;
|
||||
if (nx >= 0 && nx < width && ny >= 0 && ny < height) {
|
||||
newFloorData[name][nx+","+ny] = core.clone(currentFloorData[name][loc]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Step 4:上楼点&下楼点
|
||||
["upFloor", "downFloor"].forEach(function (name) {
|
||||
if (newFloorData[name] && newFloorData[name].length == 2) {
|
||||
newFloorData[name][0]+=x;
|
||||
newFloorData[name][1]+=y;
|
||||
}
|
||||
});
|
||||
|
||||
editor.file.saveFloor(newFloorData, function (err) {
|
||||
if (err) {
|
||||
printe(err);
|
||||
throw(err)
|
||||
}
|
||||
;alert('地图更改大小成功,即将刷新地图...\n请检查所有点的事件是否存在问题。');
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -552,7 +621,7 @@ editor_datapanel_wrapper = function (editor) {
|
||||
|
||||
|
||||
editor.uifunctions.fixCtx_func = function () {
|
||||
[editor.dom.sourceCtx, editor.dom.spriteCtx].forEach(function (ctx) {
|
||||
[editor.dom.appendSourceCtx, editor.dom.appendSpriteCtx].forEach(function (ctx) {
|
||||
ctx.mozImageSmoothingEnabled = false;
|
||||
ctx.webkitImageSmoothingEnabled = false;
|
||||
ctx.msImageSmoothingEnabled = false;
|
||||
@ -575,10 +644,10 @@ editor_datapanel_wrapper = function (editor) {
|
||||
editor_mode.appendPic.imageName = 'autotile';
|
||||
for (var jj = 0; jj < 4; jj++) editor.dom.appendPicSelection.children[jj].style = 'display:none';
|
||||
if (editor_mode.appendPic.img) {
|
||||
editor.dom.sprite.style.width = (editor.dom.sprite.width = editor_mode.appendPic.img.width) / editor.uivalues.ratio + 'px';
|
||||
editor.dom.sprite.style.height = (editor.dom.sprite.height = editor_mode.appendPic.img.height) / editor.uivalues.ratio + 'px';
|
||||
editor.dom.spriteCtx.clearRect(0, 0, editor.dom.sprite.width, editor.dom.sprite.height);
|
||||
editor.dom.spriteCtx.drawImage(editor_mode.appendPic.img, 0, 0);
|
||||
editor.dom.appendSprite.style.width = (editor.dom.appendSprite.width = editor_mode.appendPic.img.width) / editor.uivalues.ratio + 'px';
|
||||
editor.dom.appendSprite.style.height = (editor.dom.appendSprite.height = editor_mode.appendPic.img.height) / editor.uivalues.ratio + 'px';
|
||||
editor.dom.appendSpriteCtx.clearRect(0, 0, editor.dom.appendSprite.width, editor.dom.appendSprite.height);
|
||||
editor.dom.appendSpriteCtx.drawImage(editor_mode.appendPic.img, 0, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -599,9 +668,9 @@ editor_datapanel_wrapper = function (editor) {
|
||||
for (var jj = num; jj < 4; jj++) {
|
||||
editor.dom.appendPicSelection.children[jj].style = 'display:none';
|
||||
}
|
||||
editor.dom.sprite.style.width = (editor.dom.sprite.width = img.width) / editor.uivalues.ratio + 'px';
|
||||
editor.dom.sprite.style.height = (editor.dom.sprite.height = img.height + ysize) / editor.uivalues.ratio + 'px';
|
||||
editor.dom.spriteCtx.drawImage(img, 0, 0);
|
||||
editor.dom.appendSprite.style.width = (editor.dom.appendSprite.width = img.width) / editor.uivalues.ratio + 'px';
|
||||
editor.dom.appendSprite.style.height = (editor.dom.appendSprite.height = img.height + ysize) / editor.uivalues.ratio + 'px';
|
||||
editor.dom.appendSpriteCtx.drawImage(img, 0, 0);
|
||||
}
|
||||
editor.dom.selectAppend.onchange();
|
||||
}
|
||||
@ -718,8 +787,8 @@ editor_datapanel_wrapper = function (editor) {
|
||||
newsprite.style.width = (newsprite.width = image.width) / editor.uivalues.ratio + 'px';
|
||||
newsprite.style.height = (newsprite.height = image.height) / editor.uivalues.ratio + 'px';
|
||||
}
|
||||
editor.dom.spriteCtx.clearRect(0, 0, editor.dom.sprite.width, editor.dom.sprite.height);
|
||||
editor.dom.spriteCtx.drawImage(image, 0, 0);
|
||||
editor.dom.appendSpriteCtx.clearRect(0, 0, editor.dom.appendSprite.width, editor.dom.appendSprite.height);
|
||||
editor.dom.appendSpriteCtx.drawImage(image, 0, 0);
|
||||
}
|
||||
else {
|
||||
var ysize = editor.dom.selectAppend.value.endsWith('48') ? 48 : 32;
|
||||
@ -731,7 +800,7 @@ editor_datapanel_wrapper = function (editor) {
|
||||
}
|
||||
|
||||
//画灰白相间的格子
|
||||
var bgc = editor.dom.bgCtx;
|
||||
var bgc = editor.dom.appendBgCtx;
|
||||
var colorA = ["#f8f8f8", "#cccccc"];
|
||||
var colorIndex;
|
||||
var sratio = 4;
|
||||
@ -745,8 +814,8 @@ editor_datapanel_wrapper = function (editor) {
|
||||
}
|
||||
|
||||
//把导入的图片画出
|
||||
editor.dom.sourceCtx.drawImage(image, 0, 0);
|
||||
editor_mode.appendPic.sourceImageData = editor.dom.sourceCtx.getImageData(0, 0, image.width, image.height);
|
||||
editor.dom.appendSourceCtx.drawImage(image, 0, 0);
|
||||
editor_mode.appendPic.sourceImageData = editor.dom.appendSourceCtx.getImageData(0, 0, image.width, image.height);
|
||||
|
||||
//重置临时变量
|
||||
editor.dom.selectAppend.onchange();
|
||||
@ -782,8 +851,8 @@ editor_datapanel_wrapper = function (editor) {
|
||||
editor.util.setPixel(nimgData, x, y, convert(editor.util.getPixel(imgData, x, y), delta))
|
||||
}
|
||||
}
|
||||
editor.dom.sourceCtx.clearRect(0, 0, imgData.width, imgData.height);
|
||||
editor.dom.sourceCtx.putImageData(nimgData, 0, 0);
|
||||
editor.dom.appendSourceCtx.clearRect(0, 0, imgData.width, imgData.height);
|
||||
editor.dom.appendSourceCtx.putImageData(nimgData, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -808,7 +877,7 @@ editor_datapanel_wrapper = function (editor) {
|
||||
return pos;
|
||||
}
|
||||
|
||||
editor.dom.picClick.onclick = function (e) {
|
||||
editor.dom.appendPicClick.onclick = function (e) {
|
||||
var loc = eToLoc(e);
|
||||
var pos = locToPos(loc);
|
||||
//console.log(e,loc,pos);
|
||||
@ -838,12 +907,12 @@ editor_datapanel_wrapper = function (editor) {
|
||||
printe("不合法的Autotile图片!");
|
||||
return;
|
||||
}
|
||||
var imgData = editor.dom.sourceCtx.getImageData(0, 0, image.width, image.height);
|
||||
editor.dom.spriteCtx.putImageData(imgData, 0, 0);
|
||||
var imgbase64 = editor.dom.sprite.toDataURL().split(',')[1];
|
||||
var imgData = editor.dom.appendSourceCtx.getImageData(0, 0, image.width, image.height);
|
||||
editor.dom.appendSpriteCtx.putImageData(imgData, 0, 0);
|
||||
var imgbase64 = editor.dom.appendSprite.toDataURL().split(',')[1];
|
||||
|
||||
// Step 1: List文件名
|
||||
fs.readdir('./project/images', function (err, data) {
|
||||
fs.readdir('./project/autotiles', function (err, data) {
|
||||
if (err) {
|
||||
printe(err);
|
||||
throw (err);
|
||||
@ -857,7 +926,7 @@ editor_datapanel_wrapper = function (editor) {
|
||||
}
|
||||
|
||||
// Step 3: 写入文件
|
||||
fs.writeFile('./project/images/' + filename + ".png", imgbase64, 'base64', function (err, data) {
|
||||
fs.writeFile('./project/autotiles/' + filename + ".png", imgbase64, 'base64', function (err, data) {
|
||||
if (err) {
|
||||
printe(err);
|
||||
throw (err);
|
||||
@ -884,23 +953,23 @@ editor_datapanel_wrapper = function (editor) {
|
||||
|
||||
var ysize = editor.dom.selectAppend.value.endsWith('48') ? 48 : 32;
|
||||
for (var ii = 0, v; v = editor_mode.appendPic.selectPos[ii]; ii++) {
|
||||
// var imgData = editor.dom.sourceCtx.getImageData(v.x * 32, v.y * ysize, 32, ysize);
|
||||
// editor.dom.spriteCtx.putImageData(imgData, ii * 32, editor.dom.sprite.height - ysize);
|
||||
// editor.dom.spriteCtx.drawImage(editor_mode.appendPic.img, v.x * 32, v.y * ysize, 32, ysize, ii * 32, height, 32, ysize)
|
||||
// var imgData = editor.dom.appendSourceCtx.getImageData(v.x * 32, v.y * ysize, 32, ysize);
|
||||
// editor.dom.appendSpriteCtx.putImageData(imgData, ii * 32, editor.dom.appendSprite.height - ysize);
|
||||
// editor.dom.appendSpriteCtx.drawImage(editor_mode.appendPic.img, v.x * 32, v.y * ysize, 32, ysize, ii * 32, height, 32, ysize)
|
||||
|
||||
editor.dom.spriteCtx.drawImage(editor.dom.sourceCtx.canvas, v.x * 32, v.y * ysize, 32, ysize, 32 * ii, editor.dom.sprite.height - ysize, 32, ysize);
|
||||
editor.dom.appendSpriteCtx.drawImage(editor.dom.appendSourceCtx.canvas, v.x * 32, v.y * ysize, 32, ysize, 32 * ii, editor.dom.appendSprite.height - ysize, 32, ysize);
|
||||
}
|
||||
var dt = editor.dom.spriteCtx.getImageData(0, 0, editor.dom.sprite.width, editor.dom.sprite.height);
|
||||
var imgbase64 = editor.dom.sprite.toDataURL('image/png');
|
||||
var dt = editor.dom.appendSpriteCtx.getImageData(0, 0, editor.dom.appendSprite.width, editor.dom.appendSprite.height);
|
||||
var imgbase64 = editor.dom.appendSprite.toDataURL('image/png');
|
||||
var imgName = editor_mode.appendPic.imageName;
|
||||
fs.writeFile('./project/images/' + imgName + '.png', imgbase64.split(',')[1], 'base64', function (err, data) {
|
||||
fs.writeFile('./project/materials/' + imgName + '.png', imgbase64.split(',')[1], 'base64', function (err, data) {
|
||||
if (err) {
|
||||
printe(err);
|
||||
throw (err)
|
||||
}
|
||||
var currHeight = editor.dom.sprite.height;
|
||||
editor.dom.sprite.style.height = (editor.dom.sprite.height = (currHeight + ysize)) + "px";
|
||||
editor.dom.spriteCtx.putImageData(dt, 0, 0);
|
||||
var currHeight = editor.dom.appendSprite.height;
|
||||
editor.dom.appendSprite.style.height = (editor.dom.appendSprite.height = (currHeight + ysize)) + "px";
|
||||
editor.dom.appendSpriteCtx.putImageData(dt, 0, 0);
|
||||
core.material.images[imgName].src = imgbase64;
|
||||
editor.widthsX[imgName][3] = currHeight;
|
||||
if (appendRegister && appendRegister.checked) {
|
||||
@ -923,29 +992,29 @@ editor_datapanel_wrapper = function (editor) {
|
||||
if (value != 'enemys' && value != 'enemy48' && value != 'npcs' && value != 'npc48')
|
||||
return printe("只有怪物或NPC才能快速导入!");
|
||||
var ysize = value.endsWith('48') ? 48 : 32;
|
||||
if (editor.dom.sourceCtx.canvas.width != 128 || editor.dom.sourceCtx.canvas.height != 4 * ysize)
|
||||
if (editor.dom.appendSourceCtx.canvas.width != 128 || editor.dom.appendSourceCtx.canvas.height != 4 * ysize)
|
||||
return printe("只有 4*4 的素材图片才可以快速导入!");
|
||||
|
||||
var dt = editor.dom.spriteCtx.getImageData(0, 0, editor.dom.sprite.width, editor.dom.sprite.height);
|
||||
editor.dom.sprite.style.height = (editor.dom.sprite.height = (editor.dom.sprite.height + 3 * ysize)) + "px";
|
||||
editor.dom.spriteCtx.putImageData(dt, 0, 0);
|
||||
if (editor.dom.sprite.width == 64) { // 两帧
|
||||
editor.dom.spriteCtx.drawImage(editor.dom.sourceCtx.canvas, 32, 0, 64, 4 * ysize, 0, editor.dom.sprite.height - 4 * ysize, 64, 4 * ysize);
|
||||
var dt = editor.dom.appendSpriteCtx.getImageData(0, 0, editor.dom.appendSprite.width, editor.dom.appendSprite.height);
|
||||
editor.dom.appendSprite.style.height = (editor.dom.appendSprite.height = (editor.dom.appendSprite.height + 3 * ysize)) + "px";
|
||||
editor.dom.appendSpriteCtx.putImageData(dt, 0, 0);
|
||||
if (editor.dom.appendSprite.width == 64) { // 两帧
|
||||
editor.dom.appendSpriteCtx.drawImage(editor.dom.appendSourceCtx.canvas, 32, 0, 64, 4 * ysize, 0, editor.dom.appendSprite.height - 4 * ysize, 64, 4 * ysize);
|
||||
} else { // 四帧
|
||||
editor.dom.spriteCtx.drawImage(editor.dom.sourceCtx.canvas, 0, 0, 128, 4 * ysize, 0, editor.dom.sprite.height - 4 * ysize, 128, 4 * ysize);
|
||||
editor.dom.appendSpriteCtx.drawImage(editor.dom.appendSourceCtx.canvas, 0, 0, 128, 4 * ysize, 0, editor.dom.appendSprite.height - 4 * ysize, 128, 4 * ysize);
|
||||
}
|
||||
|
||||
dt = editor.dom.spriteCtx.getImageData(0, 0, editor.dom.sprite.width, editor.dom.sprite.height);
|
||||
var imgbase64 = editor.dom.sprite.toDataURL('image/png');
|
||||
dt = editor.dom.appendSpriteCtx.getImageData(0, 0, editor.dom.appendSprite.width, editor.dom.appendSprite.height);
|
||||
var imgbase64 = editor.dom.appendSprite.toDataURL('image/png');
|
||||
var imgName = editor_mode.appendPic.imageName;
|
||||
fs.writeFile('./project/images/' + imgName + '.png', imgbase64.split(',')[1], 'base64', function (err, data) {
|
||||
fs.writeFile('./project/materials/' + imgName + '.png', imgbase64.split(',')[1], 'base64', function (err, data) {
|
||||
if (err) {
|
||||
printe(err);
|
||||
throw (err)
|
||||
}
|
||||
var currHeight = editor.dom.sprite.height;
|
||||
editor.dom.sprite.style.height = (editor.dom.sprite.height = (currHeight + ysize)) + "px";
|
||||
editor.dom.spriteCtx.putImageData(dt, 0, 0);
|
||||
var currHeight = editor.dom.appendSprite.height;
|
||||
editor.dom.appendSprite.style.height = (editor.dom.appendSprite.height = (currHeight + ysize)) + "px";
|
||||
editor.dom.appendSpriteCtx.putImageData(dt, 0, 0);
|
||||
core.material.images[imgName].src = imgbase64;
|
||||
editor.widthsX[imgName][3] = currHeight;
|
||||
if (appendRegister && appendRegister.checked) {
|
||||
|
||||
@ -41,6 +41,7 @@ editor_listen_wrapper = function (editor) {
|
||||
editor.dom.brushMod.onchange = editor.uifunctions.brushMod_onchange
|
||||
if (editor.dom.brushMod2) editor.dom.brushMod2.onchange = editor.uifunctions.brushMod2_onchange;
|
||||
if (editor.dom.brushMod3) editor.dom.brushMod3.onchange = editor.uifunctions.brushMod3_onchange;
|
||||
if (editor.dom.brushMod4) editor.dom.brushMod4.onchange = editor.uifunctions.brushMod4_onchange;
|
||||
|
||||
editor.dom.layerMod.onchange = editor.uifunctions.layerMod_onchange
|
||||
if (editor.dom.layerMod2) editor.dom.layerMod2.onchange = editor.uifunctions.layerMod2_onchange;
|
||||
@ -148,6 +149,7 @@ editor_listen_wrapper = function (editor) {
|
||||
editor.uifunctions.createNewMaps_func()
|
||||
|
||||
editor.uifunctions.changeFloorId_func()
|
||||
editor.uifunctions.changeFloorSize_func()
|
||||
|
||||
editor.uifunctions.fixCtx_func()
|
||||
|
||||
|
||||
@ -247,6 +247,11 @@ editor_mappanel_wrapper = function (editor) {
|
||||
editor[editor.layerMod][editor.uivalues.stepPostfix[ii].y][editor.uivalues.stepPostfix[ii].x] = editor.ids[editor.indexs[idnum + editor.uivalues.stepPostfix[ii].x - x0]];
|
||||
}
|
||||
} else {
|
||||
// 检测是否是填充模式
|
||||
if (editor.uivalues.stepPostfix.length == 1 && editor.brushMod == 'fill') {
|
||||
editor.uivalues.stepPostfix = editor.uifunctions._fillMode_bfs(editor[editor.layerMod], editor.uivalues.stepPostfix[0].x, editor.uivalues.stepPostfix[0].y,
|
||||
editor[editor.layerMod][0].length, editor[editor.layerMod].length);
|
||||
}
|
||||
for (var ii = 0; ii < editor.uivalues.stepPostfix.length; ii++)
|
||||
editor[editor.layerMod][editor.uivalues.stepPostfix[ii].y][editor.uivalues.stepPostfix[ii].x] = editor.info;
|
||||
}
|
||||
@ -263,6 +268,32 @@ editor_mappanel_wrapper = function (editor) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* bfs找寻和某点相连的全部相同图块坐标
|
||||
*/
|
||||
editor.uifunctions._fillMode_bfs = function (array, x, y, maxWidth, maxHeight) {
|
||||
var _getNumber = function (x, y) {
|
||||
if (x<0 || y<0 || x>=maxWidth || y>=maxHeight) return null;
|
||||
return array[y][x].idnum || array[y][x] || 0;
|
||||
}
|
||||
var number = _getNumber(x, y) || 0;
|
||||
var visited = {}, result = [];
|
||||
var list = [{x:x, y:y}];
|
||||
while (list.length != 0) {
|
||||
var next = list.shift(), key = next.x+","+next.y;
|
||||
if (visited[key]) continue;
|
||||
visited[key] = true;
|
||||
result.push(next);
|
||||
[[-1,0],[1,0],[0,-1],[0,1]].forEach(function (dir) {
|
||||
var nx = next.x + dir[0], ny = next.y + dir[1];
|
||||
if (_getNumber(nx, ny) == number) {
|
||||
list.push({x: nx, y: ny});
|
||||
}
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* editor.dom.mid.onmousewheel
|
||||
* 在地图编辑区域滚轮切换楼层
|
||||
@ -586,6 +617,11 @@ editor_mappanel_wrapper = function (editor) {
|
||||
*/
|
||||
editor.uifunctions.brushMod_onchange = function () {
|
||||
editor.brushMod = editor.dom.brushMod.value;
|
||||
if (editor.brushMod == 'fill') {
|
||||
tip.isSelectedBlock(false);
|
||||
tip.msgs[11] = String('填充模式下,将会用选中的素材替换所有和目标点联通的相同素材');
|
||||
tip.whichShow(12);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -612,6 +648,13 @@ editor_mappanel_wrapper = function (editor) {
|
||||
editor.brushMod = editor.dom.brushMod3.value;
|
||||
}
|
||||
|
||||
editor.uifunctions.brushMod4_onchange = function () {
|
||||
tip.isSelectedBlock(false);
|
||||
tip.msgs[11] = String('填充模式下,将会用选中的素材替换所有和目标点联通的相同素材');
|
||||
tip.whichShow(12);
|
||||
editor.brushMod = editor.dom.brushMod4.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* editor.dom.layerMod.onchange
|
||||
* 切换编辑的层
|
||||
|
||||
@ -97,14 +97,14 @@ editor_mode = function (editor) {
|
||||
}
|
||||
|
||||
editor_mode.prototype.onmode = function (mode, callback) {
|
||||
setTimeout(function(){
|
||||
//setTimeout(function(){
|
||||
if (editor_mode.mode != mode) {
|
||||
if (mode === 'save') editor_mode.doActionList(editor_mode.mode, editor_mode.actionList, callback);
|
||||
if (editor_mode.mode === 'nextChange' && mode) editor_mode.showMode(mode);
|
||||
if (mode !== 'save') editor_mode.mode = mode;
|
||||
editor_mode.actionList = [];
|
||||
}
|
||||
})
|
||||
//})
|
||||
}
|
||||
|
||||
editor_mode.prototype.showMode = function (mode) {
|
||||
@ -169,9 +169,10 @@ editor_mode = function (editor) {
|
||||
return true
|
||||
}
|
||||
|
||||
editor_mode.prototype.checkImages = function (thiseval) {
|
||||
editor_mode.prototype.checkImages = function (thiseval, directory) {
|
||||
if (!directory) return true;
|
||||
if (!editor_mode.checkUnique(thiseval)) return false;
|
||||
fs.readdir('project/images', function (err, data) {
|
||||
fs.readdir(directory, function (err, data) {
|
||||
if (err) {
|
||||
printe(err);
|
||||
throw Error(err);
|
||||
|
||||
@ -202,7 +202,6 @@ editor_table_wrapper = function (editor) {
|
||||
// 当cobj的参数为函数时,代入args算出值
|
||||
for (var key in cobj) {
|
||||
if (key === '_data') continue;
|
||||
if (key === '_transform' || key == '_onconfirm') cobj[key] = cobj[key].toString();
|
||||
if (cobj[key] instanceof Function) cobj[key] = cobj[key](args);
|
||||
}
|
||||
pvobj[ii] = vobj = args.vobj;
|
||||
@ -363,7 +362,7 @@ editor_table_wrapper = function (editor) {
|
||||
var tokenstyle = document.createElement("style");
|
||||
document.body.appendChild(tokenstyle);
|
||||
|
||||
tokenPoolRender = function() {
|
||||
var tokenPoolRender = function() {
|
||||
var content = "";
|
||||
Object.keys(tokenPool).forEach(function(k) {
|
||||
content += /* CSS */`[data-field|=${k}]{ display: none }`;
|
||||
|
||||
@ -220,7 +220,7 @@ editor_ui_wrapper = function (editor) {
|
||||
var clickpath = editor.uifunctions.getClickpath(e);
|
||||
|
||||
var unselect = true;
|
||||
for (var ii = 0, thisId; thisId = ['edit', 'tip', 'brushMod', 'brushMod2', 'brushMod3', 'layerMod', 'layerMod2', 'layerMod3', 'viewportButtons'][ii]; ii++) {
|
||||
for (var ii = 0, thisId; thisId = ['edit', 'tip', 'brushMod', 'brushMod2', 'brushMod3', 'brushMode4', 'layerMod', 'layerMod2', 'layerMod3', 'viewportButtons'][ii]; ii++) {
|
||||
if (clickpath.indexOf(thisId) !== -1) {
|
||||
unselect = false;
|
||||
break;
|
||||
@ -781,21 +781,62 @@ editor_ui_wrapper = function (editor) {
|
||||
|
||||
// 显示每一项内容
|
||||
var html = "<p style='margin-left: 10px; line-height: 25px'>";
|
||||
html += "<button onclick='editor.uievent._selectAll(true)'>全选</button><button style='margin-left: 10px' onclick='editor.uievent._selectAll(false)'>全不选</button><br/>";
|
||||
html += "<button onclick='editor.uievent._selectAllMaterial(true)'>全选</button>"+
|
||||
"<button style='margin-left: 10px' onclick='editor.uievent._selectAllMaterial(false)'>全不选</button><br/>";
|
||||
data.forEach(function (one) {
|
||||
html += `<input type="checkbox" key="${one}" class="materialCheckbox" ${value.indexOf(one) >= 0? 'checked' : ''} /> ${one}<br/>`;
|
||||
html += `<input type="checkbox" key="${one}" class="materialCheckbox" ${value.indexOf(one) >= 0? 'checked' : ''} /> ${one}`;
|
||||
// 预览图片
|
||||
if (one.endsWith('.png') || one.endsWith('.jpg') || one.endsWith('.jpeg') || one.endsWith('.gif')) {
|
||||
html += "<button onclick='editor.uievent._previewMaterialImage(this)' style='margin-left: 10px'>预览</button>";
|
||||
html += '<br style="display:none"/><img key="'+directory+one+'" style="display:none; max-width: 100%"/>';
|
||||
}
|
||||
// 试听音频
|
||||
if (one.endsWith('.mp3') || one.endsWith('.wmv') || one.endsWith('.ogg') || one.endsWith('.wav')) {
|
||||
html += "<button onclick='editor.uievent._previewMaterialAudio(this)' style='margin-left: 10px'>试听</button>";
|
||||
html += '<br style="display:none"/><audio controls preload="none" src="'+directory+one+'" style="display:none; max-width: 100%"></audio>';
|
||||
}
|
||||
html += '<br/>';
|
||||
});
|
||||
html += "</p>";
|
||||
uievent.elements.materialList.innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
uievent._selectAll = function (checked) {
|
||||
uievent._selectAllMaterial = function (checked) {
|
||||
Array.from(document.getElementsByClassName('materialCheckbox')).forEach(function (one) {
|
||||
one.checked = checked;
|
||||
})
|
||||
}
|
||||
|
||||
uievent._previewMaterialImage = function (button) {
|
||||
var br = button.nextElementSibling;
|
||||
var img = br.nextElementSibling;
|
||||
if (br.style.display == 'none') {
|
||||
button.innerText = '折叠';
|
||||
br.style.display = 'block';
|
||||
img.style.display = 'block';
|
||||
img.src = img.getAttribute('key');
|
||||
} else {
|
||||
button.innerText = '预览';
|
||||
br.style.display = 'none';
|
||||
img.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
uievent._previewMaterialAudio = function (button) {
|
||||
var br = button.nextElementSibling;
|
||||
var audio = br.nextElementSibling;
|
||||
if (br.style.display == 'none') {
|
||||
button.innerText = '折叠';
|
||||
br.style.display = 'block';
|
||||
audio.style.display = 'block';
|
||||
} else {
|
||||
button.innerText = '试听';
|
||||
br.style.display = 'none';
|
||||
audio.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
editor.constructor.prototype.uievent=uievent;
|
||||
|
||||
}
|
||||
@ -251,7 +251,8 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_range": "false",
|
||||
"_data": "图块ID"
|
||||
"_docs": "图块ID",
|
||||
"_data": "图块唯一ID,可在页面底部修改"
|
||||
},
|
||||
"idnum": {
|
||||
"_leaf": true,
|
||||
@ -361,7 +362,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_type": "textarea",
|
||||
"_range": "false",
|
||||
"_docs": "楼层ID",
|
||||
"_data": "文件名和floorId需要保持完全一致 \n楼层唯一标识符仅能由字母、数字、下划线组成,且不能由数字开头 \n推荐用法:第20层就用MT20,第38层就用MT38,地下6层就用MT_6(用下划线代替负号),隐藏3层用MT3h(h表示隐藏),等等 \n楼层唯一标识符,需要和名字完全一致 \n这里不能更改floorId,请通过另存为来实现"
|
||||
"_data": "文件名和floorId需要保持完全一致,可在页面底部修改 \n楼层唯一标识符仅能由字母、数字、下划线组成,且不能由数字开头 \n推荐用法:第20层就用MT20,第38层就用MT38,地下6层就用MT_6(用下划线代替负号),隐藏3层用MT3h(h表示隐藏),等等"
|
||||
},
|
||||
"title": {
|
||||
"_leaf": true,
|
||||
@ -380,14 +381,14 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_type": "textarea",
|
||||
"_range": "false",
|
||||
"_docs": "宽度",
|
||||
"_data": "地图x方向大小,这里不能更改,仅能在新建地图时设置,null视为13"
|
||||
"_data": "地图x方向大小,请在表格最下方修改,null视为13"
|
||||
},
|
||||
"height": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_range": "false",
|
||||
"_docs": "高度",
|
||||
"_data": "地图y方向大小,这里不能更改,仅能在新建地图时设置,null视为13"
|
||||
"_data": "地图y方向大小,请在表格最下方修改,null视为13"
|
||||
},
|
||||
"canFlyTo": {
|
||||
"_leaf": true,
|
||||
|
||||
@ -20,27 +20,27 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"images": {
|
||||
"_leaf": true,
|
||||
"_type": "material",
|
||||
"_range": "editor.mode.checkImages(thiseval)",
|
||||
"_range": "editor.mode.checkImages(thiseval, './project/images/')",
|
||||
"_directory": "./project/images/",
|
||||
"_transform": function (one) {
|
||||
"_transform": (function (one) {
|
||||
if (one.endsWith('.png') || one.endsWith('.jpg') || one.endsWith('.jpeg') || end.endsWith('.gif'))
|
||||
return one;
|
||||
return null;
|
||||
},
|
||||
}).toString(),
|
||||
"_docs": "本塔使用图片",
|
||||
"_data": "在此存放所有可能使用的图片(tilesets除外) \n图片可以被作为背景图(的一部分),也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加",
|
||||
},
|
||||
"tilesets": {
|
||||
"_leaf": true,
|
||||
"_type": "material",
|
||||
"_range": "editor.mode.checkImages(thiseval)",
|
||||
"_directory": "./project/images/",
|
||||
"_transform": function (one) {
|
||||
"_range": "editor.mode.checkImages(thiseval, './project/tilesets/')",
|
||||
"_directory": "./project/tilesets/",
|
||||
"_transform": (function (one) {
|
||||
if (one.endsWith('.png'))
|
||||
return one;
|
||||
return null;
|
||||
},
|
||||
"_onconfirm": function (previous, current) {
|
||||
}).toString(),
|
||||
"_onconfirm": (function (previous, current) {
|
||||
// 额外素材是有序的,因此根据之前的内容进行排序,然后在之后追加新的
|
||||
previous = previous || [];
|
||||
return current.sort(function (a, b) {
|
||||
@ -49,7 +49,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
if (i >= 0 && j >= 0) return i - j;
|
||||
return j >= 0 ? 1 : -1;
|
||||
});
|
||||
},
|
||||
}).toString(),
|
||||
"_docs": "本塔额外素材",
|
||||
"_data": "在此存放额外素材的图片名, \n可以自定导入任意张素材图片,无需PS,无需注册,即可直接在游戏中使用 \n 形式如[\"1.png\", \"2.png\"] ,将需要的素材图片放在images目录下 \n 素材的宽高必须都是32的倍数,且图片上的总图块数不超过1000(即最多有1000个32*32的图块在该图片上)"
|
||||
},
|
||||
@ -58,10 +58,10 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_type": "material",
|
||||
"_range": "editor.mode.checkUnique(thiseval)",
|
||||
"_directory": "./project/animates/",
|
||||
"_transform": function (one) {
|
||||
"_transform": (function (one) {
|
||||
if (one.endsWith(".animate")) return one.substring(0, one.lastIndexOf('.'));
|
||||
return null;
|
||||
},
|
||||
}).toString(),
|
||||
"_docs": "本塔使用动画",
|
||||
"_data": "在此存放所有可能使用的动画,必须是animate格式,在这里不写后缀名 \n动画必须放在animates目录下;文件名不能使用中文,不能带空格或特殊字符 \n \"jianji\", \"thunder\" 根据需求自行添加"
|
||||
},
|
||||
@ -69,12 +69,12 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_leaf": true,
|
||||
"_type": "material",
|
||||
"_range": "editor.mode.checkUnique(thiseval)",
|
||||
"_directory": "./project/sounds/",
|
||||
"_transform": function (one) {
|
||||
"_directory": "./project/bgms/",
|
||||
"_transform": (function (one) {
|
||||
if (one.endsWith('.mp3') || one.endsWith('.wmv') || one.endsWith('.ogg') || end.endsWith('.wav'))
|
||||
return one;
|
||||
return null;
|
||||
},
|
||||
}).toString(),
|
||||
"_docs": "本塔使用音乐",
|
||||
"_data": "在此存放所有的bgm,和文件名一致。 \n音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好"
|
||||
},
|
||||
@ -83,11 +83,11 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_type": "material",
|
||||
"_range": "editor.mode.checkUnique(thiseval)",
|
||||
"_directory": "./project/sounds/",
|
||||
"_transform": function (one) {
|
||||
"_transform": (function (one) {
|
||||
if (one.endsWith('.mp3') || one.endsWith('.wmv') || one.endsWith('.ogg') || end.endsWith('.wav'))
|
||||
return one;
|
||||
return null;
|
||||
},
|
||||
}).toString(),
|
||||
"_docs": "本塔使用音效",
|
||||
"_data": "在此存放所有的SE,和文件名一致 \n音频名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好"
|
||||
},
|
||||
@ -248,7 +248,9 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_leaf": true,
|
||||
"_type": "select",
|
||||
"_select": {
|
||||
"values": [null].concat(Object.keys(editor.core.material.images))
|
||||
"values": [null].concat(Object.keys(editor.core.material.images.images).filter(function (name) {
|
||||
return name.endsWith('.png');
|
||||
}))
|
||||
},
|
||||
"_data": "勇士行走图"
|
||||
},
|
||||
@ -267,7 +269,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"hpmax": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_data": "初始上限"
|
||||
"_data": "生命上限"
|
||||
},
|
||||
"hp": {
|
||||
"_leaf": true,
|
||||
@ -513,7 +515,14 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_type": "textarea",
|
||||
"_docs": "全局动画时间",
|
||||
"_data": "全局动画时间,即怪物振动频率,一般300比较合适"
|
||||
}
|
||||
},
|
||||
"statusCanvasRowsOnMobile": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_range": "thiseval==null || (thiseval>0 && thiseval<=4)",
|
||||
"_docs": "竖屏自绘行数",
|
||||
"_data": "竖屏模式下,顶端状态栏canvas化后的行数。\n此项将决定竖屏的状态栏高度,如果设置则不小于1且不大于4。\n仅在statusCanvas开启时才有效"
|
||||
},
|
||||
}
|
||||
},
|
||||
"flags": {
|
||||
@ -638,13 +647,6 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_docs": "自绘状态栏",
|
||||
"_data": "是否状态栏canvas化,即手动自定义绘制状态栏。\n如果此项开启,则可在脚本编辑的drawStatusBar中自定义绘制菜单栏。"
|
||||
},
|
||||
"statusCanvasRowsOnMobile": {
|
||||
"_leaf": true,
|
||||
"_type": "textarea",
|
||||
"_range": "thiseval==null || (thiseval>0 && thiseval<=4)",
|
||||
"_docs": "竖屏自绘行数",
|
||||
"_data": "竖屏模式下,顶端状态栏canvas化后的行数。\n此项将决定竖屏的状态栏高度,如果设置则不小于1且不大于4。\n仅在statusCanvas开启时才有效"
|
||||
},
|
||||
"displayEnemyDamage": {
|
||||
"_leaf": true,
|
||||
"_type": "checkbox",
|
||||
|
||||
@ -25,13 +25,6 @@ var events_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_event": "commonEvent",
|
||||
"_data": "毒衰咒处理"
|
||||
},
|
||||
"滑冰事件": {
|
||||
"_leaf": true,
|
||||
"_type": "event",
|
||||
"_range": "thiseval instanceof Array",
|
||||
"_event": "commonEvent",
|
||||
"_data": "滑冰事件"
|
||||
},
|
||||
}
|
||||
if (obj[key]) return obj[key];
|
||||
return {
|
||||
|
||||
1
_server/thirdparty/awesomplete.css
vendored
@ -101,4 +101,3 @@
|
||||
background: hsl(86, 100%, 21%);
|
||||
color: inherit;
|
||||
}
|
||||
/*# sourceMappingURL=awesomplete.css.map */
|
||||
1
_server/thirdparty/awesomplete.min.js
vendored
@ -173,6 +173,11 @@
|
||||
<input placeholder="修改floorId为"/>
|
||||
<button>save</button>
|
||||
</div>
|
||||
<div id='changeFloorSize' style="font-size: 13px;">
|
||||
修改地图大小:宽<input style="width: 25px;" value="13" />,高<input style="width: 25px;" value="13" />,
|
||||
偏移x<input style="width: 25px;" value="0" /> y<input style="width: 25px;" value="0" />
|
||||
<button>save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="left5" class='leftTab' style="z-index:-1;opacity: 0;"><!-- tower -->
|
||||
@ -379,6 +384,7 @@
|
||||
<option value="line">画线</option>
|
||||
<option value="rectangle">画矩形</option>
|
||||
<option value="tileset">tileset贴图</option>
|
||||
<option value="fill">填充模式</option>
|
||||
</select>
|
||||
<select id="layerMod" style="float:left;margin-right:3px">
|
||||
<option value="bgmap">背景层</option>
|
||||
|
||||
11
editor.html
@ -169,6 +169,11 @@
|
||||
<input placeholder="修改floorId为"/>
|
||||
<button>save</button>
|
||||
</div>
|
||||
<div id='changeFloorSize' style="font-size: 13px;">
|
||||
修改地图大小:宽<input style="width: 25px;" value="13" />,高<input style="width: 25px;" value="13" />,
|
||||
偏移x<input style="width: 25px;" value="0" /> y<input style="width: 25px;" value="0" />
|
||||
<button>save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="left5" class='leftTab' style="z-index:-1;opacity: 0;"><!-- tower -->
|
||||
@ -336,9 +341,11 @@
|
||||
<span style="font-size: 12px"><input type="checkbox" id="lockMode"/>锁定模式</span>
|
||||
<br/>
|
||||
<span style="font-size: 12px;">
|
||||
<input type="radio" id="brushMod" name="brushMod" value="line" checked="checked" />画线
|
||||
<input type="radio" id="brushMod2" name="brushMod" value="rectangle" />画矩形
|
||||
<input type="radio" id="brushMod" name="brushMod" value="line" checked="checked" />线
|
||||
<input type="radio" id="brushMod2" name="brushMod" value="rectangle" />矩形
|
||||
<input type="radio" id="brushMod3" name="brushMod" value="tileset" />tileset贴图
|
||||
<input type="radio" id="brushMod4" name="brushMod" value="fill" />填充
|
||||
|
||||
</span>
|
||||
<br/>
|
||||
<span style="font-size: 12px">
|
||||
|
||||
@ -584,7 +584,6 @@ control.prototype.setAutoHeroMove = function (steps) {
|
||||
control.prototype.setHeroMoveInterval = function (callback) {
|
||||
if (core.status.heroMoving > 0) return;
|
||||
if (core.status.replay.speed == 24) {
|
||||
core.moveOneStep(core.nextX(), core.nextY());
|
||||
if (callback) callback();
|
||||
return;
|
||||
}
|
||||
@ -601,15 +600,14 @@ control.prototype.setHeroMoveInterval = function (callback) {
|
||||
if (core.status.heroMoving>=8) {
|
||||
clearInterval(core.interval.heroMoveInterval);
|
||||
core.status.heroMoving = 0;
|
||||
core.moveOneStep(core.nextX(), core.nextY());
|
||||
if (callback) callback();
|
||||
}
|
||||
}, core.values.moveSpeed / 8 * toAdd / core.status.replay.speed);
|
||||
}
|
||||
|
||||
////// 每移动一格后执行的事件 //////
|
||||
control.prototype.moveOneStep = function(x, y) {
|
||||
return this.controldata.moveOneStep(x, y);
|
||||
control.prototype.moveOneStep = function (callback) {
|
||||
return this.controldata.moveOneStep(callback);
|
||||
}
|
||||
|
||||
////// 实际每一步的行走过程 //////
|
||||
@ -625,7 +623,7 @@ control.prototype._moveAction_noPass = function (canMove, callback) {
|
||||
core.status.route.push(core.getHeroLoc('direction'));
|
||||
core.status.automaticRoute.moveStepBeforeStop = [];
|
||||
core.status.automaticRoute.lastDirection = core.getHeroLoc('direction');
|
||||
if (canMove) core.events._trigger(core.nextX(), core.nextY());
|
||||
if (canMove) core.trigger(core.nextX(), core.nextY());
|
||||
core.drawHero();
|
||||
|
||||
if (core.status.automaticRoute.moveStepBeforeStop.length==0) {
|
||||
@ -637,31 +635,14 @@ control.prototype._moveAction_noPass = function (canMove, callback) {
|
||||
|
||||
control.prototype._moveAction_moving = function (callback) {
|
||||
core.setHeroMoveInterval(function () {
|
||||
core.setHeroLoc('x', core.nextX(), true);
|
||||
core.setHeroLoc('y', core.nextY(), true);
|
||||
|
||||
var direction = core.getHeroLoc('direction');
|
||||
core.control._moveAction_popAutomaticRoute();
|
||||
core.status.route.push(direction);
|
||||
|
||||
// 无事件的道具(如血瓶)需要优先于阻激夹域判定
|
||||
var nowx = core.getHeroLoc('x'), nowy = core.getHeroLoc('y');
|
||||
var block = core.getBlock(nowx,nowy);
|
||||
var hasTrigger = false;
|
||||
if (block!=null && block.block.event.trigger=='getItem' &&
|
||||
!core.floors[core.status.floorId].afterGetItem[nowx+","+nowy]) {
|
||||
hasTrigger = true;
|
||||
core.events._trigger(nowx, nowy);
|
||||
}
|
||||
// 执行该点的阻激夹域事件
|
||||
core.checkBlock();
|
||||
|
||||
// 执行该点事件
|
||||
if (!hasTrigger)
|
||||
core.events._trigger(nowx, nowy);
|
||||
|
||||
// 检查该点是否是滑冰
|
||||
if (core.onSki()) {
|
||||
core.insertAction("滑冰事件", null, null, null, true);
|
||||
}
|
||||
|
||||
|
||||
core.moveOneStep();
|
||||
if (callback) callback();
|
||||
});
|
||||
}
|
||||
@ -2671,7 +2652,7 @@ control.prototype.resize = function() {
|
||||
}
|
||||
|
||||
var statusDisplayArr = this._shouldDisplayStatus(), count = statusDisplayArr.length;
|
||||
var statusCanvas = core.flags.statusCanvas, statusCanvasRows = core.flags.statusCanvasRowsOnMobile || 3;
|
||||
var statusCanvas = core.flags.statusCanvas, statusCanvasRows = core.values.statusCanvasRowsOnMobile || 3;
|
||||
var col = statusCanvas ? statusCanvasRows : Math.ceil(count / 3);
|
||||
if (col > 4) {
|
||||
if (statusCanvas) alert("自绘状态栏的在竖屏下的行数应不超过4!");
|
||||
|
||||
@ -192,7 +192,7 @@ function core() {
|
||||
'equipName': main.equipName || [],
|
||||
"statusLeftBackground": main.statusLeftBackground || "url(project/materials/ground.png) repeat",
|
||||
"statusTopBackground": main.statusTopBackground || "url(project/materials/ground.png) repeat",
|
||||
"toolsBackground": main.toolsBackground || "url(project/images/materials.png) repeat",
|
||||
"toolsBackground": main.toolsBackground || "url(project/materials/ground.png) repeat",
|
||||
"borderColor": main.borderColor || "white",
|
||||
"statusBarColor": main.statusBarColor || "white",
|
||||
"hardLabelColor": main.hardLabelColor || "red",
|
||||
|
||||
124
libs/events.js
@ -300,16 +300,22 @@ events.prototype.doSystemEvent = function (type, data, callback) {
|
||||
}
|
||||
|
||||
////// 触发(x,y)点的事件 //////
|
||||
events.prototype._trigger = function (x, y) {
|
||||
if (core.status.gameOver) return;
|
||||
if (core.status.event.id == 'action') {
|
||||
core.insertAction({"type": "trigger", "loc": [x, y]}, x, y, null, true);
|
||||
events.prototype.trigger = function (x, y, callback) {
|
||||
var _executeCallback = function () {
|
||||
// 因为trigger之后还有可能触发其他同步脚本(比如阻激夹域检测)
|
||||
// 所以这里强制callback被异步触发
|
||||
if (callback) {
|
||||
setTimeout(callback, 1); // +1是为了录像检测系统
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (core.status.event.id) return;
|
||||
if (core.status.gameOver) return _executeCallback();
|
||||
if (core.status.event.id && core.status.event.id != 'action') return _executeCallback();
|
||||
|
||||
var inAction = core.status.event.id == 'action';
|
||||
|
||||
var block = core.getBlock(x, y);
|
||||
if (block == null) return;
|
||||
if (block == null) return _executeCallback();
|
||||
block = block.block;
|
||||
|
||||
// 执行该点的脚本
|
||||
@ -322,11 +328,24 @@ events.prototype._trigger = function (x, y) {
|
||||
if (noPass) core.clearAutomaticRouteNode(x, y);
|
||||
|
||||
// 转换楼层能否穿透
|
||||
if (trigger == 'changeFloor' && !noPass && this._trigger_ignoreChangeFloor(block))
|
||||
if (!inAction && trigger == 'changeFloor' && !noPass && this._trigger_ignoreChangeFloor(block))
|
||||
return;
|
||||
core.status.automaticRoute.moveDirectly = false;
|
||||
this.doSystemEvent(trigger, block);
|
||||
if (inAction) {
|
||||
// 切换事件点的坐标
|
||||
this.setEvents(null, block.x, block.y);
|
||||
if (block.event.trigger == 'action') {
|
||||
this.insertAction(block.event.data);
|
||||
}
|
||||
else {
|
||||
this.doSystemEvent(block.event.trigger, block, _executeCallback);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.doSystemEvent(trigger, block);
|
||||
}
|
||||
}
|
||||
return _executeCallback();
|
||||
}
|
||||
|
||||
events.prototype._trigger_ignoreChangeFloor = function (block) {
|
||||
@ -370,7 +389,8 @@ events.prototype.battle = function (id, x, y, force, callback) {
|
||||
if (!this.beforeBattle(id, x, y))
|
||||
return core.clearContinueAutomaticRoute(callback);
|
||||
// 战后事件
|
||||
this.afterBattle(id, x, y, callback);
|
||||
this.afterBattle(id, x, y);
|
||||
if (callback) callback();
|
||||
}
|
||||
|
||||
////// 战斗前触发的事件 //////
|
||||
@ -379,8 +399,8 @@ events.prototype.beforeBattle = function (enemyId, x, y) {
|
||||
}
|
||||
|
||||
////// 战斗结束后触发的事件 //////
|
||||
events.prototype.afterBattle = function (enemyId, x, y, callback) {
|
||||
return this.eventdata.afterBattle(enemyId, x, y, callback);
|
||||
events.prototype.afterBattle = function (enemyId, x, y) {
|
||||
return this.eventdata.afterBattle(enemyId, x, y);
|
||||
}
|
||||
|
||||
events.prototype._sys_openDoor = function (data, callback) {
|
||||
@ -408,7 +428,7 @@ events.prototype.openDoor = function (x, y, needKey, callback) {
|
||||
setTimeout(function () {
|
||||
core.status.replay.animate = false;
|
||||
core.events.afterOpenDoor(id, x, y, callback);
|
||||
});
|
||||
}, 1); // +1是为了录像检测系统
|
||||
} else {
|
||||
this._openDoor_animate(id, x, y, callback);
|
||||
}
|
||||
@ -472,7 +492,8 @@ events.prototype._openDoor_animate = function (id, x, y, callback) {
|
||||
delete core.animateFrame.asyncId[animate];
|
||||
if (!locked) core.unLockControl();
|
||||
core.status.replay.animate = false;
|
||||
core.events.afterOpenDoor(id, x, y, callback);
|
||||
core.events.afterOpenDoor(id, x, y);
|
||||
if (callback) callback();
|
||||
return;
|
||||
}
|
||||
core.drawImage('event', core.material.images.animates, 32 * state, 32 * door, 32, 32, 32 * x, 32 * y, 32, 32);
|
||||
@ -481,8 +502,8 @@ events.prototype._openDoor_animate = function (id, x, y, callback) {
|
||||
}
|
||||
|
||||
////// 开一个门后触发的事件 //////
|
||||
events.prototype.afterOpenDoor = function (doorId, x, y, callback) {
|
||||
return this.eventdata.afterOpenDoor(doorId, x, y, callback);
|
||||
events.prototype.afterOpenDoor = function (doorId, x, y) {
|
||||
return this.eventdata.afterOpenDoor(doorId, x, y);
|
||||
}
|
||||
|
||||
events.prototype._sys_getItem = function (data, callback) {
|
||||
@ -519,11 +540,12 @@ events.prototype.getItem = function (id, num, x, y, isGentleClick, callback) {
|
||||
itemHint.push(id);
|
||||
}
|
||||
|
||||
this.afterGetItem(id, x, y, isGentleClick, callback);
|
||||
this.afterGetItem(id, x, y, isGentleClick);
|
||||
if (callback) callback();
|
||||
}
|
||||
|
||||
events.prototype.afterGetItem = function (id, x, y, isGentleClick, callback) {
|
||||
this.eventdata.afterGetItem(id, x, y, isGentleClick, callback);
|
||||
events.prototype.afterGetItem = function (id, x, y, isGentleClick) {
|
||||
this.eventdata.afterGetItem(id, x, y, isGentleClick);
|
||||
}
|
||||
|
||||
////// 获得面前的物品(轻按) //////
|
||||
@ -736,30 +758,17 @@ events.prototype.pushBox = function (data) {
|
||||
var nextId = core.getBlockId(nx, ny);
|
||||
if (nextId != null && nextId != 'flower') return;
|
||||
|
||||
core.setBlock(nextId == null ? 169 : 170, nx, ny);
|
||||
core.setBlock(nextId == null ? 'box' : 'boxed', nx, ny);
|
||||
|
||||
if (data.event.id == 'box')
|
||||
core.removeBlock(data.x, data.y);
|
||||
else
|
||||
core.setBlock(168, data.x, data.y);
|
||||
this._pushBox_moveHero(direction);
|
||||
}
|
||||
|
||||
events.prototype._pushBox_moveHero = function (direction) {
|
||||
core.status.replay.animate = true;
|
||||
core.lockControl();
|
||||
setTimeout(function () {
|
||||
core.moveHero(direction, function () {
|
||||
core.status.replay.animate = false;
|
||||
core.status.route.pop();
|
||||
core.events.afterPushBox();
|
||||
// 可能有阻击...
|
||||
if (core.status.event.id == null) {
|
||||
core.unLockControl();
|
||||
core.replay();
|
||||
}
|
||||
});
|
||||
});
|
||||
core.setBlock('flower', data.x, data.y);
|
||||
// 勇士前进一格,然后触发推箱子后事件
|
||||
core.insertAction([
|
||||
{"type": "moveAction"},
|
||||
{"type": "function", "function": "function() { core.afterPushBox(); }"}
|
||||
]);
|
||||
}
|
||||
|
||||
////// 推箱子后的事件 //////
|
||||
@ -768,7 +777,8 @@ events.prototype.afterPushBox = function () {
|
||||
}
|
||||
|
||||
events.prototype._sys_ski = function (data, callback) {
|
||||
core.insertAction(["V2.6后,请将滑冰放在背景层!"], data.x, data.y, callback);
|
||||
core.insertAction(["V2.6后,请将滑冰放在背景层!"], data.x, data.y);
|
||||
if (callback) callback();
|
||||
}
|
||||
|
||||
/// 当前是否在冰上
|
||||
@ -795,7 +805,8 @@ events.prototype._sys_action = function (data, callback) {
|
||||
|
||||
events.prototype._sys_custom = function (data, callback) {
|
||||
core.insertAction(["请使用\r[yellow]core.registerSystemEvent('custom', func)\r来处理自己添加的系统触发器!"],
|
||||
data.x, data.y, callback);
|
||||
data.x, data.y);
|
||||
if (callback) callback();
|
||||
}
|
||||
|
||||
// ------ 自定义事件的处理 ------ //
|
||||
@ -1341,6 +1352,26 @@ events.prototype._action_move = function (data, x, y, prefix) {
|
||||
this.__action_doAsyncFunc(data.async, core.moveBlock, loc[0], loc[1], data.steps, data.time, data.keep);
|
||||
}
|
||||
|
||||
events.prototype._action_moveAction = function (data, x, y, prefix) {
|
||||
// 检查下一个点是否可通行
|
||||
if (core.canMoveHero()) {
|
||||
var nx = core.nextX(), ny = core.nextY();
|
||||
// 检查noPass决定是撞击还是移动
|
||||
if (core.noPass(nx, ny)) {
|
||||
core.insertAction([
|
||||
{"type": "trigger", "loc": [nx, ny]}
|
||||
]);
|
||||
} else {
|
||||
// 先移动一格,然后尝试触发事件
|
||||
core.insertAction([
|
||||
{"type": "moveHero", "steps": ["forward"]},
|
||||
{"type": "function", "function": "function() { core.moveOneStep(core.doAction); }", "async": true},
|
||||
]);
|
||||
}
|
||||
}
|
||||
core.doAction();
|
||||
}
|
||||
|
||||
events.prototype._action_moveHero = function (data, x, y, prefix) {
|
||||
this.__action_doAsyncFunc(data.async, core.eventMoveHero, data.steps, data.time);
|
||||
}
|
||||
@ -1516,18 +1547,7 @@ events.prototype._action_battle = function (data, x, y, prefix) {
|
||||
|
||||
events.prototype._action_trigger = function (data, x, y, prefix) {
|
||||
var loc = this.__action_getLoc(data.loc, x, y, prefix);
|
||||
var block = core.getBlock(loc[0], loc[1]);
|
||||
if (block != null && block.block.event.trigger) {
|
||||
block = block.block;
|
||||
this.setEvents(data.keep ? null : [], block.x, block.y);
|
||||
if (block.event.trigger == 'action')
|
||||
this.insertAction(block.event.data);
|
||||
else {
|
||||
core.doSystemEvent(block.event.trigger, block, core.doAction);
|
||||
return;
|
||||
}
|
||||
}
|
||||
core.doAction();
|
||||
core.trigger(loc[0], loc[1], core.doAction);
|
||||
}
|
||||
|
||||
events.prototype._action_insert = function (data, x, y, prefix) {
|
||||
|
||||
2
main.js
@ -200,7 +200,7 @@ main.prototype.init = function (mode, callback) {
|
||||
var mainData = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main;
|
||||
for(var ii in mainData)main[ii]=mainData[ii];
|
||||
|
||||
main.dom.startBackground.src="project/images/"+main.startBackground;
|
||||
main.dom.startBackground.src = main.startBackground;
|
||||
main.dom.startLogo.style=main.startLogoStyle;
|
||||
main.dom.startButtonGroup.style = main.startButtonsStyle;
|
||||
main.levelChoose.forEach(function(value){
|
||||
|
||||
@ -40,7 +40,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"背景图.jpg": "bg.jpg",
|
||||
"背景音乐.mp3": "bgm.mp3"
|
||||
},
|
||||
"startBackground": "bg.jpg",
|
||||
"startBackground": "project/images/bg.jpg",
|
||||
"startLogoStyle": "color: black",
|
||||
"levelChoose": [
|
||||
[
|
||||
@ -65,7 +65,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"盾牌"
|
||||
],
|
||||
"startBgm": null,
|
||||
"statusLeftBackground": null,
|
||||
"statusLeftBackground": "url(project/materials/ground.png) repeat",
|
||||
"statusTopBackground": "url(project/materials/ground.png) repeat",
|
||||
"toolsBackground": "url(project/materials/ground.png) repeat",
|
||||
"borderColor": "#CCCCCC",
|
||||
@ -475,7 +475,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"counterAttack": 0.1,
|
||||
"purify": 3,
|
||||
"hatred": 2,
|
||||
"animateSpeed": 400
|
||||
"animateSpeed": 400,
|
||||
"statusCanvasRowsOnMobile": 3
|
||||
},
|
||||
"flags": {
|
||||
"statusBarItems": [
|
||||
@ -499,7 +500,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"startUsingCanvas": false,
|
||||
"startDirectly": false,
|
||||
"statusCanvas": false,
|
||||
"statusCanvasRowsOnMobile": 3,
|
||||
"displayEnemyDamage": true,
|
||||
"displayCritical": true,
|
||||
"displayExtraDamage": true,
|
||||
|
||||
@ -1,67 +1,88 @@
|
||||
var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
|
||||
{
|
||||
"greenSlime": {"name":"绿头怪","hp":100,"atk":120,"def":0,"money":1,"exp":1,"point":0,"special":[1,5,7,8]},
|
||||
"redSlime": {"name":"红头怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[16,18],"value":10},
|
||||
"blackSlime": {"name":"青头怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"slimelord": {"name":"怪王","hp":100,"atk":120,"def":0,"money":10,"exp":0,"point":0,"special":[1,9]},
|
||||
"bat": {"name":"小蝙蝠","hp":100,"atk":120,"def":0,"money":2,"exp":0,"point":0,"special":[1]},
|
||||
"bigBat": {"name":"大蝙蝠","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"redBat": {"name":"红蝙蝠","hp":100,"atk":120,"def":0,"money":5,"exp":0,"point":0,"special":[4]},
|
||||
"vampire": {"name":"冥灵魔王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"skeleton": {"name":"骷髅人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"skeletonSoilder": {"name":"骷髅士兵","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"skeletonCaptain": {"name":"骷髅队长","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"ghostSkeleton": {"name":"冥队长","hp":100,"atk":120,"def":0,"money":8,"exp":0,"point":0,"special":[7]},
|
||||
"zombie": {"name":"兽人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"zombieKnight": {"name":"兽人武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"rock": {"name":"石头人","hp":100,"atk":120,"def":0,"money":4,"exp":0,"point":0,"special":[3]},
|
||||
"slimeMan": {"name":"影子战士","hp":100,"atk":0,"def":0,"money":11,"exp":0,"point":0,"special":[10,21],"atkValue":2,"defValue":3},
|
||||
"bluePriest": {"name":"初级法师","hp":100,"atk":120,"def":0,"money":3,"exp":0,"point":1,"special":[2]},
|
||||
"redPriest": {"name":"高级法师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"brownWizard": {"name":"初级巫师","hp":100,"atk":120,"def":0,"money":16,"exp":0,"point":0,"special":[15],"value":100,"range":2},
|
||||
"redWizard": {"name":"高级巫师","hp":1000,"atk":1200,"def":0,"money":160,"exp":0,"point":0,"special":[15],"value":200,"zoneSquare":true},
|
||||
"yellowGuard": {"name":"初级卫兵","hp":100,"atk":120,"def":0,"money":10,"exp":0,"point":0,"special":[]},
|
||||
"blueGuard": {"name":"中级卫兵","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"redGuard": {"name":"高级卫兵","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"swordsman": {"name":"双手剑士","hp":100,"atk":120,"def":0,"money":6,"exp":0,"point":0,"special":[5,23]},
|
||||
"soldier": {"name":"冥战士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"yellowKnight": {"name":"金骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"redKnight": {"name":"红骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"darkKnight": {"name":"黑骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"blackKing": {"name":"黑衣魔王","hp":1000,"atk":500,"def":0,"money":1000,"exp":1000,"point":0,"special":[],"notBomb":true},
|
||||
"yellowKing": {"name":"黄衣魔王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"greenKing": {"name":"青衣武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"blueKnight": {"name":"蓝骑士","hp":100,"atk":120,"def":0,"money":9,"exp":0,"point":0,"special":[8]},
|
||||
"goldSlime": {"name":"黄头怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"poisonSkeleton": {"name":"紫骷髅","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"poisonBat": {"name":"紫蝙蝠","hp":100,"atk":120,"def":0,"money":14,"exp":0,"point":0,"special":[13]},
|
||||
"steelRock": {"name":"铁面人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"skeletonPriest": {"name":"骷髅法师","hp":100,"atk":100,"def":0,"money":0,"exp":0,"point":0,"special":[18,23],"value":20},
|
||||
"skeletonKing": {"name":"骷髅王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"skeletonWizard": {"name":"骷髅巫师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"redSkeletonCaption": {"name":"骷髅武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"badHero": {"name":"迷失勇者","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"demon": {"name":"魔神武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"demonPriest": {"name":"魔神法师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"goldHornSlime": {"name":"金角怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"redKing": {"name":"红衣魔王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"whiteKing": {"name":"白衣武士","hp":100,"atk":120,"def":0,"money":17,"exp":0,"point":0,"special":[16]},
|
||||
"blackMagician": {"name":"黑暗大法师","hp":100,"atk":120,"def":0,"money":12,"exp":0,"point":0,"special":[11],"value":0.3333333333333333,"add":true,"notBomb":true},
|
||||
"silverSlime": {"name":"银头怪","hp":100,"atk":120,"def":0,"money":15,"exp":0,"point":0,"special":[14]},
|
||||
"swordEmperor": {"name":"剑圣","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"whiteHornSlime": {"name":"尖角怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"badPrincess": {"name":"痛苦魔女","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"badFairy": {"name":"黑暗仙子","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"grayPriest": {"name":"中级法师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"redSwordsman": {"name":"剑王","hp":100,"atk":120,"def":0,"money":7,"exp":0,"point":0,"special":[6],"n":8},
|
||||
"whiteGhost": {"name":"水银战士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"poisonZombie": {"name":"绿兽人","hp":100,"atk":120,"def":0,"money":13,"exp":0,"point":0,"special":[12]},
|
||||
"magicDragon": {"name":"魔龙","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"octopus": {"name":"血影","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"darkFairy": {"name":"仙子","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"greenKnight": {"name":"强盾骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"angel": {"name":"天使","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"elemental": {"name":"元素生物","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
|
||||
"steelGuard": {"name":"铁守卫","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[18],"value":20},
|
||||
"evilBat": {"name":"邪恶蝙蝠","hp":1000,"atk":1,"def":0,"money":0,"exp":0,"point":0,"special":[2,3]}
|
||||
"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":[16,18],"value":10},
|
||||
"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]},
|
||||
"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},
|
||||
"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},
|
||||
"skeleton": {"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},
|
||||
"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},
|
||||
"rock": {"name":"石头人","hp":100,"atk":120,"def":0,"money":4,"experience":0,"point":0,"special":3},
|
||||
"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},
|
||||
"brownWizard": {"name":"初级巫师","hp":100,"atk":120,"def":0,"money":16,"experience":0,"point":0,"special":15,"value":100,"range":2},
|
||||
"redWizard": {"name":"高级巫师","hp":1000,"atk":1200,"def":0,"money":160,"experience":0,"point":0,"special":15,"value":200,"zoneSquare":true},
|
||||
"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},
|
||||
"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},
|
||||
"darkKnight": {"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},
|
||||
"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},
|
||||
"poisonBat": {"name":"紫蝙蝠","hp":100,"atk":120,"def":0,"money":14,"experience":0,"point":0,"special":13},
|
||||
"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},
|
||||
"evilHero": {"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},
|
||||
"silverSlime": {"name":"银头怪","hp":100,"atk":120,"def":0,"money":15,"experience":0,"point":0,"special":14},
|
||||
"whiteHornSlime": {"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},
|
||||
"poisonZombie": {"name":"绿兽人","hp":100,"atk":120,"def":0,"money":13,"experience":0,"point":0,"special":12},
|
||||
"octopus": {"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]},
|
||||
"frozenSkeleton": {"name":"冻死骨","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"silverSlimelord": {"name":"银怪王","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"goldSlimelord": {"name":"金怪王","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"skeletonWarrior": {"name":"骷髅士兵","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"ghostWarrior": {"name":"冥队长","hp":100,"atk":120,"def":0,"money":8,"experience":0,"point":0,"special":7},
|
||||
"whiteSlimeman": {"name":"水银战士","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"slimeman": {"name":"影子战士","hp":100,"atk":0,"def":0,"money":11,"experience":0,"point":0,"special":[10,21],"atkValue":2,"defValue":3},
|
||||
"yellowGT": {"name":"初级卫兵","hp":100,"atk":120,"def":0,"money":10,"experience":0,"point":0,"special":0},
|
||||
"blueGT": {"name":"中级卫兵","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"redGT": {"name":"高级卫兵","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"blackMS": {"name":"黑衣魔王","hp":1000,"atk":500,"def":0,"money":1000,"experience":1000,"point":0,"special":0,"notBomb":true},
|
||||
"yellowMS": {"name":"黄衣魔王","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"greenMS": {"name":"青衣武士","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"magicMaster": {"name":"黑暗大法师","hp":100,"atk":120,"def":0,"money":12,"experience":0,"point":0,"special":11,"value":0.3333333333333333,"add":true,"notBomb":true},
|
||||
"blueMS": {"name":"白衣武士","hp":100,"atk":120,"def":0,"money":17,"experience":0,"point":0,"special":16},
|
||||
"redMS": {"name":"红衣魔王","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"devilWarrior": {"name":"魔神武士","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"fairyEnemy": {"name":"仙子","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"dragon": {"name":"魔龙","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"skeletonKnight": {"name":"骷髅武士","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"skeletonPresbyter": {"name":"骷髅巫师","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"ironRock": {"name":"铁面人","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"grayRock": {"name":"灰色石头人","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"yellowPriest": {"name":"中级法师","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"evilPrincess": {"name":"痛苦魔女","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"blademaster": {"name":"剑圣","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"evilFairy": {"name":"黑暗仙子","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"blueRock": {"name":"鬼邪石","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"skeletonLite": {"name":"骷髅精英","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"blueSkeleton": {"name":"蓝骷髅","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"bowman": {"name":"弓兵","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"liteBowman": {"name":"精锐弓兵","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"crismonZombie": {"name":"红兽人","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"watcherSlime": {"name":"邪眼怪","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"mutantSlimeman": {"name":"变异战士","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"devilKnight": {"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},
|
||||
"greenGT": {"name":"卫兵队长","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"ghostSoldier": {"name":"冥队长","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"goldBat": {"name":"金蝙蝠","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"pinkSoldier": {"name":"红战士","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"pinkGhostSoldier": {"name":"红队长","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"greenSoldier": {"name":"青战士","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0},
|
||||
"greenGhostSoldier": {"name":"青队长","hp":0,"atk":0,"def":0,"money":0,"experience":0,"point":0,"special":0}
|
||||
}
|
||||
@ -156,91 +156,6 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
|
||||
]
|
||||
}
|
||||
],
|
||||
"滑冰事件": [
|
||||
{
|
||||
"type": "comment",
|
||||
"text": "公共事件:滑冰事件"
|
||||
},
|
||||
{
|
||||
"type": "if",
|
||||
"condition": "core.onSki()",
|
||||
"true": [
|
||||
{
|
||||
"type": "if",
|
||||
"condition": "core.canMoveHero()",
|
||||
"true": [
|
||||
{
|
||||
"type": "comment",
|
||||
"text": "检测下一个点是否可通行"
|
||||
},
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:nx",
|
||||
"value": "core.nextX()"
|
||||
},
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:ny",
|
||||
"value": "core.nextY()"
|
||||
},
|
||||
{
|
||||
"type": "if",
|
||||
"condition": "core.noPass(flag:nx, flag:ny)",
|
||||
"true": [
|
||||
{
|
||||
"type": "comment",
|
||||
"text": "不可通行,触发下一个点的事件"
|
||||
},
|
||||
{
|
||||
"type": "trigger",
|
||||
"loc": [
|
||||
"flag:nx",
|
||||
"flag:ny"
|
||||
]
|
||||
}
|
||||
],
|
||||
"false": [
|
||||
{
|
||||
"type": "comment",
|
||||
"text": "可通行,先移动到下个点,然后检查阻激夹域,并尝试触发该点事件"
|
||||
},
|
||||
{
|
||||
"type": "moveHero",
|
||||
"time": 80,
|
||||
"steps": [
|
||||
"forward"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": "function(){\ncore.checkBlock();\n}"
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"text": "【触发事件】如果该点存在事件则会立刻结束当前事件"
|
||||
},
|
||||
{
|
||||
"type": "trigger",
|
||||
"loc": [
|
||||
"flag:nx",
|
||||
"flag:ny"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"text": "如果该点不存在事件,则继续检测该点是否是滑冰点"
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": "function(){\ncore.insertAction(\"滑冰事件\",null,null,null,true)\n}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"回收钥匙商店": [
|
||||
{
|
||||
"type": "comment",
|
||||
|
||||
@ -117,7 +117,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]我的真名为——黑暗大法师,第四区域的头目。",
|
||||
"\t[magicMaster]我的真名为——黑暗大法师,第四区域的头目。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -127,7 +127,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]以杰克的名义利用了你这么久,真是抱歉啊。",
|
||||
"\t[magicMaster]以杰克的名义利用了你这么久,真是抱歉啊。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -137,7 +137,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]盗贼杰克这个人类从未存在过,他只是我用来接近你的一副皮囊而已。",
|
||||
"\t[magicMaster]盗贼杰克这个人类从未存在过,他只是我用来接近你的一副皮囊而已。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -147,7 +147,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]为什么你看上去丝毫不生气?",
|
||||
"\t[magicMaster]为什么你看上去丝毫不生气?",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -167,7 +167,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]能够如此淡定的面对背叛,看来跟五年前相比,你确实成长了很多啊。",
|
||||
"\t[magicMaster]能够如此淡定的面对背叛,看来跟五年前相比,你确实成长了很多啊。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -177,12 +177,12 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]五年前那场屠城你应该这一生都不会忘记吧。",
|
||||
"\t[magicMaster]五年前那场屠城你应该这一生都不会忘记吧。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]很不巧,那场屠城的主谋,也是我。",
|
||||
"\t[magicMaster]很不巧,那场屠城的主谋,也是我。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -197,7 +197,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]你的双亲?这种事情我怎么可能会记得?\n你难道在踩死蚂蚁的时候还会一只只记下他们的样子吗?",
|
||||
"\t[magicMaster]你的双亲?这种事情我怎么可能会记得?\n你难道在踩死蚂蚁的时候还会一只只记下他们的样子吗?",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -207,17 +207,17 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]你应该对我心怀感激才对,如果不是那时的我看出了你隐藏的稀有勇者体质,你绝对不可能活到今天。",
|
||||
"\t[magicMaster]你应该对我心怀感激才对,如果不是那时的我看出了你隐藏的稀有勇者体质,你绝对不可能活到今天。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]在暗中动手脚让你通过勇者选拔的人也是我,我一直一直在暗中引导你走到今天这一步。",
|
||||
"\t[magicMaster]在暗中动手脚让你通过勇者选拔的人也是我,我一直一直在暗中引导你走到今天这一步。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]是我救赎了一无是处的你。",
|
||||
"\t[magicMaster]是我救赎了一无是处的你。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -232,12 +232,12 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]我刚才不是说过了吗?因为我看出了你有稀有勇者体质啊。",
|
||||
"\t[magicMaster]我刚才不是说过了吗?因为我看出了你有稀有勇者体质啊。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]你刚刚跟鬼帝交过手,应该已经很清楚这稀有勇者体质意味着什么了吧?",
|
||||
"\t[magicMaster]你刚刚跟鬼帝交过手,应该已经很清楚这稀有勇者体质意味着什么了吧?",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -247,7 +247,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]愚蠢!这意味着只要我对你加以引导跟培养,你就能成为这世间实力最强的存在!",
|
||||
"\t[magicMaster]愚蠢!这意味着只要我对你加以引导跟培养,你就能成为这世间实力最强的存在!",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -257,7 +257,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]我利用你干的事情,你不是已经完成了吗?",
|
||||
"\t[magicMaster]我利用你干的事情,你不是已经完成了吗?",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -267,7 +267,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]不知不觉间,你已经在我的指引下跟鬼帝正面交手并且杀掉了他啊。",
|
||||
"\t[magicMaster]不知不觉间,你已经在我的指引下跟鬼帝正面交手并且杀掉了他啊。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -277,12 +277,12 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]你们两个一个是人类勇者,一个是魔物勇者,迟早会有交手的一天。",
|
||||
"\t[magicMaster]你们两个一个是人类勇者,一个是魔物勇者,迟早会有交手的一天。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]我只不过是操纵了一系列的连锁事件让这一天提早了数十年到来而已。",
|
||||
"\t[magicMaster]我只不过是操纵了一系列的连锁事件让这一天提早了数十年到来而已。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -292,22 +292,22 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]一个惧怕征战,爱好和平的懦夫,也配叫救世主?",
|
||||
"\t[magicMaster]一个惧怕征战,爱好和平的懦夫,也配叫救世主?",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]获得了力量,却只会被动挨打而不主动向人类世界出击,龟缩在第二区域惶惶度日,他根本就不配拥有稀有勇者体质。",
|
||||
"\t[magicMaster]获得了力量,却只会被动挨打而不主动向人类世界出击,龟缩在第二区域惶惶度日,他根本就不配拥有稀有勇者体质。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]为了不让这种人霸占着积累多年的庞大灵魂能量无作为,我设计让你杀掉了他。",
|
||||
"\t[magicMaster]为了不让这种人霸占着积累多年的庞大灵魂能量无作为,我设计让你杀掉了他。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]你没有辜负我的期待,成功战胜了那个废物,现在你体内累积的灵魂能量……也就是魔力,已经达到了能跟魔王匹敌的地步。",
|
||||
"\t[magicMaster]你没有辜负我的期待,成功战胜了那个废物,现在你体内累积的灵魂能量……也就是魔力,已经达到了能跟魔王匹敌的地步。",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -317,12 +317,12 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]不止如此,你现在的力量之强就算是统治世界也是绰绰有余!",
|
||||
"\t[magicMaster]不止如此,你现在的力量之强就算是统治世界也是绰绰有余!",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]怎么样?要不要加入我的麾下,跟随我去征战人类世界?",
|
||||
"\t[magicMaster]怎么样?要不要加入我的麾下,跟随我去征战人类世界?",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -337,12 +337,12 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]……什么?!",
|
||||
"\t[magicMaster]……什么?!",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]等一下!别冲动!你先等我把这利害关系理一理——",
|
||||
"\t[magicMaster]等一下!别冲动!你先等我把这利害关系理一理——",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -391,7 +391,7 @@ main.floors.sample3=
|
||||
"trigger": "action",
|
||||
"enable": false,
|
||||
"data": [
|
||||
"\t[blackMagician]听不进去人话的蠢货,就要用疼痛来管教!",
|
||||
"\t[magicMaster]听不进去人话的蠢货,就要用疼痛来管教!",
|
||||
{
|
||||
"type": "changePos",
|
||||
"direction": "up"
|
||||
@ -400,7 +400,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]出来吧!禁忌——紫电凶杀阵!",
|
||||
"\t[magicMaster]出来吧!禁忌——紫电凶杀阵!",
|
||||
{
|
||||
"type": "show",
|
||||
"loc": [
|
||||
@ -427,7 +427,7 @@ main.floors.sample3=
|
||||
"type": "sleep",
|
||||
"time": 500
|
||||
},
|
||||
"\t[blackMagician]感受绝望吧!冥顽不化的蠢货!",
|
||||
"\t[magicMaster]感受绝望吧!冥顽不化的蠢货!",
|
||||
{
|
||||
"type": "animate",
|
||||
"name": "yongchang",
|
||||
@ -482,12 +482,12 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]我的魔力可是充足的很啊!我会一直折磨到你屈服于我为止!",
|
||||
"\t[magicMaster]我的魔力可是充足的很啊!我会一直折磨到你屈服于我为止!",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]人类!好好感受吧!当初你们施加于我的痛苦!如今我要百倍奉还!",
|
||||
"\t[magicMaster]人类!好好感受吧!当初你们施加于我的痛苦!如今我要百倍奉还!",
|
||||
{
|
||||
"type": "show",
|
||||
"loc": [
|
||||
@ -590,7 +590,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]可恶…多管闲事的妖精族…明明只要再让他承受一点疼痛来瓦解他的意志力,我的计划就成功了!",
|
||||
"\t[magicMaster]可恶…多管闲事的妖精族…明明只要再让他承受一点疼痛来瓦解他的意志力,我的计划就成功了!",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -600,7 +600,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]不甘心!我不甘心!妖精公主又如何!\n只要是阻挡我的,不管是谁我都要铲除!",
|
||||
"\t[magicMaster]不甘心!我不甘心!妖精公主又如何!\n只要是阻挡我的,不管是谁我都要铲除!",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -610,12 +610,12 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]呵呵呵……那个昏庸的魔王,掌握着那么庞大的魔物军队却只知道固守魔塔,而不主动侵略人类世界扩张领土!",
|
||||
"\t[magicMaster]呵呵呵……那个昏庸的魔王,掌握着那么庞大的魔物军队却只知道固守魔塔,而不主动侵略人类世界扩张领土!",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]我实在是看不过眼,所以我才决定把这个具备稀有勇者体质的家伙培养成新一任魔王!\n来让这个世界的势力重新洗牌!",
|
||||
"\t[magicMaster]我实在是看不过眼,所以我才决定把这个具备稀有勇者体质的家伙培养成新一任魔王!\n来让这个世界的势力重新洗牌!",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -625,7 +625,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]恼人至极的妖精族!呵呵呵……我干脆一不做二不休,连你也一块收拾了吧!",
|
||||
"\t[magicMaster]恼人至极的妖精族!呵呵呵……我干脆一不做二不休,连你也一块收拾了吧!",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -635,7 +635,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]只会耍嘴皮子的恼人苍蝇!我倒要看看一块焦炭会不会说话!\n——招雷弹!!",
|
||||
"\t[magicMaster]只会耍嘴皮子的恼人苍蝇!我倒要看看一块焦炭会不会说话!\n——招雷弹!!",
|
||||
{
|
||||
"type": "animate",
|
||||
"name": "yongchang",
|
||||
@ -689,7 +689,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]哼!翅膀都被烧焦了还要嘴硬?你难不成真以为我不会对你动真格?",
|
||||
"\t[magicMaster]哼!翅膀都被烧焦了还要嘴硬?你难不成真以为我不会对你动真格?",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -719,7 +719,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]什么?!难不成你是想!!不可能……\n就为了一个渺小的人类,不可理喻!!",
|
||||
"\t[magicMaster]什么?!难不成你是想!!不可能……\n就为了一个渺小的人类,不可理喻!!",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -734,7 +734,7 @@ main.floors.sample3=
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
},
|
||||
"\t[blackMagician]不!!不应该是这样的!我完美的计划竟然会被一只小小的妖精破坏!",
|
||||
"\t[magicMaster]不!!不应该是这样的!我完美的计划竟然会被一只小小的妖精破坏!",
|
||||
{
|
||||
"type": "playSound",
|
||||
"name": "item.mp3"
|
||||
@ -773,7 +773,7 @@ main.floors.sample3=
|
||||
"type": "sleep",
|
||||
"time": 200
|
||||
},
|
||||
"\t[blackMagician]不可能!!!!!",
|
||||
"\t[magicMaster]不可能!!!!!",
|
||||
{
|
||||
"type": "hide",
|
||||
"loc": [
|
||||
@ -919,7 +919,7 @@ main.floors.sample3=
|
||||
},
|
||||
"afterBattle": {
|
||||
"6,4": [
|
||||
"\t[blackMagician]天真!你以为这样就能战胜我吗?",
|
||||
"\t[magicMaster]天真!你以为这样就能战胜我吗?",
|
||||
{
|
||||
"type": "show",
|
||||
"loc": [
|
||||
@ -933,7 +933,7 @@ main.floors.sample3=
|
||||
}
|
||||
],
|
||||
"7,5": [
|
||||
"\t[blackMagician]你打败的不过是我众多分身中的其中一个而已。",
|
||||
"\t[magicMaster]你打败的不过是我众多分身中的其中一个而已。",
|
||||
{
|
||||
"type": "show",
|
||||
"loc": [
|
||||
@ -947,7 +947,7 @@ main.floors.sample3=
|
||||
}
|
||||
],
|
||||
"5,4": [
|
||||
"\t[blackMagician]你的身体已经伤痕累累了,可我还留有着九成多的魔力。",
|
||||
"\t[magicMaster]你的身体已经伤痕累累了,可我还留有着九成多的魔力。",
|
||||
{
|
||||
"type": "show",
|
||||
"loc": [
|
||||
@ -961,7 +961,7 @@ main.floors.sample3=
|
||||
}
|
||||
],
|
||||
"5,5": [
|
||||
"\t[blackMagician]顽固的家伙!放弃抵抗吧!",
|
||||
"\t[magicMaster]顽固的家伙!放弃抵抗吧!",
|
||||
{
|
||||
"type": "show",
|
||||
"loc": [
|
||||
@ -975,7 +975,7 @@ main.floors.sample3=
|
||||
}
|
||||
],
|
||||
"7,4": [
|
||||
"\t[blackMagician]哈哈哈哈!我的灵魂远比你想象的强大!\n我即是永恒!",
|
||||
"\t[magicMaster]哈哈哈哈!我的灵魂远比你想象的强大!\n我即是永恒!",
|
||||
{
|
||||
"type": "show",
|
||||
"loc": [
|
||||
|
||||
@ -234,7 +234,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
|
||||
return true;
|
||||
},
|
||||
"afterBattle": function (enemyId, x, y, callback) {
|
||||
"afterBattle": function (enemyId, x, y) {
|
||||
// 战斗结束后触发的事件
|
||||
|
||||
var enemy = core.material.enemys[enemyId];
|
||||
@ -379,10 +379,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
else
|
||||
core.clearContinueAutomaticRoute();
|
||||
|
||||
if (callback) callback();
|
||||
|
||||
},
|
||||
"afterOpenDoor": function (doorId, x, y, callback) {
|
||||
"afterOpenDoor": function (doorId, x, y) {
|
||||
// 开一个门后触发的事件
|
||||
|
||||
var todo = [];
|
||||
@ -396,10 +394,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
core.continueAutomaticRoute();
|
||||
else
|
||||
core.clearContinueAutomaticRoute();
|
||||
|
||||
if (callback) callback();
|
||||
},
|
||||
"afterGetItem": function (itemId, x, y, isGentleClick, callback) {
|
||||
"afterGetItem": function (itemId, x, y, isGentleClick) {
|
||||
// 获得一个道具后触发的事件
|
||||
// itemId:获得的道具ID;x和y是该道具所在的坐标
|
||||
// isGentleClick:是否是轻按触发的
|
||||
@ -413,8 +409,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
}
|
||||
|
||||
if (todo.length > 0) core.insertAction(todo, x, y);
|
||||
|
||||
if (callback) callback();
|
||||
},
|
||||
"afterPushBox": function () {
|
||||
// 推箱子后的事件
|
||||
@ -1218,17 +1212,15 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
cache: {} // clear cache
|
||||
};
|
||||
},
|
||||
"moveOneStep": function (x, y) {
|
||||
// 勇士每走一步后执行的操作,x,y为要移动到的坐标。
|
||||
"moveOneStep": function (callback) {
|
||||
// 勇士每走一步后执行的操作。callback为行走完毕后的回调
|
||||
// 这个函数执行在“刚走完”的时候,即还没有检查该点的事件和领域伤害等。
|
||||
// 请注意:瞬间移动不会执行该函数。如果要控制能否瞬间移动有三种方法:
|
||||
// 1. 将全塔属性中的cannotMoveDirectly这个开关勾上,即可在全塔中全程禁止使用瞬移。
|
||||
// 2, 将楼层属性中的cannotMoveDirectly这个开关勾上,即禁止在该层楼使用瞬移。
|
||||
// 3. 将flag:cannotMoveDirectly置为true,即可使用flag控制在某段剧情范围内禁止瞬移。
|
||||
|
||||
// 设置当前坐标,增加步数
|
||||
core.setHeroLoc('x', x, true);
|
||||
core.setHeroLoc('y', y, true);
|
||||
// 增加步数
|
||||
core.status.hero.steps++;
|
||||
// 更新跟随者状态,并绘制
|
||||
core.updateFollowers();
|
||||
@ -1241,6 +1233,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
core.status.hero.hp = 0;
|
||||
core.updateStatusBar();
|
||||
core.events.lose();
|
||||
return;
|
||||
} else {
|
||||
core.updateStatusBar();
|
||||
}
|
||||
@ -1253,6 +1246,31 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
// 检查自动事件
|
||||
core.checkAutoEvents();
|
||||
|
||||
// ------ 检查目标点事件 ------ //
|
||||
// 无事件的道具(如血瓶)需要优先于阻激夹域判定
|
||||
var nowx = core.getHeroLoc('x'), nowy = core.getHeroLoc('y');
|
||||
var block = core.getBlock(nowx, nowy);
|
||||
var hasTrigger = false;
|
||||
if (block!=null && block.block.event.trigger=='getItem' &&
|
||||
!core.floors[core.status.floorId].afterGetItem[nowx+","+nowy]) {
|
||||
hasTrigger = true;
|
||||
core.trigger(nowx, nowy, callback);
|
||||
}
|
||||
// 执行目标点的阻激夹域事件
|
||||
core.checkBlock();
|
||||
|
||||
// 执行目标点的script和事件
|
||||
if (!hasTrigger)
|
||||
core.trigger(nowx, nowy, callback);
|
||||
|
||||
// 检查该点是否是滑冰
|
||||
if (core.onSki()) {
|
||||
// 延迟到事件最后执行,因为这之前可能有阻激夹域动画
|
||||
core.insertAction({"type": "moveAction"}, null, null, null, true);
|
||||
}
|
||||
|
||||
// ------ 检查目标点事件 END ------ //
|
||||
|
||||
// 如需强行终止行走可以在这里条件判定:
|
||||
// core.stopAutomaticRoute();
|
||||
},
|
||||
|
||||
110
project/icons.js
@ -93,7 +93,11 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
|
||||
"downPortal": 23,
|
||||
"leftPortal": 24,
|
||||
"rightPortal": 25,
|
||||
"upPortal": 26
|
||||
"upPortal": 26,
|
||||
"steelDoor2": 27,
|
||||
"steelDoor3": 28,
|
||||
"iceDoor": 29,
|
||||
"iceDoor2": 30
|
||||
},
|
||||
"npcs": {
|
||||
"man": 0,
|
||||
@ -108,22 +112,24 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
|
||||
"pinkShop": 9,
|
||||
"blueShop": 10,
|
||||
"princess": 11,
|
||||
"wlt": 12,
|
||||
"wt": 13,
|
||||
"wrt": 14,
|
||||
"wl": 15,
|
||||
"wc": 16,
|
||||
"wr": 17,
|
||||
"wlb": 18,
|
||||
"wrb": 19,
|
||||
"dlt": 20,
|
||||
"dt": 21,
|
||||
"drt": 22,
|
||||
"dl": 23,
|
||||
"dc": 24,
|
||||
"dr": 25,
|
||||
"dlb": 26,
|
||||
"drb": 27
|
||||
"man2": 28,
|
||||
"woman2": 29,
|
||||
"octopusLeftTop": 12,
|
||||
"octopusTop": 13,
|
||||
"octopusRightTop": 14,
|
||||
"octopusLeft": 15,
|
||||
"octopusCenter": 16,
|
||||
"octopusRight": 17,
|
||||
"octopusLeftBottom": 18,
|
||||
"octopusRightBottom": 19,
|
||||
"dragonLeftTop": 20,
|
||||
"dragonTop": 21,
|
||||
"dragonRightTop": 22,
|
||||
"dragonLeft": 23,
|
||||
"dragonCenter": 24,
|
||||
"dragonRight": 25,
|
||||
"dragonLeftBottom": 26,
|
||||
"dragonRightBottom": 27
|
||||
},
|
||||
"npc48": {
|
||||
"npc0": 0,
|
||||
@ -141,57 +147,77 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
|
||||
"redBat": 6,
|
||||
"vampire": 7,
|
||||
"skeleton": 8,
|
||||
"skeletonSoilder": 9,
|
||||
"skeletonCaptain": 10,
|
||||
"ghostSkeleton": 11,
|
||||
"zombie": 12,
|
||||
"zombieKnight": 13,
|
||||
"rock": 14,
|
||||
"slimeMan": 15,
|
||||
"bluePriest": 16,
|
||||
"redPriest": 17,
|
||||
"brownWizard": 18,
|
||||
"redWizard": 19,
|
||||
"yellowGuard": 20,
|
||||
"blueGuard": 21,
|
||||
"redGuard": 22,
|
||||
"swordsman": 23,
|
||||
"soldier": 24,
|
||||
"yellowKnight": 25,
|
||||
"redKnight": 26,
|
||||
"darkKnight": 27,
|
||||
"blackKing": 28,
|
||||
"yellowKing": 29,
|
||||
"greenKing": 30,
|
||||
"blueKnight": 31,
|
||||
"goldSlime": 32,
|
||||
"poisonSkeleton": 33,
|
||||
"poisonBat": 34,
|
||||
"steelRock": 35,
|
||||
"skeletonPriest": 36,
|
||||
"skeletonKing": 37,
|
||||
"skeletonWizard": 38,
|
||||
"redSkeletonCaption": 39,
|
||||
"badHero": 40,
|
||||
"demon": 41,
|
||||
"demonPriest": 42,
|
||||
"goldHornSlime": 43,
|
||||
"redKing": 44,
|
||||
"whiteKing": 45,
|
||||
"blackMagician": 46,
|
||||
"silverSlime": 47,
|
||||
"swordEmperor": 48,
|
||||
"whiteHornSlime": 49,
|
||||
"badPrincess": 50,
|
||||
"badFairy": 51,
|
||||
"grayPriest": 52,
|
||||
"redSwordsman": 53,
|
||||
"whiteGhost": 54,
|
||||
"poisonZombie": 55,
|
||||
"magicDragon": 56,
|
||||
"octopus": 57,
|
||||
"darkFairy": 58,
|
||||
"greenKnight": 59
|
||||
"greenKnight": 59,
|
||||
"skeletonWarrior": 9,
|
||||
"frozenSkeleton": 69,
|
||||
"silverSlimelord": 60,
|
||||
"goldSlimelord": 61,
|
||||
"whiteSlimeman": 54,
|
||||
"slimeman": 15,
|
||||
"yellowGT": 20,
|
||||
"blueGT": 21,
|
||||
"redGT": 22,
|
||||
"blackMS": 28,
|
||||
"yellowMS": 29,
|
||||
"greenMS": 30,
|
||||
"magicMaster": 46,
|
||||
"blueMS": 45,
|
||||
"redMS": 44,
|
||||
"devilWarrior": 41,
|
||||
"fairyEnemy": 58,
|
||||
"dragon": 56,
|
||||
"skeletonKnight": 39,
|
||||
"skeletonPresbyter": 38,
|
||||
"ironRock": 35,
|
||||
"grayRock": 62,
|
||||
"yellowPriest": 52,
|
||||
"evilPrincess": 50,
|
||||
"blademaster": 48,
|
||||
"evilFairy": 51,
|
||||
"blueRock": 63,
|
||||
"skeletonLite": 64,
|
||||
"blueSkeleton": 65,
|
||||
"bowman": 66,
|
||||
"liteBowman": 67,
|
||||
"crismonZombie": 68,
|
||||
"watcherSlime": 70,
|
||||
"mutantSlimeman": 71,
|
||||
"goldBat": 72,
|
||||
"devilKnight": 73,
|
||||
"grayPriest": 74,
|
||||
"greenGT": 75,
|
||||
"pinkGhostSoldier": 77,
|
||||
"greenSoldier": 78,
|
||||
"greenGhostSoldier": 79,
|
||||
"pinkSoldier": 76,
|
||||
"ghostSoldier": 11,
|
||||
"evilHero": 40
|
||||
},
|
||||
"enemy48": {
|
||||
"angel": 0,
|
||||
|
||||
106
project/maps.js
@ -86,6 +86,10 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
|
||||
"102": {"cls":"animates","id":"crystalBottom"},
|
||||
"103": {"cls":"animates","id":"fire"},
|
||||
"104": {"cls":"animates","id":"switch"},
|
||||
"105": {"cls":"animates","id":"steelDoor2","doorInfo":[{},"door.mp3","door.mp3"],"animate":1,"trigger":"openDoor"},
|
||||
"106": {"cls":"animates","id":"steelDoor3","doorInfo":[{},"door.mp3","door.mp3"],"animate":1,"trigger":"openDoor"},
|
||||
"107": {"cls":"animates","id":"iceDoor","doorInfo":[{},"door.mp3","door.mp3"],"animate":1,"trigger":"openDoor"},
|
||||
"108": {"cls":"animates","id":"iceDoor2","doorInfo":[{},"door.mp3","door.mp3"],"animate":1,"trigger":"openDoor"},
|
||||
"121": {"cls":"npcs","id":"man"},
|
||||
"122": {"cls":"npcs","id":"woman"},
|
||||
"123": {"cls":"npcs","id":"thief"},
|
||||
@ -115,22 +119,24 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
|
||||
"168": {"cls":"terrains","id":"flower","canPass":true},
|
||||
"169": {"cls":"terrains","id":"box","trigger":"pushBox"},
|
||||
"170": {"cls":"terrains","id":"boxed","trigger":"pushBox"},
|
||||
"181": {"cls":"npcs","id":"wlt"},
|
||||
"182": {"cls":"npcs","id":"wt"},
|
||||
"183": {"cls":"npcs","id":"wrt"},
|
||||
"184": {"cls":"npcs","id":"wl"},
|
||||
"185": {"cls":"npcs","id":"wc"},
|
||||
"186": {"cls":"npcs","id":"wr"},
|
||||
"187": {"cls":"npcs","id":"wlb"},
|
||||
"188": {"cls":"npcs","id":"wrb"},
|
||||
"189": {"cls":"npcs","id":"dlt"},
|
||||
"190": {"cls":"npcs","id":"dt"},
|
||||
"191": {"cls":"npcs","id":"drt"},
|
||||
"192": {"cls":"npcs","id":"dl"},
|
||||
"193": {"cls":"npcs","id":"dc"},
|
||||
"194": {"cls":"npcs","id":"dr"},
|
||||
"195": {"cls":"npcs","id":"dlb"},
|
||||
"196": {"cls":"npcs","id":"drb"},
|
||||
"181": {"cls":"npcs","id":"octopusLeftTop"},
|
||||
"182": {"cls":"npcs","id":"octopusTop"},
|
||||
"183": {"cls":"npcs","id":"octopusRightTop"},
|
||||
"184": {"cls":"npcs","id":"octopusLeft"},
|
||||
"185": {"cls":"npcs","id":"octopusCenter"},
|
||||
"186": {"cls":"npcs","id":"octopusRight"},
|
||||
"187": {"cls":"npcs","id":"octopusLeftBottom"},
|
||||
"188": {"cls":"npcs","id":"octopusRightBottom"},
|
||||
"189": {"cls":"npcs","id":"dragonLeftTop"},
|
||||
"190": {"cls":"npcs","id":"dragonTop"},
|
||||
"191": {"cls":"npcs","id":"dragonRightTop"},
|
||||
"192": {"cls":"npcs","id":"dragonLeft"},
|
||||
"193": {"cls":"npcs","id":"dragonCenter"},
|
||||
"194": {"cls":"npcs","id":"dragonRight"},
|
||||
"195": {"cls":"npcs","id":"dragonLeftBottom"},
|
||||
"196": {"cls":"npcs","id":"dragonRightBottom"},
|
||||
"197": {"cls":"npcs","id":"man2"},
|
||||
"198": {"cls":"npcs","id":"woman2"},
|
||||
"201": {"cls":"enemys","id":"greenSlime"},
|
||||
"202": {"cls":"enemys","id":"redSlime"},
|
||||
"203": {"cls":"enemys","id":"blackSlime"},
|
||||
@ -140,61 +146,81 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
|
||||
"207": {"cls":"enemys","id":"redBat"},
|
||||
"208": {"cls":"enemys","id":"vampire"},
|
||||
"209": {"cls":"enemys","id":"skeleton"},
|
||||
"210": {"cls":"enemys","id":"skeletonSoilder"},
|
||||
"210": {"cls":"enemys","id":"skeletonWarrior"},
|
||||
"211": {"cls":"enemys","id":"skeletonCaptain"},
|
||||
"212": {"cls":"enemys","id":"ghostSkeleton"},
|
||||
"212": {"cls":"enemys","id":"ghostSoldier"},
|
||||
"213": {"cls":"enemys","id":"zombie"},
|
||||
"214": {"cls":"enemys","id":"zombieKnight"},
|
||||
"215": {"cls":"enemys","id":"rock"},
|
||||
"216": {"cls":"enemys","id":"slimeMan"},
|
||||
"216": {"cls":"enemys","id":"slimeman"},
|
||||
"217": {"cls":"enemys","id":"bluePriest"},
|
||||
"218": {"cls":"enemys","id":"redPriest"},
|
||||
"219": {"cls":"enemys","id":"brownWizard"},
|
||||
"220": {"cls":"enemys","id":"redWizard"},
|
||||
"221": {"cls":"enemys","id":"yellowGuard"},
|
||||
"222": {"cls":"enemys","id":"blueGuard"},
|
||||
"223": {"cls":"enemys","id":"redGuard"},
|
||||
"221": {"cls":"enemys","id":"yellowGT"},
|
||||
"222": {"cls":"enemys","id":"blueGT"},
|
||||
"223": {"cls":"enemys","id":"redGT"},
|
||||
"224": {"cls":"enemys","id":"swordsman"},
|
||||
"225": {"cls":"enemys","id":"soldier"},
|
||||
"226": {"cls":"enemys","id":"yellowKnight"},
|
||||
"227": {"cls":"enemys","id":"redKnight"},
|
||||
"228": {"cls":"enemys","id":"darkKnight"},
|
||||
"229": {"cls":"enemys","id":"blackKing"},
|
||||
"230": {"cls":"enemys","id":"yellowKing"},
|
||||
"231": {"cls":"enemys","id":"greenKing"},
|
||||
"229": {"cls":"enemys","id":"blackMS"},
|
||||
"230": {"cls":"enemys","id":"yellowMS"},
|
||||
"231": {"cls":"enemys","id":"greenMS"},
|
||||
"232": {"cls":"enemys","id":"blueKnight"},
|
||||
"233": {"cls":"enemys","id":"goldSlime"},
|
||||
"234": {"cls":"enemys","id":"poisonSkeleton"},
|
||||
"235": {"cls":"enemys","id":"poisonBat"},
|
||||
"236": {"cls":"enemys","id":"steelRock"},
|
||||
"236": {"cls":"enemys","id":"ironRock"},
|
||||
"237": {"cls":"enemys","id":"skeletonPriest"},
|
||||
"238": {"cls":"enemys","id":"skeletonKing"},
|
||||
"239": {"cls":"enemys","id":"skeletonWizard"},
|
||||
"240": {"cls":"enemys","id":"redSkeletonCaption"},
|
||||
"241": {"cls":"enemys","id":"badHero"},
|
||||
"242": {"cls":"enemys","id":"demon"},
|
||||
"239": {"cls":"enemys","id":"skeletonPresbyter"},
|
||||
"240": {"cls":"enemys","id":"skeletonKnight"},
|
||||
"241": {"cls":"enemys","id":"evilHero"},
|
||||
"242": {"cls":"enemys","id":"devilWarrior"},
|
||||
"243": {"cls":"enemys","id":"demonPriest"},
|
||||
"244": {"cls":"enemys","id":"goldHornSlime"},
|
||||
"245": {"cls":"enemys","id":"redKing"},
|
||||
"246": {"cls":"enemys","id":"whiteKing"},
|
||||
"247": {"cls":"enemys","id":"blackMagician"},
|
||||
"245": {"cls":"enemys","id":"redMS"},
|
||||
"246": {"cls":"enemys","id":"blueMS"},
|
||||
"247": {"cls":"enemys","id":"magicMaster"},
|
||||
"248": {"cls":"enemys","id":"silverSlime"},
|
||||
"249": {"cls":"enemys","id":"swordEmperor"},
|
||||
"249": {"cls":"enemys","id":"blademaster"},
|
||||
"250": {"cls":"enemys","id":"whiteHornSlime"},
|
||||
"251": {"cls":"enemys","id":"badPrincess"},
|
||||
"252": {"cls":"enemys","id":"badFairy"},
|
||||
"253": {"cls":"enemys","id":"grayPriest"},
|
||||
"251": {"cls":"enemys","id":"evilPrincess"},
|
||||
"252": {"cls":"enemys","id":"evilFairy"},
|
||||
"253": {"cls":"enemys","id":"yellowPriest"},
|
||||
"254": {"cls":"enemys","id":"redSwordsman"},
|
||||
"255": {"cls":"enemys","id":"whiteGhost"},
|
||||
"255": {"cls":"enemys","id":"whiteSlimeman"},
|
||||
"256": {"cls":"enemys","id":"poisonZombie"},
|
||||
"257": {"cls":"enemys","id":"magicDragon"},
|
||||
"257": {"cls":"enemys","id":"dragon"},
|
||||
"258": {"cls":"enemys","id":"octopus"},
|
||||
"259": {"cls":"enemys","id":"darkFairy"},
|
||||
"259": {"cls":"enemys","id":"fairyEnemy"},
|
||||
"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"},
|
||||
"265": {"cls":"enemys","id":"silverSlimelord"},
|
||||
"266": {"cls":"enemys","id":"goldSlimelord"},
|
||||
"267": {"cls":"enemys","id":"grayRock"},
|
||||
"268": {"cls":"enemys","id":"blueRock"},
|
||||
"269": {"cls":"enemys","id":"skeletonLite"},
|
||||
"270": {"cls":"enemys","id":"blueSkeleton"},
|
||||
"271": {"cls":"enemys","id":"bowman"},
|
||||
"272": {"cls":"enemys","id":"liteBowman"},
|
||||
"273": {"cls":"enemys","id":"crismonZombie"},
|
||||
"274": {"cls":"enemys","id":"frozenSkeleton"},
|
||||
"275": {"cls":"enemys","id":"watcherSlime"},
|
||||
"276": {"cls":"enemys","id":"mutantSlimeman"},
|
||||
"277": {"cls":"enemys","id":"goldBat"},
|
||||
"278": {"cls":"enemys","id":"devilKnight"},
|
||||
"279": {"cls":"enemys","id":"grayPriest"},
|
||||
"280": {"cls":"enemys","id":"greenGT"},
|
||||
"281": {"cls":"enemys","id":"pinkSoldier"},
|
||||
"282": {"cls":"enemys","id":"pinkGhostSoldier"},
|
||||
"283": {"cls":"enemys","id":"greenSoldier"},
|
||||
"284": {"cls":"enemys","id":"greenGhostSoldier"},
|
||||
"300": {"cls":"terrains","id":"ground"},
|
||||
"301": {"cls":"terrains","id":"grass"},
|
||||
"302": {"cls":"terrains","id":"grass2"},
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
@ -11,7 +11,7 @@
|
||||
10. 建议给“转变图块”事件增加一个淡入时间参数,用于原本是空地或空气墙的情况,目前这种效果必须借助存在安全隐患的红点
|
||||
(已完成!) 11. 建议修复勇士后退时跟随者的鬼畜行为,并推出一套能够对跟随者位置和朝向进行读写的API甚至事件,且允许这些信息被计入存档,以实现一些演出效果甚至游戏要素,如新新2用公主占位防冰块
|
||||
(已完成!) 12. “设置怪物属性”事件的下拉框目前只支持一部分,另一部分只能通过手敲json再解析来得到,希望提供完整支持
|
||||
13. 建议给core.moveAction(callback)提供对应的事件,用于在事件中让勇士像事件外一样移动,从而正常触发跑毒和阻激夹域捕等
|
||||
(已完成!) 13. 建议给core.moveAction(callback)提供对应的事件,用于在事件中让勇士像事件外一样移动,从而正常触发跑毒和阻激夹域捕等
|
||||
(已完成!) 14. core.openShop()和对应的事件,建议在用于公共事件时简单地退化为“插入公共事件”而不要打断当前事件,把决定权交给作者
|
||||
(已完成!) 15. “等待用户操作”虽然提供了场合块但还不支持将多个按键的场合合并(比如空格、回车和C键一般会被作者予以合并,执行内容如果只是大致相同也值得合并,在块内由作者根据flag再行分歧),建议支持一下
|
||||
(已完成!) 16. “绘制描边文本”事件建议加一个“描边颜色”参数,目前只能描黑边
|
||||
@ -47,8 +47,10 @@
|
||||
像素高分辨率问题
|
||||
(已完成!) 道具效果优化,删除部分道具相关的开关
|
||||
(已完成!) 素材列表选择
|
||||
油漆桶,动态更改地图大小
|
||||
(已完成!) 油漆桶,动态更改地图大小
|
||||
地图拉框选择复制剪切删除
|
||||
(已完成!) 素材替换
|
||||
大屏幕下放大游戏界面
|
||||
|
||||
-------------
|
||||
|
||||
@ -117,7 +119,7 @@
|
||||
(已完成!) 60. “设置怪物属性”事件的下拉框目前只支持一部分,另一部分只能通过手敲json再解析来得到,希望提供完整支持
|
||||
(已完成!) 61. 在事件编辑器中进行地图选点时,有些事件指令虽然只能用于同楼层,但实际生效时勇士可能已经不在当前正在编辑的楼层(比如在一个楼层切换事件指令后)了,所以希望地图选点始终提供楼层下拉表
|
||||
(文档相关给秋橙) 62. 希望在线文档介绍一下楼层和startText的独立开关的flag表示
|
||||
63. 希望给core.moveAction(callback)函数提供一个对应的事件指令,用于在事件流处理中让勇士进行一些有游戏性意义(即非纯演出)的移动。如果做不到的话希望参照本文的46号issue作为原生脚本勾选async的例子讲解如何使用
|
||||
(已完成!) 63. 希望给core.moveAction(callback)函数提供一个对应的事件指令,用于在事件流处理中让勇士进行一些有游戏性意义(即非纯演出)的移动。如果做不到的话希望参照本文的46号issue作为原生脚本勾选async的例子讲解如何使用
|
||||
(已完成!) 64. “打开全局商店”事件指令建议在用于公共事件版商店时简单地退化为“插入公共事件”而不要打断当前事件流,由作者在这个公共事件结尾去决定“立刻结束当前事件”还是不结束
|
||||
(已修复!) 65. “显隐贴图”的参数应为像素坐标而不是网格坐标,请修正在线文档的描述。同时建议加个淡入淡出时间参数,还建议贴图能像图片一样有透明度和被移动
|
||||
(不处理) 66. 读档建议换个和floor.mp3不一样的音效
|
||||
|
||||