更新道具效果
This commit is contained in:
parent
8c5fc76d8c
commit
299440e04a
@ -2720,8 +2720,8 @@ Global_Value_List
|
||||
|
||||
|
||||
Global_Flag_List
|
||||
: '显示当前楼层'|'显示勇士图标'|'显示当前等级'|'启用生命上限'|'显示生命值'|'显示魔力值'|'显示攻击力'|'显示防御力'|'显示护盾值'|'显示金币值'|'显示经验值'|'允许等级提升'|'升级扣除模式'|'显示钥匙数量'|'显示绿钥匙'|'显示破炸飞'|'显示毒衰咒'|'显示当前技能'|'楼梯边才能楼传'|'楼传平面塔模式'|'破墙镐四方向'|'炸弹四方向'|'冰冻徽章四方向'|'铁门不需要钥匙'|'开启加点'|'开启负伤'|'夹击不超伤害值'|'循环计算临界'|'允许轻按'|'允许走到将死领域'|'允许瞬间移动'|'阻激夹域后禁用快捷商店'|'虚化前景层'|'检查控制台'
|
||||
/*Global_Flag_List ['s:enableFloor','s:enableName','s:enableLv', 's:enableHPMax', 's:enableHP', 's:enableMana', 's:enableAtk', 's:enableDef', 's:enableMDef', 's:enableMoney', 's:enableExp', 's:enableLevelUp', 's:levelUpLeftMode', 's:enableKeys', 's:enableGreenKey', 's:enablePZF', 's:enableDebuff', 's:enableSkill', 'flyNearStair', 'flyRecordPosition', 'pickaxeFourDirections', 'bombFourDirections', 'snowFourDirections', 'steelDoorWithoutKey', 'enableAddPoint', 'enableNegativeDamage', 'betweenAttackMax', 'useLoop', 'enableGentleClick', 'canGoDeadZone', 'enableMoveDirectly', 'disableShopOnDamage', 'blurFg']*/;
|
||||
: '显示当前楼层'|'显示勇士图标'|'显示当前等级'|'启用生命上限'|'显示生命值'|'显示魔力值'|'显示攻击力'|'显示防御力'|'显示护盾值'|'显示金币值'|'显示经验值'|'允许等级提升'|'升级扣除模式'|'显示钥匙数量'|'显示绿钥匙'|'显示破炸飞'|'显示毒衰咒'|'显示当前技能'|'楼梯边才能楼传'|'楼传平面塔模式'|'铁门不需要钥匙'|'开启加点'|'开启负伤'|'夹击不超伤害值'|'循环计算临界'|'允许轻按'|'允许走到将死领域'|'允许瞬间移动'|'阻激夹域后禁用快捷商店'|'虚化前景层'|'检查控制台'
|
||||
/*Global_Flag_List ['s:enableFloor','s:enableName','s:enableLv', 's:enableHPMax', 's:enableHP', 's:enableMana', 's:enableAtk', 's:enableDef', 's:enableMDef', 's:enableMoney', 's:enableExp', 's:enableLevelUp', 's:levelUpLeftMode', 's:enableKeys', 's:enableGreenKey', 's:enablePZF', 's:enableDebuff', 's:enableSkill', 'flyNearStair', 'flyRecordPosition', 'steelDoorWithoutKey', 'enableAddPoint', 'enableNegativeDamage', 'betweenAttackMax', 'useLoop', 'enableGentleClick', 'canGoDeadZone', 'enableMoveDirectly', 'disableShopOnDamage', 'blurFg']*/;
|
||||
|
||||
Colour
|
||||
: 'sdeirughvuiyasdeb'+ //为了被识别为复杂词法规则
|
||||
|
||||
@ -529,29 +529,6 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_docs": "楼传平面模式",
|
||||
"_data": "传送器平面塔模式;此模式下楼层传送器将飞到上次离开该楼层的位置。"
|
||||
},
|
||||
"pickaxeFourDirections": {
|
||||
"_leaf": true,
|
||||
"_type": "checkbox",
|
||||
"_docs": "四向破墙镐",
|
||||
"_data": "使用破墙镐是否四个方向都破坏;如果false则只破坏面前的墙壁"
|
||||
},
|
||||
"bombFourDirections": {
|
||||
"_leaf": true,
|
||||
"_type": "checkbox",
|
||||
"_docs": "四向炸弹",
|
||||
"_data": "使用炸弹是否四个方向都会炸;如果false则只炸面前的怪物(即和圣锤等价)"
|
||||
},
|
||||
"snowFourDirections": {
|
||||
"_leaf": true,
|
||||
"_type": "checkbox",
|
||||
"_docs": "四向破冰稿",
|
||||
"_data": "使用冰冻徽章是否四个方向都会消除熔岩;如果false则只消除面前的熔岩"
|
||||
},
|
||||
"bigKeyIsBox": {
|
||||
"_leaf": true,
|
||||
"_type": "checkbox",
|
||||
"_data": "如果此项为true,则视为钥匙盒,红黄蓝钥匙+1;若为false,则视为大黄门钥匙"
|
||||
},
|
||||
"steelDoorWithoutKey": {
|
||||
"_leaf": true,
|
||||
"_type": "checkbox",
|
||||
@ -564,12 +541,6 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
||||
"_docs": "首次道具提示",
|
||||
"_data": "首次获得道具是否提示"
|
||||
},
|
||||
"equipment": {
|
||||
"_leaf": true,
|
||||
"_type": "checkbox",
|
||||
"_docs": "剑盾装备",
|
||||
"_data": "剑和盾是否作为装备。如果此项为true,则作为装备,需要在装备栏使用,否则将直接加属性。"
|
||||
},
|
||||
"equipboxButton": {
|
||||
"_leaf": true,
|
||||
"_type": "checkbox",
|
||||
|
||||
@ -872,7 +872,7 @@ actions.prototype._clickCenterFly = function (x, y) {
|
||||
core.useItem('centerFly');
|
||||
}
|
||||
else {
|
||||
core.drawTip('当前不能使用中心对称飞行器');
|
||||
core.drawTip('当前不能使用' + core.material.items['centerFly'].name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -884,7 +884,7 @@ actions.prototype._keyUpCenterFly = function (keycode) {
|
||||
core.useItem('centerFly');
|
||||
}
|
||||
else {
|
||||
core.drawTip('当前不能使用中心对称飞行器');
|
||||
core.drawTip('当前不能使用' + core.material.items['centerFly'].name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -990,7 +990,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;
|
||||
@ -1268,7 +1269,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')
|
||||
|
||||
@ -277,7 +277,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();
|
||||
}
|
||||
|
||||
|
||||
@ -2266,14 +2266,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;
|
||||
|
||||
@ -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;
|
||||
|
||||
16
libs/ui.js
16
libs/ui.js
@ -2042,7 +2042,7 @@ 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;
|
||||
}
|
||||
|
||||
@ -2101,7 +2101,7 @@ ui.prototype._drawMaps_drawHint = function () {
|
||||
core.fillText('ui', "后张地图 [▼ / PGDN]", this.HPIXEL, this.PIXEL - (32 * per + 48));
|
||||
|
||||
core.fillText('ui', "退出 [ESC / ENTER]", this.HPIXEL, this.HPIXEL);
|
||||
core.fillText('ui', "[X] 可查看怪物手册", this.HPIXEL + 77, this.HPIXEL + 32, null, '13px Arial');
|
||||
core.fillText('ui', "[X] 可查看" + core.material.items['book'].name, this.HPIXEL + 77, this.HPIXEL + 32, null, '13px Arial');
|
||||
|
||||
core.setTextBaseline('ui', 'alphabetic');
|
||||
}
|
||||
@ -2767,13 +2767,14 @@ ui.prototype._drawStatistics_generateText = function (obj, type, data) {
|
||||
}
|
||||
else text += ",";
|
||||
prev = obj.cls[key];
|
||||
text+=core.ui._drawStatistics_getName(key)+value+"个";
|
||||
var name = ((core.material.items[key] || (core.getBlockById(key) || {}).event)||{}).name || key;
|
||||
text+=name+value+"个";
|
||||
if (obj.ext[key])
|
||||
text+="("+obj.ext[key]+")";
|
||||
})
|
||||
if (prev!="") text+="。";
|
||||
|
||||
text+="\n\n";
|
||||
text+="\n";
|
||||
text+="共加生命值"+core.formatBigNumber(data.add.hp)+"点,攻击"
|
||||
+core.formatBigNumber(data.add.atk)+"点,防御"
|
||||
+core.formatBigNumber(data.add.def)+"点,护盾"
|
||||
@ -2781,11 +2782,6 @@ ui.prototype._drawStatistics_generateText = function (obj, type, data) {
|
||||
return text;
|
||||
}
|
||||
|
||||
ui.prototype._drawStatistics_getName = function (key) {
|
||||
return {"yellowDoor": "黄门", "blueDoor": "蓝门", "redDoor": "红门", "greenDoor": "绿门",
|
||||
"steelDoor": "铁门"}[key] || core.material.items[key].name;
|
||||
}
|
||||
|
||||
////// 绘制“关于”界面 //////
|
||||
ui.prototype.drawAbout = function () {
|
||||
return this.uidata.drawAbout();
|
||||
@ -2805,7 +2801,7 @@ ui.prototype.drawHelp = function () {
|
||||
core.drawText([
|
||||
"\t[键盘快捷键列表]"+
|
||||
"[CTRL] 跳过对话 [Z] 转向\n" +
|
||||
"[X] 怪物手册 [G] 楼层传送\n" +
|
||||
"[X] "+core.material.items['book'].name + " [G] "+core.material.items['fly'].name+"\n" +
|
||||
"[A] 读取自动存档 [W] 撤销读取自动存档\n" +
|
||||
"[S/D] 存读档页面 [SPACE] 轻按\n" +
|
||||
"[V] 快捷商店 [ESC] 系统菜单\n" +
|
||||
|
||||
@ -487,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,
|
||||
|
||||
@ -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 || {})
|
||||
@ -811,22 +810,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: 飞
|
||||
@ -1065,10 +1056,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
id = block.event.id,
|
||||
enemy = core.material.enemys[id];
|
||||
|
||||
type[loc] = type[loc] || {};
|
||||
|
||||
// 血网
|
||||
if (id == 'lavaNet' && !core.hasItem('shoes')) {
|
||||
damage[loc] = (damage[loc] || 0) + core.values.lavaDamage;
|
||||
type[loc] = "血网伤害";
|
||||
type[loc]["血网伤害"] = true;
|
||||
}
|
||||
|
||||
// 领域
|
||||
@ -1090,7 +1083,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1104,7 +1098,8 @@ 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);
|
||||
// 检查下一个点是否存在事件(从而判定是否移动)
|
||||
@ -1125,14 +1120,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1192,7 +1189,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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');",
|
||||
|
||||
@ -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":"null","script":"(function () {\n\t// 血网的伤害效果移动到 checkBlock 中处理\n\n\t// 如果要做一次性血网,可直接注释掉下面这句话:\n\t// core.removeBlock(core.getHeroLoc('x'), core.getHeroLoc('y'));\n})();"},
|
||||
"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})()"},
|
||||
"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})()"},
|
||||
"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})()"},
|
||||
"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},
|
||||
|
||||
@ -44,6 +44,8 @@
|
||||
(已完成!) 读档时色调数据丢失
|
||||
圆角边框
|
||||
像素高分辨率问题
|
||||
(已完成!) 道具效果优化,删除部分道具相关的开关
|
||||
素材列表选择
|
||||
|
||||
-------------
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user