diff --git a/editor.html b/editor.html
index d82f8236..f6d81925 100644
--- a/editor.html
+++ b/editor.html
@@ -546,7 +546,8 @@
diff --git a/libs/actions.js b/libs/actions.js
index de3809c0..0a9ed824 100644
--- a/libs/actions.js
+++ b/libs/actions.js
@@ -260,9 +260,6 @@ actions.prototype._sys_keyDown_lockControl = function (keyCode) {
case 'replayRemain':
this._keyDownSL(keyCode);
break;
- case 'shop':
- this._keyDownShop(keyCode);
- break;
case 'selectShop':
case 'switchs':
case 'settings':
@@ -346,9 +343,6 @@ actions.prototype._sys_keyUp_lockControl = function (keyCode, altKey) {
case 'viewMaps':
this._keyUpViewMaps(keyCode);
break;
- case 'shop':
- this._keyUpShop(keyCode);
- break;
case 'selectShop':
this._keyUpQuickShop(keyCode);
break;
@@ -476,7 +470,6 @@ actions.prototype._sys_onmove_choices = function (x, y) {
switch (core.status.event.id) {
case 'action':
if (core.status.event.data.type != 'choices') break;
- case 'shop':
case 'selectShop':
case 'switchs':
case 'settings':
@@ -488,6 +481,9 @@ actions.prototype._sys_onmove_choices = function (x, y) {
case 'gameInfo':
this._onMoveChoices(x, y);
return true;
+ case 'confirmBox':
+ this._onMoveConfirmBox(x, y);
+ return true;
default:
break;
}
@@ -614,9 +610,6 @@ actions.prototype._sys_onclick_lockControl = function (x, y) {
case 'settings':
this._clickSettings(x, y);
break;
- case 'shop':
- this._clickShop(x, y);
- break;
case 'selectShop':
this._clickQuickShop(x, y);
break;
@@ -792,10 +785,6 @@ actions.prototype._sys_longClick_lockControl = function (x, y) {
return true;
}
}
- // 长按商店连续购买
- if (core.status.event.id == 'shop' && x >= this.CHOICES_LEFT && x <= this.CHOICES_RIGHT) {
- return this._clickShop(x, y);
- }
// 长按可以跳过等待事件
if (core.status.event.id == 'action' && core.status.event.data.type == 'sleep'
&& !core.status.event.data.current.noSkip) {
@@ -886,7 +875,7 @@ actions.prototype._clickCenterFly = function (x, y) {
core.useItem('centerFly');
}
else {
- core.drawTip('当前不能使用中心对称飞行器');
+ core.drawTip('当前不能使用' + core.material.items['centerFly'].name);
}
}
}
@@ -898,7 +887,7 @@ actions.prototype._keyUpCenterFly = function (keycode) {
core.useItem('centerFly');
}
else {
- core.drawTip('当前不能使用中心对称飞行器');
+ core.drawTip('当前不能使用' + core.material.items['centerFly'].name);
}
}
}
@@ -939,6 +928,22 @@ actions.prototype._keyUpConfirmBox = function (keycode) {
}
}
+////// 鼠标在确认框上移动时 //////
+actions.prototype._onMoveConfirmBox = function (x, y) {
+ if (y == this.HSIZE + 1) {
+ if (x == this.HSIZE - 2 || x == this.HSIZE - 1) {
+ core.status.event.selection = 0;
+ core.ui.drawConfirmBox(core.status.event.ui, core.status.event.data.yes, core.status.event.data.no);
+ return;
+ }
+ if (x == this.HSIZE + 2 || x == this.HSIZE + 1) {
+ core.status.event.selection = 1;
+ core.ui.drawConfirmBox(core.status.event.ui, core.status.event.data.yes, core.status.event.data.no);
+ return;
+ }
+ }
+}
+
////// 自定义事件时的点击操作 //////
actions.prototype._clickAction = function (x, y) {
if (core.status.event.data.type == 'text') {
@@ -1280,61 +1285,28 @@ actions.prototype._keyUpViewMaps = function (keycode) {
return;
}
-////// 商店界面时的点击操作 //////
-actions.prototype._clickShop = function (x, y) {
- var shop = core.status.event.data.shop;
- var choices = shop.choices;
- if (x >= this.CHOICES_LEFT && x <= this.CHOICES_RIGHT) {
- var topIndex = this.HSIZE - parseInt(choices.length / 2) + (core.status.event.ui.offset || 0);
- if (y >= topIndex && y < topIndex + choices.length) {
- return core.events._useShop(shop, y - topIndex);
- }
- // 离开
- else if (y == topIndex + choices.length) {
- core.events._exitShop();
- }
- else return false;
- }
- return true;
-}
-
-actions.prototype._keyDownShop = function (keycode) {
- // 商店界面长按空格连续购买
- if (keycode == 32 && core.status.event.selection != core.status.event.data.shop.choices.length) {
- this._selectChoices(core.status.event.data.shop.choices.length + 1, keycode, this._clickShop);
- return;
- }
- this._keyDownChoices(keycode);
-}
-
-////// 商店界面时,放开某个键的操作 //////
-actions.prototype._keyUpShop = function (keycode) {
- if (keycode == 27 || keycode == 88) {
- core.events._exitShop();
- return;
- }
- if (keycode != 32 || core.status.event.selection == core.status.event.data.shop.choices.length) {
- this._selectChoices(core.status.event.data.shop.choices.length + 1, keycode, this._clickShop);
- return;
- }
- return;
-}
-
////// 快捷商店界面时的点击操作 //////
actions.prototype._clickQuickShop = function (x, y) {
- var keys = Object.keys(core.status.shops).filter(function (shopId) {
- return core.status.shops[shopId].visited || !core.status.shops[shopId].mustEnable
- });
+ var shopIds = core.listShopIds();
if (x >= this.CHOICES_LEFT && x <= this.CHOICES_RIGHT) {
- var topIndex = this.HSIZE - parseInt(keys.length / 2) + (core.status.event.ui.offset || 0);
- if (y >= topIndex && y < topIndex + keys.length) {
- core.events.openShop(keys[y - topIndex], true);
- if (core.status.event.id == 'shop')
- core.status.event.data.fromList = true;
+ var topIndex = this.HSIZE - parseInt(shopIds.length / 2) + (core.status.event.ui.offset || 0);
+ if (y >= topIndex && y < topIndex + shopIds.length) {
+ var shopId = shopIds[y - topIndex];
+ if (!core.canOpenShop(shopId)) {
+ core.drawTip('当前项尚未开启');
+ return;
+ }
+ var message = core.canUseQuickShop(shopId);
+ if (message == null) {
+ // core.ui.closePanel();
+ core.openShop(shopIds[y - topIndex], false);
+ } else {
+ core.drawTip(message);
+ }
}
// 离开
- else if (y == topIndex + keys.length)
+ else if (y == topIndex + shopIds.length)
core.ui.closePanel();
return;
}
@@ -1347,10 +1319,7 @@ actions.prototype._keyUpQuickShop = function (keycode) {
core.ui.closePanel();
return;
}
- var keys = Object.keys(core.status.shops).filter(function (shopId) {
- return core.status.shops[shopId].visited || !core.status.shops[shopId].mustEnable
- });
- this._selectChoices(keys.length + 1, keycode, this._clickQuickShop);
+ this._selectChoices(core.listShopIds().length + 1, keycode, this._clickQuickShop);
return;
}
diff --git a/libs/control.js b/libs/control.js
index a0a3d27a..e7ba51c1 100644
--- a/libs/control.js
+++ b/libs/control.js
@@ -656,10 +656,9 @@ control.prototype._moveAction_moving = function (callback) {
// 执行该点事件
if (!hasTrigger)
core.events._trigger(nowx, nowy);
- core.updateStatusBar();
// 检查该点是否是滑冰
- if (core.getBgNumber() == 167) {
+ if (core.onSki()) {
core.insertAction("滑冰事件", null, null, null, true);
}
@@ -745,7 +744,7 @@ control.prototype.waitHeroToStop = function(callback) {
core.setHeroLoc('direction', lastDirection);
core.drawHero();
callback();
- }, 30);
+ }, core.status.replay.speed == 24 ? 0 : 30);
}
}
@@ -757,8 +756,7 @@ control.prototype.turnHero = function(direction) {
core.status.route.push("turn:"+direction);
return;
}
- var dirs = {'up':'right','right':'down','down':'left','left':'up'};
- core.setHeroLoc('direction', dirs[core.getHeroLoc('direction')]);
+ core.setHeroLoc('direction', core.turnDirection(':right'));
core.drawHero();
core.status.route.push("turn");
}
@@ -991,7 +989,8 @@ control.prototype.checkBlock = function () {
var damage = core.status.checkBlock.damage[loc];
if (damage) {
core.status.hero.hp -= damage;
- core.drawTip("受到"+(core.status.checkBlock.type[loc]||"伤害")+damage+"点");
+ var text = (Object.keys(core.status.checkBlock.type[loc] || {}).join(",")) || "伤害";
+ core.drawTip("受到"+text+damage+"点");
core.drawHeroAnimate("zone");
this._checkBlock_disableQuickShop();
core.status.hero.statistics.extraDamage += damage;
@@ -1000,6 +999,8 @@ control.prototype.checkBlock = function () {
core.updateStatusBar();
core.events.lose();
return;
+ } else {
+ core.updateStatusBar();
}
}
this._checkBlock_snipe(core.status.checkBlock.snipe[loc]);
@@ -1009,9 +1010,9 @@ control.prototype.checkBlock = function () {
control.prototype._checkBlock_disableQuickShop = function () {
// 禁用快捷商店
if (core.flags.disableShopOnDamage) {
- for (var shopId in core.status.shops) {
- core.status.shops[shopId].visited = false;
- }
+ Object.keys(core.status.shops).forEach(function (shopId) {
+ core.setShopVisited(shopId, false);
+ });
}
}
@@ -1020,7 +1021,7 @@ control.prototype._checkBlock_snipe = function (snipe) {
if (!snipe || snipe.length == 0) return;
var actions = [];
snipe.forEach(function (t) {
- actions.push({"type": "move", "loc": [t[0],t[1]], "steps": [t[3]], "time": 500, "keep": true, "async": true});
+ actions.push({"type": "move", "loc": [t[0],t[1]], "steps": [t[3]], "time": 250, "keep": true, "async": true});
});
actions.push({"type": "waitAsync"});
core.insertAction(actions);
@@ -1032,12 +1033,14 @@ control.prototype._checkBlock_ambush = function (ambush) {
// 捕捉效果
var actions = [];
ambush.forEach(function (t) {
- actions.push({"type": "move", "loc": [t[0],t[1]], "steps": [t[3]], "time": 500, "keep": false, "async":true});
+ actions.push({"type": "move", "loc": [t[0],t[1]], "steps": [t[3]], "time": 250, "keep": false, "async":true});
});
actions.push({"type": "waitAsync"});
// 强制战斗
ambush.forEach(function (t) {
- actions.push({"type": "battle", "id": t[2]});
+ actions.push({"type": "function", "function": "function() { "+
+ "core.battle('" + t[2] + "', " + t[0]+ "," + t[1] + ", true, core.doAction); "+
+ "}", "async": true});
});
core.insertAction(actions);
}
@@ -1265,7 +1268,7 @@ control.prototype.bookReplay = function () {
if (core.isMoving() || core.status.replay.animate
|| (core.status.event.id && core.status.event.id != 'viewMaps'))
return core.drawTip("请等待当前事件的处理结束");
- if (!core.hasItem('book')) return core.drawTip('你没有怪物手册');
+ if (!core.hasItem('book')) return core.drawTip('你没有'+core.material.items['book'].name);
// 从“浏览地图”页面打开
if (core.status.event.id=='viewMaps')
@@ -1430,7 +1433,7 @@ control.prototype._replayAction_item = function (action) {
if (action.indexOf("item:")!=0) return false;
var itemId = action.substring(5);
if (!core.canUseItem(itemId)) return false;
- if (core.material.items[itemId].hideInReplay) {
+ if (core.material.items[itemId].hideInReplay || core.status.replay.speed == 24) {
core.useItem(itemId, false, core.replay);
return true;
}
@@ -1463,7 +1466,7 @@ control.prototype._replayAction_equip = function (action) {
var index = ownEquipment.indexOf(equipId), per = core.__SIZE__-1;
if (index<0) return false;
core.status.route.push(action);
- if (core.material.items[equipId].hideInReplay) {
+ if (core.material.items[equipId].hideInReplay || core.status.replay.speed == 24) {
core.loadEquip(equipId, core.replay);
return true;
}
@@ -1483,6 +1486,10 @@ control.prototype._replayAction_unEquip = function (action) {
if (!core.isset(equipType)) return false;
core.ui.drawEquipbox(equipType);
core.status.route.push(action);
+ if (core.status.replay.speed == 24) {
+ core.unloadEquip(equipType, core.replay);
+ return true;
+ }
setTimeout(function () {
core.ui.closePanel();
core.unloadEquip(equipType, core.replay);
@@ -1496,6 +1503,11 @@ control.prototype._replayAction_fly = function (action) {
var toIndex=core.floorIds.indexOf(floorId);
if (!core.canUseItem('fly')) return false;
core.ui.drawFly(toIndex);
+ if (core.status.replay.speed == 24) {
+ if (!core.flyTo(floorId, core.replay))
+ core.control._replay_error(action);
+ return true;
+ }
setTimeout(function () {
if (!core.flyTo(floorId, core.replay))
core.control._replay_error(action);
@@ -1505,36 +1517,13 @@ control.prototype._replayAction_fly = function (action) {
control.prototype._replayAction_shop = function (action) {
if (action.indexOf("shop:")!=0) return false;
- var sps=action.substring(5).split(":");
- var shopId=sps[0], selections=sps[1].split("");
- if (selections.length == 0) return false;
- var shop=core.status.shops[shopId];
- if (!shop || !shop.visited) return false;
- // --- 判定commonEvent或item
- if (shop.commonEvent || shop.item) {
- core.openShop(shopId, false);
- setTimeout(core.replay);
+ var shopId = action.substring(5);
+ if (core.canUseQuickShop(shopId) != null || !core.canOpenShop(shopId)) {
+ this._replay_error(shopId);
return true;
}
- var choices = shop.choices;
- core.status.event.selection = parseInt(selections.shift());
- core.events.openShop(shopId, false);
- var topIndex = core.__HALF_SIZE__ - parseInt(choices.length / 2) + (core.status.event.ui.offset || 0);
- var shopInterval = setInterval(function () {
- if (!core.actions._clickShop(core.__HALF_SIZE__, topIndex+core.status.event.selection)) {
- clearInterval(shopInterval);
- core.control._replay_error(action);
- return;
- }
- if (selections.length==0) {
- clearInterval(shopInterval);
- core.actions._clickShop(core.__HALF_SIZE__, topIndex+choices.length);
- core.replay();
- return;
- }
- core.status.event.selection = parseInt(selections.shift());
- core.events.openShop(shopId, false);
- }, core.control.__replay_getTimeout());
+ core.openShop(shopId, false);
+ core.replay();
return true;
}
@@ -1542,14 +1531,14 @@ control.prototype._replayAction_turn = function (action) {
if (action != 'turn' && action.indexOf('turn:') != 0) return false;
if (action == 'turn') core.turnHero();
else core.turnHero(action.substring(5));
- setTimeout(core.replay);
+ core.replay();
return true;
}
control.prototype._replayAction_getNext = function (action) {
if (action != "getNext") return false;
if (!core.getNextItem()) return false;
- setTimeout(core.replay);
+ core.replay();
return true;
}
@@ -1566,6 +1555,11 @@ control.prototype._replayAction_moveDirectly = function (action) {
var x=parseInt(pos[0]), y=parseInt(pos[1]);
var nowx=core.getHeroLoc('x'), nowy=core.getHeroLoc('y');
if (!core.moveDirectly(x, y)) return false;
+ if (core.status.replay.speed == 24) {
+ core.replay();
+ return true;
+ }
+
core.ui.drawArrow('ui', 32*nowx+16-core.bigmap.offsetX, 32*nowy+16-core.bigmap.offsetY,
32*x+16-core.bigmap.offsetX, 32*y+16-core.bigmap.offsetY, '#FF0000', 3);
setTimeout(function () {
@@ -1578,7 +1572,7 @@ control.prototype._replayAction_moveDirectly = function (action) {
control.prototype._replayAction_key = function (action) {
if (action.indexOf("key:") != 0) return false;
core.actions.keyUp(parseInt(action.substring(4)), false, true);
- setTimeout(core.replay);
+ core.replay();
return true;
}
diff --git a/libs/core.js b/libs/core.js
index 2654c2e1..09c5d5f4 100644
--- a/libs/core.js
+++ b/libs/core.js
@@ -239,6 +239,10 @@ core.prototype._init_flags = function () {
core.values = core.clone(core.data.values);
core.firstData = core.clone(core.data.firstData);
this._init_sys_flags();
+
+ // 让你总是拼错!
+ window.on = true;
+ window.off = false;
core.dom.versionLabel.innerText = core.firstData.version;
core.dom.logoLabel.innerText = core.firstData.title;
@@ -277,7 +281,6 @@ core.prototype._init_flags = function () {
// 初始化怪物、道具等
core.material.enemys = core.enemys.getEnemys();
core.material.items = core.items.getItems();
- core.items._resetItems();
core.material.icons = core.icons.getIcons();
}
diff --git a/libs/enemys.js b/libs/enemys.js
index 4c82a6fa..b4478955 100644
--- a/libs/enemys.js
+++ b/libs/enemys.js
@@ -86,7 +86,7 @@ enemys.prototype.getSpecialHint = function (enemy, special) {
var hints = [];
for (var i = 0; i < specials.length; i++) {
if (this.hasSpecial(enemy, specials[i][0]))
- hints.push(this._calSpecialContent(enemy, specials[i][1]) + ":" + this._calSpecialContent(enemy, specials[i][2]));
+ hints.push("\r[#FF6A6A]\\d"+this._calSpecialContent(enemy, specials[i][1]) + ":\\d\r[]" + this._calSpecialContent(enemy, specials[i][2]));
}
return hints;
}
@@ -94,7 +94,7 @@ enemys.prototype.getSpecialHint = function (enemy, special) {
if (specials == null) return "";
for (var i = 0; i < specials.length; i++) {
if (special == specials[i][0])
- return this._calSpecialContent(enemy, specials[i][1]) + ":" + this._calSpecialContent(enemy, specials[i][2]);
+ return "\r[#FF6A6A]\\d"+this._calSpecialContent(enemy, specials[i][1]) + ":\\d\r[]" + this._calSpecialContent(enemy, specials[i][2]);
}
return "";
}
diff --git a/libs/events.js b/libs/events.js
index 7462c7da..ea1a1316 100644
--- a/libs/events.js
+++ b/libs/events.js
@@ -317,7 +317,7 @@ events.prototype._trigger = function (x, y) {
eval(block.event.script);
} catch (e) { main.log(e); }
- if (block.event.trigger) {
+ if (block.event.trigger && block.event.trigger != 'null') {
var noPass = block.event.noPass, trigger = block.event.trigger;
if (noPass) core.clearAutomaticRouteNode(x, y);
@@ -402,7 +402,16 @@ events.prototype.openDoor = function (x, y, needKey, callback) {
});
return;
}
- this._openDoor_animate(id, x, y, callback);
+ if (core.status.replay.speed == 24) {
+ core.status.replay.animate = true;
+ core.removeBlock(x, y);
+ setTimeout(function () {
+ core.status.replay.animate = false;
+ core.events.afterOpenDoor(id, x, y, callback);
+ });
+ } else {
+ this._openDoor_animate(id, x, y, callback);
+ }
}
events.prototype._openDoor_check = function (id, x, y, needKey) {
@@ -477,16 +486,16 @@ events.prototype.afterOpenDoor = function (doorId, x, y, callback) {
}
events.prototype._sys_getItem = function (data, callback) {
- this.getItem(data.event.id, 1, data.x, data.y, callback);
+ this.getItem(data.event.id, 1, data.x, data.y, false, callback);
}
////// 获得某个物品 //////
-events.prototype.getItem = function (id, num, x, y, callback) {
+events.prototype.getItem = function (id, num, x, y, isGentleClick, callback) {
if (num == null) num = 1;
num = num || 1;
var itemCls = core.material.items[id].cls;
- core.items.getItemEffect(id, num);
core.removeBlock(x, y);
+ core.items.getItemEffect(id, num);
var text = '获得 ' + core.material.items[id].name;
if (num > 1) text += "x" + num;
if (itemCls === 'items' && num == 1) text += core.items.getItemEffectTip(id);
@@ -510,14 +519,11 @@ events.prototype.getItem = function (id, num, x, y, callback) {
itemHint.push(id);
}
-
- core.updateStatusBar();
-
- this.afterGetItem(id, x, y, callback);
+ this.afterGetItem(id, x, y, isGentleClick, callback);
}
-events.prototype.afterGetItem = function (id, x, y, callback) {
- this.eventdata.afterGetItem(id, x, y, callback);
+events.prototype.afterGetItem = function (id, x, y, isGentleClick, callback) {
+ this.eventdata.afterGetItem(id, x, y, isGentleClick, callback);
}
////// 获得面前的物品(轻按) //////
@@ -545,7 +551,7 @@ events.prototype._getNextItem = function (direction, noRoute) {
var nx = core.getHeroLoc('x') + core.utils.scan[direction].x;
var ny = core.getHeroLoc('y') + core.utils.scan[direction].y;
if (!noRoute) core.status.route.push("getNext");
- this.getItem(core.getBlockId(nx, ny), 1, nx, ny);
+ this.getItem(core.getBlockId(nx, ny), 1, nx, ny, true);
return true;
}
@@ -593,6 +599,8 @@ events.prototype._changeFloor_getInfo = function (floorId, stair, heroLoc, time)
var index = core.floorIds.indexOf(core.status.floorId);
if (index < core.floorIds.length - 1) floorId = core.floorIds[index + 1];
else floorId = core.status.floorId;
+ } else if (floorId == ':now') {
+ floorId = core.status.floorId;
}
if (!core.status.maps[floorId]) {
main.log("不存在的楼层:" + floorId);
@@ -702,33 +710,6 @@ events.prototype.visitFloor = function (floorId) {
core.getFlag("__visited__")[floorId] = true;
}
-events.prototype._sys_passNet = function (data, callback) {
- this.passNet(data);
- if (callback) callback();
-}
-
-////// 经过一个路障 //////
-events.prototype.passNet = function (data) {
- if (!core.hasItem('shoes')) {
- // 血网 lavaNet 移动到 checkBlock 中处理
- if (data.event.id == 'poisonNet') { // 毒网
- core.insertAction({"type":"insert","name":"毒衰咒处理","args":[0]});
- }
- else if (data.event.id == 'weakNet') { // 衰网
- core.insertAction({"type":"insert","name":"毒衰咒处理","args":[1]});
- }
- else if (data.event.id == 'curseNet') { // 咒网
- core.insertAction({"type":"insert","name":"毒衰咒处理","args":[2]});
- }
- }
- this.afterPassNet(data.x, data.y, data.event.id);
- core.updateStatusBar();
-}
-
-events.prototype.afterPassNet = function (x, y, id) {
- if (this.eventdata.afterPassNet) this.eventdata.afterPassNet(x, y, id);
-}
-
events.prototype._sys_pushBox = function (data, callback) {
this.pushBox(data);
if (callback) callback();
@@ -743,7 +724,15 @@ events.prototype.pushBox = function (data) {
nx = data.x + core.utils.scan[direction].x, ny = data.y + core.utils.scan[direction].y;
// 检测能否推上去
- if (!core.canMoveHero() || !core.canMoveHero(data.x, data.y, direction)) return;
+ if (!core.canMoveHero()) return;
+ var canGoDeadZone = core.flags.canGoDeadZone;
+ core.flags.canGoDeadZone = false;
+ if (!core.canMoveHero(data.x, data.y, direction)) {
+ core.flags.canGoDeadZone = canGoDeadZone;
+ return;
+ }
+ core.flags.canGoDeadZone = canGoDeadZone;
+
var nextId = core.getBlockId(nx, ny);
if (nextId != null && nextId != 'flower') return;
@@ -753,8 +742,6 @@ events.prototype.pushBox = function (data) {
core.removeBlock(data.x, data.y);
else
core.setBlock(168, data.x, data.y);
-
- core.updateStatusBar();
this._pushBox_moveHero(direction);
}
@@ -780,27 +767,22 @@ events.prototype.afterPushBox = function () {
return this.eventdata.afterPushBox();
}
-events.prototype._sys_changeLight = function (data, callback) {
- core.events.changeLight(data.event.id, data.x, data.y);
- if (callback) callback();
-}
-
-////// 改变亮灯(感叹号)的事件 //////
-events.prototype.changeLight = function (id, x, y) {
- if (id != null && id != 'light') return;
- core.setBlock(core.getNumberById('darkLight'), x, y);
- return this.eventdata.afterChangeLight(x, y);
-}
-
events.prototype._sys_ski = function (data, callback) {
core.insertAction(["V2.6后,请将滑冰放在背景层!"], data.x, data.y, callback);
}
+/// 当前是否在冰上
+events.prototype.onSki = function (number) {
+ if (number == null) number = core.getBgNumber();
+ var block = core.getBlockByNumber(number);
+ return block && block.event && block.event.trigger == 'ski';
+}
+
events.prototype._sys_action = function (data, callback) {
var ev = core.clone(data.event.data), ex = data.x, ey = data.y;
// 检查是否需要改变朝向
if (ex == core.nextX() && ey == core.nextY()) {
- var dir = core.reverseDirection();
+ var dir = core.turnDirection(":back");
var id = data.event.id, toId = (data.event.faceIds || {})[dir];
if (toId && id != toId) {
var number = core.getNumberById(toId);
@@ -1269,14 +1251,12 @@ events.prototype._action_show = function (data, x, y, prefix) {
events.prototype._action_hide = function (data, x, y, prefix) {
data.loc = this.__action_getLoc2D(data.loc, x, y, prefix);
if (data.time > 0 && data.floorId == core.status.floorId) {
- data.loc.forEach(function (t) {
- core.hideBlock(t[0], t[1], data.floorId);
- });
- this.__action_doAsyncFunc(data.async, core.animateBlock, data.loc, 'hide', data.time);
+ this.__action_doAsyncFunc(data.async, core.animateBlock, data.loc, data.remove ? 'remove' : 'hide', data.time);
}
else {
data.loc.forEach(function (t) {
- core.removeBlock(t[0], t[1], data.floorId)
+ if (data.remove) core.removeBlock(t[0], t[1], data.floorId);
+ else core.hideBlock(t[0], t[1], data.floorId);
});
core.doAction();
}
@@ -1290,6 +1270,14 @@ events.prototype._action_setBlock = function (data, x, y, prefix) {
core.doAction();
}
+events.prototype._action_turnBlock = function (data, x, y, prefix) {
+ data.loc = this.__action_getLoc2D(data.loc, x, y, prefix);
+ data.loc.forEach(function (t) {
+ core.turnBlock(data.number, t[0], t[1], data.floorId);
+ });
+ core.doAction();
+}
+
events.prototype._action_showFloorImg = function (data, x, y, prefix) {
core.maps.showFloorImage(this.__action_getLoc2D(data.loc, x, y, prefix), data.floorId, core.doAction);
}
@@ -1383,7 +1371,7 @@ events.prototype._action_changeFloor = function (data, x, y, prefix) {
events.prototype._action_changePos = function (data, x, y, prefix) {
core.clearMap('hero');
if (data.x == null && data.y == null && data.direction) {
- core.setHeroLoc('direction', data.direction, true);
+ core.setHeroLoc('direction', core.turnDirection(data.direction), true);
core.drawHero();
return core.doAction();
}
@@ -1391,7 +1379,7 @@ events.prototype._action_changePos = function (data, x, y, prefix) {
var loc = this.__action_getHeroLoc(data.loc, prefix);
core.setHeroLoc('x', loc[0]);
core.setHeroLoc('y', loc[1]);
- if (data.direction) core.setHeroLoc('direction', data.direction);
+ if (data.direction) core.setHeroLoc('direction', core.turnDirection(data.direction));
core.drawHero();
core.doAction();
}
@@ -1502,16 +1490,13 @@ events.prototype._action_unloadEquip = function (data, x, y, prefix) {
}
events.prototype._action_openShop = function (data, x, y, prefix) {
- core.status.shops[data.id].visited = true;
- this.setEvents([]);
- if (!core.isReplaying())
- this.openShop(data.id);
- if (core.status.event.id == 'action')
- core.doAction();
+ core.setShopVisited(data.id, true);
+ if (data.open) core.openShop(data.id, true);
+ core.doAction();
}
events.prototype._action_disableShop = function (data, x, y, prefix) {
- this.disableQuickShop(data.id);
+ core.setShopVisited(data.id, false);
core.doAction();
}
@@ -1820,9 +1805,9 @@ events.prototype._precompile_confirm = function (data) {
}
events.prototype._action_for = function (data, x, y, prefix) {
- // Only support switch:A
- if (!/^switch:[A-Z]$/.test(data.name)) {
- core.insertAction(['循环遍历事件只支持独立开关!']);
+ // Only support temp:A
+ if (!/^temp:[A-Z]$/.test(data.name)) {
+ core.insertAction('循环遍历事件只支持临时变量!');
return core.doAction();
}
var from = core.calValue(data.from);
@@ -1830,22 +1815,22 @@ events.prototype._action_for = function (data, x, y, prefix) {
core.insertAction('循环遍历事件要求【起始点】仅能是数字!');
return core.doAction();
}
- this._setValue_setSwitch(data.name, from, prefix);
- var toName = '__for@to@' + prefix + '@' + data.name.substring(7) + '__';
- var stepName = '__for@step@' + prefix + '@' + data.name.substring(7) + '__';
+ var letter = data.name.substring(5);
+ core.setFlag('@temp@' + letter, from);
+ var toName = '@temp@for-to@' + letter;
+ var stepName = '@temp@for-step@' + letter;
core.setFlag(toName, data.to);
core.setFlag(stepName, data.step);
var condition = "(function () {"+
- "var clearAndReturn = function (v) { if (!v) { core.removeFlag('"+toName+"'); core.removeFlag('"+stepName+"'); } return v; };"+
"var to = core.calValue(core.getFlag('" + toName + "'));"+
"var step = core.calValue(core.getFlag('" + stepName + "'));"+
- "if (typeof step != 'number' || typeof to != 'number') return clearAndReturn(false);"+
- "if (step == 0) return clearAndReturn(true);"+
- "var currentValue = core.calValue('switch:'+'" + data.name.substring(7) + "', '"+prefix+"');"+
+ "if (typeof step != 'number' || typeof to != 'number') return false;"+
+ "if (step == 0) return true;"+
+ "var currentValue = core.getFlag('@temp@" + letter + "');"+
"currentValue += step;"+
- "core.events._setValue_setSwitch('switch:'+'" + data.name.substring(7) + "', currentValue, '"+prefix+"');"+
- "if (step > 0) { return clearAndReturn(currentValue <= to); }"+
- "else { return clearAndReturn(currentValue >= to); }"+
+ "core.setFlag('@temp@" + letter + "', currentValue);"+
+ "if (step > 0) { return currentValue <= to; }"+
+ "else { return currentValue >= to; }"+
"})()";
return this._action_dowhile({"condition": condition, "data": data.data}, x, y, prefix);
}
@@ -1859,17 +1844,17 @@ events.prototype._precompile_for = function (data) {
}
events.prototype._action_forEach = function (data, x, y, prefix) {
- // Only support switch:A
- if (!/^switch:[A-Z]$/.test(data.name)) {
- core.insertAction(['循环遍历事件只支持独立开关!']);
+ // Only support temp:A
+ if (!/^temp:[A-Z]$/.test(data.name)) {
+ core.insertAction(['循环遍历事件只支持临时变量!']);
return core.doAction();
}
- var listName = '__forEach@' + prefix + '@' + data.name.substring(7) + '__';
+ var listName = '@temp@forEach@' + data.name.substring(5);
core.setFlag(listName, core.clone(data.list));
var condition = "(function () {" +
"var list = core.getFlag('"+listName+"', []);"+
- "if (list.length == 0) { core.removeFlag('" + listName + "'); return false; }"+
- "core.events._setValue_setSwitch('switch:'+'" + data.name.substring(7) + "', list.shift(), '"+prefix+"');"+
+ "if (list.length == 0) return false;"+
+ "core.setFlag('@temp@'+'" + data.name.substring(5) + "', list.shift());"+
"return true;"+
"})()";
return this._action_while({"condition": condition, "data": data.data}, x, y, prefix);
@@ -1949,7 +1934,7 @@ events.prototype._action_function = function (data, x, y, prefix) {
}
events.prototype._action_update = function (data, x, y, prefix) {
- core.updateStatusBar();
+ core.updateStatusBar(data.doNotCheckAutoEvents);
core.doAction();
}
@@ -2086,13 +2071,6 @@ events.prototype._action_waitAsync = function (data, x, y, prefix) {
}, 50);
}
-events.prototype._action_revisit = function (data, x, y, prefix) {
- var block = core.getBlock(x, y);
- if (block != null && block.block.event.trigger == 'action')
- this.setEvents(block.block.event.data);
- core.doAction();
-}
-
events.prototype._action_callBook = function (data, x, y, prefix) {
if (core.isReplaying() || !core.hasItem('book')) {
core.doAction();
@@ -2296,14 +2274,14 @@ events.prototype.useFly = function (fromUserAction) {
if (core.isReplaying()) return;
if (!this._checkStatus('fly', fromUserAction, true)) return;
if (core.flags.flyNearStair && !core.nearStair()) {
- core.drawTip("只有在楼梯边才能使用传送器");
+ core.drawTip("只有在楼梯边才能使用" + core.material.items['fly'].name);
core.unLockControl();
core.status.event.data = null;
core.status.event.id = null;
return;
}
if (!core.canUseItem('fly')) {
- core.drawTip("楼层传送器好像失效了");
+ core.drawTip(core.material.items['fly'].name + "好像失效了");
core.unLockControl();
core.status.event.data = null;
core.status.event.id = null;
@@ -2343,8 +2321,17 @@ events.prototype.openQuickShop = function (fromUserAction) {
// --- 如果只有一个商店,则直接打开之
if (Object.keys(core.status.shops).length == 1) {
var shopId = Object.keys(core.status.shops)[0];
- if (core.status.event.id != null || !this._checkStatus('shop', false)) return;
- core.events.openShop(shopId, true);
+ if (core.status.event.id != null) return;
+ if (!core.canOpenShop(shopId)) {
+ core.drawTip("当前无法打开快捷商店!");
+ return;
+ }
+ var message = core.canUseQuickShop(shopId);
+ if (message != null) {
+ core.drawTip(message);
+ return;
+ }
+ core.openShop(shopId, false);
return;
}
@@ -2452,6 +2439,7 @@ events.prototype.setValue = function (name, operator, value, prefix) {
this._setValue_setItem(name, value);
this._setValue_setFlag(name, value);
this._setValue_setSwitch(name, value, prefix);
+ this._setValue_setTemp(name, value, prefix);
this._setValue_setGlobal(name, value);
}
@@ -2477,6 +2465,11 @@ events.prototype._setValue_setSwitch = function (name, value, prefix) {
core.setFlag((prefix || ":f@x@y") + "@" + name.substring(7), value);
}
+events.prototype._setValue_setTemp = function (name, value) {
+ if (name.indexOf("temp:") !== 0) return;
+ core.setFlag("@temp@" + name.substring(5), value);
+}
+
events.prototype._setValue_setGlobal = function (name, value) {
if (name.indexOf("global:") !== 0) return;
core.setGlobal(name.substring(7), value);
@@ -2487,16 +2480,6 @@ events.prototype.addValue = function (name, value, prefix) {
this.setValue(name, '+=', value, prefix);
}
-////// 执行一个表达式的effect操作 //////
-events.prototype.doEffect = function (effect, need, times) {
- effect.split(";").forEach(function (expression) {
- var arr = expression.split("+=");
- if (arr.length != 2) return;
- var name=arr[0], value=core.calValue(arr[1], null, need, times);
- core.addValue(name, value);
- });
-}
-
////// 设置一个怪物属性 //////
events.prototype.setEnemy = function (id, name, value, prefix) {
if (!core.hasFlag('enemyInfo')) {
@@ -2864,87 +2847,6 @@ events.prototype._jumpHero_finished = function (animate, ex, ey, callback) {
if (callback) callback();
}
-////// 打开一个全局商店 //////
-events.prototype.openShop = function (shopId, needVisited) {
- var shop = core.status.shops[shopId];
- shop.times = shop.times || 0;
- if (shop.commonTimes) shop.times = core.getFlag('commonTimes', 0);
- var reason = core.events.canUseQuickShop(shop.id);
- if (reason != null) return core.drawTip(reason);
-
- if (needVisited && !shop.visited) {
- if (!core.flags.enableDisabledShop || shop.commonEvent || shop.item) {
- if (shop.times == 0) core.drawTip("该项尚未开启");
- else core.drawTip("该项已失效");
- core.ui.closePanel();
- return;
- }
- else {
- core.drawTip("该商店尚未开启,只能浏览不可使用");
- }
- }
- else shop.visited = true;
-
- if (shop.item) {
- core.status.route.push("shop:" + shopId + ":0");
- if (core.openItemShop) {
- core.openItemShop(shopId);
- } else {
- core.insertAction("道具商店插件不存在!请检查是否存在该插件!");
- }
- return;
- } else if (shop.commonEvent) {
- core.status.route.push("shop:"+shopId+":0");
- core.insertAction({"type": "insert", "name": shop.commonEvent, "args": shop.args});
- return;
- }
- core.ui.drawShop(shopId);
-}
-
-events.prototype._useShop = function (shop, index) {
- if (!shop.visited) {
- core.drawTip(shop.times ? "该商店已失效" : "该商店尚未开启");
- return false;
- }
- var use = shop.use, choice = shop.choices[index];
- var times = shop.times, need = core.calValue(choice.need || shop.need, null, null, times);
- if (need > core.getStatus(use)) {
- core.drawTip("你的" + (use == 'money' ? "金币" : "经验") + "不足");
- return false;
- }
- core.status.event.selection = index;
- core.status.event.data.actions.push(index);
- core.setStatus(use, core.getStatus(use) - need);
- core.doEffect(choice.effect, need, times);
- core.updateStatusBar();
- shop.times++;
- if (shop.commonTimes) core.setFlag('commonTimes', shop.times);
- this.openShop(shop.id);
- return true;
-}
-
-events.prototype._exitShop = function () {
- if (core.status.event.data.actions.length > 0) {
- core.status.route.push("shop:" + core.status.event.data.id + ":" + core.status.event.data.actions.join(""));
- }
- core.status.event.data.actions = [];
- core.status.boxAnimateObjs = [];
- if (core.status.event.data.fromList)
- core.ui.drawQuickShop();
- else
- core.ui.closePanel();
-}
-
-////// 禁用一个全局商店 //////
-events.prototype.disableQuickShop = function (shopId) {
- core.status.shops[shopId].visited = false;
-}
-
-////// 能否使用快捷商店 //////
-events.prototype.canUseQuickShop = function (shopId) {
- return this.eventdata.canUseQuickShop(shopId);
-}
-
////// 设置角色行走图 //////
events.prototype.setHeroIcon = function (name, noDraw) {
name = core.getMappedName(name);
diff --git a/libs/icons.js b/libs/icons.js
index 45051561..a21780f3 100644
--- a/libs/icons.js
+++ b/libs/icons.js
@@ -27,6 +27,15 @@ icons.prototype.getClsFromId = function (id) {
return null;
}
+icons.prototype.getAllIconIds = function () {
+ if (this.allIconIds) return this.allIconIds;
+ this.allIconIds = [];
+ for (var type in this.icons) {
+ this.allIconIds = this.allIconIds.concat(Object.keys(this.icons[type]));
+ }
+ return this.allIconIds;
+}
+
icons.prototype._getAnimateFrames = function (cls, useOriginValue) {
if (cls == 'enemys' || cls == 'npcs') {
return 2;
diff --git a/libs/items.js b/libs/items.js
index 46121db2..41c9d61c 100644
--- a/libs/items.js
+++ b/libs/items.js
@@ -26,35 +26,6 @@ items.prototype.getItems = function () {
return core.clone(this.items);
}
-items.prototype._resetItems = function () {
- // 只有运行时才能执行此函数!
- if (main.mode != 'play') return;
-
- // 根据flag来对道具进行修改
- if (core.flags.bigKeyIsBox) {
- core.material.items.bigKey.cls = 'items';
- core.material.items.bigKey.name = '钥匙盒';
- }
- if (core.flags.pickaxeFourDirections)
- core.material.items.pickaxe.text = "可以破坏勇士四周的墙";
- if (core.flags.bombFourDirections)
- core.material.items.bomb.text = "可以炸掉勇士四周的怪物";
- if (core.flags.snowFourDirections)
- core.material.items.snow.text = "可以将四周的熔岩变成平地";
- if (core.flags.equipment) {
- core.material.items.sword1.cls = 'equips';
- core.material.items.sword2.cls = 'equips';
- core.material.items.sword3.cls = 'equips';
- core.material.items.sword4.cls = 'equips';
- core.material.items.sword5.cls = 'equips';
- core.material.items.shield1.cls = 'equips';
- core.material.items.shield2.cls = 'equips';
- core.material.items.shield3.cls = 'equips';
- core.material.items.shield4.cls = 'equips';
- core.material.items.shield5.cls = 'equips';
- }
-}
-
////// “即捡即用类”道具的使用效果 //////
items.prototype.getItemEffect = function (itemId, itemNum) {
var itemCls = core.material.items[itemId].cls;
@@ -81,6 +52,7 @@ items.prototype.getItemEffect = function (itemId, itemNum) {
main.log(e);
}
}
+ core.updateStatusBar();
}
else {
core.addItem(itemId, itemNum);
diff --git a/libs/maps.js b/libs/maps.js
index 2d095e38..72debb41 100644
--- a/libs/maps.js
+++ b/libs/maps.js
@@ -516,7 +516,7 @@ maps.prototype._canMoveHero_checkCannotInOut = function (number, name, direction
}
return false;
}
- if (name == 'cannotIn') direction = core.reverseDirection(direction);
+ if (name == 'cannotIn') direction = core.turnDirection(":back", direction);
return core.inArray((this.getBlockByNumber(number).event || {})[name], direction);
}
@@ -596,7 +596,7 @@ maps.prototype._canMoveDirectly_bfs = function (sx, sy, locs, number, ans) {
if (!core.inArray(canMoveArray[x][y], direction)) continue;
var nx = x + core.utils.scan[direction].x, ny = y + core.utils.scan[direction].y, nindex = nx + "," + ny;
if (visited[nindex]) continue;
- if (bgMap[ny][nx] == 167) continue;
+ if (core.onSki(bgMap[ny][nx])) continue;
if (!this._canMoveDirectly_checkNextPoint(blocksObj, nx, ny)) continue;
visited[nindex] = visited[now] + 1;
// if (nx == ex && ny == ey) return visited[nindex];
@@ -1464,19 +1464,35 @@ maps.prototype.hideBlock = function (x, y, floorId) {
core.clearMap('event2', x * 32, y * 32 + 32 - height, 32, height - 32);
}
- block.block.disable = true;
+ core.hideBlockByIndex(block.index, floorId);
core.updateStatusBar();
}
-////// 将某个块从启用变成禁用状态 //////
-maps.prototype.removeBlock = function (x, y, floorId) {
+////// 根据图块的索引来隐藏图块 //////
+maps.prototype.hideBlockByIndex = function (index, floorId) {
floorId = floorId || core.status.floorId;
if (!floorId) return;
- var block = core.getBlock(x, y, floorId, true);
- if (block == null) return; // 不存在
+ var blocks = core.status.maps[floorId].blocks, block = blocks[index];
+ block.disable = true;
+}
- var index = block.index;
+////// 一次性隐藏多个block //////
+maps.prototype.hideBlockByIndexes = function (indexes, floorId) {
+ indexes.sort(function (a, b) {
+ return b - a;
+ }).forEach(function (index) {
+ core.hideBlockByIndex(index, floorId);
+ });
+}
+
+////// 删除某个图块 //////
+maps.prototype.removeBlock = function (x, y, floorId) {
+ floorId = floorId || core.status.floorId;
+ if (!floorId) return false;
+
+ var block = core.getBlock(x, y, floorId, true);
+ if (block == null) return false; // 不存在
// 删除动画,清除地图
if (floorId == core.status.floorId) {
@@ -1487,9 +1503,9 @@ maps.prototype.removeBlock = function (x, y, floorId) {
core.clearMap('event2', x * 32, y * 32 + 32 - height, 32, height - 32);
}
- // 删除Index
- core.removeBlockByIndex(index, floorId);
+ core.removeBlockByIndex(block.index, floorId);
core.updateStatusBar();
+ return true;
}
////// 根据block的索引(尽可能)删除该块 //////
@@ -1498,13 +1514,7 @@ maps.prototype.removeBlockByIndex = function (index, floorId) {
if (!floorId) return;
var blocks = core.status.maps[floorId].blocks, block = blocks[index];
-
- if (this.canRemoveBlock(block, floorId)) { // 能否彻底删除该图块
- blocks.splice(index, 1);
- }
- else {
- block.disable = true;
- }
+ blocks.splice(index, 1);
}
////// 一次性删除多个block //////
@@ -1516,19 +1526,6 @@ maps.prototype.removeBlockByIndexes = function (indexes, floorId) {
});
}
-////// 能否彻底从地图中删除一个图块 //////
-maps.prototype.canRemoveBlock = function (block, floorId) {
- var x = block.x, y = block.y;
- // 检查该点是否存在事件
- if (core.floors[floorId].events[x + "," + y] || core.floors[floorId].changeFloor[x + "," + y])
- return false;
- // 检查是否存在重生
- if (block.event && block.event.cls.indexOf('enemy') == 0 && core.hasSpecial(block.event.id, 23))
- return false;
-
- return true;
-}
-
////// 显示前景/背景地图 //////
maps.prototype.showBgFgMap = function (name, loc, floorId, callback) {
this._triggerBgFgMap('show', name, loc, floorId, callback);
@@ -1611,7 +1608,7 @@ maps.prototype.setBlock = function (number, x, y, floorId) {
var block = this.initBlock(x, y, number, true, core.floors[floorId]);
if (block.id == 0 && !block.event.trigger) {
- // 转变图块为0且该点无事件,视为隐藏
+ // 转变图块为0且该点无事件,视为删除
core.removeBlock(x, y, floorId);
return;
}
@@ -1641,6 +1638,26 @@ maps.prototype.setBlock = function (number, x, y, floorId) {
}
}
+////// 事件转向 //////
+maps.prototype.turnBlock = function (direction, x, y, floorId) {
+ var id = core.getBlockId(x, y, floorId, true);
+ var blockInfo = core.getBlockInfo(id);
+ if (blockInfo == null) return;
+ var faceIds = blockInfo.faceIds || {};
+ var currDirection = null;
+ for (var dir in core.utils.scan) {
+ if (faceIds[dir] == id) {
+ currDirection = dir;
+ }
+ }
+ if (currDirection == null) return;
+ var nextDirection = core.turnDirection(direction, currDirection);
+ var nextId = faceIds[nextDirection];
+ if (nextId != null && nextId != id) {
+ this.setBlock(nextId, x, y, floorId);
+ }
+}
+
////// 将地图中所有某个图块替换成另一个图块 //////
maps.prototype.replaceBlock = function (fromNumber, toNumber, floorId) {
floorId = floorId || core.status.floorId;
@@ -1778,6 +1795,7 @@ maps.prototype._getAndRemoveBlock = function (x, y) {
////// 显示移动某块的动画,达到{“type”:”move”}的效果 //////
maps.prototype.moveBlock = function (x, y, steps, time, keep, callback) {
+ if (core.status.replay.speed == 24) time = 1;
time = time || 500;
var blockArr = this._getAndRemoveBlock(x, y);
if (blockArr == null) {
@@ -1939,24 +1957,24 @@ maps.prototype._moveJumpBlock_finished = function (blockInfo, canvases, info, an
////// 显示/隐藏某个块时的动画效果 //////
maps.prototype.animateBlock = function (loc, type, time, callback) {
- var isHide = type == 'hide';
+ if (core.status.replay.speed == 24) time = 1;
if (typeof loc[0] == 'number' && typeof loc[1] == 'number')
loc = [loc];
// --- 检测所有是0的点
- var list = this._animateBlock_getList(loc);
+ var list = this._animateBlock_getList(loc, type);
if (list.length == 0) {
if (callback) callback();
return;
}
- this._animateBlock_drawList(list, isHide ? 1 : 0);
+ this._animateBlock_drawList(list, type != 'show' ? 1 : 0);
time /= Math.max(core.status.replay.speed, 1)
- this._animateBlock_doAnimate(loc, list, isHide, 10 / time, callback);
+ this._animateBlock_doAnimate(loc, list, type, 10 / time, callback);
}
-maps.prototype._animateBlock_doAnimate = function (loc, list, isHide, delta, callback) {
- var opacity = isHide ? 1 : 0;
+maps.prototype._animateBlock_doAnimate = function (loc, list, type, delta, callback) {
+ var opacity = type != 'show' ? 1 : 0;
var animate = setInterval(function () {
- opacity += isHide ? -delta : delta;
+ opacity += type != 'show' ? -delta : delta;
core.maps._animateBlock_drawList(list, opacity);
if (opacity >= 1 || opacity <= 0) {
delete core.animateFrame.asyncId[animate];
@@ -1966,8 +1984,9 @@ maps.prototype._animateBlock_doAnimate = function (loc, list, isHide, delta, cal
core.maps._deleteDetachedBlock(t.canvases);
});
loc.forEach(function (t) {
- if (isHide) core.removeBlock(t[0], t[1]);
- else core.showBlock(t[0], t[1]);
+ if (type == 'show') core.showBlock(t[0], t[1]);
+ else if (type == 'hide') core.hideBlock(t[0], t[1]);
+ else if (type == 'remove') core.removeBlock(t[0], t[1]);
});
if (callback) callback();
}
@@ -1976,7 +1995,7 @@ maps.prototype._animateBlock_doAnimate = function (loc, list, isHide, delta, cal
core.animateFrame.asyncId[animate] = true;
}
-maps.prototype._animateBlock_getList = function (loc) {
+maps.prototype._animateBlock_getList = function (loc, type) {
var list = [];
loc.forEach(function (t) {
var block = core.getBlock(t[0], t[1], null, true);
@@ -1988,6 +2007,16 @@ maps.prototype._animateBlock_getList = function (loc) {
list.push({ 'x': t[0], 'y': t[1] });
return;
}
+ // 该点是否已经被启用/删除
+ if ((type == 'show' && !block.disable) || ((type == 'hide' || type == 'remove') && block.disable)) {
+ list.push({ 'x': t[0], 'y': t[1] });
+ return;
+ }
+
+ if (type == 'hide' || type == 'remove') {
+ core.hideBlock(t[0], t[1]); // 暂时先隐藏
+ }
+
var canvases = core.maps._initDetachedBlock(blockInfo, t[0], t[1], block.event.displayDamage !== false);
list.push({
diff --git a/libs/ui.js b/libs/ui.js
index 965d4b80..8050ec13 100644
--- a/libs/ui.js
+++ b/libs/ui.js
@@ -360,23 +360,56 @@ ui.prototype.splitLines = function (name, text, maxWidth, font) {
if (!ctx) return [text];
if (font) core.setFont(name, font);
+ // 不能在行首的标点
+ var forbidStart = "))】》>﹞>)]»›〕〉}]」}〗』" + ",。?!:;·…,.?!:;、……~&@#~&@#";
+ // 不能在行尾的标点
+ var forbidEnd = "((【《<﹝<([«‹〔〈{[「{〖『";
+
var contents = [];
var last = 0;
+ var forceChangeLine = false; // 是否强制换行,避免多个连续forbidStart存在
for (var i = 0; i < text.length; i++) {
if (text.charAt(i) == '\n') {
contents.push(text.substring(last, i));
last = i + 1;
+ forceChangeLine = false;
}
else if (text.charAt(i) == '\\' && text.charAt(i + 1) == 'n') {
contents.push(text.substring(last, i));
last = i + 2;
+ forceChangeLine = false;
}
else {
+ var curr = text.charAt(i);
var toAdd = text.substring(last, i + 1);
var width = core.calWidth(name, toAdd);
if (maxWidth && width > maxWidth) {
+ // --- 当前应当换行,然而还是检查一下是否是forbidStart
+ if (!forceChangeLine && forbidStart.indexOf(curr) >= 0) {
+ forceChangeLine = true;
+ continue;
+ }
contents.push(text.substring(last, i));
last = i;
+ forceChangeLine = false;
+ } else {
+ // --- 当前不应该换行;但是提前检查一下是否是行尾标点
+ var curr = text.charAt(i);
+ if (forbidEnd.indexOf(curr) >= 0 && i < text.length -1) {
+ // 检查是否是行尾
+ var nextcurr = text.charAt(i+1);
+ // 确认不是手动换行
+ if (nextcurr != '\n' && !(nextcurr == '\\' && text.charAt(i+2) == 'n')) {
+ var toAdd = text.substring(last, i+2);
+ var width = core.calWidth(name, toAdd);
+ if (maxWidth && width > maxWidth) {
+ // 下一项会换行,因此在此处换行
+ contents.push(text.substring(last, i));
+ last = i;
+ forceChangeLine = false;
+ }
+ }
+ }
}
}
}
@@ -443,6 +476,14 @@ ui.prototype._uievent_drawIcon = function (data) {
////// 结束一切事件和绘制,关闭UI窗口,返回游戏进程 //////
ui.prototype.closePanel = function () {
+ if (core.status.hero && core.status.hero.flags) {
+ // 清除全部临时变量
+ Object.keys(core.status.hero.flags).forEach(function (name) {
+ if (name.startsWith("@temp@")) {
+ delete core.status.hero.flags[name];
+ }
+ });
+ }
this.clearUI();
core.maps.generateGroundPattern();
core.updateStatusBar(true);
@@ -652,6 +693,14 @@ ui.prototype._uievent_drawSelector = function (data) {
this._drawSelector(ctx, background, w, h);
}
+ui.prototype._clearUIEventSelector = function (codes) {
+ if (codes instanceof Array) {
+ codes.forEach(function (code) { core.ui._clearUIEventSelector(code); });
+ return;
+ }
+ core.deleteCanvas('_uievent_selector_' + (codes || 0));
+}
+
ui.prototype._drawSelector = function (ctx, background, w, h, left, top) {
left = left || 0;
top = top || 0;
@@ -1546,11 +1595,9 @@ ui.prototype.drawSettings = function () {
////// 绘制快捷商店选择栏 //////
ui.prototype.drawQuickShop = function () {
core.status.event.id = 'selectShop';
- var shopList = core.status.shops, keys = Object.keys(shopList).filter(function (shopId) {
- return shopList[shopId].visited || !shopList[shopId].mustEnable
- });
+ var shopList = core.status.shops, keys = core.listShopIds();
var choices = keys.map(function (shopId) {
- return {"text": shopList[shopId].textInList, "color": shopList[shopId].visited?null:"#999999"};
+ return {"text": shopList[shopId].textInList, "color": core.isShopVisited(shopId) ? null : "#999999"};
});
choices.push("返回游戏");
this.drawChoices(null, choices);
@@ -1828,8 +1875,8 @@ ui.prototype.drawBookDetail = function (index) {
var left = 10, width = this.PIXEL - 2 * left, right = left + width;
var content_left = left + 25, validWidth = right - content_left - 13;
- var contents = core.splitLines("data", content, validWidth, this._buildFont(16, false));
- var height = Math.max(24 * contents.length + 55, 80), top = (this.PIXEL - height) / 2, bottom = top + height;
+ var height = Math.max(this.getTextContentHeight(content, {fontSize: 16, lineHeight: 24, maxWidth: validWidth}) + 58, 80),
+ top = (this.PIXEL - height) / 2, bottom = top + height;
core.setAlpha('data', 0.9);
core.fillRect('data', left, top, width, height, '#000000');
@@ -1837,7 +1884,7 @@ ui.prototype.drawBookDetail = function (index) {
core.strokeRect('data', left - 1, top - 1, width + 1, height + 1,
core.status.globalAttribute.borderColor, 2);
- this._drawBookDetail_drawContent(enemy, contents, {top: top, content_left: content_left, bottom: bottom});
+ this._drawBookDetail_drawContent(enemy, content, {top: top, content_left: content_left, bottom: bottom, validWidth: validWidth});
}
ui.prototype._drawBookDetail_getInfo = function (index) {
@@ -1870,7 +1917,7 @@ ui.prototype._drawBookDetail_mofang = function (enemy, texts) {
var hp = enemy.hp;
var delta = core.status.hero.atk - core.status.hero.def;
if (delta0) {
- texts.push("模仿临界计算器:(当前攻防差"+core.formatBigNumber(delta)+")");
+ texts.push("\r[#FF6A6A]\\d模仿临界计算器:\\d\r[](当前攻防差"+core.formatBigNumber(delta)+")");
var u = [];
this._drawBookDetail_mofang_getArray(hp).forEach(function (t) {
if (u.length < 20) u.push(t);
@@ -1921,7 +1968,7 @@ ui.prototype._drawBookDetail_vampire = function (enemy, texts) {
}
core.status.hero.hp = start;
if (core.canBattle(enemy.id)) {
- texts.push("打死该怪物最低需要生命值:"+core.formatBigNumber(start));
+ texts.push("\r[#FF6A6A]\\d打死该怪物最低需要生命值:\\d\r[]"+core.formatBigNumber(start));
}
core.status.hero.hp = nowHp;
}
@@ -1930,19 +1977,19 @@ ui.prototype._drawBookDetail_vampire = function (enemy, texts) {
ui.prototype._drawBookDetail_hatred = function (enemy, texts) {
if (core.enemys.hasSpecial(enemy.special, 17)) {
- texts.push("当前仇恨伤害值:"+core.getFlag('hatred', 0));
+ texts.push("\r[#FF6A6A]\\d当前仇恨伤害值:\\d\r[]"+core.getFlag('hatred', 0));
}
}
ui.prototype._drawBookDetail_turnAndCriticals = function (enemy, floorId, texts) {
var damageInfo = core.getDamageInfo(enemy, null, null, null, floorId);
- texts.push("战斗回合数:"+((damageInfo||{}).turn||0));
+ texts.push("\r[#FF6A6A]\\d战斗回合数:\\d\r[]"+((damageInfo||{}).turn||0));
// 临界表
var criticals = core.enemys.nextCriticals(enemy, 8, null, null, floorId).map(function (v) {
return core.formatBigNumber(v[0])+":"+core.formatBigNumber(v[1]);
});
while (criticals[0]=='0:0') criticals.shift();
- texts.push("临界表:"+JSON.stringify(criticals));
+ texts.push("\r[#FF6A6A]\\d临界表:\\d\r[]"+JSON.stringify(criticals));
var prevInfo = core.getDamageInfo(enemy, {atk: core.status.hero.atk-1}, null, null, floorId);
if (prevInfo != null && damageInfo != null) {
if (damageInfo.damage != null) damageInfo = damageInfo.damage;
@@ -1953,26 +2000,14 @@ ui.prototype._drawBookDetail_turnAndCriticals = function (enemy, floorId, texts)
}
}
-ui.prototype._drawBookDetail_drawContent = function (enemy, contents, pos) {
+ui.prototype._drawBookDetail_drawContent = function (enemy, content, pos) {
// 名称
core.setTextAlign('data', 'left');
core.fillText('data', enemy.name, pos.content_left, pos.top + 30, '#FFD700', this._buildFont(22, true));
- var content_top = pos.top + 57;
+ var content_top = pos.top + 44;
- for (var i=0;i=0) {
- var x1 = text.substring(0, index+1);
- core.fillText('data', x1, pos.content_left, content_top, '#FF6A6A', this._buildFont(16, true));
- var len=core.calWidth('data', x1);
- core.fillText('data', text.substring(index+1), pos.content_left+len, content_top, '#FFFFFF', this._buildFont(16, false));
- }
- else {
- core.fillText('data', contents[i], pos.content_left, content_top, '#FFFFFF', this._buildFont(16, false));
- }
- content_top+=24;
- }
+ this.drawTextContent('data', content, {left: pos.content_left, top: content_top, maxWidth: pos.validWidth,
+ fontSize: 16, lineHeight: 24});
}
////// 绘制楼层传送器 //////
@@ -2028,37 +2063,10 @@ ui.prototype.drawCenterFly = function () {
offsetY = core.clamp(toY - core.__HALF_SIZE__, 0, core.bigmap.height - core.__SIZE__);
core.fillRect('ui', (toX - offsetX) * 32, (toY - offsetY) * 32, 32, 32, fillstyle);
core.status.event.data = {"x": toX, "y": toY, "posX": toX - offsetX, "posY": toY - offsetY};
- core.drawTip("请确认当前中心对称飞行器的位置");
+ core.drawTip("请确认当前"+core.material.items['centerFly'].name+"的位置");
return;
}
-////// 绘制全局商店
-ui.prototype.drawShop = function (shopId) {
- var shop = core.status.shops[shopId];
- var actions = [], fromList = (core.status.event.data||{}).fromList, selection = core.status.event.selection;
- if (core.status.event.data && core.status.event.data.actions) actions=core.status.event.data.actions;
-
- core.ui.closePanel();
- core.lockControl();
- core.status.event.id = 'shop';
- core.status.event.data = {'id': shopId, 'shop': shop, 'actions': actions, 'fromList': fromList};
- core.status.event.selection = selection;
-
- var times = shop.times, need=core.calValue(shop.need, null, null, times);
- var content = "\t["+shop.name+","+shop.icon+"]" + core.replaceText(shop.text, null, need, times);
- var use = shop.use=='exp'?'经验':'金币';
- var choices = [];
- for (var i=0;i= 0)
value = value.replace(/global:([a-zA-Z0-9_\u4E00-\u9FCC]+)/g, "core.getGlobal('$1', 0)");
if (value.indexOf('enemy:')>=0)
- value = value.replace(/enemy:([a-zA-Z0-9_]+)\.([a-zA-Z0-9_]+)/g, "core.material.enemys['$1'].$2");
+ value = value.replace(/enemy:([a-zA-Z0-9_]+)[\.:]([a-zA-Z0-9_]+)/g, "core.material.enemys['$1'].$2");
if (value.indexOf('blockId:')>=0)
value = value.replace(/blockId:(\d+),(\d+)/g, "core.getBlockId($1, $2)");
if (value.indexOf('blockCls:')>=0)
value = value.replace(/blockCls:(\d+),(\d+)/g, "core.getBlockCls($1, $2)");
if (value.indexOf('equip:')>=0)
value = value.replace(/equip:(\d)/g, "core.getEquip($1)");
+ if (value.indexOf('temp:')>=0)
+ value = value.replace(/temp:([a-zA-Z0-9_]+)/g, "core.getFlag('@temp@$1', 0)");
}
return value;
}
////// 计算表达式的值 //////
-utils.prototype.calValue = function (value, prefix, need, times) {
+utils.prototype.calValue = function (value, prefix) {
if (!core.isset(value)) return null;
if (typeof value === 'string') {
if (value.indexOf(':') >= 0) {
@@ -594,7 +596,7 @@ utils.prototype._decodeRoute_decodeOne = function (decodeObj, c) {
decodeObj.ans.push("choices:" + nxt);
break;
case "S":
- decodeObj.ans.push("shop:" + nxt + ":" + this._decodeRoute_getNumber(decodeObj, true));
+ decodeObj.ans.push("shop:" + nxt);
break;
case "T":
decodeObj.ans.push("turn");
@@ -689,9 +691,19 @@ utils.prototype.strlen = function (str) {
return count;
};
-utils.prototype.reverseDirection = function (direction) {
+utils.prototype.turnDirection = function (turn, direction) {
direction = direction || core.getHeroLoc('direction');
- return {"left":"right","right":"left","down":"up","up":"down"}[direction] || direction;
+ var directionList = ["left", "up", "right", "down"];
+ if (directionList.indexOf(turn) >= 0) return turn;
+ switch (turn) {
+ case ':left': turn = 3; break; // turn left
+ case ':right': turn = 1; break; // turn right
+ case ':back': turn = 2; break; // turn back
+ default: turn = 0; break;
+ }
+ var index = directionList.indexOf(direction);
+ if (index < 0) return direction;
+ return directionList[(index + (turn || 0)) % 4];
}
utils.prototype.matchWildcard = function (pattern, string) {
diff --git a/main.js b/main.js
index 74da7a29..e6206b82 100644
--- a/main.js
+++ b/main.js
@@ -597,7 +597,7 @@ main.statusBar.image.keyboard.onclick = function (e) {
main.core.openKeyBoard(true);
}
-////// 点击状态栏中的快捷商店键盘时 //////
+////// 点击状态栏中的快捷商店时 //////
main.statusBar.image.shop.onclick = function (e) {
e.stopPropagation();
@@ -610,7 +610,7 @@ main.statusBar.image.shop.onclick = function (e) {
main.core.openQuickShop(true);
}
-////// 点击金币时也可以开启虚拟键盘 //////
+////// 点击金币时也可以开启快捷商店 //////
main.statusBar.image.money.onclick = function (e) {
e.stopPropagation();
diff --git a/project/data.js b/project/data.js
index d048aad3..49445eab 100644
--- a/project/data.js
+++ b/project/data.js
@@ -299,37 +299,100 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
],
"shops": [
{
- "id": "moneyShop1",
- "name": "贪婪之神",
- "icon": "blueShop",
+ "id": "shop1",
+ "text": "\t[贪婪之神,blueShop]勇敢的武士啊, 给我${20+2*flag:shop1}金币就可以:",
"textInList": "1F金币商店",
- "commonTimes": false,
"mustEnable": false,
- "use": "money",
- "need": "20+10*times*(times+1)",
- "text": "勇敢的武士啊,给我${need}金币就可以:",
+ "disablePreview": false,
"choices": [
{
"text": "生命+800",
- "effect": "status:hp+=800"
+ "need": "status:money>=20+2*flag:shop1",
+ "action": [
+ {
+ "type": "comment",
+ "text": "新版商店中需要手动扣减金币和增加访问次数"
+ },
+ {
+ "type": "setValue",
+ "name": "status:money",
+ "operator": "-=",
+ "value": "20+2*flag:shop1"
+ },
+ {
+ "type": "setValue",
+ "name": "flag:shop1",
+ "operator": "+=",
+ "value": "1"
+ },
+ {
+ "type": "setValue",
+ "name": "status:hp",
+ "operator": "+=",
+ "value": "800"
+ }
+ ]
+ },
+ {
+ "text": "攻击+4",
+ "need": "status:money>=20+2*flag:shop1",
+ "action": [
+ {
+ "type": "comment",
+ "text": "新版商店中需要手动扣减金币和增加访问次数"
+ },
+ {
+ "type": "setValue",
+ "name": "status:money",
+ "operator": "-=",
+ "value": "20+2*flag:shop1"
+ },
+ {
+ "type": "setValue",
+ "name": "flag:shop1",
+ "operator": "+=",
+ "value": "1"
+ },
+ {
+ "type": "setValue",
+ "name": "status:atk",
+ "operator": "+=",
+ "value": "4"
+ }
+ ]
}
]
},
{
- "id": "expShop1",
- "name": "经验之神",
- "icon": "pinkShop",
+ "id": "shop2",
+ "text": "\t[贪婪之神,pinkShop]勇敢的武士啊, 给我一定经验就可以:",
"textInList": "1F经验商店",
- "commonTimes": false,
"mustEnable": false,
- "use": "exp",
- "need": "-1",
- "text": "勇敢的武士啊,给我若干经验就可以:",
+ "disablePreview": true,
"choices": [
{
- "text": "等级+1",
- "need": "100",
- "effect": "status:hp+=1000"
+ "text": "等级+1(100经验)",
+ "need": "status:exp>=100",
+ "action": [
+ {
+ "type": "setValue",
+ "name": "status:exp",
+ "operator": "-=",
+ "value": "100"
+ },
+ {
+ "type": "setValue",
+ "name": "status:lv",
+ "operator": "+=",
+ "value": "1"
+ },
+ {
+ "type": "setValue",
+ "name": "status:hp",
+ "operator": "+=",
+ "value": "1000"
+ }
+ ]
}
]
},
@@ -342,12 +405,13 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
{
"id": "yellowKey",
"number": 10,
- "money": 10
+ "money": "10",
+ "sell": "5"
}
]
},
{
- "id": "keyShop1",
+ "id": "keyShop",
"textInList": "回收钥匙商店",
"mustEnable": false,
"commonEvent": "回收钥匙商店"
@@ -423,13 +487,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
],
"flyNearStair": true,
"flyRecordPosition": false,
- "pickaxeFourDirections": false,
- "bombFourDirections": false,
- "snowFourDirections": false,
- "bigKeyIsBox": false,
"steelDoorWithoutKey": false,
"itemFirstText": false,
- "equipment": false,
"equipboxButton": false,
"enableAddPoint": false,
"enableNegativeDamage": false,
@@ -446,7 +505,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"ignoreChangeFloor": true,
"canGoDeadZone": false,
"enableMoveDirectly": true,
- "enableDisabledShop": true,
"disableShopOnDamage": false,
"blurFg": false
}
diff --git a/project/enemys.js b/project/enemys.js
index 9a203006..e2024616 100644
--- a/project/enemys.js
+++ b/project/enemys.js
@@ -1,67 +1,67 @@
-var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
+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":0},
+ "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":0},
- "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":0},
- "skeleton": {"name":"骷髅人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "skeletonSoilder": {"name":"骷髅士兵","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "skeletonCaptain": {"name":"骷髅队长","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "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":0},
- "zombieKnight": {"name":"兽人武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "rock": {"name":"石头人","hp":100,"atk":120,"def":0,"money":4,"exp":0,"point":0,"special":3},
+ "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":0},
- "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":0},
- "blueGuard": {"name":"中级卫兵","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "redGuard": {"name":"高级卫兵","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
+ "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":0},
- "yellowKnight": {"name":"金骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "redKnight": {"name":"红骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "darkKnight": {"name":"黑骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "blackKing": {"name":"黑衣魔王","hp":1000,"atk":500,"def":0,"money":1000,"exp":1000,"point":0,"special":0,"notBomb":true},
- "yellowKing": {"name":"黄衣魔王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "greenKing": {"name":"青衣武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "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":0},
- "poisonSkeleton": {"name":"紫骷髅","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "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":0},
- "skeletonPriest": {"name":"骷髅法师","hp":100,"atk":100,"def":0,"money":0,"exp":0,"point":0,"special":18,"value":20},
- "skeletonKing": {"name":"骷髅王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "skeletonWizard": {"name":"骷髅巫师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "redSkeletonCaption": {"name":"骷髅武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "badHero": {"name":"迷失勇者","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "demon": {"name":"魔神武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "demonPriest": {"name":"魔神法师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "goldHornSlime": {"name":"金角怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "redKing": {"name":"红衣魔王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "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":0},
- "whiteHornSlime": {"name":"尖角怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "badPrincess": {"name":"痛苦魔女","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "badFairy": {"name":"黑暗仙子","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "grayPriest": {"name":"中级法师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "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":0},
- "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":0},
- "octopus": {"name":"血影","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "darkFairy": {"name":"仙子","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "greenKnight": {"name":"强盾骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "angel": {"name":"天使","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "elemental": {"name":"元素生物","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
- "steelGuard": {"name":"铁守卫","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":18,"value":20},
+ "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]}
}
\ No newline at end of file
diff --git a/project/events.js b/project/events.js
index d98dcfda..b6aea258 100644
--- a/project/events.js
+++ b/project/events.js
@@ -163,7 +163,7 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
},
{
"type": "if",
- "condition": "core.getBgNumber() == 167",
+ "condition": "core.onSki()",
"true": [
{
"type": "if",
@@ -244,7 +244,7 @@ var events_c12a15a8_c380_4b28_8144_256cba95f760 =
"回收钥匙商店": [
{
"type": "comment",
- "text": "此事件在全局商店中被引用了(全局商店keyShop1)"
+ "text": "此事件在全局商店中被引用了(全局商店keyShop)"
},
{
"type": "comment",
diff --git a/project/floors/MT0.js b/project/floors/MT0.js
index afcc0832..8e98ca33 100644
--- a/project/floors/MT0.js
+++ b/project/floors/MT0.js
@@ -1,15 +1,15 @@
main.floors.MT0=
{
-"floorId": "MT0",
-"title": "主塔 0 层",
-"name": "0",
-"canFlyTo": true,
-"canUseQuickShop": true,
-"cannotViewMap": false,
-"defaultGround": "ground",
-"images": [],
-"item_ratio": 1,
-"map": [
+ "floorId": "MT0",
+ "title": "主塔 0 层",
+ "name": "0",
+ "canFlyTo": true,
+ "canUseQuickShop": true,
+ "cannotViewMap": false,
+ "defaultGround": "ground",
+ "images": [],
+ "item_ratio": 1,
+ "map": [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
@@ -24,18 +24,21 @@ main.floors.MT0=
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
],
-"firstArrive": [],
-"parallelDo": "",
-"events": {},
-"changeFloor": {},
-"afterBattle": {},
-"afterGetItem": {},
-"afterOpenDoor": {},
-"cannotMove": {},
-"bgmap": [
+ "firstArrive": [],
+ "parallelDo": "",
+ "events": {},
+ "changeFloor": {},
+ "afterBattle": {},
+ "afterGetItem": {},
+ "afterOpenDoor": {},
+ "cannotMove": {},
+ "bgmap": [
],
-"fgmap": [
+ "fgmap": [
],
+ "width": 13,
+ "height": 13,
+ "autoEvent": {}
}
\ No newline at end of file
diff --git a/project/floors/sample0.js b/project/floors/sample0.js
index 8ed705e3..4af03e43 100644
--- a/project/floors/sample0.js
+++ b/project/floors/sample0.js
@@ -1,15 +1,15 @@
main.floors.sample0=
{
-"floorId": "sample0",
-"title": "样板 0 层",
-"name": "0",
-"canFlyTo": true,
-"canUseQuickShop": true,
-"defaultGround": "ground",
-"images": [],
-"bgm": "bgm.mp3",
-"item_ratio": 1,
-"map": [
+ "floorId": "sample0",
+ "title": "样板 0 层",
+ "name": "0",
+ "canFlyTo": true,
+ "canUseQuickShop": true,
+ "defaultGround": "ground",
+ "images": [],
+ "bgm": "bgm.mp3",
+ "item_ratio": 1,
+ "map": [
[ 0, 0,220, 0, 0, 20, 87, 3, 65, 64, 44, 43, 42],
[ 0,246, 0,246, 0, 20, 0, 3, 58, 59, 60, 61, 41],
[219, 0, 0, 0,219, 20, 0, 3, 57, 26, 62, 63, 40],
@@ -24,199 +24,202 @@ main.floors.sample0=
[ 87, 11, 12, 13, 14, 4, 4, 2, 2, 2,122, 2, 2],
[ 88, 89, 90, 91, 92, 93, 94, 2, 81, 82, 83, 84, 86]
],
-"firstArrive": [
- {
- "type": "setText",
- "background": "winskin.png",
- "time": 0
- },
- "\t[样板提示]首次到达某层可以触发 firstArrive 事件,该事件可类似于RMXP中的“自动执行脚本”。\n\n本事件支持一切的事件类型,常常用来触发对话,例如:",
- "\t[hero]\b[up,hero]我是谁?我从哪来?我又要到哪去?",
- "\t[仙子,fairy]你问我...?我也不知道啊...",
- "本层主要对道具、门、怪物等进行介绍,有关事件的各种信息在下一层会有更为详细的说明。"
-],
-"events": {
- "10,9": [
- "\t[老人,man]这些是本样板支持的所有的道具。\n\n道具分为四类:items, constants, tools,equips。\nitems 为即捡即用类道具,例如宝石、血瓶、剑盾等。\nconstants 为永久道具,例如怪物手册、楼层传送器、幸运金币等。\ntools 为消耗类道具,例如破墙镐、炸弹、中心对称飞行器等。\nequips 为装备,例如剑盾等。",
- "\t[老人,man]\b[up]有关道具效果,定义在items.js中。\n目前大多数道具已有默认行为,如有自定义的需求则需在items.js中修改代码。",
- "\t[老人,man]\b[up]拾取道具结束后可触发 afterGetItem 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。",
+ "firstArrive": [
{
- "type": "hide",
- "time": 500
- }
+ "type": "setText",
+ "background": "winskin.png",
+ "time": 0
+ },
+ "\t[样板提示]首次到达某层可以触发 firstArrive 事件,该事件可类似于RMXP中的“自动执行脚本”。\n\n本事件支持一切的事件类型,常常用来触发对话,例如:",
+ "\t[hero]\b[up,hero]我是谁?我从哪来?我又要到哪去?",
+ "\t[仙子,fairy]你问我...?我也不知道啊...",
+ "本层主要对道具、门、怪物等进行介绍,有关事件的各种信息在下一层会有更为详细的说明。"
],
- "10,11": [
- "\t[老人,woman]这些是门,需要对应的钥匙打开。\n机关门必须使用特殊的开法。",
- "\t[老人,woman]开门后可触发 afterOpenDoor 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。",
- {
- "type": "hide",
- "time": 500
- }
- ],
- "2,10": [
- "\t[少女,npc0]这些是路障、楼梯、传送门。",
- "\t[少女,npc0]血网的伤害数值、中毒后每步伤害数值、衰弱时攻防下降的数值,都在 data.js 内定义。\n\n路障同样会尽量被自动寻路绕过。",
- "\t[少女,npc0]楼梯和传送门需要在changeFloor中定义目标楼层和位置,可参见样板里已有的的写法。",
- {
- "type": "hide",
- "time": 500
- }
- ],
- "2,8": [
- "\t[老人,magician]这些都是各种各样的怪物,所有怪物的数据都在enemys.js中设置。",
- "\t[老人,magician]这批怪物分别为:普通、先攻、魔攻、坚固、2连击、3连击、4连击、破甲、反击、净化。",
- "\t[老人,magician]打败怪物后可触发 afterBattle 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。",
- {
- "type": "hide",
- "time": 500
- }
- ],
- "2,5": [
- "\t[老人,magician]模仿、吸血、中毒、衰弱、诅咒。\n\n请注意吸血怪需要设置value为吸血数值,可参见样板中黑暗大法师的写法。",
- {
- "type": "hide",
- "time": 500
- }
- ],
- "2,3": [
- "\t[老人,magician]领域、夹击。\n请注意领域怪需要设置value为伤害数值,可参见样板中初级巫师的写法。",
- "\t[老人,magician]夹击和领域同时发生时先计算领域,再夹击。\n自动寻路同样会尽量绕过你设置的这些点。",
- {
- "type": "hide",
- "time": 500
- }
- ],
- "12,10": {
- "enable": false,
- "data": [
- "\t[仙子,fairy]只有楼上启用事件后,才能看到我并可以和我对话来触发事件。",
+ "events": {
+ "10,9": [
+ "\t[老人,man]这些是本样板支持的所有的道具。\n\n道具分为四类:items, constants, tools,equips。\nitems 为即捡即用类道具,例如宝石、血瓶、剑盾等。\nconstants 为永久道具,例如怪物手册、楼层传送器、幸运金币等。\ntools 为消耗类道具,例如破墙镐、炸弹、中心对称飞行器等。\nequips 为装备,例如剑盾等。",
+ "\t[老人,man]\b[up]有关道具效果,定义在items.js中。\n目前大多数道具已有默认行为,如有自定义的需求则需在items.js中修改代码。",
+ "\t[老人,man]\b[up]拾取道具结束后可触发 afterGetItem 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。",
{
"type": "hide",
"time": 500
}
- ]
- }
-},
-"changeFloor": {
- "6,0": {
- "floorId": "sample1",
- "stair": "downFloor"
+ ],
+ "10,11": [
+ "\t[老人,woman]这些是门,需要对应的钥匙打开。\n机关门必须使用特殊的开法。",
+ "\t[老人,woman]开门后可触发 afterOpenDoor 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。",
+ {
+ "type": "hide",
+ "time": 500
+ }
+ ],
+ "2,10": [
+ "\t[少女,npc0]这些是路障、楼梯、传送门。",
+ "\t[少女,npc0]血网的伤害数值、中毒后每步伤害数值、衰弱时攻防下降的数值,都在 data.js 内定义。\n\n路障同样会尽量被自动寻路绕过。",
+ "\t[少女,npc0]楼梯和传送门需要在changeFloor中定义目标楼层和位置,可参见样板里已有的的写法。",
+ {
+ "type": "hide",
+ "time": 500
+ }
+ ],
+ "2,8": [
+ "\t[老人,magician]这些都是各种各样的怪物,所有怪物的数据都在enemys.js中设置。",
+ "\t[老人,magician]这批怪物分别为:普通、先攻、魔攻、坚固、2连击、3连击、4连击、破甲、反击、净化。",
+ "\t[老人,magician]打败怪物后可触发 afterBattle 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。",
+ {
+ "type": "hide",
+ "time": 500
+ }
+ ],
+ "2,5": [
+ "\t[老人,magician]模仿、吸血、中毒、衰弱、诅咒。\n\n请注意吸血怪需要设置value为吸血数值,可参见样板中黑暗大法师的写法。",
+ {
+ "type": "hide",
+ "time": 500
+ }
+ ],
+ "2,3": [
+ "\t[老人,magician]领域、夹击。\n请注意领域怪需要设置value为伤害数值,可参见样板中初级巫师的写法。",
+ "\t[老人,magician]夹击和领域同时发生时先计算领域,再夹击。\n自动寻路同样会尽量绕过你设置的这些点。",
+ {
+ "type": "hide",
+ "time": 500
+ }
+ ],
+ "12,10": {
+ "enable": false,
+ "data": [
+ "\t[仙子,fairy]只有楼上启用事件后,才能看到我并可以和我对话来触发事件。",
+ {
+ "type": "hide",
+ "time": 500
+ }
+ ]
+ }
},
- "0,11": {
- "floorId": "sample0",
- "loc": [
- 0,
- 12
+ "changeFloor": {
+ "6,0": {
+ "floorId": "sample1",
+ "stair": "downFloor"
+ },
+ "0,11": {
+ "floorId": "sample0",
+ "loc": [
+ 0,
+ 12
+ ]
+ },
+ "0,12": {
+ "floorId": "sample0",
+ "stair": "upFloor"
+ },
+ "1,12": {
+ "floorId": "sample0",
+ "loc": [
+ 1,
+ 12
+ ]
+ },
+ "2,12": {
+ "floorId": "sample0",
+ "loc": [
+ 2,
+ 12
+ ]
+ },
+ "3,12": {
+ "floorId": "sample0",
+ "loc": [
+ 6,
+ 1
+ ],
+ "direction": "up"
+ },
+ "4,12": {
+ "floorId": "sample0",
+ "loc": [
+ 0,
+ 9
+ ],
+ "direction": "left",
+ "time": 1000
+ },
+ "5,12": {
+ "floorId": "sample0",
+ "loc": [
+ 6,
+ 10
+ ],
+ "time": 0,
+ "portalWithoutTrigger": false
+ },
+ "6,12": {
+ "floorId": "sample0",
+ "loc": [
+ 10,
+ 10
+ ],
+ "direction": "left",
+ "time": 1000
+ }
+ },
+ "afterBattle": {
+ "2,6": [
+ "\t[ghostSkeleton]不可能,你怎么可能打败我!\n(一个打败怪物触发的事件)"
]
},
- "0,12": {
- "floorId": "sample0",
- "stair": "upFloor"
- },
- "1,12": {
- "floorId": "sample0",
- "loc": [
- 1,
- 12
+ "afterGetItem": {
+ "11,8": [
+ "由于状态栏放不下,绿钥匙和铁门钥匙均视为tools,放入工具栏中。\n碰到绿门和铁门仍然会自动使用开门。"
+ ],
+ "8,6": [
+ "由于吸血和夹击等的存在,血瓶默认自动被绕路。\n你可以修改data.js中的系统Flag来设置这一项。"
+ ],
+ "8,7": [
+ "如需修改消耗品的效果,请前往 data.js ,找到并修改values内对应的具体数值即可。\n如果有更高级的需求(如每个区域宝石数值变化),详见doc文档内的做法说明。"
+ ],
+ "9,5": [
+ "每层楼的 canFlyTo 决定了该楼层能否被飞到。\n\n不能被飞到的楼层也无法使用楼层传送器。",
+ "飞行的楼层顺序由 main.js 中 floorIds 加载顺序所决定。\n\n是否必须在楼梯边使用楼传器由 data.js 中的系统Flag所决定。"
+ ],
+ "10,5": [
+ "破墙镐是破面前的墙壁还是四个方向的墙壁,由data.js中的系统Flag所决定。"
+ ],
+ "8,4": [
+ "炸弹是只能炸面前的怪物还是四个方向的怪物,由data.js中的系统Flag所决定。\n如只能炸前方怪物则和上面的圣锤等价。\n不能被炸的怪物在enemys中可以定义,可参见样板里黑衣魔王和黑暗大法师的写法。"
+ ],
+ "10,4": [
+ "“上楼”和“下楼”的目标层由 main.js 的 floorIds顺序所决定。"
+ ],
+ "9,2": [
+ "该道具默认是大黄门钥匙,如需改为钥匙盒直接修改 data.js 中的系统Flag即可。"
+ ],
+ "10,2": [
+ "屠龙匕首目前未被定义,可能需要自行实现功能。\n有关如何实现一个道具功能参见doc文档。"
+ ],
+ "12,7": [
+ "在 data.js 的系统Flag中设置是否启用装备栏。\n如果不启用则装备会直接增加属性。"
+ ],
+ "12,6": [
+ "在 data.js 的系统Flag中设置是否启用装备栏按钮。\n如果启用则装备栏按钮会替代楼传按钮。"
+ ],
+ "12,5": [
+ "装备的种类由全塔属性中的equipName决定,type的值就是该类型在equipName中的位次,例如默认情况下equiptype为0代表武器,同时只有type为0的装备的animate属性生效"
]
},
- "2,12": {
- "floorId": "sample0",
- "loc": [
- 2,
- 12
+ "afterOpenDoor": {
+ "11,12": [
+ "你开了一个绿门,触发了一个afterOpenDoor事件"
]
},
- "3,12": {
- "floorId": "sample0",
- "loc": [
- 6,
- 1
- ],
- "direction": "up"
- },
- "4,12": {
- "floorId": "sample0",
- "loc": [
- 0,
- 9
- ],
- "direction": "left",
- "time": 1000
- },
- "5,12": {
- "floorId": "sample0",
- "loc": [
- 6,
- 10
- ],
- "time": 0,
- "portalWithoutTrigger": false
- },
- "6,12": {
- "floorId": "sample0",
- "loc": [
- 10,
- 10
- ],
- "direction": "left",
- "time": 1000
- }
-},
-"afterBattle": {
- "2,6": [
- "\t[ghostSkeleton]不可能,你怎么可能打败我!\n(一个打败怪物触发的事件)"
- ]
-},
-"afterGetItem": {
- "11,8": [
- "由于状态栏放不下,绿钥匙和铁门钥匙均视为tools,放入工具栏中。\n碰到绿门和铁门仍然会自动使用开门。"
- ],
- "8,6": [
- "由于吸血和夹击等的存在,血瓶默认自动被绕路。\n你可以修改data.js中的系统Flag来设置这一项。"
- ],
- "8,7": [
- "如需修改消耗品的效果,请前往 data.js ,找到并修改values内对应的具体数值即可。\n如果有更高级的需求(如每个区域宝石数值变化),详见doc文档内的做法说明。"
- ],
- "9,5": [
- "每层楼的 canFlyTo 决定了该楼层能否被飞到。\n\n不能被飞到的楼层也无法使用楼层传送器。",
- "飞行的楼层顺序由 main.js 中 floorIds 加载顺序所决定。\n\n是否必须在楼梯边使用楼传器由 data.js 中的系统Flag所决定。"
- ],
- "10,5": [
- "破墙镐是破面前的墙壁还是四个方向的墙壁,由data.js中的系统Flag所决定。"
- ],
- "8,4": [
- "炸弹是只能炸面前的怪物还是四个方向的怪物,由data.js中的系统Flag所决定。\n如只能炸前方怪物则和上面的圣锤等价。\n不能被炸的怪物在enemys中可以定义,可参见样板里黑衣魔王和黑暗大法师的写法。"
- ],
- "10,4": [
- "“上楼”和“下楼”的目标层由 main.js 的 floorIds顺序所决定。"
- ],
- "9,2": [
- "该道具默认是大黄门钥匙,如需改为钥匙盒直接修改 data.js 中的系统Flag即可。"
- ],
- "10,2": [
- "屠龙匕首目前未被定义,可能需要自行实现功能。\n有关如何实现一个道具功能参见doc文档。"
- ],
- "12,7": [
- "在 data.js 的系统Flag中设置是否启用装备栏。\n如果不启用则装备会直接增加属性。"
- ],
- "12,6": [
- "在 data.js 的系统Flag中设置是否启用装备栏按钮。\n如果启用则装备栏按钮会替代楼传按钮。"
- ],
- "12,5": [
- "装备的种类由全塔属性中的equipName决定,type的值就是该类型在equipName中的位次,例如默认情况下equiptype为0代表武器,同时只有type为0的装备的animate属性生效"
- ]
-},
-"afterOpenDoor": {
- "11,12": [
- "你开了一个绿门,触发了一个afterOpenDoor事件"
- ]
-},
-"cannotMove": {},
-"bgmap": [
+ "cannotMove": {},
+ "bgmap": [
],
-"fgmap": [
+ "fgmap": [
],
+ "width": 13,
+ "height": 13,
+ "autoEvent": {}
}
\ No newline at end of file
diff --git a/project/floors/sample1.js b/project/floors/sample1.js
index 5149304d..9c769745 100644
--- a/project/floors/sample1.js
+++ b/project/floors/sample1.js
@@ -1,25 +1,25 @@
main.floors.sample1=
{
-"floorId": "sample1",
-"title": "样板 1 层",
-"name": "1",
-"canFlyTo": true,
-"canUseQuickShop": true,
-"defaultGround": "grass",
-"images": [
- [
- 0,
- 0,
- "bg.jpg",
- 0
- ]
-],
-"weather": [
- "snow",
- 6
-],
-"item_ratio": 1,
-"map": [
+ "floorId": "sample1",
+ "title": "样板 1 层",
+ "name": "1",
+ "canFlyTo": true,
+ "canUseQuickShop": true,
+ "defaultGround": "grass",
+ "images": [
+ [
+ 0,
+ 0,
+ "bg.jpg",
+ 0
+ ]
+ ],
+ "weather": [
+ "snow",
+ 6
+ ],
+ "item_ratio": 1,
+ "map": [
[ 7,131, 8,152, 9,130, 10,152,166,165,132,165,166],
[ 0, 0, 0, 0, 0, 0, 0,152,165,164, 0,162,165],
[152,152,152,152,121,152,152,152, 0, 0,229, 0, 0],
@@ -34,609 +34,617 @@ main.floors.sample1=
[ 1, 0,123, 1, 0, 20,124, 0,121, 0,122, 0,126],
[ 1, 0, 0, 1, 88, 20, 86, 0, 0, 0, 0, 0, 0]
],
-"firstArrive": [],
-"events": {
- "4,10": [
- "\t[样板提示]本层楼将会对各类事件进行介绍。",
- "左边是一个仿50层的陷阱做法,上方是商店、快捷商店的使用方法,右上是一个典型的杀怪开门的例子,右下是各类可能的NPC事件。",
- "本样板目前支持的事件列表大致有:\ntext: 显示一段文字(比如你现在正在看到的)\ntip: 左上角显示提示\nshow: 使一个事件有效(可见、可被交互)\nhide: 使一个事件失效(不可见、不可被交互)\ntrigger: 触发另一个地点的事件\nanimate: 显示动画\nbattle: 强制和某怪物战斗\nopenDoor: 无需钥匙开门(例如机关门、暗墙)",
- "openShop: 打开一个全局商店\ndisableShop: 禁用一个全局商店\nchangeFloor: 传送勇士到某层某位置\nchangePos: 传送勇士到当层某位置;转向\nshowImage: 显示图片\nsetFg: 更改画面色调\nsetWeather: 更改天气\nmove: 移动事件效果\nmoveHero: 移动勇士效果\nplayBgm: 播放某个背景音乐\npauseBgm: 暂停背景音乐\nresumeBgm: 恢复背景音乐的播放\nplaySound: 播放某个音频",
- "if: 条件判断\nchoices: 提供选项\nsetValue: 设置勇士属性道具,或某个变量/flag\nupdate: 更新状态栏和地图显伤\nwin: 获得胜利(游戏通关)\nlose: 游戏失败\nsleep: 等待多少毫秒\nexit: 立刻结束当前事件\nrevisit: 立刻结束事件并重新触发\nfunction: 自定义JS脚本\n\n更多支持的事件还在编写中,欢迎您宝贵的意见。",
- "有关各事件的样例,可参见本层一些NPC的写法。\n所有事件样例本层都有介绍。\n\n一个自定义事件处理完后,需要调用{\"type\": \"hide\"}该事件才不会再次出现。",
- {
- "type": "hide"
- }
- ],
- "1,5": {
- "enable": false,
- "data": []
- },
- "1,6": {
- "enable": false,
- "data": []
- },
- "0,7": {
- "enable": false,
- "data": []
- },
- "2,7": {
- "enable": false,
- "data": []
- },
- "1,8": {
- "enable": false,
- "data": []
- },
- "1,7": [
- {
- "type": "show",
- "loc": [
- 1,
- 5
- ],
- "time": 1500
+ "firstArrive": [],
+ "events": {
+ "4,10": [
+ "\t[样板提示]本层楼将会对各类事件进行介绍。",
+ "左边是一个仿50层的陷阱做法,上方是商店、快捷商店的使用方法,右上是一个典型的杀怪开门的例子,右下是各类可能的NPC事件。",
+ "本样板目前支持的事件列表大致有:\ntext: 显示一段文字(比如你现在正在看到的)\ntip: 左上角显示提示\nshow: 使一个事件有效(可见、可被交互)\nhide: 使一个事件失效(不可见、不可被交互)\ntrigger: 触发另一个地点的事件\nanimate: 显示动画\nbattle: 强制和某怪物战斗\nopenDoor: 无需钥匙开门(例如机关门、暗墙)",
+ "openShop: 打开一个全局商店\ndisableShop: 禁用一个全局商店\nchangeFloor: 传送勇士到某层某位置\nchangePos: 传送勇士到当层某位置;转向\nshowImage: 显示图片\nsetFg: 更改画面色调\nsetWeather: 更改天气\nmove: 移动事件效果\nmoveHero: 移动勇士效果\nplayBgm: 播放某个背景音乐\npauseBgm: 暂停背景音乐\nresumeBgm: 恢复背景音乐的播放\nplaySound: 播放某个音频",
+ "if: 条件判断\nchoices: 提供选项\nsetValue: 设置勇士属性道具,或某个变量/flag\nupdate: 更新状态栏和地图显伤\nwin: 获得胜利(游戏通关)\nlose: 游戏失败\nsleep: 等待多少毫秒\nexit: 立刻结束当前事件\nfunction: 自定义JS脚本\n\n更多支持的事件还在编写中,欢迎您宝贵的意见。",
+ "有关各事件的样例,可参见本层一些NPC的写法。\n所有事件样例本层都有介绍。\n\n一个自定义事件处理完后,需要调用{\"type\": \"hide\"}该事件才不会再次出现。",
+ {
+ "type": "hide"
+ }
+ ],
+ "1,5": {
+ "enable": false,
+ "data": []
},
- {
- "type": "sleep",
- "time": 500
+ "1,6": {
+ "enable": false,
+ "data": []
},
- "\t[redKing]欢迎来到魔塔,你是第一百位挑战者。\n若你能打败我所有的手下,我就与你一对一的决斗。\n现在你必须接受我的安排。",
- {
- "type": "show",
- "loc": [
- [
+ "0,7": {
+ "enable": false,
+ "data": []
+ },
+ "2,7": {
+ "enable": false,
+ "data": []
+ },
+ "1,8": {
+ "enable": false,
+ "data": []
+ },
+ "1,7": [
+ {
+ "type": "show",
+ "loc": [
1,
- 6
+ 5
],
- [
- 0,
- 7
- ],
- [
- 1,
- 8
- ],
- [
- 2,
- 7
- ]
- ],
- "time": 500
- },
- "\t[hero]什么?",
- {
- "type": "playSound",
- "name": "attack.mp3"
- },
- {
- "type": "setValue",
- "name": "status:atk",
- "operator": "/=",
- "value": "10"
- },
- {
- "type": "setValue",
- "name": "status:def",
- "operator": "/=",
- "value": "10"
- },
- {
- "type": "hide",
- "loc": [
- [
- 1,
- 6
- ],
- [
- 0,
- 7
- ],
- [
- 2,
- 7
- ],
- [
- 1,
- 8
- ]
- ]
- },
- {
- "type": "hide",
- "loc": [
- 1,
- 5
- ],
- "time": 500
- },
- {
- "type": "hide"
- },
- {
- "type": "setCurtain",
- "color": [
- 0,
- 0,
- 0
- ],
- "time": 1250
- },
- {
- "type": "sleep",
- "time": 700
- },
- {
- "type": "changeFloor",
- "floorId": "sample1",
- "loc": [
- 1,
- 11
- ],
- "direction": "right",
- "time": 1000
- },
- {
- "type": "trigger",
- "loc": [
- 2,
- 11
- ]
- }
- ],
- "2,11": [
- "\t[杰克,thief]喂!醒醒!快醒醒!",
- {
- "type": "setCurtain",
- "time": 1500
- },
- "\t[hero]额,我这是在什么地方?",
- "\t[杰克,thief]你被魔王抓了起来扔进了监狱,和我关在了一起,但是幸运的是我在昨天刚刚挖好一条越狱的暗道!",
- {
- "type": "openDoor",
- "loc": [
- 3,
- 11
- ]
- },
- {
- "type": "sleep",
- "time": 300
- },
- "\t[杰克,thief]我先走了,祝你好运!",
- {
- "type": "move",
- "time": 750,
- "steps": [
- "right",
- "right",
- "down"
- ]
- },
- "上面是个move事件,可以对NPC等进行移动。\n详见样板中小偷事件的写法。",
- "\t[hero]怎么跑的这么快..."
- ],
- "4,2": [
- "\t[老人,man]本塔的商店有两类,全局商店和非全局商店。\n\n所谓非全局商店,就类似于右下角那个卖钥匙的老人一样,一定要碰到才能触发事件。\n\n而全局商店,则能在快捷商店中直接使用。",
- "\t[老人,man]要注册一个全局商店,你需要在 data.js 中,找到 shops,并在内添加你的商店信息。",
- "\t[老人,man]商店信息添加后,可以在需要的事件处调用{\"type\": \"openShop\"}来打开你添加的全局商店。",
- "\t[老人,man]在上面的例子里,左边是一个仿50层的金币商店,右边是一个仿24层的经验商店。\n\n商店被访问后即可在快捷商店中进行使用。",
- "\t[老人,man]如果你需要在某层暂时禁用快捷商店,可以在data.js中设置cannotUseQuickShop。\n如果需要永久禁用商店,请使用{\"type\":\"disableShop\"}",
- {
- "type": "hide",
- "time": 500
- }
- ],
- "1,0": [
- {
- "type": "openShop",
- "id": "moneyShop1"
- }
- ],
- "5,0": [
- {
- "type": "openShop",
- "id": "expShop1"
- }
- ],
- "7,7": [
- "\t[老人,man]这是一个典型的杀怪开门、强制战斗事件。",
- {
- "type": "hide"
- }
- ],
- "8,7": {
- "enable": false,
- "data": []
- },
- "9,7": [
- {
- "type": "show",
- "loc": [
- 8,
- 7
- ]
- },
- {
- "type": "hide"
- }
- ],
- "10,4": [
- "\t[blackKing]你终于还是来了。",
- "\t[hero]放开我们的公主!",
- "\t[blackKing]如果我不愿意呢?",
- "\t[hero]无需多说,拔剑吧!",
- {
- "type": "battle",
- "id": "blackKing"
- },
- {
- "type": "hide",
- "loc": [
- 10,
- 2
- ]
- },
- {
- "type": "openDoor",
- "loc": [
- 8,
- 7
- ]
- },
- "\t[blackKing]没想到你已经变得这么强大了... 算你厉害。\n公主就交给你了,请好好对她。",
- {
- "type": "hide"
- }
- ],
- "10,0": [
- "\t[hero]公主,我来救你了~",
- "\t[公主,princess]快救我出去!我受够这里了!",
- "\t[hero]公主别怕,我们走吧~",
- {
- "type": "win",
- "reason": "救出公主"
- }
- ],
- "6,12": {
- "enable": false,
- "data": []
- },
- "6,11": [
- "\t[仙子,fairy]通过调用 {\"type\": \"show\"} 可以使隐藏的事件显示出来。\n比如我下面这个机关门。",
- {
- "type": "show",
- "loc": [
- 6,
- 12
- ]
- },
- "\t[仙子,fairy]通过调用 {\"type\": \"openDoor\"} 可以无需钥匙打开一扇门或暗墙。",
- {
- "type": "openDoor",
- "loc": [
- 6,
- 12
- ]
- },
- "\t[仙子,fairy]同时,也可以对其它层进行操作,比如楼下的机关门,现在已经为你打开了。",
- {
- "type": "openDoor",
- "loc": [
- 11,
- 10
- ],
- "floorId": "sample0"
- },
- "\t[仙子,fairy]如果 show 或 hide 指定了 time 参数,则以动画效果显示,指定的参数作为消失时间(毫秒)来计算。",
- "\t[仙子,fairy]现在到楼下来找我吧~",
- {
- "type": "show",
- "loc": [
- 12,
- 10
- ],
- "floorId": "sample0"
- },
- {
- "type": "hide",
- "time": 500
- }
- ],
- "8,11": [
- {
- "type": "setValue",
- "name": "flag:man_times",
- "operator": "+=",
- "value": "1"
- },
- "\t[老人,man]在文字中使用$+{}可以计算并显示一个表达式的结果。\n",
- "\t[老人,man]例如:\n你的当前攻击力是${status:atk},防御力是${status:def}。\n攻防和的十倍是${10*(status:atk+status:def)},攻防之积是${status:atk*status:def}。\n你有${item:yellowKey}把黄钥匙,${item:blueKey}把蓝钥匙,${item:redKey}把红钥匙。\n你有${item:pickaxe}个破,${item:bomb}个炸,${item:centerFly}个飞。\n这是你第${flag:man_times}次和我对话。",
- "\t[老人,man]同时,你也可以通过{\"type\": \"setValue\"}来设置一个勇士的属性、道具,或某个Flag。",
- "\t[老人,man]例如:\n现在我将让你的攻防提升50%,再将攻防和的十倍加到生命值上。",
- {
- "type": "setValue",
- "name": "status:atk",
- "operator": "*=",
- "value": "1.5"
- },
- {
- "type": "setValue",
- "name": "status:def",
- "operator": "*=",
- "value": "1.5"
- },
- {
- "type": "setValue",
- "name": "status:hp",
- "operator": "+=",
- "value": "10*(status:atk+status:def)"
- },
- "\t[老人,man]再送你500金币,1000经验,1破2炸3飞!",
- {
- "type": "setValue",
- "name": "status:money",
- "operator": "+=",
- "value": "500"
- },
- {
- "type": "setValue",
- "name": "status:exp",
- "operator": "+=",
- "value": "1000"
- },
- {
- "type": "setValue",
- "name": "item:pickaxe",
- "operator": "+=",
- "value": "1"
- },
- {
- "type": "setValue",
- "name": "item:bomb",
- "operator": "+=",
- "value": "2"
- },
- {
- "type": "setValue",
- "name": "item:centerFly",
- "operator": "+=",
- "value": "3"
- },
- "\t[老人,man]status:xxx 代表勇士的某个属性。\n其中xxx可取hp, atk, def, mdef, money,exp这几项。\n\nitem:xxx 代表勇士的某个道具的个数。\nxxx为道具ID,具体可参见items.js中的定义。\n\nflag:xxx 代表某个自定义Flag或变量。\nxxx为Flag/变量名,可以自行定义,由字母、数字和下划线组成。\n未定义过而直接取用的Flag默认值为false。",
- "\t[老人,man]你现在可以重新和我进行对话,进一步看到属性值的改变。"
- ],
- "10,11": [
- {
- "type": "if",
- "condition": "flag:woman_times==0",
- "true": [
- "\t[老人,woman]这是个很复杂的例子,它将教会你如何使用if 语句进行条件判断,以及 choices 提供选项来供用户进行选择。",
- "\t[老人,woman]第一次访问我将显示这段文字;从第二次开始将会向你出售钥匙。\n钥匙价格将随着访问次数递增。\n当合计出售了七把钥匙后,将送你一把大黄门钥匙,并消失不再出现。",
- "\t[老人,woman]这部分的逻辑比较长,请细心看样板的写法,是很容易看懂并理解的。"
- ],
- "false": [
- {
- "type": "if",
- "condition": "flag:woman_times==8",
- "true": [
- "\t[老人,woman]你购买的钥匙已经够多了,再继续卖给你的话我会有危险的。",
- "\t[老人,woman]看在你贡献给我这么多钱的份上,送你一把大黄门钥匙吧,希望你能好好用它。",
- {
- "type": "setValue",
- "name": "item:bigKey",
- "operator": "+=",
- "value": "1"
- },
- "\t[老人,woman]我先走了,拜拜~",
- {
- "type": "hide",
- "time": 500
- },
- {
- "type": "exit"
- }
+ "time": 1500
+ },
+ {
+ "type": "sleep",
+ "time": 500
+ },
+ "\t[redKing]欢迎来到魔塔,你是第一百位挑战者。\n若你能打败我所有的手下,我就与你一对一的决斗。\n现在你必须接受我的安排。",
+ {
+ "type": "show",
+ "loc": [
+ [
+ 1,
+ 6
],
- "false": [
- {
- "type": "choices",
- "text": "\t[老人,woman]少年,你需要钥匙吗?\n我这里有大把的!",
- "choices": [
- {
- "text": "黄钥匙(${9+flag:woman_times}金币)",
- "action": [
- {
- "type": "if",
- "condition": "status:money>=9+flag:woman_times",
- "true": [
- {
- "type": "setValue",
- "name": "status:money",
- "operator": "-=",
- "value": "9+flag:woman_times"
- },
- {
- "type": "setValue",
- "name": "item:yellowKey",
- "operator": "+=",
- "value": "1"
- }
- ],
- "false": [
- "\t[老人,woman]你的金钱不足!",
- {
- "type": "revisit"
- }
- ]
- }
- ]
- },
- {
- "text": "蓝钥匙(${18+2*flag:woman_times}金币)",
- "action": [
- {
- "type": "if",
- "condition": "status:money>=18+2*flag:woman_times",
- "true": [
- {
- "type": "setValue",
- "name": "status:money",
- "operator": "-=",
- "value": "18+2*flag:woman_times"
- },
- {
- "type": "setValue",
- "name": "item:blueKey",
- "operator": "+=",
- "value": "1"
- }
- ],
- "false": [
- "\t[老人,woman]你的金钱不足!",
- {
- "type": "revisit"
- }
- ]
- }
- ]
- },
- {
- "text": "红钥匙(${36+4*flag:woman_times}金币)",
- "action": [
- {
- "type": "if",
- "condition": "status:money>=36+4*flag:woman_times",
- "true": [
- {
- "type": "setValue",
- "name": "status:money",
- "operator": "-=",
- "value": "36+4*flag:woman_times"
- },
- {
- "type": "setValue",
- "name": "item:redKey",
- "operator": "+=",
- "value": "1"
- }
- ],
- "false": [
- "\t[老人,woman]你的金钱不足!",
- {
- "type": "revisit"
- }
- ]
- }
- ]
- },
- {
- "text": "离开",
- "action": [
- {
- "type": "exit"
- }
- ]
- }
- ]
- }
+ [
+ 0,
+ 7
+ ],
+ [
+ 1,
+ 8
+ ],
+ [
+ 2,
+ 7
]
- }
- ]
+ ],
+ "time": 500
+ },
+ "\t[hero]什么?",
+ {
+ "type": "playSound",
+ "name": "attack.mp3"
+ },
+ {
+ "type": "setValue",
+ "name": "status:atk",
+ "operator": "/=",
+ "value": "10"
+ },
+ {
+ "type": "setValue",
+ "name": "status:def",
+ "operator": "/=",
+ "value": "10"
+ },
+ {
+ "type": "hide",
+ "loc": [
+ [
+ 1,
+ 6
+ ],
+ [
+ 0,
+ 7
+ ],
+ [
+ 2,
+ 7
+ ],
+ [
+ 1,
+ 8
+ ]
+ ]
+ },
+ {
+ "type": "hide",
+ "loc": [
+ 1,
+ 5
+ ],
+ "time": 500
+ },
+ {
+ "type": "hide"
+ },
+ {
+ "type": "setCurtain",
+ "color": [
+ 0,
+ 0,
+ 0
+ ],
+ "time": 1250
+ },
+ {
+ "type": "sleep",
+ "time": 700
+ },
+ {
+ "type": "changeFloor",
+ "floorId": "sample1",
+ "loc": [
+ 1,
+ 11
+ ],
+ "direction": "right",
+ "time": 1000
+ },
+ {
+ "type": "trigger",
+ "loc": [
+ 2,
+ 11
+ ]
+ }
+ ],
+ "2,11": [
+ "\t[杰克,thief]喂!醒醒!快醒醒!",
+ {
+ "type": "setCurtain",
+ "time": 1500
+ },
+ "\t[hero]额,我这是在什么地方?",
+ "\t[杰克,thief]你被魔王抓了起来扔进了监狱,和我关在了一起,但是幸运的是我在昨天刚刚挖好一条越狱的暗道!",
+ {
+ "type": "openDoor",
+ "loc": [
+ 3,
+ 11
+ ]
+ },
+ {
+ "type": "sleep",
+ "time": 300
+ },
+ "\t[杰克,thief]我先走了,祝你好运!",
+ {
+ "type": "move",
+ "time": 750,
+ "steps": [
+ "right",
+ "right",
+ "down"
+ ]
+ },
+ "上面是个move事件,可以对NPC等进行移动。\n详见样板中小偷事件的写法。",
+ "\t[hero]怎么跑的这么快..."
+ ],
+ "4,2": [
+ "\t[老人,man]本塔的商店有两类,全局商店和非全局商店。\n\n所谓非全局商店,就类似于右下角那个卖钥匙的老人一样,一定要碰到才能触发事件。\n\n而全局商店,则能在快捷商店中直接使用。",
+ "\t[老人,man]要注册一个全局商店,你需要在 data.js 中,找到 shops,并在内添加你的商店信息。",
+ "\t[老人,man]商店信息添加后,可以在需要的事件处调用{\"type\": \"openShop\"}来打开你添加的全局商店。",
+ "\t[老人,man]在上面的例子里,左边是一个仿50层的金币商店,右边是一个仿24层的经验商店。\n\n商店被访问后即可在快捷商店中进行使用。",
+ "\t[老人,man]如果你需要在某层暂时禁用快捷商店,可以在data.js中设置cannotUseQuickShop。\n如果需要永久禁用商店,请使用{\"type\":\"disableShop\"}",
+ {
+ "type": "hide",
+ "time": 500
+ }
+ ],
+ "1,0": [
+ {
+ "type": "openShop",
+ "id": "shop1",
+ "open": true
+ }
+ ],
+ "5,0": [
+ {
+ "type": "openShop",
+ "id": "shop2",
+ "open": true
+ }
+ ],
+ "7,7": [
+ "\t[老人,man]这是一个典型的杀怪开门、强制战斗事件。",
+ {
+ "type": "hide"
+ }
+ ],
+ "8,7": {
+ "enable": false,
+ "data": []
},
- {
- "type": "setValue",
- "name": "flag:woman_times",
- "operator": "+=",
- "value": "1"
+ "9,7": [
+ {
+ "type": "show",
+ "loc": [
+ 8,
+ 7
+ ]
+ },
+ {
+ "type": "hide"
+ }
+ ],
+ "10,4": [
+ "\t[blackKing]你终于还是来了。",
+ "\t[hero]放开我们的公主!",
+ "\t[blackKing]如果我不愿意呢?",
+ "\t[hero]无需多说,拔剑吧!",
+ {
+ "type": "battle",
+ "id": "blackKing"
+ },
+ {
+ "type": "hide",
+ "loc": [
+ 10,
+ 2
+ ]
+ },
+ {
+ "type": "openDoor",
+ "loc": [
+ 8,
+ 7
+ ]
+ },
+ "\t[blackKing]没想到你已经变得这么强大了... 算你厉害。\n公主就交给你了,请好好对她。",
+ {
+ "type": "hide"
+ }
+ ],
+ "10,0": [
+ "\t[hero]公主,我来救你了~",
+ "\t[公主,princess]快救我出去!我受够这里了!",
+ "\t[hero]公主别怕,我们走吧~",
+ {
+ "type": "win",
+ "reason": "救出公主"
+ }
+ ],
+ "6,12": {
+ "enable": false,
+ "data": []
},
- {
- "type": "revisit"
- }
- ],
- "12,11": [
- "\t[老人,womanMagician]使用 {\"type\":\"function\"} 可以写自定义的JS脚本。\n本塔支持的所有主要API会在doc文档内给出。",
- "\t[老人,womanMagician]例如这个例子:即将弹出一个输入窗口,然后会将你的输入结果直接加到你的攻击力上。",
- {
- "type": "input",
- "text": "请输入你要加攻击力的数值:"
- },
- {
- "type": "if",
- "condition": "flag:input>0",
- "true": [
- {
- "type": "setValue",
- "name": "status:atk",
- "operator": "+=",
- "value": "flag:input"
- },
- {
- "type": "tip",
- "text": "操作成功,攻击+${flag:input}"
- },
- "操作成功,攻击+${flag:input}"
- ],
- "false": []
- },
- "\t[老人,womanMagician]具体可参见样板中本事件的写法。"
- ],
-},
-"changeFloor": {
- "4,12": {
- "floorId": "sample0",
- "loc": [
- 6,
- 0
+ "6,11": [
+ "\t[仙子,fairy]通过调用 {\"type\": \"show\"} 可以使隐藏的事件显示出来。\n比如我下面这个机关门。",
+ {
+ "type": "show",
+ "loc": [
+ 6,
+ 12
+ ]
+ },
+ "\t[仙子,fairy]通过调用 {\"type\": \"openDoor\"} 可以无需钥匙打开一扇门或暗墙。",
+ {
+ "type": "openDoor",
+ "loc": [
+ 6,
+ 12
+ ]
+ },
+ "\t[仙子,fairy]同时,也可以对其它层进行操作,比如楼下的机关门,现在已经为你打开了。",
+ {
+ "type": "openDoor",
+ "loc": [
+ 11,
+ 10
+ ],
+ "floorId": "sample0"
+ },
+ "\t[仙子,fairy]如果 show 或 hide 指定了 time 参数,则以动画效果显示,指定的参数作为消失时间(毫秒)来计算。",
+ "\t[仙子,fairy]现在到楼下来找我吧~",
+ {
+ "type": "show",
+ "loc": [
+ 12,
+ 10
+ ],
+ "floorId": "sample0"
+ },
+ {
+ "type": "hide",
+ "time": 500
+ }
+ ],
+ "8,11": [
+ {
+ "type": "setValue",
+ "name": "flag:man_times",
+ "operator": "+=",
+ "value": "1"
+ },
+ "\t[老人,man]在文字中使用$+{}可以计算并显示一个表达式的结果。\n",
+ "\t[老人,man]例如:\n你的当前攻击力是${status:atk},防御力是${status:def}。\n攻防和的十倍是${10*(status:atk+status:def)},攻防之积是${status:atk*status:def}。\n你有${item:yellowKey}把黄钥匙,${item:blueKey}把蓝钥匙,${item:redKey}把红钥匙。\n你有${item:pickaxe}个破,${item:bomb}个炸,${item:centerFly}个飞。\n这是你第${flag:man_times}次和我对话。",
+ "\t[老人,man]同时,你也可以通过{\"type\": \"setValue\"}来设置一个勇士的属性、道具,或某个Flag。",
+ "\t[老人,man]例如:\n现在我将让你的攻防提升50%,再将攻防和的十倍加到生命值上。",
+ {
+ "type": "setValue",
+ "name": "status:atk",
+ "operator": "*=",
+ "value": "1.5"
+ },
+ {
+ "type": "setValue",
+ "name": "status:def",
+ "operator": "*=",
+ "value": "1.5"
+ },
+ {
+ "type": "setValue",
+ "name": "status:hp",
+ "operator": "+=",
+ "value": "10*(status:atk+status:def)"
+ },
+ "\t[老人,man]再送你500金币,1000经验,1破2炸3飞!",
+ {
+ "type": "setValue",
+ "name": "status:money",
+ "operator": "+=",
+ "value": "500"
+ },
+ {
+ "type": "setValue",
+ "name": "status:exp",
+ "operator": "+=",
+ "value": "1000"
+ },
+ {
+ "type": "setValue",
+ "name": "item:pickaxe",
+ "operator": "+=",
+ "value": "1"
+ },
+ {
+ "type": "setValue",
+ "name": "item:bomb",
+ "operator": "+=",
+ "value": "2"
+ },
+ {
+ "type": "setValue",
+ "name": "item:centerFly",
+ "operator": "+=",
+ "value": "3"
+ },
+ "\t[老人,man]status:xxx 代表勇士的某个属性。\n其中xxx可取hp, atk, def, mdef, money,exp这几项。\n\nitem:xxx 代表勇士的某个道具的个数。\nxxx为道具ID,具体可参见items.js中的定义。\n\nflag:xxx 代表某个自定义Flag或变量。\nxxx为Flag/变量名,可以自行定义,由字母、数字和下划线组成。\n未定义过而直接取用的Flag默认值为false。",
+ "\t[老人,man]你现在可以重新和我进行对话,进一步看到属性值的改变。"
+ ],
+ "10,11": [
+ {
+ "type": "while",
+ "condition": "true",
+ "data": [
+ {
+ "type": "switch",
+ "condition": "flag:woman_times",
+ "caseList": [
+ {
+ "case": "0",
+ "action": [
+ "\t[老人,woman]这是个很复杂的例子,它将教会你如何使用if 语句进行条件判断,以及 choices 提供选项来供用户进行选择。",
+ "\t[老人,woman]第一次访问我将显示这段文字;从第二次开始将会向你出售钥匙。\n钥匙价格将随着访问次数递增。\n当合计出售了七把钥匙后,将送你一把大黄门钥匙,并消失不再出现。",
+ "\t[老人,woman]这部分的逻辑比较长,请细心看样板的写法,是很容易看懂并理解的。"
+ ]
+ },
+ {
+ "case": "8",
+ "action": [
+ "\t[老人,woman]你购买的钥匙已经够多了,再继续卖给你的话我会有危险的。",
+ "\t[老人,woman]看在你贡献给我这么多钱的份上,送你一把大黄门钥匙吧,希望你能好好用它。",
+ {
+ "type": "setValue",
+ "name": "item:bigKey",
+ "operator": "+=",
+ "value": "1"
+ },
+ "\t[老人,woman]我先走了,拜拜~",
+ {
+ "type": "hide",
+ "time": 500
+ },
+ {
+ "type": "exit"
+ }
+ ]
+ },
+ {
+ "case": "default",
+ "action": [
+ {
+ "type": "choices",
+ "text": "\t[老人,woman]少年,你需要钥匙吗?\n我这里有大把的!",
+ "choices": [
+ {
+ "text": "黄钥匙(${9+flag:woman_times}金币)",
+ "action": [
+ {
+ "type": "if",
+ "condition": "status:money>=9+flag:woman_times",
+ "true": [
+ {
+ "type": "setValue",
+ "name": "status:money",
+ "operator": "-=",
+ "value": "9+flag:woman_times"
+ },
+ {
+ "type": "setValue",
+ "name": "item:yellowKey",
+ "operator": "+=",
+ "value": "1"
+ }
+ ],
+ "false": [
+ "\t[老人,woman]你的金钱不足!"
+ ]
+ }
+ ]
+ },
+ {
+ "text": "蓝钥匙(${18+2*flag:woman_times}金币)",
+ "action": [
+ {
+ "type": "if",
+ "condition": "status:money>=18+2*flag:woman_times",
+ "true": [
+ {
+ "type": "setValue",
+ "name": "status:money",
+ "operator": "-=",
+ "value": "18+2*flag:woman_times"
+ },
+ {
+ "type": "setValue",
+ "name": "item:blueKey",
+ "operator": "+=",
+ "value": "1"
+ },
+ {
+ "type": "continue"
+ }
+ ],
+ "false": [
+ "\t[老人,woman]你的金钱不足!"
+ ]
+ }
+ ]
+ },
+ {
+ "text": "红钥匙(${36+4*flag:woman_times}金币)",
+ "action": [
+ {
+ "type": "if",
+ "condition": "status:money>=36+4*flag:woman_times",
+ "true": [
+ {
+ "type": "setValue",
+ "name": "status:money",
+ "operator": "-=",
+ "value": "36+4*flag:woman_times"
+ },
+ {
+ "type": "setValue",
+ "name": "item:redKey",
+ "operator": "+=",
+ "value": "1"
+ }
+ ],
+ "false": [
+ "\t[老人,woman]你的金钱不足!",
+ {
+ "type": "continue"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "text": "离开",
+ "action": [
+ {
+ "type": "exit"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "setValue",
+ "name": "flag:woman_times",
+ "operator": "+=",
+ "value": "1"
+ }
+ ]
+ }
+ ],
+ "12,11": [
+ "\t[老人,womanMagician]使用 {\"type\":\"function\"} 可以写自定义的JS脚本。\n本塔支持的所有主要API会在doc文档内给出。",
+ "\t[老人,womanMagician]例如这个例子:即将弹出一个输入窗口,然后会将你的输入结果直接加到你的攻击力上。",
+ {
+ "type": "input",
+ "text": "请输入你要加攻击力的数值:"
+ },
+ {
+ "type": "if",
+ "condition": "flag:input>0",
+ "true": [
+ {
+ "type": "setValue",
+ "name": "status:atk",
+ "operator": "+=",
+ "value": "flag:input"
+ },
+ {
+ "type": "tip",
+ "text": "操作成功,攻击+${flag:input}"
+ },
+ "操作成功,攻击+${flag:input}"
+ ],
+ "false": []
+ },
+ "\t[老人,womanMagician]具体可参见样板中本事件的写法。"
]
},
- "5,5": {
- "floorId": "sample2",
- "stair": "downFloor",
- "direction": "up"
- },
- "10,12": null
-},
-"afterBattle": {
- "9,6": [
- {
- "type": "setValue",
- "name": "flag:door",
- "operator": "+=",
- "value": "1"
- }
- ],
- "11,6": [
- {
- "type": "setValue",
- "name": "flag:door",
- "operator": "+=",
- "value": "1"
- }
- ]
-},
-"afterGetItem": {},
-"afterOpenDoor": {},
-"cannotMove": {},
-"bgmap": [
-
-],
-"fgmap": [
-
-],
-"autoEvent": {
- "10,5": {
- "0": {
- "condition": "flag:door==2",
- "currentFloor": true,
- "priority": 0,
- "delayExecute": false,
- "multiExecute": false,
- "data": [
- {
- "type": "openDoor"
- }
-
+ "changeFloor": {
+ "4,12": {
+ "floorId": "sample0",
+ "loc": [
+ 6,
+ 0
]
+ },
+ "5,5": {
+ "floorId": "sample2",
+ "stair": "downFloor",
+ "direction": "up"
+ },
+ "10,12": null
+ },
+ "afterBattle": {
+ "9,6": [
+ {
+ "type": "setValue",
+ "name": "flag:door",
+ "operator": "+=",
+ "value": "1"
+ }
+ ],
+ "11,6": [
+ {
+ "type": "setValue",
+ "name": "flag:door",
+ "operator": "+=",
+ "value": "1"
+ }
+ ]
+ },
+ "afterGetItem": {},
+ "afterOpenDoor": {},
+ "cannotMove": {},
+ "bgmap": [
+
+],
+ "fgmap": [
+
+],
+ "autoEvent": {
+ "10,5": {
+ "0": {
+ "condition": "flag:door==2",
+ "currentFloor": true,
+ "priority": 0,
+ "delayExecute": false,
+ "multiExecute": false,
+ "data": [
+ {
+ "type": "openDoor"
+ }
+ ]
+ }
}
- }
-}
+ },
+ "width": 13,
+ "height": 13
}
\ No newline at end of file
diff --git a/project/floors/sample2.js b/project/floors/sample2.js
index 7ae07530..a118ee6d 100644
--- a/project/floors/sample2.js
+++ b/project/floors/sample2.js
@@ -1,15 +1,15 @@
main.floors.sample2=
{
-"floorId": "sample2",
-"title": "样板 2 层",
-"name": "2",
-"canFlyTo": true,
-"canUseQuickShop": true,
-"cannotViewMap": false,
-"defaultGround": "ground",
-"images": [],
-"item_ratio": 1,
-"map": [
+ "floorId": "sample2",
+ "title": "样板 2 层",
+ "name": "2",
+ "canFlyTo": true,
+ "canUseQuickShop": true,
+ "cannotViewMap": false,
+ "defaultGround": "ground",
+ "images": [],
+ "item_ratio": 1,
+ "map": [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 1,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
@@ -37,36 +37,37 @@ main.floors.sample2=
[ 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
],
-"width": 26,
-"height": 26,
-"firstArrive": [],
-"events": {
- "3,2": [
- "123"
- ],
- "12,12": [
- "234"
- ]
-},
-"changeFloor": {
- "6,10": {
- "floorId": "sample1",
- "stair": "upFloor"
+ "width": 26,
+ "height": 26,
+ "firstArrive": [],
+ "events": {
+ "3,2": [
+ "123"
+ ],
+ "12,12": [
+ "234"
+ ]
},
- "7,12": {
- "floorId": "sample3",
- "stair": "downFloor"
- }
-},
-"afterBattle": {},
-"afterGetItem": {},
-"afterOpenDoor": {},
-"cannotMove": {},
-"upFloor": null,
-"bgmap": [
+ "changeFloor": {
+ "6,10": {
+ "floorId": "sample1",
+ "stair": "upFloor"
+ },
+ "7,12": {
+ "floorId": "sample3",
+ "stair": "downFloor"
+ }
+ },
+ "afterBattle": {},
+ "afterGetItem": {},
+ "afterOpenDoor": {},
+ "cannotMove": {},
+ "upFloor": null,
+ "bgmap": [
],
-"fgmap": [
+ "fgmap": [
],
+ "autoEvent": {}
}
\ No newline at end of file
diff --git a/project/floors/sample3.js b/project/floors/sample3.js
index e115ba5f..e0c28451 100644
--- a/project/floors/sample3.js
+++ b/project/floors/sample3.js
@@ -1,25 +1,25 @@
main.floors.sample3=
{
-"floorId": "sample3",
-"title": "主塔 40 层",
-"name": "40",
-"canFlyTo": false,
-"canUseQuickShop": true,
-"defaultGround": "snowGround",
-"images": [],
-"color": [
- 255,
- 0,
- 0,
- 0.3
-],
-"weather": [
- "rain",
- 10
-],
-"bgm": "bgm.mp3",
-"item_ratio": 1,
-"map": [
+ "floorId": "sample3",
+ "title": "主塔 40 层",
+ "name": "40",
+ "canFlyTo": false,
+ "canUseQuickShop": true,
+ "defaultGround": "snowGround",
+ "images": [],
+ "color": [
+ 255,
+ 0,
+ 0,
+ 0.3
+ ],
+ "weather": [
+ "rain",
+ 10
+ ],
+ "bgm": "bgm.mp3",
+ "item_ratio": 1,
+ "map": [
[ 5, 5, 5, 5, 5, 5, 87, 5, 5, 5, 5, 5, 5],
[ 5, 4, 4, 4, 4, 1, 0, 1, 4, 4, 4, 4, 5],
[ 5, 4, 4, 4, 4, 1, 85, 1, 4, 4, 4, 4, 5],
@@ -34,972 +34,975 @@ main.floors.sample3=
[ 5, 4, 4, 4, 4, 4, 85, 4, 4, 4, 4, 4, 5],
[ 5, 5, 5, 5, 5, 5, 88, 5, 5, 5, 5, 5, 5]
],
-"firstArrive": [
- "\t[实战!]本楼将尝试复刻《宿命的旋律》40F剧情。"
-],
-"events": {
- "6,11": {
- "enable": false,
- "data": []
- },
- "6,10": [
- {
- "type": "playSound",
- "name": "door.mp3"
- },
- {
- "type": "show",
- "loc": [
- 6,
- 11
- ]
- },
- {
- "type": "hide"
- },
- {
- "type": "trigger",
- "loc": [
- 6,
- 7
- ]
- }
+ "firstArrive": [
+ "\t[实战!]本楼将尝试复刻《宿命的旋律》40F剧情。"
],
- "6,7": [
- {
- "type": "playSound",
- "name": "item.mp3"
+ "events": {
+ "6,11": {
+ "enable": false,
+ "data": []
},
- "\t[hero]杰克,你究竟是什么人?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[杰克,thief]……",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]我们……是朋友对吧?\n是朋友就应该相互信任对吧?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[杰克,thief]……事到如今也没有什么好隐瞒的了。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[杰克,thief]没错,我就是这一切的背后主谋。",
- {
- "type": "move",
- "steps": [
- {
- "direction": "up",
- "value": 3
- }
- ],
- "time": 1000
- },
- {
- "type": "show",
- "loc": [
- 6,
- 4
- ],
- "time": 1000
- },
- {
- "type": "sleep",
- "time": 500
- },
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]我的真名为——黑暗大法师,第四区域的头目。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]呵呵,不知道为什么,我竟然对事情走到现在这一步毫不感觉意外。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]以杰克的名义利用了你这么久,真是抱歉啊。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]真正的杰克现在在哪里?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]盗贼杰克这个人类从未存在过,他只是我用来接近你的一副皮囊而已。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]……这样啊,呵呵。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]为什么你看上去丝毫不生气?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]多亏了鬼帝,我现在的脾气好得连我自己都害怕。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]说起来我还得好好感谢你呢,如果没有杰克……你的帮助,我早就死在第一区域了。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]不论你的目的如何,你的所作所为都是对我有利的。不是吗?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]能够如此淡定的面对背叛,看来跟五年前相比,你确实成长了很多啊。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]五年前?……黑暗大法师,在这之前,我们好像素未谋面吧?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]五年前那场屠城你应该这一生都不会忘记吧。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]很不巧,那场屠城的主谋,也是我。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]……",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]这么说,击中我双亲的那道紫色闪电,也就是你释放的吧……",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]你的双亲?这种事情我怎么可能会记得?\n你难道在踩死蚂蚁的时候还会一只只记下他们的样子吗?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]老 子 要 你 的 命",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]你应该对我心怀感激才对,如果不是那时的我看出了你隐藏的稀有勇者体质,你绝对不可能活到今天。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]在暗中动手脚让你通过勇者选拔的人也是我,我一直一直在暗中引导你走到今天这一步。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]是我救赎了一无是处的你。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]为什么只有我一个人活了下来!!!!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]为什么偏偏是我!!!!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]我刚才不是说过了吗?因为我看出了你有稀有勇者体质啊。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]你刚刚跟鬼帝交过手,应该已经很清楚这稀有勇者体质意味着什么了吧?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]……就因为我有这种体质,就不得不背负如此残酷的宿命吗?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]愚蠢!这意味着只要我对你加以引导跟培养,你就能成为这世间实力最强的存在!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]……所以,你究竟想利用我干什么?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]我利用你干的事情,你不是已经完成了吗?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]……你说什么?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]不知不觉间,你已经在我的指引下跟鬼帝正面交手并且杀掉了他啊。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]就连我跟鬼帝的对决……也是被你安排好了的?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]你们两个一个是人类勇者,一个是魔物勇者,迟早会有交手的一天。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]我只不过是操纵了一系列的连锁事件让这一天提早了数十年到来而已。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]……你这样做对谁有好处?他可是你们魔物世界的救世主啊。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]一个惧怕征战,爱好和平的懦夫,也配叫救世主?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]获得了力量,却只会被动挨打而不主动向人类世界出击,龟缩在第二区域惶惶度日,他根本就不配拥有稀有勇者体质。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]为了不让这种人霸占着积累多年的庞大灵魂能量无作为,我设计让你杀掉了他。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]你没有辜负我的期待,成功战胜了那个废物,现在你体内累积的灵魂能量……也就是魔力,已经达到了能跟魔王匹敌的地步。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]……是吗?现在的我能与魔王匹敌?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]不止如此,你现在的力量之强就算是统治世界也是绰绰有余!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]怎么样?要不要加入我的麾下,跟随我去征战人类世界?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]能与魔王匹敌的话,也就是说。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]我 现 在 对 付 你 这 种 杂 碎 也 绰 绰 有 余 吧 ?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]……什么?!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]等一下!别冲动!你先等我把这利害关系理一理——",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]你给老子闭嘴。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]老子什么都不想听。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]老子现在想做的事情只有一件——",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]剁掉你的头,把它放回我双亲的墓前。",
- {
- "type": "update"
- }
- ],
- "6,4": {
- "enable": false,
- "data": []
- },
- "5,4": {
- "enable": false,
- "data": []
- },
- "7,4": {
- "enable": false,
- "data": []
- },
- "5,5": {
- "enable": false,
- "data": []
- },
- "7,5": {
- "enable": false,
- "data": []
- },
- "6,3": {
- "trigger": "action",
- "enable": false,
- "data": [
- "\t[blackMagician]听不进去人话的蠢货,就要用疼痛来管教!",
- {
- "type": "changePos",
- "direction": "up"
- },
+ "6,10": [
{
"type": "playSound",
- "name": "item.mp3"
+ "name": "door.mp3"
},
- "\t[blackMagician]出来吧!禁忌——紫电凶杀阵!",
- {
- "type": "show",
- "loc": [
- [
- 4,
- 3
- ],
- [
- 4,
- 6
- ],
- [
- 8,
- 6
- ],
- [
- 8,
- 3
- ]
- ],
- "time": 500
- },
- {
- "type": "sleep",
- "time": 500
- },
- "\t[blackMagician]感受绝望吧!冥顽不化的蠢货!",
- {
- "type": "animate",
- "name": "yongchang",
- "loc": [
- 4,
- 3
- ]
- },
- {
- "type": "animate",
- "name": "yongchang",
- "loc": [
- 4,
- 6
- ]
- },
- {
- "type": "animate",
- "name": "yongchang",
- "loc": [
- 8,
- 6
- ]
- },
- {
- "type": "animate",
- "name": "yongchang",
- "loc": [
- 8,
- 3
- ]
- },
- {
- "type": "sleep",
- "time": 200
- },
- {
- "type": "playSound",
- "name": "attack.mp3"
- },
- {
- "type": "animate",
- "name": "thunder",
- "loc": "hero"
- },
- {
- "type": "sleep",
- "time": 200
- },
- "\t[hero]唔……!!(吐血)",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]我的魔力可是充足的很啊!我会一直折磨到你屈服于我为止!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]人类!好好感受吧!当初你们施加于我的痛苦!如今我要百倍奉还!",
{
"type": "show",
"loc": [
6,
- 6
- ],
- "time": 1000
+ 11
+ ]
},
{
- "type": "sleep",
- "time": 700
+ "type": "hide"
},
{
"type": "trigger",
"loc": [
6,
- 6
+ 7
]
}
- ]
- },
- "4,3": {
- "trigger": "action",
- "displayDamage": false,
- "enable": false,
- "data": []
- },
- "8,3": {
- "trigger": "action",
- "displayDamage": false,
- "enable": false,
- "data": []
- },
- "4,6": {
- "trigger": "action",
- "displayDamage": false,
- "enable": false,
- "data": []
- },
- "8,6": {
- "trigger": "action",
- "displayDamage": false,
- "enable": false,
- "data": []
- },
- "6,6": {
- "enable": false,
- "data": [
+ ],
+ "6,7": [
{
"type": "playSound",
"name": "item.mp3"
},
- "\t[hero]…妖精…小姐……是你吗?",
+ "\t[hero]杰克,你究竟是什么人?",
{
"type": "playSound",
"name": "item.mp3"
},
- "\t[小妖精,fairy]不要绝望,也不要悲伤。",
+ "\t[杰克,thief]……",
{
"type": "playSound",
"name": "item.mp3"
},
- "\t[小妖精,fairy]你从来都不是独自一人在前进。",
+ "\t[hero]我们……是朋友对吧?\n是朋友就应该相互信任对吧?",
{
"type": "playSound",
"name": "item.mp3"
},
- "\t[小妖精,fairy]咱一直,一直都在注视着你。",
+ "\t[杰克,thief]……事到如今也没有什么好隐瞒的了。",
{
"type": "playSound",
"name": "item.mp3"
},
- "\t[小妖精,fairy]耍小聪明的你、笨笨的你呆呆的你、胆小的你、勇敢的你帅气的你……全部全部都是你。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]所以放心吧,无论发生什么,咱都会陪伴在你身边的。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]因为你要是离开我的话,立刻就会死掉吧?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]…妖精…小姐……其实一直以来,我都非常感激你……",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]笨蛋!都这种时候了就不要作出像是临终遗言的发言了啊!!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]喂!那边穿衣品味差到极点的黑暗大法师,别左顾右盼说的就是你!你应该知道咱的身份吧?\n还不速速退下!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]可恶…多管闲事的妖精族…明明只要再让他承受一点疼痛来瓦解他的意志力,我的计划就成功了!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]哼哼哼~抱歉哦,这个笨蛋的意志力可不像你想象的那么薄弱哦!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]不甘心!我不甘心!妖精公主又如何!\n只要是阻挡我的,不管是谁我都要铲除!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]终于露出狐狸尾巴了,其实咱早就看出你有谋反的念头。你的计划就是拉拢这家伙入伙然后推翻魔王对魔塔的统治对吧?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]呵呵呵……那个昏庸的魔王,掌握着那么庞大的魔物军队却只知道固守魔塔,而不主动侵略人类世界扩张领土!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]我实在是看不过眼,所以我才决定把这个具备稀有勇者体质的家伙培养成新一任魔王!\n来让这个世界的势力重新洗牌!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]你觉得一个满脑子想着回家种田的废柴勇者会成为改变世界的魔王?你晃晃脑袋试试,是不是能听到大海的声音?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]恼人至极的妖精族!呵呵呵……我干脆一不做二不休,连你也一块收拾了吧!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]别小瞧咱!咱好歹也是妖精族里实力数一数二的存在!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]只会耍嘴皮子的恼人苍蝇!我倒要看看一块焦炭会不会说话!\n——招雷弹!!",
- {
- "type": "animate",
- "name": "yongchang",
- "loc": [
- 4,
- 3
- ]
- },
- {
- "type": "animate",
- "name": "yongchang",
- "loc": [
- 4,
- 6
- ]
- },
- {
- "type": "animate",
- "name": "yongchang",
- "loc": [
- 8,
- 6
- ]
- },
- {
- "type": "animate",
- "name": "yongchang",
- "loc": [
- 8,
- 3
- ]
- },
- {
- "type": "playSound",
- "name": "attack.mp3"
- },
- {
- "type": "animate",
- "name": "thunder",
- "loc": [
- 6,
- 6
- ]
- },
- {
- "type": "sleep",
- "time": 500
- },
- "\t[小妖精,fairy]切,这点伤痛跟他刚才经历的身心地狱相比根本就不算什么。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]哼!翅膀都被烧焦了还要嘴硬?你难不成真以为我不会对你动真格?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]……你这混蛋!给我离她远点!!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]!…你现在受了很严重的致命伤,乱动什么?\n乖。别怕,这里有咱顶着!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]对了,咱再问你一遍,你是很珍惜自己性命的对吧?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]!…等等…妖精小姐,你不会是……?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]喂,黑暗大法师,你作为魔塔里最博学多识的蠢货,应该对咱妖精族的特殊能力再清楚不过吧?",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]什么?!难不成你是想!!不可能……\n就为了一个渺小的人类,不可理喻!!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]哼哼哼!你害怕的表情可真美味!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]不过比起这个,咱更期待你吃到“妖精自灭冲击”之后的死状哦!~",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[blackMagician]不!!不应该是这样的!我完美的计划竟然会被一只小小的妖精破坏!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[hero]不要!……千万不要!……为了我这种人……唔!",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]笨蛋,动都动不了了就不要强撑着站起来了啊。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]真是的,都到最后一刻了,你这家伙好歹也让咱省点心吧。",
- {
- "type": "playSound",
- "name": "item.mp3"
- },
- "\t[小妖精,fairy]那么,再见了……我的勇者大人。",
+ "\t[杰克,thief]没错,我就是这一切的背后主谋。",
{
"type": "move",
- "time": 700,
"steps": [
{
"direction": "up",
"value": 3
}
- ]
- },
- {
- "type": "playSound",
- "name": "attack.mp3"
- },
- {
- "type": "sleep",
- "time": 200
- },
- "\t[blackMagician]不可能!!!!!",
- {
- "type": "hide",
- "loc": [
- 6,
- 3
- ]
- },
- {
- "type": "hide",
- "loc": [
- 4,
- 3
- ]
- },
- {
- "type": "hide",
- "loc": [
- 4,
- 6
- ]
- },
- {
- "type": "hide",
- "loc": [
- 8,
- 6
- ]
- },
- {
- "type": "hide",
- "loc": [
- 8,
- 3
- ]
- },
- {
- "type": "changeFloor",
- "floorId": "sample3",
- "loc": [
- 6,
- 6
],
- "direction": "up",
"time": 1000
},
{
"type": "show",
"loc": [
6,
- 5
- ]
+ 4
+ ],
+ "time": 1000
},
{
"type": "sleep",
- "time": 200
+ "time": 500
},
{
"type": "playSound",
"name": "item.mp3"
},
- {
- "type": "sleep",
- "time": 200
- },
- "\t[hero]…妖精…小姐……",
+ "\t[blackMagician]我的真名为——黑暗大法师,第四区域的头目。",
{
"type": "playSound",
"name": "item.mp3"
},
- "\t[hero]……妖精小姐!",
+ "\t[hero]呵呵,不知道为什么,我竟然对事情走到现在这一步毫不感觉意外。",
{
"type": "playSound",
"name": "item.mp3"
},
- "\t[hero]是梦吗?……不对,为什么我在流泪?",
+ "\t[blackMagician]以杰克的名义利用了你这么久,真是抱歉啊。",
{
"type": "playSound",
"name": "item.mp3"
},
- "\t[hero]这颗漂亮的宝石是……?",
+ "\t[hero]真正的杰克现在在哪里?",
{
"type": "playSound",
"name": "item.mp3"
},
- "\t[hero]我全都想起来了……妖精小姐为了我……\n牺牲了自己的性命。",
+ "\t[blackMagician]盗贼杰克这个人类从未存在过,他只是我用来接近你的一副皮囊而已。",
{
"type": "playSound",
"name": "item.mp3"
},
- "\t[hero]在这颗宝石上,我能感受到你的温度……\n熟悉而又令人安心,这就是你最后留给我的东西吗……",
+ "\t[hero]……这样啊,呵呵。",
{
"type": "playSound",
"name": "item.mp3"
},
- "\t[hero]好温暖……",
+ "\t[blackMagician]为什么你看上去丝毫不生气?",
{
- "type": "setValue",
- "name": "item:yellowJewel",
- "value": "1"
+ "type": "playSound",
+ "name": "item.mp3"
},
+ "\t[hero]多亏了鬼帝,我现在的脾气好得连我自己都害怕。",
{
- "type": "hide",
- "loc": [
- 6,
- 5
- ]
+ "type": "playSound",
+ "name": "item.mp3"
},
+ "\t[hero]说起来我还得好好感谢你呢,如果没有杰克……你的帮助,我早就死在第一区域了。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]不论你的目的如何,你的所作所为都是对我有利的。不是吗?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]能够如此淡定的面对背叛,看来跟五年前相比,你确实成长了很多啊。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]五年前?……黑暗大法师,在这之前,我们好像素未谋面吧?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]五年前那场屠城你应该这一生都不会忘记吧。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]很不巧,那场屠城的主谋,也是我。",
{
"type": "playSound",
"name": "item.mp3"
},
"\t[hero]……",
{
- "type": "openDoor",
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]这么说,击中我双亲的那道紫色闪电,也就是你释放的吧……",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]你的双亲?这种事情我怎么可能会记得?\n你难道在踩死蚂蚁的时候还会一只只记下他们的样子吗?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]老 子 要 你 的 命",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]你应该对我心怀感激才对,如果不是那时的我看出了你隐藏的稀有勇者体质,你绝对不可能活到今天。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]在暗中动手脚让你通过勇者选拔的人也是我,我一直一直在暗中引导你走到今天这一步。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]是我救赎了一无是处的你。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]为什么只有我一个人活了下来!!!!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]为什么偏偏是我!!!!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]我刚才不是说过了吗?因为我看出了你有稀有勇者体质啊。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]你刚刚跟鬼帝交过手,应该已经很清楚这稀有勇者体质意味着什么了吧?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]……就因为我有这种体质,就不得不背负如此残酷的宿命吗?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]愚蠢!这意味着只要我对你加以引导跟培养,你就能成为这世间实力最强的存在!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]……所以,你究竟想利用我干什么?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]我利用你干的事情,你不是已经完成了吗?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]……你说什么?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]不知不觉间,你已经在我的指引下跟鬼帝正面交手并且杀掉了他啊。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]就连我跟鬼帝的对决……也是被你安排好了的?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]你们两个一个是人类勇者,一个是魔物勇者,迟早会有交手的一天。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]我只不过是操纵了一系列的连锁事件让这一天提早了数十年到来而已。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]……你这样做对谁有好处?他可是你们魔物世界的救世主啊。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]一个惧怕征战,爱好和平的懦夫,也配叫救世主?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]获得了力量,却只会被动挨打而不主动向人类世界出击,龟缩在第二区域惶惶度日,他根本就不配拥有稀有勇者体质。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]为了不让这种人霸占着积累多年的庞大灵魂能量无作为,我设计让你杀掉了他。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]你没有辜负我的期待,成功战胜了那个废物,现在你体内累积的灵魂能量……也就是魔力,已经达到了能跟魔王匹敌的地步。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]……是吗?现在的我能与魔王匹敌?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]不止如此,你现在的力量之强就算是统治世界也是绰绰有余!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]怎么样?要不要加入我的麾下,跟随我去征战人类世界?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]能与魔王匹敌的话,也就是说。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]我 现 在 对 付 你 这 种 杂 碎 也 绰 绰 有 余 吧 ?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]……什么?!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]等一下!别冲动!你先等我把这利害关系理一理——",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]你给老子闭嘴。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]老子什么都不想听。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]老子现在想做的事情只有一件——",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]剁掉你的头,把它放回我双亲的墓前。",
+ {
+ "type": "update"
+ }
+ ],
+ "6,4": {
+ "enable": false,
+ "data": []
+ },
+ "5,4": {
+ "enable": false,
+ "data": []
+ },
+ "7,4": {
+ "enable": false,
+ "data": []
+ },
+ "5,5": {
+ "enable": false,
+ "data": []
+ },
+ "7,5": {
+ "enable": false,
+ "data": []
+ },
+ "6,3": {
+ "trigger": "action",
+ "enable": false,
+ "data": [
+ "\t[blackMagician]听不进去人话的蠢货,就要用疼痛来管教!",
+ {
+ "type": "changePos",
+ "direction": "up"
+ },
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]出来吧!禁忌——紫电凶杀阵!",
+ {
+ "type": "show",
+ "loc": [
+ [
+ 4,
+ 3
+ ],
+ [
+ 4,
+ 6
+ ],
+ [
+ 8,
+ 6
+ ],
+ [
+ 8,
+ 3
+ ]
+ ],
+ "time": 500
+ },
+ {
+ "type": "sleep",
+ "time": 500
+ },
+ "\t[blackMagician]感受绝望吧!冥顽不化的蠢货!",
+ {
+ "type": "animate",
+ "name": "yongchang",
+ "loc": [
+ 4,
+ 3
+ ]
+ },
+ {
+ "type": "animate",
+ "name": "yongchang",
+ "loc": [
+ 4,
+ 6
+ ]
+ },
+ {
+ "type": "animate",
+ "name": "yongchang",
+ "loc": [
+ 8,
+ 6
+ ]
+ },
+ {
+ "type": "animate",
+ "name": "yongchang",
+ "loc": [
+ 8,
+ 3
+ ]
+ },
+ {
+ "type": "sleep",
+ "time": 200
+ },
+ {
+ "type": "playSound",
+ "name": "attack.mp3"
+ },
+ {
+ "type": "animate",
+ "name": "thunder",
+ "loc": "hero"
+ },
+ {
+ "type": "sleep",
+ "time": 200
+ },
+ "\t[hero]唔……!!(吐血)",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]我的魔力可是充足的很啊!我会一直折磨到你屈服于我为止!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]人类!好好感受吧!当初你们施加于我的痛苦!如今我要百倍奉还!",
+ {
+ "type": "show",
+ "loc": [
+ 6,
+ 6
+ ],
+ "time": 1000
+ },
+ {
+ "type": "sleep",
+ "time": 700
+ },
+ {
+ "type": "trigger",
+ "loc": [
+ 6,
+ 6
+ ]
+ }
+ ]
+ },
+ "4,3": {
+ "trigger": "action",
+ "displayDamage": false,
+ "enable": false,
+ "data": []
+ },
+ "8,3": {
+ "trigger": "action",
+ "displayDamage": false,
+ "enable": false,
+ "data": []
+ },
+ "4,6": {
+ "trigger": "action",
+ "displayDamage": false,
+ "enable": false,
+ "data": []
+ },
+ "8,6": {
+ "trigger": "action",
+ "displayDamage": false,
+ "enable": false,
+ "data": []
+ },
+ "6,6": {
+ "enable": false,
+ "data": [
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]…妖精…小姐……是你吗?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]不要绝望,也不要悲伤。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]你从来都不是独自一人在前进。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]咱一直,一直都在注视着你。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]耍小聪明的你、笨笨的你呆呆的你、胆小的你、勇敢的你帅气的你……全部全部都是你。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]所以放心吧,无论发生什么,咱都会陪伴在你身边的。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]因为你要是离开我的话,立刻就会死掉吧?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]…妖精…小姐……其实一直以来,我都非常感激你……",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]笨蛋!都这种时候了就不要作出像是临终遗言的发言了啊!!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]喂!那边穿衣品味差到极点的黑暗大法师,别左顾右盼说的就是你!你应该知道咱的身份吧?\n还不速速退下!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]可恶…多管闲事的妖精族…明明只要再让他承受一点疼痛来瓦解他的意志力,我的计划就成功了!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]哼哼哼~抱歉哦,这个笨蛋的意志力可不像你想象的那么薄弱哦!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]不甘心!我不甘心!妖精公主又如何!\n只要是阻挡我的,不管是谁我都要铲除!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]终于露出狐狸尾巴了,其实咱早就看出你有谋反的念头。你的计划就是拉拢这家伙入伙然后推翻魔王对魔塔的统治对吧?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]呵呵呵……那个昏庸的魔王,掌握着那么庞大的魔物军队却只知道固守魔塔,而不主动侵略人类世界扩张领土!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]我实在是看不过眼,所以我才决定把这个具备稀有勇者体质的家伙培养成新一任魔王!\n来让这个世界的势力重新洗牌!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]你觉得一个满脑子想着回家种田的废柴勇者会成为改变世界的魔王?你晃晃脑袋试试,是不是能听到大海的声音?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]恼人至极的妖精族!呵呵呵……我干脆一不做二不休,连你也一块收拾了吧!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]别小瞧咱!咱好歹也是妖精族里实力数一数二的存在!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]只会耍嘴皮子的恼人苍蝇!我倒要看看一块焦炭会不会说话!\n——招雷弹!!",
+ {
+ "type": "animate",
+ "name": "yongchang",
+ "loc": [
+ 4,
+ 3
+ ]
+ },
+ {
+ "type": "animate",
+ "name": "yongchang",
+ "loc": [
+ 4,
+ 6
+ ]
+ },
+ {
+ "type": "animate",
+ "name": "yongchang",
+ "loc": [
+ 8,
+ 6
+ ]
+ },
+ {
+ "type": "animate",
+ "name": "yongchang",
+ "loc": [
+ 8,
+ 3
+ ]
+ },
+ {
+ "type": "playSound",
+ "name": "attack.mp3"
+ },
+ {
+ "type": "animate",
+ "name": "thunder",
+ "loc": [
+ 6,
+ 6
+ ]
+ },
+ {
+ "type": "sleep",
+ "time": 500
+ },
+ "\t[小妖精,fairy]切,这点伤痛跟他刚才经历的身心地狱相比根本就不算什么。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]哼!翅膀都被烧焦了还要嘴硬?你难不成真以为我不会对你动真格?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]……你这混蛋!给我离她远点!!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]!…你现在受了很严重的致命伤,乱动什么?\n乖。别怕,这里有咱顶着!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]对了,咱再问你一遍,你是很珍惜自己性命的对吧?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]!…等等…妖精小姐,你不会是……?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]喂,黑暗大法师,你作为魔塔里最博学多识的蠢货,应该对咱妖精族的特殊能力再清楚不过吧?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]什么?!难不成你是想!!不可能……\n就为了一个渺小的人类,不可理喻!!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]哼哼哼!你害怕的表情可真美味!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]不过比起这个,咱更期待你吃到“妖精自灭冲击”之后的死状哦!~",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[blackMagician]不!!不应该是这样的!我完美的计划竟然会被一只小小的妖精破坏!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]不要!……千万不要!……为了我这种人……唔!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]笨蛋,动都动不了了就不要强撑着站起来了啊。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]真是的,都到最后一刻了,你这家伙好歹也让咱省点心吧。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[小妖精,fairy]那么,再见了……我的勇者大人。",
+ {
+ "type": "move",
+ "time": 700,
+ "steps": [
+ {
+ "direction": "up",
+ "value": 3
+ }
+ ]
+ },
+ {
+ "type": "playSound",
+ "name": "attack.mp3"
+ },
+ {
+ "type": "sleep",
+ "time": 200
+ },
+ "\t[blackMagician]不可能!!!!!",
+ {
+ "type": "hide",
+ "loc": [
+ 6,
+ 3
+ ]
+ },
+ {
+ "type": "hide",
+ "loc": [
+ 4,
+ 3
+ ]
+ },
+ {
+ "type": "hide",
+ "loc": [
+ 4,
+ 6
+ ]
+ },
+ {
+ "type": "hide",
+ "loc": [
+ 8,
+ 6
+ ]
+ },
+ {
+ "type": "hide",
+ "loc": [
+ 8,
+ 3
+ ]
+ },
+ {
+ "type": "changeFloor",
+ "floorId": "sample3",
+ "loc": [
+ 6,
+ 6
+ ],
+ "direction": "up",
+ "time": 1000
+ },
+ {
+ "type": "show",
+ "loc": [
+ 6,
+ 5
+ ]
+ },
+ {
+ "type": "sleep",
+ "time": 200
+ },
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ {
+ "type": "sleep",
+ "time": 200
+ },
+ "\t[hero]…妖精…小姐……",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]……妖精小姐!",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]是梦吗?……不对,为什么我在流泪?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]这颗漂亮的宝石是……?",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]我全都想起来了……妖精小姐为了我……\n牺牲了自己的性命。",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]在这颗宝石上,我能感受到你的温度……\n熟悉而又令人安心,这就是你最后留给我的东西吗……",
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]好温暖……",
+ {
+ "type": "setValue",
+ "name": "item:yellowJewel",
+ "value": "1"
+ },
+ {
+ "type": "hide",
+ "loc": [
+ 6,
+ 5
+ ]
+ },
+ {
+ "type": "playSound",
+ "name": "item.mp3"
+ },
+ "\t[hero]……",
+ {
+ "type": "openDoor",
+ "loc": [
+ 6,
+ 2
+ ]
+ },
+ {
+ "type": "openDoor",
+ "loc": [
+ 6,
+ 11
+ ]
+ }
+ ]
+ },
+ "6,5": {
+ "enable": false,
+ "data": []
+ }
+ },
+ "changeFloor": {
+ "6,0": {
+ "floorId": "sample3",
+ "stair": "upFloor"
+ },
+ "6,12": {
+ "floorId": "sample2",
+ "stair": "upFloor"
+ }
+ },
+ "afterBattle": {
+ "6,4": [
+ "\t[blackMagician]天真!你以为这样就能战胜我吗?",
+ {
+ "type": "show",
"loc": [
- 6,
- 2
- ]
+ 7,
+ 5
+ ],
+ "time": 500
},
{
- "type": "openDoor",
+ "type": "update"
+ }
+ ],
+ "7,5": [
+ "\t[blackMagician]你打败的不过是我众多分身中的其中一个而已。",
+ {
+ "type": "show",
+ "loc": [
+ 5,
+ 4
+ ],
+ "time": 500
+ },
+ {
+ "type": "update"
+ }
+ ],
+ "5,4": [
+ "\t[blackMagician]你的身体已经伤痕累累了,可我还留有着九成多的魔力。",
+ {
+ "type": "show",
+ "loc": [
+ 5,
+ 5
+ ],
+ "time": 500
+ },
+ {
+ "type": "update"
+ }
+ ],
+ "5,5": [
+ "\t[blackMagician]顽固的家伙!放弃抵抗吧!",
+ {
+ "type": "show",
+ "loc": [
+ 7,
+ 4
+ ],
+ "time": 500
+ },
+ {
+ "type": "update"
+ }
+ ],
+ "7,4": [
+ "\t[blackMagician]哈哈哈哈!我的灵魂远比你想象的强大!\n我即是永恒!",
+ {
+ "type": "show",
"loc": [
6,
- 11
+ 3
+ ],
+ "time": 500
+ },
+ {
+ "type": "trigger",
+ "loc": [
+ 6,
+ 3
]
}
]
},
- "6,5": {
- "enable": false,
- "data": []
- }
-},
-"changeFloor": {
- "6,0": {
- "floorId": "sample3",
- "stair": "upFloor"
- },
- "6,12": {
- "floorId": "sample2",
- "stair": "upFloor"
- }
-},
-"afterBattle": {
- "6,4": [
- "\t[blackMagician]天真!你以为这样就能战胜我吗?",
- {
- "type": "show",
- "loc": [
- 7,
- 5
- ],
- "time": 500
- },
- {
- "type": "update"
- }
- ],
- "7,5": [
- "\t[blackMagician]你打败的不过是我众多分身中的其中一个而已。",
- {
- "type": "show",
- "loc": [
- 5,
- 4
- ],
- "time": 500
- },
- {
- "type": "update"
- }
- ],
- "5,4": [
- "\t[blackMagician]你的身体已经伤痕累累了,可我还留有着九成多的魔力。",
- {
- "type": "show",
- "loc": [
- 5,
- 5
- ],
- "time": 500
- },
- {
- "type": "update"
- }
- ],
- "5,5": [
- "\t[blackMagician]顽固的家伙!放弃抵抗吧!",
- {
- "type": "show",
- "loc": [
- 7,
- 4
- ],
- "time": 500
- },
- {
- "type": "update"
- }
- ],
- "7,4": [
- "\t[blackMagician]哈哈哈哈!我的灵魂远比你想象的强大!\n我即是永恒!",
- {
- "type": "show",
- "loc": [
- 6,
- 3
- ],
- "time": 500
- },
- {
- "type": "trigger",
- "loc": [
- 6,
- 3
- ]
- }
- ]
-},
-"afterGetItem": {},
-"afterOpenDoor": {},
-"cannotMove": {},
-"bgmap": [
+ "afterGetItem": {},
+ "afterOpenDoor": {},
+ "cannotMove": {},
+ "bgmap": [
],
-"fgmap": [
+ "fgmap": [
],
+ "width": 13,
+ "height": 13,
+ "autoEvent": {}
}
\ No newline at end of file
diff --git a/project/functions.js b/project/functions.js
index 195e0a0b..cf38a8c7 100644
--- a/project/functions.js
+++ b/project/functions.js
@@ -29,7 +29,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 初始化怪物和道具
core.material.enemys = core.enemys.getEnemys();
core.material.items = core.items.getItems();
- core.items._resetItems();
// 初始化全局数值和全局开关
core.values = core.clone(core.data.values);
for (var key in values || {})
@@ -112,6 +111,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 重置画布尺寸
core.maps.resizeMap(floorId);
// 设置勇士的位置
+ heroLoc.direction = core.turnDirection(heroLoc.direction);
core.status.hero.loc = heroLoc;
// 检查重生怪并重置
if (!fromLoad) {
@@ -273,7 +273,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 删除该块
var guards = []; // 支援
if (x != null && y != null) {
- core.removeBlock(x, y);
+ // 检查是否是重生怪物;如果是则仅隐藏不删除
+ if (core.hasSpecial(enemy.special, 23)) {
+ core.hideBlock(x, y);
+ } else {
+ core.removeBlock(x, y);
+ }
guards = core.getFlag("__guards__" + x + "_" + y, []);
core.removeFlag("__guards__" + x + "_" + y);
}
@@ -381,6 +386,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 开一个门后触发的事件
var todo = [];
+ // 检查该点的获得开门后事件。
var event = core.floors[core.status.floorId].afterOpenDoor[x + "," + y];
if (event) core.unshift(todo, event);
@@ -393,21 +399,22 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
if (callback) callback();
},
- "afterGetItem": function (itemId, x, y, callback) {
+ "afterGetItem": function (itemId, x, y, isGentleClick, callback) {
// 获得一个道具后触发的事件
+ // itemId:获得的道具ID;x和y是该道具所在的坐标
+ // isGentleClick:是否是轻按触发的
core.playSound('item.mp3');
var todo = [];
+ // 检查该点的获得道具后事件。
var event = core.floors[core.status.floorId].afterGetItem[x + "," + y];
- if (event) core.unshift(todo, event);
+ if (event && (event instanceof Array || !isGentleClick || !event.disableOnGentleClick)) {
+ core.unshift(todo, event);
+ }
if (todo.length > 0) core.insertAction(todo, x, y);
if (callback) callback();
-},
- "afterChangeLight": function(x,y) {
- // 改变亮灯之后,可以触发的事件
-
},
"afterPushBox": function () {
// 推箱子后的事件
@@ -422,25 +429,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
*/
}
},
- "afterPassNet": function (x, y, id) {
- // 经过特殊地形后的事件;x和y为当前坐标,id为当前的图块id
-
- // 这是个一次性血网的例子
- // if (id == 'lavaNet') core.removeBlock(x, y);
-
-},
- "canUseQuickShop": function(shopId) {
- // 当前能否使用某个快捷商店
- // shopId:快捷商店ID
- // 如果返回一个字符串,表示不能,字符串为不能使用的提示
- // 返回null代表可以使用
-
- // 检查当前楼层的canUseQuickShop选项是否为false
- if (core.status.thisMap.canUseQuickShop === false)
- return '当前楼层不能使用快捷商店。';
-
- return null;
-}
},
"enemys": {
"getSpecials": function () {
@@ -453,7 +441,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
[3, "坚固", "勇士每回合最多只能对怪物造成1点伤害"],
[4, "2连击", "怪物每回合攻击2次"],
[5, "3连击", "怪物每回合攻击3次"],
- [6, function (enemy) { return (enemy.n || 4) + "连击"; }, function (enemy) { return "怪物每回合攻击" + (enemy.n || 4) + "次"; }],
+ [6, function (enemy) { return (enemy.n || '') + "连击"; }, function (enemy) { return "怪物每回合攻击" + (enemy.n || 4) + "次"; }],
[7, "破甲", "战斗前,怪物附加角色防御的" + Math.floor(100 * core.values.breakArmor || 0) + "%作为伤害"],
[8, "反击", "战斗时,怪物每回合附加角色攻击的" + Math.floor(100 * core.values.counterAttack || 0) + "%作为伤害,无视角色防御"],
[9, "净化", "战斗前,怪物附加勇士护盾的" + core.values.purify + "倍作为伤害"],
@@ -834,22 +822,14 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
break;
case 49: // 快捷键1: 破
if (core.hasItem('pickaxe')) {
- if (core.canUseItem('pickaxe')) {
- core.status.route.push("key:49"); // 将按键记在录像中
- core.useItem('pickaxe', true); // 第二个参数true代表该次使用道具是被按键触发的,使用过程不计入录像
- } else {
- core.drawTip('当前不能使用破墙镐');
- }
+ core.status.route.push("key:49"); // 将按键记在录像中
+ core.useItem('pickaxe', true); // 第二个参数true代表该次使用道具是被按键触发的,使用过程不计入录像
}
break;
case 50: // 快捷键2: 炸
if (core.hasItem('bomb')) {
- if (core.canUseItem('bomb')) {
- core.status.route.push("key:50"); // 将按键记在录像中
- core.useItem('bomb', true); // 第二个参数true代表该次使用道具是被按键触发的,使用过程不计入录像
- } else {
- core.drawTip('当前不能使用炸弹');
- }
+ core.status.route.push("key:50"); // 将按键记在录像中
+ core.useItem('bomb', true); // 第二个参数true代表该次使用道具是被按键触发的,使用过程不计入录像
}
break;
case 51: // 快捷键3: 飞
@@ -943,17 +923,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
'maps': core.maps.saveMap(),
'route': core.encodeRoute(core.status.route),
'values': values,
- 'shops': {},
'version': core.firstData.version,
"time": new Date().getTime()
};
- // 设置商店次数
- for (var shopId in core.status.shops) {
- data.shops[shopId] = {
- 'times': core.status.shops[shopId].times || 0,
- 'visited': core.status.shops[shopId].visited || false
- };
- }
return data;
},
@@ -963,13 +935,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 重置游戏和路线
core.resetGame(data.hero, data.hard, data.floorId, core.maps.loadMap(data.maps), data.values);
core.status.route = core.decodeRoute(data.route);
- // 加载商店信息
- for (var shopId in core.status.shops) {
- if (data.shops[shopId]) {
- core.status.shops[shopId].times = data.shops[shopId].times;
- core.status.shops[shopId].visited = data.shops[shopId].visited;
- }
- }
// 文字属性,全局属性
core.status.textAttribute = core.getFlag('textAttribute', core.status.textAttribute);
var toAttribute = core.getFlag('globalAttribute', core.status.globalAttribute);
@@ -1103,10 +1068,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
id = block.event.id,
enemy = core.material.enemys[id];
+ type[loc] = type[loc] || {};
+
// 血网
- if (id == 'lavaNet' && block.event.trigger == 'passNet' && !core.hasItem('shoes')) {
+ if (id == 'lavaNet' && !core.hasItem('shoes')) {
damage[loc] = (damage[loc] || 0) + core.values.lavaDamage;
- type[loc] = "血网伤害";
+ type[loc]["血网伤害"] = true;
}
// 领域
@@ -1128,7 +1095,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 如果是十字领域,则还需要满足 |dx|+|dy|<=range
if (!zoneSquare && Math.abs(dx) + Math.abs(dy) > range) continue;
damage[currloc] = (damage[currloc] || 0) + (enemy.value || 0);
- type[currloc] = "领域伤害";
+ type[currloc] = type[currloc] || {};
+ type[currloc]["领域伤害"] = true;
}
}
}
@@ -1142,9 +1110,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
currloc = nx + "," + ny;
if (nx < 0 || nx >= width || ny < 0 || ny >= height) continue;
damage[currloc] = (damage[currloc] || 0) + (enemy.value || 0);
- type[currloc] = "阻击伤害";
+ type[currloc] = type[currloc] || {};
+ type[currloc]["阻击伤害"] = true;
- var rdir = core.reverseDirection(dir);
+ var rdir = core.turnDirection(":back", dir);
// 检查下一个点是否存在事件(从而判定是否移动)
var rnx = x + core.utils.scan[rdir].x,
rny = y + core.utils.scan[rdir].y;
@@ -1163,14 +1132,16 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
var currloc = nx + "," + y;
if (nx != x) {
damage[currloc] = (damage[currloc] || 0) + (enemy.value || 0);
- type[currloc] = "激光伤害";
+ type[currloc] = type[currloc] || {};
+ type[currloc]["激光伤害"] = true;
}
}
for (var ny = 0; ny < height; ny++) {
var currloc = x + "," + ny;
if (ny != y) {
damage[currloc] = (damage[currloc] || 0) + (enemy.value || 0);
- type[currloc] = "激光伤害";
+ type[currloc] = type[currloc] || {};
+ type[currloc]["激光伤害"] = true;
}
}
}
@@ -1230,7 +1201,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
}
if (value > 0) {
damage[loc] = (damage[loc] || 0) + value;
- type[loc] = "夹击伤害";
+ type[loc] = type[loc] || {};
+ type[loc]["夹击伤害"] = true;
}
}
}
@@ -1269,9 +1241,18 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
core.status.hero.hp = 0;
core.updateStatusBar();
core.events.lose();
- return;
+ } else {
+ core.updateStatusBar();
}
}
+
+ // 从v2.7开始,每一步行走不会再刷新状态栏。
+ // 如果有特殊要求(如每走一步都加buff之类),可手动取消注释下面这一句:
+ // core.updateStatusBar(true);
+
+ // 检查自动事件
+ core.checkAutoEvents();
+
// 如需强行终止行走可以在这里条件判定:
// core.stopAutomaticRoute();
},
diff --git a/project/items.js b/project/items.js
index 1244844e..0a68a3f0 100644
--- a/project/items.js
+++ b/project/items.js
@@ -370,11 +370,11 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"book": "core.ui.drawBook(0);",
"fly": "core.ui.drawFly(core.floorIds.indexOf(core.status.floorId));",
"earthquake": "(function () {\n\tvar indexes = [];\n\tfor (var index in core.status.thisMap.blocks) {\n\t\tvar block = core.status.thisMap.blocks[index];\n\t\tif (!block.disable && block.event.canBreak) {\n\t\t\tindexes.push(index);\n\t\t}\n\t}\n\tcore.removeBlockByIndexes(indexes);\n\tcore.drawMap(core.status.floorId, function () {\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t});\n})();",
- "pickaxe": "(function () {\n\tvar canBreak = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.block.disable) return false;\n\t\treturn block.block.event.canBreak;\n\t};\n\n\tcore.playSound('pickaxe.mp3');\n\tif (core.flags.pickaxeFourDirections) {\n\t\t// 四方向破\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tvar nx = core.getHeroLoc('x') + delta.x,\n\t\t\t\tny = core.getHeroLoc('y') + delta.y;\n\t\t\tif (canBreak(nx, ny)) {\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// 仅破当前\n\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t}\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n})();",
+ "pickaxe": "(function () {\n\tvar canBreak = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.block.disable) return false;\n\t\treturn block.block.event.canBreak;\n\t};\n\n\tvar success = false;\n\tvar pickaxeFourDirections = false; // 是否四方向破;如果是将其改成true\n\tif (pickaxeFourDirections) {\n\t\t// 四方向破\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tvar nx = core.getHeroLoc('x') + delta.x,\n\t\t\t\tny = core.getHeroLoc('y') + delta.y;\n\t\t\tif (canBreak(nx, ny)) {\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// 仅破当前\n\t\tif (canBreak(core.nextX(), core.nextY())) {\n\t\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t\t\tsuccess = true;\n\t\t}\n\t}\n\n\tif (success) {\n\t\tcore.playSound('pickaxe.mp3');\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t} else {\n\t\t// 无法使用\n\t\tcore.drawTip(\"当前无法使用\" + core.material.items[itemId].name);\n\t\tcore.addItem(itemId, 1);\n\t\treturn;\n\t}\n})();",
"icePickaxe": "(function () {\n\tcore.removeBlock(core.nextX(), core.nextY());\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n})();",
- "snow": "(function () {\n\tif (core.flags.snowFourDirections) {\n\t\t// 四方向雪花\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tvar nx = core.getHeroLoc('x') + delta.x,\n\t\t\t\tny = core.getHeroLoc('y') + delta.y;\n\t\t\tif (core.getBlockId(nx, ny) == 'lava') {\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t}\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n})();",
+ "snow": "(function () {\n\tvar success = false;\n\n\tvar snowFourDirections = false; // 是否四方向雪花;如果是将其改成true\n\tif (snowFourDirections) {\n\t\t// 四方向雪花\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tvar nx = core.getHeroLoc('x') + delta.x,\n\t\t\t\tny = core.getHeroLoc('y') + delta.y;\n\t\t\tif (core.getBlockId(nx, ny) == 'lava') {\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif (core.getBlockId(core.nextX(), core.nextY()) == 'lava') {\n\t\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t\t\tsuccess = true;\n\t\t}\n\t}\n\n\tif (success) {\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t} else {\n\t\tcore.drawTip(\"当前无法使用\" + core.material.items[itemId].name);\n\t\tcore.addItem(itemId, 1);\n\t\treturn;\n\t}\n})();",
"bigKey": "(function () {\n\tvar actions = core.searchBlock(\"yellowDoor\").map(function (block) {\n\t\treturn { \"type\": \"openDoor\", \"loc\": [block.x, block.y], \"async\": true };\n\t});\n\tactions.push({ \"type\": \"waitAsync\" });\n\tactions.push({ \"type\": \"tip\", \"text\": core.material.items[itemId].name + \"使用成功\" });\n\tcore.insertAction(actions);\n})();",
- "bomb": "(function () {\n\tvar canBomb = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.block.disable || block.block.event.cls.indexOf('enemy') != 0) return false;\n\t\tvar enemy = core.material.enemys[block.block.event.id];\n\t\treturn enemy && !enemy.notBomb;\n\t};\n\n\tcore.playSound('bomb.mp3');\n\tvar bombList = []; // 炸掉的怪物坐标列表\n\tif (core.flags.bombFourDirections) {\n\t\t// 四方向炸\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tvar nx = core.getHeroLoc('x') + delta.x,\n\t\t\t\tny = core.getHeroLoc('y') + delta.y;\n\t\t\tif (canBomb(nx, ny)) {\n\t\t\t\tbombList.push([nx, ny]);\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// 仅炸当前\n\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t\tbombList.push([core.nextX(), core.nextY()]);\n\t}\n\n\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t// 炸弹后事件\n\t// 这是一个使用炸弹也能开门的例子\n\t/*\n\tif (core.status.floorId=='xxx' && core.terrainExists(x0,y0,'specialDoor') // 某个楼层,该机关门存在\n\t\t&& !core.enemyExists(x1,y1) && !core.enemyExists(x2,y2)) // 且守门的怪物都不存在\n\t{\n\t\tcore.insertAction([ // 插入事件\n\t\t\t{\"type\": \"openDoor\", \"loc\": [x0,y0]} // 开门\n\t\t])\n\t}\n\t*/\n})();",
+ "bomb": "(function () {\n\tvar canBomb = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.block.disable || block.block.event.cls.indexOf('enemy') != 0) return false;\n\t\tvar enemy = core.material.enemys[block.block.event.id];\n\t\treturn enemy && !enemy.notBomb;\n\t};\n\n\tvar bombList = []; // 炸掉的怪物坐标列表\n\tvar bombFourDirections = false; // 是否四方向可炸;如果是将其改成true。\n\tif (bombFourDirections) {\n\t\t// 四方向炸\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tvar nx = core.getHeroLoc('x') + delta.x,\n\t\t\t\tny = core.getHeroLoc('y') + delta.y;\n\t\t\tif (canBomb(nx, ny)) {\n\t\t\t\tbombList.push([nx, ny]);\n\t\t\t\tcore.removeBlock(nx, ny);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// 仅炸当前\n\t\tif (canBomb(core.nextX(), core.nextY())) {\n\t\t\tbombList.push([core.nextX(), core.nextY()]);\n\t\t\tcore.removeBlock(core.nextX(), core.nextY());\n\t\t}\n\t}\n\n\tif (bombList.length > 0) {\n\t\tcore.playSound('bomb.mp3');\n\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t} else {\n\t\tcore.drawTip('当前无法使用' + core.material.items[itemId].name);\n\t\tcore.addItem(itemId, 1);\n\t\treturn;\n\t}\n\n\t// 炸弹后事件\n\t// 这是一个使用炸弹也能开门的例子\n\t/*\n\tif (core.status.floorId=='xxx' && core.terrainExists(x0,y0,'specialDoor') // 某个楼层,该机关门存在\n\t\t&& !core.enemyExists(x1,y1) && !core.enemyExists(x2,y2)) // 且守门的怪物都不存在\n\t{\n\t\tcore.insertAction([ // 插入事件\n\t\t\t{\"type\": \"openDoor\", \"loc\": [x0,y0]} // 开门\n\t\t])\n\t}\n\t*/\n})();",
"centerFly": "core.playSound('centerFly.mp3');\ncore.clearMap('hero');\ncore.setHeroLoc('x', core.bigmap.width - 1 - core.getHeroLoc('x'));\ncore.setHeroLoc('y', core.bigmap.height - 1 - core.getHeroLoc('y'));\ncore.drawHero();\ncore.drawTip(core.material.items[itemId].name + '使用成功');",
"upFly": "(function () {\n\tvar floorId = core.floorIds[core.floorIds.indexOf(core.status.floorId) + 1];\n\tif (core.status.event.id == 'action') {\n\t\tcore.insertAction([\n\t\t\t{ \"type\": \"changeFloor\", \"loc\": [core.getHeroLoc('x'), core.getHeroLoc('y')], \"floorId\": floorId },\n\t\t\t{ \"type\": \"tip\", \"text\": core.material.items[itemId].name + '使用成功' }\n\t\t]);\n\t} else {\n\t\tcore.changeFloor(floorId, null, core.status.hero.loc, null, function () {\n\t\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t\t\tcore.replay();\n\t\t});\n\t}\n})();",
"downFly": "(function () {\n\tvar floorId = core.floorIds[core.floorIds.indexOf(core.status.floorId) - 1];\n\tif (core.status.event.id == 'action') {\n\t\tcore.insertAction([\n\t\t\t{ \"type\": \"changeFloor\", \"loc\": [core.getHeroLoc('x'), core.getHeroLoc('y')], \"floorId\": floorId },\n\t\t\t{ \"type\": \"tip\", \"text\": core.material.items[itemId].name + '使用成功' }\n\t\t]);\n\t} else {\n\t\tcore.changeFloor(floorId, null, core.status.hero.loc, null, function () {\n\t\t\tcore.drawTip(core.material.items[itemId].name + '使用成功');\n\t\t\tcore.replay();\n\t\t});\n\t}\n})();",
@@ -397,14 +397,14 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"canUseItemEffect": {
"book": "true",
"fly": "(function () {\n\treturn core.status.maps[core.status.floorId].canFlyTo;\n})();",
- "pickaxe": "(function () {\n\tvar canBreak = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.block.disable) return false;\n\t\treturn block.block.event.canBreak;\n\t};\n\n\tif (core.flags.pickaxeFourDirections) {\n\t\t// 四方向破\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tif (canBreak(core.getHeroLoc('x') + delta.x, core.getHeroLoc('y') + delta.y)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t} else {\n\t\t// 仅破当前\n\t\treturn canBreak(core.nextX(), core.nextY());\n\t}\n})();",
+ "pickaxe": "true",
"icePickaxe": "(function () {\n\treturn core.getBlockId(core.nextX(), core.nextY()) == 'ice';\n})();",
- "bomb": "(function () {\n\tvar canBomb = function (x, y) {\n\t\tvar block = core.getBlock(x, y);\n\t\tif (block == null || block.block.disable || block.block.event.cls.indexOf('enemy') != 0) return false;\n\t\tvar enemy = core.material.enemys[block.block.event.id];\n\t\treturn enemy && !enemy.notBomb;\n\t};\n\n\tif (core.flags.bombFourDirections) {\n\t\t// 四方向炸\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tif (canBomb(core.getHeroLoc('x') + delta.x, core.getHeroLoc('y') + delta.y)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t} else {\n\t\t// 仅炸当前\n\t\treturn canBomb(core.nextX(), core.nextY());\n\t}\n})();",
+ "bomb": "true",
"earthquake": "(function () {\n\treturn core.status.thisMap.blocks.filter(function (block) {\n\t\treturn !block.disable && block.event.canBreak;\n\t}).length > 0;\n})();",
"centerFly": "(function () {\n\tvar toX = core.bigmap.width - 1 - core.getHeroLoc('x'),\n\t\ttoY = core.bigmap.height - 1 - core.getHeroLoc('y');\n\tvar id = core.getBlockId(toX, toY);\n\treturn id == null;\n})();",
"upFly": "(function () {\n\tvar floorId = core.status.floorId,\n\t\tindex = core.floorIds.indexOf(floorId);\n\tif (index < core.floorIds.length - 1) {\n\t\tvar toId = core.floorIds[index + 1],\n\t\t\ttoX = core.getHeroLoc('x'),\n\t\t\ttoY = core.getHeroLoc('y');\n\t\tvar mw = core.floors[toId].width,\n\t\t\tmh = core.floors[toId].height;\n\t\tif (toX >= 0 && toX < mw && toY >= 0 && toY < mh && core.getBlock(toX, toY, toId) == null) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n})();",
"downFly": "(function () {\n\tvar floorId = core.status.floorId,\n\t\tindex = core.floorIds.indexOf(floorId);\n\tif (index > 0) {\n\t\tvar toId = core.floorIds[index - 1],\n\t\t\ttoX = core.getHeroLoc('x'),\n\t\t\ttoY = core.getHeroLoc('y');\n\t\tvar mw = core.floors[toId].width,\n\t\t\tmh = core.floors[toId].height;\n\t\tif (toX >= 0 && toX < mw && toY >= 0 && toY < mh && core.getBlock(toX, toY, toId) == null) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n})();",
- "snow": "(function () {\n\tif (core.flags.snowFourDirections) {\n\t\t// 四方向雪花\n\t\tfor (var direction in core.utils.scan) {\n\t\t\tvar delta = core.utils.scan[direction];\n\t\t\tif (core.getBlockId(core.getHeroLoc('x') + delta.x, core.getHeroLoc('y') + delta.y) == 'lava') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t} else {\n\t\treturn core.getBlockId(core.nextX(), core.nextY()) == 'lava';\n\t}\n})();",
+ "snow": "true",
"bigKey": "(function () {\n\treturn core.searchBlock('yellowDoor').length > 0;\n})();",
"poisonWine": "core.hasFlag('poison');",
"weakWine": "core.hasFlag('weak');",
diff --git a/project/maps.js b/project/maps.js
index 4077be1f..b21de5b9 100644
--- a/project/maps.js
+++ b/project/maps.js
@@ -3,17 +3,17 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"1": {"cls":"animates","id":"yellowWall","canBreak":true,"animate":1,"doorInfo":[null,"door.mp3","door.mp3"]},
"2": {"cls":"animates","id":"whiteWall","canBreak":true,"animate":1,"doorInfo":[null,"door.mp3","door.mp3"]},
"3": {"cls":"animates","id":"blueWall","canBreak":true,"animate":1,"doorInfo":[null,"door.mp3","door.mp3"]},
- "4": {"cls":"animates","id":"star"},
- "5": {"cls":"animates","id":"lava"},
+ "4": {"cls":"animates","id":"star","name":"星空"},
+ "5": {"cls":"animates","id":"lava","name":"岩浆"},
"6": {"cls":"terrains","id":"ice"},
"7": {"cls":"terrains","id":"blueShopLeft"},
"8": {"cls":"terrains","id":"blueShopRight"},
"9": {"cls":"terrains","id":"pinkShopLeft"},
"10": {"cls":"terrains","id":"pinkShopRight"},
- "11": {"cls":"animates","id":"lavaNet","canPass":true,"trigger":"passNet"},
- "12": {"cls":"animates","id":"poisonNet","canPass":true,"trigger":"passNet"},
- "13": {"cls":"animates","id":"weakNet","canPass":true,"trigger":"passNet"},
- "14": {"cls":"animates","id":"curseNet","canPass":true,"trigger":"passNet"},
+ "11": {"cls":"animates","id":"lavaNet","canPass":true,"trigger":"null","script":"(function () {\n\t// 血网的伤害效果移动到 checkBlock 中处理\n\n\t// 如果要做一次性血网,可直接注释掉下面这句话:\n\t// core.removeBlock(core.getHeroLoc('x'), core.getHeroLoc('y'));\n})();","name":"血网"},
+ "12": {"cls":"animates","id":"poisonNet","canPass":true,"trigger":"null","script":"(function () {\n\t// 直接插入公共事件进行毒处理\n\tif (!core.hasItem('shoes')) {\n\t\tcore.insertAction({ \"type\": \"insert\", \"name\": \"毒衰咒处理\", \"args\": [0] });\n\t}\n\n\t// 如果要做一次性毒网,可直接注释掉下面这句话:\n\t// core.removeBlock(core.getHeroLoc('x'), core.getHeroLoc('y'));\n})()","name":"毒网"},
+ "13": {"cls":"animates","id":"weakNet","canPass":true,"trigger":"null","script":"(function () {\n\t// 直接插入公共事件进行衰处理\n\tif (!core.hasItem('shoes')) {\n\t\tcore.insertAction({ \"type\": \"insert\", \"name\": \"毒衰咒处理\", \"args\": [1] });\n\t}\n\n\t// 如果要做一次性衰网,可直接注释掉下面这句话:\n\t// core.removeBlock(core.getHeroLoc('x'), core.getHeroLoc('y'));\n})()","name":"衰网"},
+ "14": {"cls":"animates","id":"curseNet","canPass":true,"trigger":"null","script":"(function () {\n\t// 直接插入公共事件进行咒处理\n\tif (!core.hasItem('shoes')) {\n\t\tcore.insertAction({ \"type\": \"insert\", \"name\": \"毒衰咒处理\", \"args\": [2] });\n\t}\n\n\t// 如果要做一次性咒网,可直接注释掉下面这句话:\n\t// core.removeBlock(core.getHeroLoc('x'), core.getHeroLoc('y'));\n})()","name":"咒网"},
"15": {"cls":"animates","id":"blueWater"},
"16": {"cls":"animates","id":"water"},
"20": {"cls":"autotile","id":"autotile"},
@@ -68,12 +68,12 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"71": {"cls":"items","id":"shield0"},
"72": {"cls":"items","id":"skill1"},
"73": {"cls":"items","id":"wand"},
- "81": {"cls":"animates","id":"yellowDoor","trigger":"openDoor","animate":1,"doorInfo":[{"yellowKey":1},"door.mp3","door.mp3"]},
- "82": {"cls":"animates","id":"blueDoor","trigger":"openDoor","animate":1,"doorInfo":[{"blueKey":1},"door.mp3","door.mp3"]},
- "83": {"cls":"animates","id":"redDoor","trigger":"openDoor","animate":1,"doorInfo":[{"redKey":1},"door.mp3","door.mp3"]},
- "84": {"cls":"animates","id":"greenDoor","trigger":"openDoor","animate":1,"doorInfo":[{"greenKey":1},"door.mp3","door.mp3"]},
- "85": {"cls":"animates","id":"specialDoor","trigger":"openDoor","animate":1,"doorInfo":[null,"door.mp3","door.mp3"]},
- "86": {"cls":"animates","id":"steelDoor","trigger":"openDoor","animate":1,"doorInfo":[{"steelKey":1},"door.mp3","door.mp3"]},
+ "81": {"cls":"animates","id":"yellowDoor","trigger":"openDoor","animate":1,"doorInfo":[{"yellowKey":1},"door.mp3","door.mp3"],"name":"黄门"},
+ "82": {"cls":"animates","id":"blueDoor","trigger":"openDoor","animate":1,"doorInfo":[{"blueKey":1},"door.mp3","door.mp3"],"name":"蓝门"},
+ "83": {"cls":"animates","id":"redDoor","trigger":"openDoor","animate":1,"doorInfo":[{"redKey":1},"door.mp3","door.mp3"],"name":"红门"},
+ "84": {"cls":"animates","id":"greenDoor","trigger":"openDoor","animate":1,"doorInfo":[{"greenKey":1},"door.mp3","door.mp3"],"name":"绿门"},
+ "85": {"cls":"animates","id":"specialDoor","trigger":"openDoor","animate":1,"doorInfo":[null,"door.mp3","door.mp3"],"name":"机关门"},
+ "86": {"cls":"animates","id":"steelDoor","trigger":"openDoor","animate":1,"doorInfo":[{"steelKey":1},"door.mp3","door.mp3"],"name":"铁门"},
"87": {"cls":"terrains","id":"upFloor","canPass":true},
"88": {"cls":"terrains","id":"downFloor","canPass":true},
"89": {"cls":"animates","id":"portal","canPass":true},
@@ -109,7 +109,7 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"162": {"cls":"terrains","id":"arrowDown","canPass":true,"cannotOut":["left","right","up"],"cannotIn":["down"]},
"163": {"cls":"terrains","id":"arrowLeft","canPass":true,"cannotOut":["up","down","right"],"cannotIn":["left"]},
"164": {"cls":"terrains","id":"arrowRight","canPass":true,"cannotOut":["up","down","left"],"cannotIn":["right"]},
- "165": {"cls":"terrains","id":"light","trigger":"changeLight","canPass":true},
+ "165": {"cls":"terrains","id":"light","trigger":"null","canPass":true,"script":"(function () {\n\tcore.setBlock(core.getNumberById('darkLight'), core.getHeroLoc('x'), core.getHeroLoc('y'));\n})();"},
"166": {"cls":"terrains","id":"darkLight"},
"167": {"cls":"terrains","id":"ski","trigger":"ski","canPass":true},
"168": {"cls":"terrains","id":"flower","canPass":true},
diff --git a/project/plugins.js b/project/plugins.js
index 3f25e0f6..b8a4776e 100644
--- a/project/plugins.js
+++ b/project/plugins.js
@@ -39,7 +39,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
// core.plugin.drawLight('ui', 0.95, [[25,11,46]]); // 在ui层绘制全图不透明度0.95,其中在(25,11)点存在一个半径为46的灯光效果。
// core.plugin.drawLight('test', 0.2, [[25,11,46,0.1]]); // 创建一个test图层,不透明度0.2,其中在(25,11)点存在一个半径为46的灯光效果,灯光中心不透明度0.1。
// core.plugin.drawLight('test2', 0.9, [[25,11,46],[105,121,88],[301,221,106]]); // 创建test2图层,且存在三个灯光效果,分别是中心(25,11)半径46,中心(105,121)半径88,中心(301,221)半径106。
- // core.plugin.drawLight('xxx', 0.3, [[25,11,46],[105,121,88,0.2]], 0.4); // 存在两个灯光效果,它们在内圈40%范围内保持全亮,且40%后才开始衰减。
+ // core.plugin.drawLight('xxx', 0.3, [[25,11,46],[105,121,88,0.2]], 0.4); // 存在两个灯光效果,它们在内圈40%范围内保持全亮,40%后才开始衰减。
this.drawLight = function (name, color, lights, lightDec) {
// 清空色调层;也可以修改成其它层比如animate/weather层,或者用自己创建的canvas
@@ -84,6 +84,142 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
ctx.globalCompositeOperation = 'source-over';
// 可以在任何地方(如afterXXX或自定义脚本事件)调用函数,方法为 core.plugin.xxx();
}
+},
+ "shop": function () {
+ // 【全局商店】相关的功能
+ //
+ // 打开一个全局商店
+ // shopId:要打开的商店id;noRoute:是否不计入录像
+ this.openShop = function (shopId, noRoute) {
+ var shop = core.status.shops[shopId];
+ // Step 1: 检查能否打开此商店
+ if (!this.canOpenShop(shopId)) {
+ core.drawTip("该商店尚未开启");
+ return false;
+ }
+
+ // Step 2: (如有必要)记录打开商店的脚本事件
+ if (!noRoute) {
+ core.status.route.push("shop:" + shopId);
+ }
+
+ // Step 3: 检查道具商店 or 公共事件
+ if (shop.item) {
+ if (core.openItemShop) {
+ core.openItemShop(shopId);
+ } else {
+ core.insertAction("道具商店插件不存在!请检查是否存在该插件!");
+ }
+ return;
+ }
+ if (shop.commonEvent) {
+ core.insertAction({ "type": "insert", "name": shop.commonEvent, "args": shop.args });
+ return;
+ }
+
+ // Step 4: 执行标准公共商店
+ core.insertAction(this._convertShop(shop));
+ return true;
+ }
+
+ ////// 将一个全局商店转变成可预览的公共事件 //////
+ this._convertShop = function (shop) {
+ return [{
+ "type": "while",
+ "condition": "true",
+ "data": [
+ // 检测能否访问该商店
+ {
+ "type": "if",
+ "condition": "core.isShopVisited('" + shop.id + "')",
+ "true": [
+ // 可以访问,直接插入执行效果
+ { "type": "function", "function": "function() { core.plugin._convertShop_replaceChoices('" + shop.id + "', false) }" },
+ ],
+ "false": [
+ // 不能访问的情况下:检测能否预览
+ {
+ "type": "if",
+ "condition": shop.disablePreview,
+ "true": [
+ // 不可预览,提示并退出
+ "当前无法访问该商店!",
+ { "type": "break" },
+ ],
+ "false": [
+ // 可以预览:将商店全部内容进行替换
+ { "type": "tip", "text": "当前处于预览模式,不可购买" },
+ { "type": "function", "function": "function() { core.plugin._convertShop_replaceChoices('" + shop.id + "', true) }" },
+ ]
+ }
+ ]
+ }
+ ]
+ }];
+ }
+
+ this._convertShop_replaceChoices = function (shopId, previewMode) {
+ var shop = core.status.shops[shopId];
+ var choices = (shop.choices || []).filter(function (choice) {
+ if (choice.condition == null || choice.condition == '') return true;
+ try { return core.calValue(choice.condition); } catch (e) { return true; }
+ }).map(function (choice) {
+ var ableToBuy = core.calValue(choice.need);
+ return {
+ "text": choice.text,
+ "icon": choice.icon,
+ "color": ableToBuy && !previewMode ? choice.color : [153, 153, 153, 1],
+ "action": ableToBuy && !previewMode ? choice.action : [
+ { "type": "tip", "text": previewMode ? "预览模式下不可购买" : "购买条件不足" }
+ ]
+ };
+ }).concat({ "text": "离开", "action": [{ "type": "break" }] });
+ core.insertAction({ "type": "choices", "text": shop.text, "choices": choices });
+ }
+
+ /// 是否访问过某个快捷商店
+ this.isShopVisited = function (id) {
+ if (!core.hasFlag("__shops__")) core.setFlag("__shops__", {});
+ var shops = core.getFlag("__shops__");
+ if (!shops[id]) shops[id] = {};
+ return shops[id].visited;
+ }
+
+ /// 当前应当显示的快捷商店列表
+ this.listShopIds = function () {
+ return Object.keys(core.status.shops).filter(function (id) {
+ return core.isShopVisited(id) || !core.status.shops[id].mustEnable;
+ });
+ }
+
+ /// 是否能够打开某个商店
+ this.canOpenShop = function (id) {
+ if (this.isShopVisited(id)) return true;
+ var shop = core.status.shops[id];
+ if (shop.item || shop.commonEvent || shop.mustEnable) return false;
+ return true;
+ }
+
+ /// 启用或禁用某个快捷商店
+ this.setShopVisited = function (id, visited) {
+ if (!core.hasFlag("__shops__")) core.setFlag("__shops__", {});
+ var shops = core.getFlag("__shops__");
+ if (!shops[id]) shops[id] = {};
+ if (visited) shops[id].visited = true;
+ else delete shops[id].visited;
+ }
+
+ /// 能否使用快捷商店
+ this.canUseQuickShop = function (id) {
+ // 如果返回一个字符串,表示不能,字符串为不能使用的提示
+ // 返回null代表可以使用
+
+ // 检查当前楼层的canUseQuickShop选项是否为false
+ if (core.status.thisMap.canUseQuickShop === false)
+ return '当前楼层不能使用快捷商店。';
+ return null;
+ }
+
},
"itemShop": function () {
// 道具商店相关的插件
@@ -97,6 +233,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
var totalPage = 0;
var totalMoney = 0;
var list = [];
+ var shopInfo = null; // 商店信息
+ var choices = []; // 商店选项
var bigFont = core.ui._buildFont(20, false),
middleFont = core.ui._buildFont(18, false);
@@ -107,16 +245,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
// Step 1: 背景和固定的几个文字
core.ui._createUIEvent();
core.clearMap('uievent');
- core.ui._uievent_drawSelector({ "code": 1 });
- core.ui._uievent_drawSelector({ "code": 2 });
+ core.ui._clearUIEventSelector([1, 2]);
core.setTextAlign('uievent', 'left');
core.setTextBaseline('uievent', 'top');
core.fillRect('uievent', 0, 0, 416, 416, 'black');
- core.ui._uievent_drawBackground({ background: 'winskin.png', x: 0, y: 0, width: 416, height: 56 });
- core.ui._uievent_drawBackground({ background: 'winskin.png', x: 0, y: 56, width: 312, height: 56 });
- core.ui._uievent_drawBackground({ background: 'winskin.png', x: 0, y: 112, width: 312, height: 304 });
- core.ui._uievent_drawBackground({ background: 'winskin.png', x: 312, y: 56, width: 104, height: 56 });
- core.ui._uievent_drawBackground({ background: 'winskin.png', x: 312, y: 112, width: 104, height: 304 });
+ core.drawWindowSkin('winskin.png', 'uievent', 0, 0, 416, 56);
+ core.drawWindowSkin('winskin.png', 'uievent', 0, 56, 312, 56);
+ core.drawWindowSkin('winskin.png', 'uievent', 0, 112, 312, 304);
+ core.drawWindowSkin('winskin.png', 'uievent', 312, 56, 104, 56);
+ core.drawWindowSkin('winskin.png', 'uievent', 312, 112, 104, 304);
core.setFillStyle('uievent', 'white');
core.setStrokeStyle('uievent', 'white');
core.fillText("uievent", "购买", 32, 74, 'white', bigFont);
@@ -143,9 +280,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
}
// Step 2:获得列表并展示
- var choices = core.status.shops[shopId].choices;
list = choices.filter(function (one) {
- if (one.condition != null) {
+ if (one.condition != null && one.condition != '') {
try { if (!core.calValue(one.condition)) return false; } catch (e) {}
}
return (type == 0 && one.money != null) || (type == 1 && one.sell != null);
@@ -369,6 +505,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
page = 0;
selectItem = null;
selectCount = 0;
+ shopInfo = flags.__shops__[shopId];
+ if (shopInfo.choices == null) shopInfo.choices = core.clone(core.status.shops[shopId].choices);
+ choices = shopInfo.choices;
+
core.insertAction([{
"type": "while",
"condition": "true",
@@ -378,44 +518,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
{ "type": "function", "function": "function() { core.performItemShopAction(); }" }
]
},
- { "type": "function", "function": "function () { " +
- "core.deleteCanvas('uievent'); " +
- "core.ui._uievent_drawSelector({ \"code\": 1 }); " +
- "core.ui._uievent_drawSelector({ \"code\": 2 }); " +
- "}" }
+ {
+ "type": "function",
+ "function": "function () { core.deleteCanvas('uievent'); core.ui._clearUIEventSelector([1, 2]); }"
+ }
]);
}
- // Write item number to save
- core.control.saveData = function () {
- var data = this.controldata.saveData();
- for (var shopId in core.status.shops) {
- if (core.status.shops[shopId].item) {
- data.shops[shopId].choices = core.status.shops[shopId].choices.map(function (t) {
- return {
- number: t.number,
- money_count: t.money_count || 0,
- sell_count: t.sell_count || 0
- }
- });
- }
- }
- return data;
- }
-
- core.control.loadData = function (data, callback) {
- this.controldata.loadData(data, callback);
- for (var shopId in data.shops) {
- if (data.shops[shopId].choices) {
- for (var i = 0; i < data.shops[shopId].choices.length; ++i) {
- core.status.shops[shopId].choices[i].number = data.shops[shopId].choices[i].number;
- core.status.shops[shopId].choices[i].money_count = data.shops[shopId].choices[i].money_count;
- core.status.shops[shopId].choices[i].sell_count = data.shops[shopId].choices[i].sell_count;
- }
- }
- }
- }
-
},
"smoothCamera": function () {
diff --git a/styles.css b/styles.css
index 255fd81b..dec14381 100644
--- a/styles.css
+++ b/styles.css
@@ -295,22 +295,27 @@ p#name {
#bg {
z-index: 10;
+ image-rendering: pixelated;
}
#event {
z-index: 30;
+ image-rendering: pixelated;
}
#hero {
z-index: 40;
+ image-rendering: pixelated;
}
#event2 {
z-index: 50;
+ image-rendering: pixelated;
}
#fg {
z-index: 60;
+ image-rendering: pixelated;
}
#damage {
diff --git a/v2.x-final更新.txt b/v2.x-final更新.txt
index 337fc4d2..f996dd5a 100644
--- a/v2.x-final更新.txt
+++ b/v2.x-final更新.txt
@@ -3,7 +3,7 @@
(已完成!) 3. 请求修复(如果还没修复)core.drawTip()不能使用系统图标和clear参数的bug,建议增加一个参数来表示多帧图块绘制第几帧
(已完成!) 3.1 (“UI绘制”类事件中的“绘制图标”同理)
(已完成!\b[up,null]可实现此效果) 4. 建议显示文章的\b[]提供top和bottom这两种新写法来实现在顶部或底部显示对话框,目前只有startText、firstArrive、eachArrive、useItemEvent和公共事件等没有当前点的事件中才能用up和down来临时实现这种效果,否则就得设置剧情文本的属性,这在频繁来回切换时是致命的,就像《无上之光》RMXP版地上40层一样
-5. 建议优化core.splitLines()来避免把单词打断和触犯标点禁则,如点号和右标号禁止用于行首,左标号禁止用于行尾
+(已完成!) 5. 建议优化core.splitLines()来避免把单词打断和触犯标点禁则,如点号和右标号禁止用于行首,左标号禁止用于行尾
(已完成!) 6. core.drawAnimate()和对应的事件,建议增加一个boolean型参数来表示坐标是绝对坐标(即当前的实现)还是在视野中的相对坐标(以13*13为例相对坐标总是在0~12之间),以实现形如“在视野正中心播放某某动画”的需求(小地图可以写6,6,大地图怎么办)
(已完成!) 7. 建议把core.playBgm(bgm, startTime)的startTime参数在事件中也提供出来,以用于一些演出(比如适当的剧情处直接从高潮开始)。同理可以让“暂停背景音乐”记录下当前播放到了第几秒,并在“恢复背景音乐”中自动从这个秒数恢复。作者还可以手动配合音量渐变效果
(已完成!) 8. 系统设置菜单中“音量”和“步时”的点击区并不是根据文本长度自动适配的,这导致作者修改文本(包括但不限于翻译)后玩家难以找到准确的点击区,建议优化
@@ -12,14 +12,16 @@
(已完成!) 11. 建议修复勇士后退时跟随者的鬼畜行为,并推出一套能够对跟随者位置和朝向进行读写的API甚至事件,且允许这些信息被计入存档,以实现一些演出效果甚至游戏要素,如新新2用公主占位防冰块
(已完成!) 12. “设置怪物属性”事件的下拉框目前只支持一部分,另一部分只能通过手敲json再解析来得到,希望提供完整支持
13. 建议给core.moveAction(callback)提供对应的事件,用于在事件中让勇士像事件外一样移动,从而正常触发跑毒和阻激夹域捕等
-14. core.openShop()和对应的事件,建议在用于公共事件时简单地退化为“插入公共事件”而不要打断当前事件,把决定权交给作者
+(已完成!) 14. core.openShop()和对应的事件,建议在用于公共事件时简单地退化为“插入公共事件”而不要打断当前事件,把决定权交给作者
(已完成!) 15. “等待用户操作”虽然提供了场合块但还不支持将多个按键的场合合并(比如空格、回车和C键一般会被作者予以合并,执行内容如果只是大致相同也值得合并,在块内由作者根据flag再行分歧),建议支持一下
(已完成!) 16. “绘制描边文本”事件建议加一个“描边颜色”参数,目前只能描黑边
(已完成!) 17. “设置画布属性”的基准线建议增加'hanging'和'ideographic'这两种模式
(已完成!) 18. 建议修复“绘制多行文本”时行距比字号大不太多会导致各行下缘丢失的bug(加大行距又会导致第一行的纵坐标难以估计),此bug在道具商店和1.3倍行距英文看的很明显
-19.(来自群友)建议给第一代全局商店的子选项像“显示选择项”一样提供图标、颜色和出现条件(注意长按的适配)
+(已完成!) 19.(来自群友)建议给第一代全局商店的子选项像“显示选择项”一样提供图标、颜色和出现条件(注意长按的适配)
(已完成!) 20. 很多事件对应的脚本有默认参数,但在事件中省略参数却会变成0,建议修复
+-------------
+
(已完成!) defaultGround全局可用
(已完成!) 对floorIds和图片进行检测
(已完成!) 删除绘图模式
@@ -27,18 +29,28 @@
(已完成!) cannotIn / cannotOut使用选项框
(已完成!) noPass->canPass改成选择框
初始化&读档优化:不一次读取全部楼层并创建
-绿钥匙进状态栏
+(已完成!) 绿钥匙进状态栏
(已完成!) 图块ID不可全数字
-怪物详细信息富文本化
+(已完成!) 怪物详细信息富文本化
(已完成!) for和forEach事件
-转向:顺时针/逆时针/反向
-事件转向
+(已完成!) 转向:顺时针/逆时针/反向
+(已完成!) 事件转向
+(已完成!) 修复core.removeBlock隐藏和删除问题
(已完成!) 合并数值操作事件
(已完成!) fromLoad,聚集问题
(已完成!) 注释优化
-状态栏显示项的优化
-动画/音乐/音效自动补全
+(已完成!) 状态栏显示项的优化
+(已完成!) 动画/音乐/音效自动补全
+(已完成!) 重构全局商店!
+(已完成!) 读档时色调数据丢失
+圆角边框
+像素高分辨率问题
+(已完成!) 道具效果优化,删除部分道具相关的开关
+(已完成!) 素材列表选择
+油漆桶,动态更改地图大小
+地图拉框选择复制剪切删除
+-------------
(不处理) 0. 部分文案的修改,如“地图编辑器”(启动服务.exe中)、“enemys”、“snipe”
(造塔工具相关都给鹿神) 1. 便捷PS工具希望加入自定义单位宽高功能,希望把“白底转透明”增强为“纯色底转透明”(弹窗由作者输入RGB或RGBA值)。
@@ -55,7 +67,7 @@
(不处理) 12. (来自鹿神和君浪)坚固属性建议按照描述来,去修改turn或hero_per_damage而不是mon_def(rmxp魔塔的坚固属性是通过一个全局量去指定hero_per_damage的,默认为1)以免和模仿(或者说仿防)冲突
(不处理) 13. 破甲、反击、净化倍率、仇恨增量和是否减半,建议允许使用怪物的属性去覆盖全塔属性中的值,如不同的破甲怪破甲倍率不同
(已完成!) 14. (来自小艾)仇恨伤害和固伤合并进总伤害以免和负伤抵消
-(不处理) 15. 单点阻激夹域和血网伤害同时存在多种时,气泡提示的伤害类型存在覆盖现象,建议优化
+(已完成!) 15. 单点阻激夹域和血网伤害同时存在多种时,气泡提示的伤害类型存在覆盖现象,建议优化
(已完成!) 16. (来自小艾)建议修复瞬移判定无视图快属性script项的bug
(已完成!) 17. 建议修复(如果还没修复)core.drawTip()不能使用系统图标和clear参数的bug,并建议增加一个参数来表示多帧图块使用第几帧(UI绘制事件中的绘制图标同理),增加另一个参数来表示32*48图块绘制上2/3(当前实现,和手册一致)还是下2/3
(不处理) 18. (来自群友)推箱子、阻击、捕捉、重生、炸锤和afterXxx事件的系列问题...
@@ -64,8 +76,8 @@
(不处理) 21. (来自群友)建议大幅缩减表格的长度,譬如把勾选项和单个数值类紧凑摆放
(已完成!) 22. betweenAttackMax在被四个怪同时夹击时(比如上下楼后或通过事件使勇士和其中一只怪重合了)目前是以上下方向的怪为准,建议在表格注释中予以强调,更合理的做法是在两种怪的战损中取max或min
(不处理) 23. displayIdInBook属性不能用于夹击QAQ,同时建议给core.getBlockId()追加一个“如果是怪物,是否按displayIdInBook进行映射”的参数。此外此属性会导致core.hasEnemyLeft()在指定id时失真(不一定是坏事)
-(不处理) 24. core.hasEnemyLeft()不应该调用core.getCurrentEnemys(),因为后者是用于手册的,它为了按伤害升序排列而调用了core.getDamageInfo(),而core.getDamageInfo()又会调用core.getEnemyInfo(),但作者完全可能在core.getDamageInfo()或core.getEnemyInfo()中使用core.hasEnemyLeft()判断特定id的怪物是否存在从而实现一些类似光环的效果(如协同),这样就会造成死递归
-(不处理) 25. 建议新增一个类似“勇士转向”的事件指令————“图块转向”,用于NPC甚至怪物(比如基于索引/数字对4取余),毕竟用转变图块的话不够通用
+(已完成!) 24. core.hasEnemyLeft()不应该调用core.getCurrentEnemys(),因为后者是用于手册的,它为了按伤害升序排列而调用了core.getDamageInfo(),而core.getDamageInfo()又会调用core.getEnemyInfo(),但作者完全可能在core.getDamageInfo()或core.getEnemyInfo()中使用core.hasEnemyLeft()判断特定id的怪物是否存在从而实现一些类似光环的效果(如协同),这样就会造成死递归
+(已完成!) 25. 建议新增一个类似“勇士转向”的事件指令————“图块转向”,用于NPC甚至怪物(比如基于索引/数字对4取余),毕竟用转变图块的话不够通用
(已完成!) 26. “勇士转向”会导致跟随者聚集,这不利于演出,建议改成像core.turnHero()一样不聚集跟随者
(已完成!) 27. 勇士后退时跟随者很鬼畜,建议优化(每步聚集算是一种简陋的办法)
(不处理) 28. 勇士的移动帧只有2,建议改为允许作者指定
@@ -83,7 +95,7 @@
(已修复!) 38.2 移除圣锤道具的定义
(不处理) 39. 建议把样板自带的大部分tools类道具的useItemEffect用useItemEvent重写,以方便作者参照学习(我能说266都几个月了好多新作者和老作者压根不知道useItemEvent的存在吗)
(已修复!) 40. 希望显示文章的\b提供top和bottom这两种新写法来实现在顶部或底部显示对话框,目前只有firstArrive和eachArrive等没有当前点的事件中才能用up和down来临时实现这种效果,否则就得设置剧情文本的属性,这在频繁来回切换时是致命的,就像《无上之光》RMXP版地上40层一样
-41. 建议优化core.splitLines()来避免出现标点禁则(如点号和右标号不能用于行首,左标号不能用于行尾),同时也能更好地支持字母文字语言如英语(日语韩语等同样是方块字的倒不要紧)
+(已完成!) 41. 建议优化core.splitLines()来避免出现标点禁则(如点号和右标号不能用于行首,左标号不能用于行尾),同时也能更好地支持字母文字语言如英语(日语韩语等同样是方块字的倒不要紧)
(已修复!) 42. core.drawAnimate()和对应的事件指令,建议增加一个参数来表示坐标是绝对坐标(即当前的实现)还是在视野中的相对坐标(以13*13为例相对坐标总是在0~12之间),毕竟有些动画按相对坐标绘制才是作者的演出需求。
(不处理) 43. (来自鹿神)希望给animate文件支持多音效、画面闪烁和图块闪烁
(已修复!) 44. 希望给“播放背景音乐”事件像core.playBgm()函数一样添加“从第几秒开始”的参数,以用于一些演出(比如适当的剧情处直接从高潮开始)。同理可以让“暂停背景音乐”记录下当前播放到了第几秒,并在“恢复背景音乐”中自动从这个秒数恢复。作者还可以手动配合音量渐变效果
@@ -95,18 +107,18 @@
(不处理) 50. 建议给录像播放时的N键提供一个对应的移动端操作,以方便移动端作者
(已完成!) 51. 希望给“显示选择项”、“显示确认框”、“等待用户操作”这三个事件添加一个“若多少毫秒内不响应则触发的分支”,用来实现一些QTE,录像中可以记录“choice: timeout”、“confirm: timeout”和“wait: timeout”来表示触发了超时分支
52. 希望给“转变图块”加一个淡入时间参数(显隐和转变图层块也希望加个淡入淡出时间参数,图层块也希望提供移动和跳跃事件),专门用于原本是空地或空气墙的情况。目前要实现这样的效果必须使用红点,然而红点有着“推箱子、阻击、捕捉、重生、炸锤和afterXxx事件”的系列问题,且会导致core.removeBlock()(隐藏事件)退化为core.hideBlock()
-53. 希望“移动事件”的移速和淡出速度拆开成两个参数,目前这样捆绑在一起不太自由
-(不处理) 54. 建议把图块属性的noPass改为勾选框而不是下拉框,因为null一定表示不可通行(道具根本没有noPass)
+(不处理) 53. 希望“移动事件”的移速和淡出速度拆开成两个参数,目前这样捆绑在一起不太自由
+(已完成) 54. 建议把图块属性的noPass改为勾选框而不是下拉框,因为null一定表示不可通行(道具根本没有noPass)
(不处理,可以转变图块) 55. “移动事件”和“跳跃事件”会导致本来勾选了不显伤的怪物突然有了显伤,非常难看,建议优化
(不处理) 56. 希望推出一套能够对跟随者位置和坐标进行读写的API甚至事件指令,并允许这些信息被计入存档,以实现一些演出甚至游戏性效果,如新新2用公主占位防冰块
(不处理) 57. 希望\t[hero]和\t[xxx,hero]能像图块一样绘制原地抖动的4帧全局动画而不是不动,希望能使用勇士的当前朝向而不是一直朝下,希望能使用\t[hero1]和\t[xxx,hero1]这样的写法来使用跟随者的行走图作为头像
(文档相关给秋橙) 58. 建议在在线文档中给\r支持的颜色单词做一下枚举并写出对应的RGB值
(不处理) 59. 在标题画面调用core.hideStartAnimate(core.startGame)会立即开始游戏并跳过难度选择,可能造成非作者预期的效果,有办法优化吗?
(已完成!) 60. “设置怪物属性”事件的下拉框目前只支持一部分,另一部分只能通过手敲json再解析来得到,希望提供完整支持
-61. 在事件编辑器中进行地图选点时,有些事件指令虽然只能用于同楼层,但实际生效时勇士可能已经不在当前正在编辑的楼层(比如在一个楼层切换事件指令后)了,所以希望地图选点始终提供楼层下拉表
+(已完成!) 61. 在事件编辑器中进行地图选点时,有些事件指令虽然只能用于同楼层,但实际生效时勇士可能已经不在当前正在编辑的楼层(比如在一个楼层切换事件指令后)了,所以希望地图选点始终提供楼层下拉表
(文档相关给秋橙) 62. 希望在线文档介绍一下楼层和startText的独立开关的flag表示
63. 希望给core.moveAction(callback)函数提供一个对应的事件指令,用于在事件流处理中让勇士进行一些有游戏性意义(即非纯演出)的移动。如果做不到的话希望参照本文的46号issue作为原生脚本勾选async的例子讲解如何使用
-64. “打开全局商店”事件指令建议在用于公共事件版商店时简单地退化为“插入公共事件”而不要打断当前事件流,由作者在这个公共事件结尾去决定“立刻结束当前事件”还是不结束
+(已完成!) 64. “打开全局商店”事件指令建议在用于公共事件版商店时简单地退化为“插入公共事件”而不要打断当前事件流,由作者在这个公共事件结尾去决定“立刻结束当前事件”还是不结束
(已修复!) 65. “显隐贴图”的参数应为像素坐标而不是网格坐标,请修正在线文档的描述。同时建议加个淡入淡出时间参数,还建议贴图能像图片一样有透明度和被移动
(不处理) 66. 读档建议换个和floor.mp3不一样的音效
(不处理) 67. “画面震动”事件希望不要光左右晃,至少做成QQ窗口抖动的效果吧w
@@ -118,7 +130,7 @@
73. 画弧既然有现成的API,那建议也作为UI绘制事件提供。甚至希望提供画椭圆功能(长短轴水平或铅直的那种)参数为中心坐标和长短轴长度
(已完成!) 74. “设置画布属性”的基准线建议增加'hanging'和'ideographic'这两种模式
(已完成!) 75. 建议修复“绘制多行文本”时行距比字号大不太多会导致各行下缘丢失的bug(加大行距又会导致第一行的纵坐标难以估计),此bug在道具商店和1.3倍行距英文看的很明显
-76. (来自群友)建议给第一代全局商店像“显示选择项”一样提供图标、颜色和出现条件
+(已完成!) 76. (来自群友)建议给第一代全局商店像“显示选择项”一样提供图标、颜色和出现条件
(已完成!增加正则匹配) 77. 建议给core.searchBlock()新增问号通配符(匹配一个任意字符)
(已完成!) 78. 建议移除core.setInitData()并将其内容写在startText以方便作者仿照修改
(不处理;有跟随情况下处理很麻烦) 79. 建议给core.drawHero()添加纵横两个偏移参数(目前只有一个),以用于做一些斜向移动的演出