From 4ecac00f6de52cc8306feb47b1e1abdc7b76cc52 Mon Sep 17 00:00:00 2001 From: oc Date: Sun, 6 May 2018 20:43:25 +0800 Subject: [PATCH] Remove isEquipment --- _server/comment.js | 6 ------ _server/data.comment.js | 6 +++--- libs/items.js | 8 +++++--- libs/ui.js | 2 +- project/items.js | 10 ---------- 更新说明.txt | 2 +- 6 files changed, 10 insertions(+), 24 deletions(-) diff --git a/_server/comment.js b/_server/comment.js index 0a138152..92db9457 100644 --- a/_server/comment.js +++ b/_server/comment.js @@ -33,12 +33,6 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc = "_leaf": true, "_type": "textarea", "_data": "道具在道具栏中显示的描述" - }, - "isEquipment": { - "_leaf": true, - "_type": "checkbox", - "_bool": "bool", - "_data": "物品是否属于装备(仅在全塔属性的equipment为true时有效)" } } }, diff --git a/_server/data.comment.js b/_server/data.comment.js index 169751c4..bc4b3876 100644 --- a/_server/data.comment.js +++ b/_server/data.comment.js @@ -50,17 +50,17 @@ data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = "statusLeftBackground": { "_leaf": true, "_type": "textarea", - "_data": "横屏时左侧状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"" + "_data": "横屏时左侧状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。" }, "statusTopBackground": { "_leaf": true, "_type": "textarea", - "_data": "竖屏时上方状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"" + "_data": "竖屏时上方状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。" }, "toolsBackground": { "_leaf": true, "_type": "textarea", - "_data": "竖屏时下方道具栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"" + "_data": "竖屏时下方道具栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图,推荐写法:\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。" }, } }, diff --git a/libs/items.js b/libs/items.js index 9f6d05b5..437c7ff4 100644 --- a/libs/items.js +++ b/libs/items.js @@ -32,9 +32,11 @@ items.prototype.getItemEffect = function(itemId, itemNum) { ////// “即捡即用类”道具的文字提示 ////// items.prototype.getItemEffectTip = function(itemId) { - var ratio = parseInt(core.floors[core.status.floorId].item_ratio) || 1; - if (itemId in this.itemEffectTip && (!this.items[itemId].isEquipment || !core.flags.equipment)) { - return eval(this.itemEffectTip[itemId]); + var itemCls = core.material.items[itemId].cls; + // 消耗品 + if (itemCls === 'items') { + var ratio = parseInt(core.floors[core.status.floorId].item_ratio) || 1; + if (itemId in this.itemEffectTip) return eval(this.itemEffectTip[itemId])||""; } return ""; } diff --git a/libs/ui.js b/libs/ui.js index 84ea2d28..f875e18b 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -1513,7 +1513,7 @@ ui.prototype.drawToolbox = function(index) { if (core.isset(selectId)) { var item=core.material.items[selectId]; core.fillText('ui', item.name, 10, 32, '#FFD700', "bold 20px Verdana") - core.fillText('ui', item.text, 10, 62, '#FFFFFF', '17px Verdana'); + core.fillText('ui', item.text||"该道具暂无描述。", 10, 62, '#FFFFFF', '17px Verdana'); core.fillText('ui', '<继续点击该道具即可进行使用>', 10, 89, '#CCCCCC', '14px Verdana'); } diff --git a/project/items.js b/project/items.js index f551ad2a..3c529527 100644 --- a/project/items.js +++ b/project/items.js @@ -48,61 +48,51 @@ items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "sword1": { "cls": "items", "name": "铁剑", - "isEquipment": true, "text": "一把很普通的铁剑" }, "sword2": { "cls": "items", "name": "银剑", - "isEquipment": true, "text": "一把很普通的银剑" }, "sword3": { "cls": "items", "name": "骑士剑", - "isEquipment": true, "text": "一把很普通的骑士剑" }, "sword4": { "cls": "items", "name": "圣剑", - "isEquipment": true, "text": "一把很普通的圣剑" }, "sword5": { "cls": "items", "name": "神圣剑", - "isEquipment": true, "text": "一把很普通的神圣剑" }, "shield1": { "cls": "items", "name": "铁盾", - "isEquipment": true, "text": "一个很普通的铁盾" }, "shield2": { "cls": "items", "name": "银盾", - "isEquipment": true, "text": "一个很普通的银盾" }, "shield3": { "cls": "items", "name": "骑士盾", - "isEquipment": true, "text": "一个很普通的骑士盾" }, "shield4": { "cls": "items", "name": "圣盾", - "isEquipment": true, "text": "一个很普通的圣盾" }, "shield5": { "cls": "items", "name": "神圣盾", - "isEquipment": true, "text": "一个很普通的神圣盾" }, "superPotion": { diff --git a/更新说明.txt b/更新说明.txt index bd3cdff6..999864fa 100644 --- a/更新说明.txt +++ b/更新说明.txt @@ -10,7 +10,7 @@ 事件:设置BGM音量 √ 提供core.rand()和core.rand2()两个随机数函数 √ 作弊处理 √ -状态栏绘制 +状态栏绘制 √ 六倍速播放 √ 播放视频时可以C键查看怪物手册 √ 修复标题文字太长导致无法开始游戏的问题 √