diff --git a/_server/comment.js b/_server/comment.js index f2aeffdd..9f7bb124 100644 --- a/_server/comment.js +++ b/_server/comment.js @@ -44,28 +44,28 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc = "type": { "_leaf": true, "_type": "textarea", - "_data": "装备的类别,与equipName按顺序对应" + "_data": "如果是装备,其类别,与equipName按顺序对应(从0开始)" }, "atk": { "_leaf": true, "_type": "textarea", - "_data": "装备增加的攻击数值" + "_data": "如果是装备,其增加的攻击数值" }, "def": { "_leaf": true, "_type": "textarea", - "_data": "装备增加的防御数值" + "_data": "如果是装备,其增加的防御数值" }, "mdef": { "_leaf": true, "_type": "textarea", - "_data": "装备增加的魔防数值" + "_data": "如果是装备,其增加的魔防数值" }, "animate": { "_leaf": true, "_type": "textarea", "_string": true, - "_data": "装备的攻击动画,仅对type为0的装备有效" + "_data": "如果是装备,其攻击动画,仅对type为0的装备有效" } } }, diff --git a/_server/css/editor_mobile.css b/_server/css/editor_mobile.css index 36ca92ae..6d024248 100644 --- a/_server/css/editor_mobile.css +++ b/_server/css/editor_mobile.css @@ -112,7 +112,7 @@ body { #tip { float: right; - width: 50%; + width: 45%; /* height: 95%; */ min-height: 9rem; padding: 5px 10px 10px 10px; diff --git a/_server/data.comment.js b/_server/data.comment.js index 69715eaf..9b678051 100644 --- a/_server/data.comment.js +++ b/_server/data.comment.js @@ -50,7 +50,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = "equipName": { "_leaf": true, "_type": "textarea", - "_data": "装备位名称,为不超过6个的数组,此项的顺序与equiptype数值关联" + "_data": "装备位名称,为不超过6个的数组,此项的顺序与equiptype数值关联;例如可写[\"武器\",\"防具\",\"首饰\"]等等。" }, "statusLeftBackground": { "_leaf": true, @@ -152,7 +152,7 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = "equipment": { "_leaf": true, "_type": "textarea", - "_data": "初始装备" + "_data": "初始装上的装备,此处建议请直接留空数组" }, "items": { "_leaf": false, @@ -429,11 +429,11 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = "_bool": "bool", "_data": "剑和盾是否作为装备。如果此项为true,则作为装备,需要在装备栏使用,否则将直接加属性。" }, - "equipboxBotton": { + "equipboxButton": { "_leaf": true, "_type": "checkbox", "_bool": "bool", - "_data": "若此项为true则将状态栏中的楼层转换器按钮换为装备栏按钮,同时启用装备栏,无论equipment是否为true" + "_data": "若此项为true则将状态栏中的楼层转换器按钮换为装备栏按钮" }, /* "enableDeleteItem": { diff --git a/_server/editor.js b/_server/editor.js index 9c9603cc..07741e42 100644 --- a/_server/editor.js +++ b/_server/editor.js @@ -2,6 +2,7 @@ function editor() { this.version = "2.0"; this.material = {}; this.brushMod = "line";//["line","rectangle"] + this.layerMod = "map";//["fgmap","map","bgmap"] } editor.prototype.init = function (callback) { @@ -12,14 +13,7 @@ editor.prototype.init = function (callback) { editor.reset(function () { editor.drawMapBg(); - var mapArray = core.maps.save(core.status.maps, core.status.floorId); - editor.map = mapArray.map(function (v) { - return v.map(function (v) { - return editor.ids[[editor.indexs[parseInt(v)][0]]] - }) - }); - editor.currentFloorId = core.status.floorId; - editor.currentFloorData = core.floors[core.status.floorId]; + editor.fetchMapFromCore(); editor.updateMap(); editor.buildMark(); editor.drawEventBlock(); @@ -170,7 +164,11 @@ editor.prototype.mapInit = function () { editor.map[y][x] = 0; } } + editor.fgmap=JSON.parse(JSON.stringify(editor.map)); + editor.bgmap=JSON.parse(JSON.stringify(editor.map)); editor.currentFloorData.map = editor.map; + editor.currentFloorData.fgmap = editor.fgmap; + editor.currentFloorData.bgmap = editor.bgmap; editor.currentFloorData.firstArrive = []; editor.currentFloorData.events = {}; editor.currentFloorData.changeFloor = {}; @@ -180,12 +178,15 @@ editor.prototype.mapInit = function () { editor.currentFloorData.cannotMove = {}; } editor.prototype.drawMapBg = function (img) { - var bgc = bg.getContext('2d'); + return; + + //legacy if (!core.isset(editor.bgY) || editor.bgY == 0) { editor.main.editor.drawMapBg(); return; } + var bgc = bg.getContext('2d'); for (var ii = 0; ii < 13; ii++) for (var jj = 0; jj < 13; jj++) { bgc.clearRect(ii * 32, jj * 32, 32, 32); @@ -256,6 +257,8 @@ editor.prototype.updateMap = function () { } // 绘制地图 start var eventCtx = document.getElementById('event').getContext("2d"); + var fgCtx = document.getElementById('fg').getContext("2d"); + var bgCtx = document.getElementById('bg').getContext("2d"); for (var y = 0; y < editor.map.length; y++) for (var x = 0; x < editor.map[0].length; x++) { var tileInfo = editor.map[y][x]; @@ -263,6 +266,10 @@ editor.prototype.updateMap = function () { addIndexToAutotileInfo(x, y); drawAutotile(eventCtx, x, y, tileInfo); } else drawTile(eventCtx, x, y, tileInfo); + tileInfo = editor.fgmap[y][x]; + drawTile(fgCtx, x, y, tileInfo); + tileInfo = editor.bgmap[y][x]; + drawTile(bgCtx, x, y, tileInfo); } // 绘制地图 end @@ -326,26 +333,45 @@ editor.prototype.buildMark = function(){ } } -editor.prototype.changeFloor = function (floorId, callback) { - editor.currentFloorData.map = editor.map.map(function (v) { +editor.prototype.fetchMapFromCore = function(){ + var mapArray = core.maps.save(core.status.maps, core.status.floorId); + editor.map = mapArray.map(function (v) { return v.map(function (v) { - return v.idnum || v || 0 + return editor.ids[[editor.indexs[parseInt(v)][0]]] }) }); + editor.currentFloorId = core.status.floorId; + editor.currentFloorData = core.floors[core.status.floorId]; + for(var ii=0,name;name=['bgmap','fgmap'][ii];ii++){ + var mapArray = editor.currentFloorData[name]; + if(!mapArray || JSON.stringify(mapArray)==JSON.stringify([])){//未设置或空数组 + //与editor.map同形的全0 + mapArray=eval('['+Array(editor.map.length+1).join('['+Array(editor.map[0].length+1).join('0,')+'],')+']'); + } + editor[name]=mapArray.map(function (v) { + return v.map(function (v) { + return editor.ids[[editor.indexs[parseInt(v)][0]]] + }) + }); + } +} + +editor.prototype.changeFloor = function (floorId, callback) { + for(var ii=0,name;name=['map','bgmap','fgmap'][ii];ii++){ + var mapArray=editor[name].map(function (v) { + return v.map(function (v) { + return v.idnum || v || 0 + }) + }); + editor.currentFloorData[name]=mapArray; + } core.changeFloor(floorId, null, {"x": 0, "y": 0, "direction": "up"}, null, function () { core.bigmap.offsetX=0; core.bigmap.offsetY=0; editor.moveViewport(0,0); editor.drawMapBg(); - var mapArray = core.maps.save(core.status.maps, core.status.floorId); - editor.map = mapArray.map(function (v) { - return v.map(function (v) { - return editor.ids[[editor.indexs[parseInt(v)][0]]] - }) - }); - editor.currentFloorId = core.status.floorId; - editor.currentFloorData = core.floors[core.status.floorId]; + editor.fetchMapFromCore(); editor.updateMap(); editor_mode.floor(); editor.drawEventBlock(); @@ -486,7 +512,7 @@ editor.prototype.listen = function () { holdingPath = 0; e.stopPropagation(); if (stepPostfix && stepPostfix.length) { - preMapData = JSON.parse(JSON.stringify(editor.map)); + preMapData = JSON.parse(JSON.stringify({map:editor.map,fgmap:editor.fgmap,bgmap:editor.bgmap})); if(editor.brushMod==='rectangle'){ var x0=stepPostfix[0].x; var y0=stepPostfix[0].y; @@ -505,8 +531,12 @@ editor.prototype.listen = function () { currDrawData.info = JSON.parse(JSON.stringify(editor.info)); reDo = null; // console.log(stepPostfix); - for (var ii = 0; ii < stepPostfix.length; ii++) - editor.map[stepPostfix[ii].y][stepPostfix[ii].x] = editor.info; + if (editor.layerMod!='map' && editor.info.images && editor.info.images.indexOf('48')!==-1){ + printe('前景/背景不支持48的图块'); + } else { + for (var ii = 0; ii < stepPostfix.length; ii++) + editor[editor.layerMod][stepPostfix[ii].y][stepPostfix[ii].x] = editor.info; + } // console.log(editor.map); editor.updateMap(); holdingPath = 0; @@ -574,7 +604,9 @@ editor.prototype.listen = function () { e.preventDefault(); //Ctrl+z 撤销上一步undo if (e.keyCode == 90 && e.ctrlKey && preMapData && currDrawData.pos.length && selectBox.isSelected) { - editor.map = JSON.parse(JSON.stringify(preMapData)); + editor.map = JSON.parse(JSON.stringify(preMapData.map)); + editor.fgmap = JSON.parse(JSON.stringify(preMapData.fgmap)); + editor.bgmap = JSON.parse(JSON.stringify(preMapData.bgmap)); editor.updateMap(); reDo = JSON.parse(JSON.stringify(currDrawData)); currDrawData = {pos: [], info: {}}; @@ -582,7 +614,7 @@ editor.prototype.listen = function () { } //Ctrl+y 重做一步redo if (e.keyCode == 89 && e.ctrlKey && reDo && reDo.pos.length && selectBox.isSelected) { - preMapData = JSON.parse(JSON.stringify(editor.map)); + preMapData = JSON.parse(JSON.stringify({map:editor.map,fgmap:editor.fgmap,bgmap:editor.bgmap})); for (var j = 0; j < reDo.pos.length; j++) editor.map[reDo.pos[j].y][reDo.pos[j].x] = JSON.parse(JSON.stringify(reDo.info)); @@ -865,6 +897,21 @@ editor.prototype.listen = function () { editor.brushMod=brushMod2.value; } + var layerMod=document.getElementById('layerMod'); + layerMod.onchange=function(){ + editor.layerMod=layerMod.value; + } + + var layerMod2=document.getElementById('layerMod2'); + if(layerMod2)layerMod2.onchange=function(){ + editor.layerMod=layerMod2.value; + } + + var layerMod3=document.getElementById('layerMod3'); + if(layerMod3)layerMod3.onchange=function(){ + editor.layerMod=layerMod3.value; + } + editor.moveViewport=function(x,y){ core.bigmap.offsetX = core.clamp(core.bigmap.offsetX+32*x, 0, 32*core.bigmap.width-416); diff --git a/_server/editor_file.js b/_server/editor_file.js index 4f534d2a..8e340f4b 100644 --- a/_server/editor_file.js +++ b/_server/editor_file.js @@ -98,16 +98,20 @@ editor_file = function (editor, callback) { editor.currentFloorData.map = []; for (var i=0;i + @@ -247,6 +248,7 @@ +
@@ -268,17 +270,22 @@ - -
- - - - + +
+ + + +
- +
@@ -245,6 +246,12 @@ 画线 画矩形 +
+ + 背景层 + 事件层 + 前景层 +
@@ -391,7 +398,7 @@ - + diff --git a/libs/control.js b/libs/control.js index c8c9c5a3..8b9bc67b 100644 --- a/libs/control.js +++ b/libs/control.js @@ -9,7 +9,7 @@ function control() { } control.prototype.init = function () { - + this.controldata = functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a.control; } ////// 设置requestAnimationFrame ////// @@ -1183,116 +1183,7 @@ control.prototype.updateFollowers = function () { ////// 更新领域、夹击、阻击的伤害地图 ////// control.prototype.updateCheckBlock = function() { - core.status.checkBlock = {}; - if (!core.isset(core.status.thisMap)) return; - var blocks = core.status.thisMap.blocks; - - // Step1: 更新怪物地图 - core.status.checkBlock.map = []; // 记录怪物地图 - for (var n=0;n=core.bigmap.width || ny<0 || ny>=core.bigmap.height) continue; - if (!zoneSquare && Math.abs(dx)+Math.abs(dy)>range) continue; - core.status.checkBlock.damage[nx+ny*core.bigmap.width]+=enemy.value||0; - } - } - } - // 存在激光 - if (core.enemys.hasSpecial(enemy.special, 24)) { - for (var nx=0;nx=core.bigmap.width || ny<0 || ny>=core.bigmap.height || Math.abs(dx)+Math.abs(dy)>1) continue; - core.status.checkBlock.damage[nx+ny*core.bigmap.width]+=enemy.value||0; - } - } - } - } - } - } - - - // Step3: 更新夹击点坐标,并将夹击伤害加入到damage中 - core.status.checkBlock.betweenAttack = []; // 记录(x,y)点是否有夹击 - for (var x=0;x0 && x0 && y1) - core.status.checkBlock.damage[x+core.bigmap.width*y] += Math.floor((leftHp+(core.flags.betweenAttackCeil?0:1))/2); - } - } - } + return this.controldata.updateCheckBlock(); } ////// 检查并执行领域、夹击、阻击事件 ////// @@ -1944,23 +1835,25 @@ control.prototype.replay = function () { if (core.canUseItem(itemId)) { var tools = Object.keys(core.status.hero.items.tools).sort(); var constants = Object.keys(core.status.hero.items.constants).sort(); - var index; + var index=-1; if ((index=tools.indexOf(itemId))>=0) { - core.status.event.data = {"toolsPage":Math.floor(index/12)+1, "constantsPage":1, "selectId":null} + core.status.event.data = {"toolsPage":Math.floor(index/12)+1, "constantsPage":1, "selectId":null}; index = index%12; } else if (index=constants.indexOf(itemId)>=0) { - core.status.event.data = {"toolsPage":1, "constantsPage":Math.floor(index/12)+1, "selectId":null} + core.status.event.data = {"toolsPage":1, "constantsPage":Math.floor(index/12)+1, "selectId":null}; index = index%12+12; } - core.ui.drawToolbox(index); + if (index>=0) { + core.ui.drawToolbox(index); setTimeout(function () { core.ui.closePanel(); core.useItem(itemId, function () { core.replay(); }); }, 750 / Math.max(1, core.status.replay.speed)); - return; + return; + } } } else if (action.indexOf("unEquip:")==0) { @@ -1979,16 +1872,18 @@ control.prototype.replay = function () { var equipId = action.substring(6); var ownEquipment = Object.keys(core.status.hero.items.equips).sort(); var index = ownEquipment.indexOf(equipId); - core.status.event.data = {"page":Math.floor(index/12)+1, "selectId":null} - index = index%12+12; - core.ui.drawEquipbox(index); - setTimeout(function () { - core.ui.closePanel(); - core.loadEquip(equipId, function () { - core.replay(); - }); - }, 750 / Math.max(1, core.status.replay.speed)); - return; + if (index>=0) { + core.status.event.data = {"page":Math.floor(index/12)+1, "selectId":null}; + index = index%12+12; + core.ui.drawEquipbox(index); + setTimeout(function () { + core.ui.closePanel(); + core.loadEquip(equipId, function () { + core.replay(); + }); + }, 750 / Math.max(1, core.status.replay.speed)); + return; + } } else if (action.indexOf("fly:")==0) { var floorId=action.substring(4); @@ -2691,7 +2586,7 @@ control.prototype.clearStatusBar = function() { core.statusBar[e].innerHTML = " "; }); core.statusBar.image.book.style.opacity = 0.3; - if (!core.flags.equipboxBotton) { + if (!core.flags.equipboxButton) { core.statusBar.image.fly.style.opacity = 0.3; } } @@ -2699,52 +2594,7 @@ control.prototype.clearStatusBar = function() { ////// 更新状态栏 ////// control.prototype.updateStatusBar = function () { - // 检查等级 - core.events.checkLvUp(); - - // 检查HP上限 - if (core.flags.enableHPMax) { - core.setStatus('hp', Math.min(core.getStatus('hpmax'), core.getStatus('hp'))); - } - - // 更新领域、阻击、显伤 - core.updateCheckBlock(); - - var lvName = core.getLvName(); - core.statusBar.lv.innerHTML = lvName; - if (/^[+-]?\d+$/.test(lvName)) - core.statusBar.lv.style.fontStyle = 'italic'; - else core.statusBar.lv.style.fontStyle = 'normal'; - - var statusList = ['hpmax', 'hp', 'atk', 'def', 'mdef', 'money', 'experience']; - statusList.forEach(function (item) { - if (core.isset(core.status.hero[item])) - core.status.hero[item] = Math.floor(core.status.hero[item]); - core.statusBar[item].innerHTML = core.formatBigNumber(core.getStatus(item)); - }); - - // 进阶 - if (core.flags.enableLevelUp && core.status.hero.lv0) { + core.events.insertAction(todo,x,y); + } + + if (core.isset(callback)) callback(); +}, + "afterChangeLight": function(x,y) { // 改变亮灯之后,可以触发的事件 }, -////// 推箱子后的事件 ////// -"afterPushBox" : function () { + "afterPushBox": function () { // 推箱子后的事件 var noBoxLeft = function () { @@ -295,8 +302,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = */ } }, -////// 使用炸弹/圣锤后的事件 ////// -"afterUseBomb" : function () { + "afterUseBomb": function () { // 使用炸弹/圣锤后的事件 // 这是一个使用炸弹也能开门的例子 @@ -311,21 +317,19 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = */ }, -////// 即将存档前可以执行的操作 ////// -"beforeSaveData" : function(data) { + "beforeSaveData": function(data) { // 即将存档前可以执行的操作 }, -////// 读档事件后,载入事件前,可以执行的操作 ////// -"afterLoadData" : function(data) { + "afterLoadData": function(data) { // 读档事件后,载入事件前,可以执行的操作 // 怪物数据的动态修改迁移到了“脚本编辑 - updateEnemys”中,详见文档说明 core.enemys.updateEnemys(); } -}, -"enemys": { -"getSpecials" : function() { + }, + "enemys": { + "getSpecials": function() { // 获得怪物的特殊属性,每一行定义一个特殊属性。 // 分为三项,第一项为该特殊属性的数字,第二项为特殊属性的名字,第三项为特殊属性的描述 // 可以直接写字符串,也可以写个function将怪物传进去 @@ -356,7 +360,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = [24, "激光", function (enemy) {return "经过怪物同行或同列时自动减生命"+(enemy.value||0)+"点";}] ]; }, -"getDamageInfo" : function (enemy, hero_hp, hero_atk, hero_def, hero_mdef) { + "getDamageInfo": function (enemy, hero_hp, hero_atk, hero_def, hero_mdef) { // 获得战斗伤害信息(实际伤害计算函数) // 怪物生命,怪物攻击、防御、特殊属性 @@ -449,7 +453,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = "damage": damage }; }, -"updateEnemys" : function () { + "updateEnemys": function () { // 更新怪物数据,可以在这里对怪物属性和数据进行动态更新,详见文档——事件——怪物数据的动态修改 // 比如下面这个例子,如果flag:xxx为真,则将绿头怪的攻击设为100,金币设为20 /* @@ -460,10 +464,180 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = */ // 别忘了在事件中调用“更新怪物数据”事件! } + }, + "control": { + "updateStatusBar": function () { + // 更新状态栏 + + // 检查等级 + core.events.checkLvUp(); + + // 检查HP上限 + if (core.flags.enableHPMax) { + core.setStatus('hp', Math.min(core.getStatus('hpmax'), core.getStatus('hp'))); + } + + // 更新领域、阻击、显伤 + core.updateCheckBlock(); + + var lvName = core.getLvName(); + core.statusBar.lv.innerHTML = lvName; + if (/^[+-]?\d+$/.test(lvName)) + core.statusBar.lv.style.fontStyle = 'italic'; + else core.statusBar.lv.style.fontStyle = 'normal'; + + var statusList = ['hpmax', 'hp', 'atk', 'def', 'mdef', 'money', 'experience']; + statusList.forEach(function (item) { + if (core.isset(core.status.hero[item])) + core.status.hero[item] = Math.floor(core.status.hero[item]); + core.statusBar[item].innerHTML = core.formatBigNumber(core.getStatus(item)); + }); + + // 进阶 + if (core.flags.enableLevelUp && core.status.hero.lv=core.bigmap.width || ny<0 || ny>=core.bigmap.height) continue; + if (!zoneSquare && Math.abs(dx)+Math.abs(dy)>range) continue; + core.status.checkBlock.damage[nx+ny*core.bigmap.width]+=enemy.value||0; + } + } + } + // 存在激光 + // 如果要防止激光伤害,可以直接简单的将 flag:no_laser 设为true + if (core.enemys.hasSpecial(enemy.special, 24) && !core.hasFlag("no_laser")) { + for (var nx=0;nx=core.bigmap.width || ny<0 || ny>=core.bigmap.height || Math.abs(dx)+Math.abs(dy)>1) continue; + core.status.checkBlock.damage[nx+ny*core.bigmap.width]+=enemy.value||0; + } + } + } + } + } + } + + // Step3: 更新夹击点坐标,并将夹击伤害加入到damage中 + core.status.checkBlock.betweenAttack = []; // 记录(x,y)点是否有夹击 + // 如果要防止夹击伤害,可以简单的将 flag:no_betweenAttack 设为true + if (!core.hasFlag('no_betweenAttack')) { + for (var x=0;x0 && x0 && y1) + core.status.checkBlock.damage[x+core.bigmap.width*y] += Math.floor((leftHp+(core.flags.betweenAttackCeil?0:1))/2); + } + } + } + } +} + }, + "ui": { + "drawAbout": function() { // 绘制“关于”界面 if (!core.isPlaying()) { core.status.event = {'id': null, 'data': null}; @@ -490,9 +664,9 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = core.fillText('ui', 'HTML5魔塔交流群:539113091', text_start, top+112+32); // TODO: 写自己的“关于”页面,每次增加32像素即可 } -}, -"plugins": { -"plugin": function () { + }, + "plugins": { + "plugin": function () { ////// 插件编写,可以在这里写自己额外需要执行的脚本 ////// // 在这里写的代码,在所有模块加载完毕后,游戏开始前会被执行 @@ -510,5 +684,5 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = // 可以在任何地方(如afterXXX或自定义脚本事件)调用函数,方法为 core.plugin.xxx(); } -} + } } \ No newline at end of file diff --git a/project/icons.js b/project/icons.js index 98e69bb6..314c671a 100644 --- a/project/icons.js +++ b/project/icons.js @@ -203,12 +203,13 @@ icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 = 'greenPotion': 22, 'yellowPotion': 23, 'lifeWand': 33, - 'blank': 60, + "sword0": 60, 'sword1': 50, 'sword2': 51, 'sword3': 52, 'sword4': 53, 'sword5': 54, + "shield0": 61, 'shield1': 55, 'shield2': 56, 'shield3': 57, diff --git a/project/images/items.png b/project/images/items.png index 4979dc24..cce829cc 100644 Binary files a/project/images/items.png and b/project/images/items.png differ diff --git a/project/items.js b/project/items.js index 08fa5407..a3ee85b7 100644 --- a/project/items.js +++ b/project/items.js @@ -45,8 +45,18 @@ items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "cls": "items", "name": "绿血瓶" }, + "sword0": { + "cls": "items", + "name": "破旧的剑", + "text": "一把已经生锈的剑", + "equip": { + "type": 0, + "atk": 0, + "animate": "sword" + } + }, "sword1": { - "cls": "item", + "cls": "items", "name": "铁剑", "text": "一把很普通的铁剑", "equip":{ @@ -95,6 +105,15 @@ items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "animate": "sword" } }, + "shield0": { + "cls": "items", + "name": "破旧的盾", + "text": "一个很破旧的铁盾", + "equip": { + "type": 1, + "def": 0 + } + }, "shield1": { "cls": "items", "name": "铁盾", @@ -279,11 +298,13 @@ items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "bluePotion": "core.status.hero.hp += core.values.bluePotion * ratio", "yellowPotion": "core.status.hero.hp += core.values.yellowPotion * ratio", "greenPotion": "core.status.hero.hp += core.values.greenPotion * ratio", + "sword0": "core.status.hero.atk += 0", "sword1": "core.status.hero.atk += 10", "sword2": "core.status.hero.atk += 20", "sword3": "core.status.hero.atk += 40", "sword4": "core.status.hero.atk += 80", "sword5": "core.status.hero.atk += 100", + "shield0": "core.status.hero.def += 0", "shield1": "core.status.hero.def += 10", "shield2": "core.status.hero.def += 20", "shield3": "core.status.hero.def += 40", @@ -302,16 +323,18 @@ items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "bluePotion": "',生命+'+core.values.bluePotion * ratio", "yellowPotion": "',生命+'+core.values.yellowPotion * ratio", "greenPotion": "',生命+'+core.values.greenPotion * ratio", - "sword1": ",攻击+10", - "sword2": ",攻击+20", - "sword3": ",攻击+40", - "sword4": ",攻击+80", - "sword5": ",攻击+100", - "shield1": ",防御+10", - "shield2": ",防御+20", - "shield3": ",防御+40", - "shield4": ",防御+80", - "shield5": ",防御+100,魔防+100", + "sword0": "',攻击+0'", + "sword1": "',攻击+10'", + "sword2": "',攻击+20'", + "sword3": "',攻击+40'", + "sword4": "',攻击+80'", + "sword5": "',攻击+100'", + "shield0": "',防御+0'", + "shield1": "',防御+10'", + "shield2": "',防御+20'", + "shield3": "',防御+40'", + "shield4": "',防御+80'", + "shield5": "',防御+100,魔防+100'", "bigKey": "',全钥匙+1'", "superPotion": "',生命值翻倍'", "moneyPocket": "',金币+'+core.values.moneyPocket"