勇士帧动画;ratio;优化注释

This commit is contained in:
ckcz123 2020-05-22 10:43:03 +08:00
parent 012c8d7d80
commit 6ab04d71c8
23 changed files with 178 additions and 164 deletions

View File

@ -383,7 +383,7 @@ value为必填项代表要修改到的内容。对于修改名称的必须
{"type": "setFloor", "name": "title", "value": "'主塔 0 层'" } // 设置当前楼层的中文名为主塔0层
{"type": "setFloor", "name": "canFlyTo", "floorId": "MT2", "value": "false" } // 设置MT2层不可飞行
{"type": "setFloor", "name": "cannotViewMap", "floorId": "MT0", "value": "true" } // 设置MT0层不可被浏览地图
{"type": "setFloor", "name": "item_ratio", "value": "5" } // 设置当前楼层的宝石血瓶属性加成为5
{"type": "setFloor", "name": "ratio", "value": "5" } // 设置当前楼层的宝石血瓶属性加成为5
{"type": "setFloor", "name": "images", "value": "[[0,0,'tree.png',2]]" } // 设置当前楼层的楼层贴图
{"type": "setFloor", "name": "upFloor", "value": "[2,3]" } // 设置当前楼层的上楼梯
{"type": "setFloor", "name": "bgm", "floorId": "MT10", "value": "'233.mp3'" } // 设置当前楼层的背景音乐

View File

@ -249,21 +249,18 @@ ID必须由数字字母下划线组成数字在1000以内且均不能和
如果你想要同种宝石在不同层效果不同的话,可以进行如下操作:
1. 在楼层的item_ratio中定义宝石的比率比如1-10的写111-20层写2等
1. 在楼层的ratio中定义宝石的比率比如1-10的写111-20层写2等
2. 修改获得道具的itemEffect函数编辑器中双击进行编辑
``` js
// ratio为楼层的item_ratio值可以进行翻倍宝石属性
core.status.hero.atk += core.values.redGem * ratio
core.status.hero.atk += core.values.redGem * core.status.thisMap.ratio
```
这里我们可以直接写ratio来取用该楼层中定义的`item_ratio`的值。
如果不是倍数增加(比如线性增加)也可以类似来写
``` js
// 一个二倍线性增加的例子
core.status.hero.atk += core.values.redGem + 2*ratio
core.status.hero.atk += core.values.redGem + 2*core.status.thisMap.ratio
```
### 消耗类道具cls: tools永久类道具cls: constants

View File

@ -3038,7 +3038,7 @@ Event_List
Floor_Meta_List
: '楼层中文名'|'状态栏名称'|'能否使用楼传'|'能否打开快捷商店'|'是否不可浏览地图'|'是否不可瞬间移动'|'默认地面ID'|'楼层贴图'|'宝石血瓶效果'|'上楼点坐标'|'下楼点坐标'|'背景音乐'|'画面色调'|'天气和强度'|'是否地下层'
/*Floor_Meta_List ['title','name','canFlyTo', 'canUseQuickShop', 'cannotViewMap', 'cannotMoveDirectly', 'defaultGround', 'images', 'item_ratio', 'upFloor', 'downFloor', 'bgm', 'color', 'weather', 'underGround']*/;
/*Floor_Meta_List ['title','name','canFlyTo', 'canUseQuickShop', 'cannotViewMap', 'cannotMoveDirectly', 'defaultGround', 'images', 'ratio', 'upFloor', 'downFloor', 'bgm', 'color', 'weather', 'underGround']*/;
Global_Attribute_List
: '全局字体'|'横屏左侧状态栏背景'|'竖屏上方状态栏背景'|'竖屏下方道具栏背景'|'边框颜色'|'状态栏文字色'|'楼层转换背景'|'楼层转换文字色'|'装备列表'

View File

@ -212,7 +212,7 @@ editor_file = function (editor, callback) {
canUseQuickShop: currData.canUseQuickShop,
cannotViewMap: currData.cannotViewMap,
cannotMoveDirectly: currData.cannotMoveDirectly,
item_ratio: currData.item_ratio,
ratio: currData.ratio,
defaultGround: currData.defaultGround,
bgm: currData.bgm,
color: currData.color,
@ -260,7 +260,7 @@ editor_file = function (editor, callback) {
canUseQuickShop: currData.canUseQuickShop,
cannotViewMap: currData.cannotViewMap,
cannotMoveDirectly: currData.cannotMoveDirectly,
item_ratio: currData.item_ratio,
ratio: currData.ratio,
defaultGround: currData.defaultGround,
bgm: currData.bgm,
color: currData.color,

View File

@ -99,7 +99,6 @@ editor_multi = function () {
editor_multi.isString = false;
editor_multi.lintAutocomplete = false;
if (args.lint === true) editor_multi.lintAutocomplete = true;
if (field.indexOf('Effect') !== -1) editor_multi.lintAutocomplete = true;
if ((!input.value || input.value == 'null') && editor_mode.mode == 'plugins')
input.value = '"function () {\\n\\t// 在此增加新插件\\n\\t\\n}"';
if (input.value.slice(0, 1) === '"' || args.string) {

View File

@ -23,8 +23,8 @@ editor_table_wrapper = function (editor) {
editor_table.prototype.checkbox = function (value) {
return /* html */`<input type='checkbox' class='checkbox' ${(value ? 'checked ' : '')}/>\n`
}
editor_table.prototype.textarea = function (value, indent) {
return /* html */`<textarea spellcheck='false'>${JSON.stringify(value, null, indent || 0)}</textarea>\n`
editor_table.prototype.textarea = function (value, indent, disable) {
return /* html */`<textarea spellcheck='false' ${disable ? 'disabled readonly' : ''}>${JSON.stringify(value, null, indent || 0)}</textarea>\n`
}
editor_table.prototype.checkboxSet = function (value, keys, prefixStrings) {
if (value == null) value = [];
@ -76,7 +76,7 @@ editor_table_wrapper = function (editor) {
<td title="${field}">${shortField}</td>
<td title="${commentHTMLescape}" cobj="${cobjstr}">${shortComment || commentHTMLescape}</td>
<td><div class="etableInputDiv ${type}">${tdstr}</div></td>
<td>${editor.table.editGrid(shortComment, type != 'select' && type != 'checkbox' && type != 'checkboxSet')}</td>
<td>${editor.table.editGrid(shortComment, type != 'select' && type != 'checkbox' && type != 'checkboxSet' && type != 'disable')}</td>
</tr>\n`
}
@ -283,7 +283,7 @@ editor_table_wrapper = function (editor) {
case 'checkboxSet':
return editor.table.checkboxSet(thiseval, cobj._checkboxSet.key, cobj._checkboxSet.prefix);
default:
return editor.table.textarea(thiseval, cobj.indent || 0);
return editor.table.textarea(thiseval, cobj.indent || 0, cobj._type == 'disable');
}
}

View File

@ -26,7 +26,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
]
},
"_docs": "道具类别",
"_data": "只能取items(宝石、血瓶) constants(永久物品) tools(消耗道具) equips(装备)"
"_data": "items(宝石、血瓶) constants(永久物品) tools(消耗道具) equips(装备)"
},
"name": {
"_leaf": true,
@ -44,8 +44,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"hideInToolbox": {
"_leaf": true,
"_type": "checkbox",
"_docs": "道具栏中隐藏",
"_data": "是否不显示在道具栏中"
"_docs": "不显示在道具栏",
},
"equip": {
"_leaf": true,
@ -57,7 +56,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_leaf": true,
"_type": "checkbox",
"_docs": "回放不绘制道具栏",
"_data": "是否回放时不绘制道具栏。\n如果此项为true则在回放录像时使用本道具将不会绘制道具栏页面而是直接使用。\n此项建议在会频繁连续多次使用的道具开启(如开启技能,或者《镜子》那样的镜像切换等等)"
"_data": "此项建议在会频繁连续多次使用的道具开启(如开启技能,或者《镜子》那样的镜像切换等等)"
}
}
},
@ -73,7 +72,6 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_docs": "即捡即用提示",
"_data": "即捡即用类物品在获得时提示的文字仅对cls为items有效。"
},
@ -82,7 +80,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "event",
"_event": "item",
"_docs": "碰触或使用事件",
"_data": "碰触或使用本道具所执行的事件"
"_data": "碰触或使用本道具所执行的事件对所有cls有效"
},
"useItemEffect": {
"_leaf": true,
@ -97,7 +95,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "textarea",
"_string": true,
"_lint": true,
"_docs": "能否使用条件",
"_docs": "能否使用",
"_data": "当前能否使用该道具仅对cls为tools或constants有效。"
},
"equipCondition": {
@ -105,7 +103,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "textarea",
"_string": true,
"_lint": true,
"_docs": "能否装备条件",
"_docs": "能否装备",
"_data": "能装备某个装备的条件仅对cls为equips有效。\n与canUseItemEffect不同这里null代表可以装备。"
}
}
@ -128,7 +126,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "textarea",
"_string": true,
"_docs": "手册映射ID",
"_data": "在怪物手册中映射到的怪物ID。如果此项不为null则在怪物手册中将用目标ID来替换该怪物原本的ID。\n此项应被运用在同一个怪物的多朝向上。\n例如如果想定义同一个怪物的向下和向左的行走图则需要建立两个属性完全相同的怪物。\n但是这样会导致在怪物手册中同时存在向下和向左的两种怪物的显示。\n可以将朝向左的怪物的displayIdInBook项指定为朝向下的怪物ID这样在怪物手册中则会归一化只显示一个。"
"_data": "在怪物手册中映射到的怪物ID。如果此项不为null则在怪物手册中将用目标ID来替换该怪物原本的ID。常被运用在同一个怪物的多朝向上。"
},
"hp": {
"_leaf": true,
@ -182,7 +180,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"value": {
"_leaf": true,
"_type": "textarea",
"_docs": "特殊属性值",
"_docs": "特殊属性值",
"_data": "特殊属性的数值\n如领域/阻激/激光怪的伤害值;吸血怪的吸血比例;光环怪增加生命的比例"
},
"zoneSquare": {
@ -201,7 +199,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"notBomb": {
"_leaf": true,
"_type": "checkbox",
"_docs": "是否不可炸",
"_docs": "不可炸",
"_data": "该怪物不可被炸"
},
"n": {
@ -214,21 +212,21 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"add": {
"_leaf": true,
"_type": "checkbox",
"_docs": "吸血加自身",
"_docs": "吸血加自身",
"_data": "吸血后是否加到自身;光环是否叠加"
},
"atkValue": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_docs": "退化扣攻击",
"_docs": "退化扣攻击",
"_data": "退化时勇士下降的攻击力点数;光环怪增加攻击的比例"
},
"defValue": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_docs": "退化扣防御",
"_docs": "退化扣防御",
"_data": "退化时勇士下降的防御力点数;光环怪增加防御的比例"
},
"damage": {
@ -249,20 +247,20 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_data": {
"id": {
"_leaf": true,
"_type": "textarea",
"_type": "disable",
"_range": "false",
"_docs": "图块ID",
"_data": "图块唯一ID可在页面底部修改"
},
"idnum": {
"_leaf": true,
"_type": "textarea",
"_type": "disable",
"_range": "false",
"_data": "图块数字"
},
"cls": {
"_leaf": true,
"_type": "textarea",
"_type": "disable",
"_range": "false",
"_data": "图块类别"
},
@ -291,7 +289,6 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_leaf": true,
"_type": "checkbox",
"_docs": "可通行性",
"_data": "该图块是否可以通行true代表可以通行false代表不可通行"
},
"script": {
"_leaf": true,
@ -309,7 +306,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"key":["up","down","left","right"]
},
"_docs": "不可出方向",
"_data": "该图块的不可出方向\n可以在这里定义在该图块时不能前往哪个方向,可以达到悬崖之类的效果\n例如 [\"up\", \"left\"] 代表在该图块时不能往上和左走\n此值对背景层、事件层、前景层上的图块均有效"
"_data": "该图块的不可出方向\n对背景层、事件层、前景层上的图块均有效"
},
"cannotIn": {
"_leaf": true,
@ -319,7 +316,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"key":["up","down","left","right"]
},
"_docs": "不可入方向",
"_data": "该图块的不可入方向\n可以在这里定义不能朝哪个方向进入该图块,可以达到悬崖之类的效果\n例如 [\"down\"] 代表不能从该图块的上方点朝向下进入此图块\n此值对背景层、事件层、前景层上的图块均有效"
"_data": "该图块的不可入方向\n对背景层、事件层、前景层上的图块均有效"
},
"canBreak": {
"_leaf": true,
@ -329,24 +326,26 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
},
"animate": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_type": "select",
"_select": {
"values": [1,2,3,4],
},
"_docs": "动画帧数",
"_data": "该图块的全局动画帧数。\n如果此项为null则对于除了npc48外使用素材默认帧数npc48默认是1帧即静止。"
"_data": "null代表素材默认帧数"
},
"doorInfo": {
"_leaf": true,
"_type": "event",
"_event": "doorInfo",
"_docs": "门信息",
"_data": "该图块的门信息,是一个四元数组。\n第一项为所需要的钥匙信息第二项为开关门的毫秒数第三项为开此门时的音效第四项为关此门时的音效。仅对animates生效。"
"_data": "该图块的门信息,仅对animates和npc48生效。"
},
"faceIds": {
"_leaf": true,
"_type": "event",
"_event": "faceIds",
"_docs": "行走图朝向",
"_data": "行走图朝向,仅对NPC有效。可以在这里定义同一个NPC的多个朝向行走图。\n比如 {\"up\":\"N333\",\"down\":\"N334\",\"left\":\"N335\",\"right\":\"N336\"} 就将该素材的上下左右朝向分别绑定到N333,N334,N335和N336四个图块。\n在勇士撞上NPC时或NPC在移动时会自动选择最合适的朝向图块如果存在定义来进行绘制。"
"_data": "行走图朝向,仅对npc48有效。在勇士撞上NPC时或NPC在移动时会自动选择最合适的朝向图块如果存在定义来进行绘制。"
}
}
},
@ -361,15 +360,15 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_data": {
"floorId": {
"_leaf": true,
"_type": "textarea",
"_type": "disable",
"_range": "false",
"_docs": "楼层ID",
"_data": "文件名和floorId需要保持完全一致可在页面底部修改 \n楼层唯一标识符仅能由字母、数字、下划线组成且不能由数字开头 \n推荐用法第20层就用MT20第38层就用MT38地下6层就用MT_6用下划线代替负号隐藏3层用MT3hh表示隐藏等等"
"_data": "文件名和floorId需要保持完全一致可在页面底部修改"
},
"title": {
"_leaf": true,
"_type": "textarea",
"_docs": "楼层中文名",
"_docs": "楼层名",
"_data": "楼层中文名,将在切换楼层和浏览地图时显示"
},
"name": {
@ -380,17 +379,17 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
},
"width": {
"_leaf": true,
"_type": "textarea",
"_type": "disable",
"_range": "false",
"_docs": "宽度",
"_data": "地图x方向大小,请在表格最下方修改,null视为13"
"_data": "地图x方向大小,请在表格最下方修改"
},
"height": {
"_leaf": true,
"_type": "textarea",
"_type": "disable",
"_range": "false",
"_docs": "高度",
"_data": "地图y方向大小,请在表格最下方修改,null视为13"
"_data": "地图y方向大小,请在表格最下方修改"
},
"canFlyTo": {
"_leaf": true,
@ -462,8 +461,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_leaf": true,
"_type": "event",
"_event": "floorImage",
"_docs": "楼层贴图",
"_data": "背景/前景图;你可以选择若干张图片来作为背景/前景素材。详细用法请参见文档“自定义素材”中的说明。"
"_docs": "楼层贴图"
},
"color": {
"_leaf": true,
@ -484,9 +482,9 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"values": [null].concat(Object.keys(editor.core.material.bgms))
},
"_docs": "背景音乐",
"_data": "到达该层后默认播放的BGM。本项可忽略,或者为一个定义过的背景音乐如\"bgm.mp3\"。"
"_data": "到达该层后默认播放的BGM"
},
"item_ratio": {
"ratio": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval==~~thiseval && thiseval>=0)||thiseval==null",
@ -583,7 +581,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"cannotViewMap": false,
"cannotMoveDirectly": false,
"images": [],
"item_ratio": 1,
"ratio": 1,
"defaultGround": "ground",
"bgm": null,
"upFloor": null,

View File

@ -27,7 +27,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
return one;
return null;
}).toString(),
"_docs": "本塔使用图片",
"_docs": "使用图片",
"_data": "在此存放所有可能使用的图片tilesets除外 \n图片可以被作为背景图的一部分也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加",
},
"tilesets": {
@ -50,7 +50,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
return j >= 0 ? 1 : -1;
});
}).toString(),
"_docs": "本塔额外素材",
"_docs": "额外素材",
"_data": "在此存放额外素材的图片名, \n可以自定导入任意张素材图片无需PS无需注册即可直接在游戏中使用 \n 形式如[\"1.png\", \"2.png\"] ,将需要的素材图片放在images目录下 \n 素材的宽高必须都是32的倍数且图片上的总图块数不超过1000即最多有1000个32*32的图块在该图片上"
},
"animates": {
@ -62,7 +62,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
if (one.endsWith(".animate")) return one.substring(0, one.lastIndexOf('.'));
return null;
}).toString(),
"_docs": "本塔使用动画",
"_docs": "使用动画",
"_data": "在此存放所有可能使用的动画必须是animate格式在这里不写后缀名 \n动画必须放在animates目录下文件名不能使用中文不能带空格或特殊字符 \n \"jianji\", \"thunder\" 根据需求自行添加"
},
"bgms": {
@ -75,7 +75,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
return one;
return null;
}).toString(),
"_docs": "本塔使用音乐",
"_docs": "使用音乐",
"_data": "在此存放所有的bgm和文件名一致。 \n音频名不能使用中文不能带空格或特殊字符可以直接改名拼音就好"
},
"sounds": {
@ -88,7 +88,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
return one;
return null;
}).toString(),
"_docs": "本塔使用音效",
"_docs": "使用音效",
"_data": "在此存放所有的SE和文件名一致 \n音频名不能使用中文不能带空格或特殊字符可以直接改名拼音就好"
},
"fonts": {
@ -100,13 +100,13 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
if (one.endsWith(".ttf")) return one.substring(0, one.lastIndexOf('.'));
return null;
}).toString(),
"_docs": "本塔使用字体",
"_docs": "使用字体",
"_data": "在此存放所有可能使用的字体 \n 字体名不能使用中文,不能带空格或特殊字符"
},
"nameMap": {
"_leaf": true,
"_type": "textarea",
"_docs": "文件映射",
"_docs": "文件映射",
"_data": "文件名映射目前仅对images, animates, bgms, sounds有效。\n例如定义 {\"精灵石.mp3\":\"jinglingshi.mp3\"} 就可以使用\ncore.playBgm(\"精灵石.mp3\") 或对应的事件来播放该bgm。"
},
"startBackground": {
@ -157,21 +157,21 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_docs": "横状态栏",
"_docs": "横状态栏",
"_data": "横屏时左侧状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图推荐写法\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。"
},
"statusTopBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_docs": "竖状态栏",
"_docs": "竖状态栏",
"_data": "竖屏时上方状态栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图推荐写法\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。"
},
"toolsBackground": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_docs": "竖工具栏",
"_docs": "竖工具栏",
"_data": "竖屏时下方工具栏的背景样式,可以定义背景图、平铺方式等。\n具体请网上搜索\"css background\"了解写法。\n如果弄一张图片作为背景图推荐写法\n\"url(project/images/XXX.png) 0 0/100% 100% no-repeat\"\n图片最好进行一些压缩等操作节省流量。"
},
"borderColor": {
@ -192,14 +192,14 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_docs": "转场背景",
"_docs": "转场背景",
"_data": "楼层转换界面的背景样式可以使用纯色默认值black也可以使用图片参见状态栏的图片写法"
},
"floorChangingTextColor": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_docs": "转场文字",
"_docs": "转场文字",
"_data": "楼层转换界面的文字颜色,默认是白色"
},
"font": {
@ -257,7 +257,13 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
return name.endsWith('.png');
}))
},
"_data": "勇士行走图"
"_data": "行走图"
},
"animate": {
"_leaf": true,
"_type": "checkbox",
"_docs": "帧动画",
"_data": "是否开启停止状态和对话框的帧动画"
},
"name": {
"_leaf": true,
@ -344,7 +350,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_docs": "初始装备个数",
"_docs": "初始拥有装备个数",
"_data": "初始装备个数,例如初始送铁剑可以写 {\"sword1\": 1}"
}
}
@ -385,13 +391,12 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
},
"followers": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Array",
"_data": "跟随者列表"
"_type": "disable",
"_data": "跟随者"
},
"steps": {
"_leaf": true,
"_type": "textarea",
"_type": "disable",
"_data": "行走步数"
}
}
@ -401,7 +406,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "event",
"_event": "firstArrive",
"_range": "thiseval==null || thiseval instanceof Array",
"_docs": "标题事件",
"_docs": "标题事件",
"_data": "标题界面事件化,可以使用事件流的形式来绘制开始界面等。\n需要开启startUsingCanvas这个开关。\n详见文档-个性化-标题界面事件化。"
},
"startText": {
@ -452,43 +457,43 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"redGem": {
"_leaf": true,
"_type": "textarea",
"_docs": "红宝石效果",
"_docs": "红宝石",
"_data": "红宝石加攻击的数值"
},
"blueGem": {
"_leaf": true,
"_type": "textarea",
"_docs": "蓝宝石效果",
"_docs": "蓝宝石",
"_data": "蓝宝石加防御的数值"
},
"greenGem": {
"_leaf": true,
"_type": "textarea",
"_docs": "绿宝石效果",
"_docs": "绿宝石",
"_data": "绿宝石加护盾的数值"
},
"redPotion": {
"_leaf": true,
"_type": "textarea",
"_docs": "红血瓶效果",
"_docs": "红血瓶",
"_data": "红血瓶加血数值"
},
"bluePotion": {
"_leaf": true,
"_type": "textarea",
"_docs": "蓝血瓶效果",
"_docs": "蓝血瓶",
"_data": "蓝血瓶加血数值"
},
"yellowPotion": {
"_leaf": true,
"_type": "textarea",
"_docs": "黄血瓶效果",
"_docs": "黄血瓶",
"_data": "黄血瓶加血数值"
},
"greenPotion": {
"_leaf": true,
"_type": "textarea",
"_docs": "绿血瓶效果",
"_docs": "绿血瓶",
"_data": "绿血瓶加血数值"
},
"breakArmor": {
@ -518,14 +523,16 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"animateSpeed": {
"_leaf": true,
"_type": "textarea",
"_docs": "全局动画时间",
"_data": "全局动画时间即怪物振动频率一般300比较合适"
"_docs": "全局动画时间",
"_data": "全局动画时间即怪物振动频率一般300比较合适"
},
"statusCanvasRowsOnMobile": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==null || (thiseval>0 && thiseval<=4)",
"_docs": "竖屏自绘行数",
"_type": "select",
"_select": {
"values": [1,2,3,4]
},
"_docs": "竖状态栏自绘行数",
"_data": "竖屏模式下顶端状态栏canvas化后的行数。\n此项将决定竖屏的状态栏高度如果设置则不小于1且不大于4。\n仅在statusCanvas开启时才有效"
},
}
@ -578,36 +585,36 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"enableSkill"
]
},
"_data": "状态栏显示"
"_data": "状态栏显示"
},
"flyNearStair": {
"_leaf": true,
"_type": "checkbox",
"_docs": "楼传楼梯边",
"_docs": "楼传需在楼梯边",
"_data": "传送器是否需要在楼梯边使用如果flyRecordPosition开启则此项对箭头也有效。"
},
"flyRecordPosition": {
"_leaf": true,
"_type": "checkbox",
"_docs": "楼传平面模式",
"_docs": "楼传平面模式",
"_data": "传送器平面塔模式;此模式下楼层传送器将飞到上次离开该楼层的位置。"
},
"steelDoorWithoutKey": {
"_leaf": true,
"_type": "checkbox",
"_docs": "铁门不消耗",
"_docs": "铁门不消耗钥匙",
"_data": "铁门是否不需要钥匙开启。如果此项为true则无需钥匙也可以开铁门。"
},
"itemFirstText": {
"_leaf": true,
"_type": "checkbox",
"_docs": "首次道具提示",
"_docs": "首次道具进行提示",
"_data": "首次获得道具是否提示"
},
"equipboxButton": {
"_leaf": true,
"_type": "checkbox",
"_docs": "状态栏装备",
"_docs": "状态栏装备按钮",
"_data": "状态栏的装备按钮。若此项为true则将状态栏中的楼层转换器按钮换为装备栏按钮"
},
"enableAddPoint": {
@ -625,7 +632,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"betweenAttackMax": {
"_leaf": true,
"_type": "checkbox",
"_docs": "夹击不超伤害",
"_docs": "夹击不超伤害",
"_data": "夹击伤害是否不超过怪物伤害值。"
},
"useLoop": {
@ -637,13 +644,13 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"startUsingCanvas": {
"_leaf": true,
"_type": "checkbox",
"_docs": "标题事件化",
"_docs": "标题开启事件化",
"_data": "是否开始菜单canvas化如果此项为true则将使用canvas来绘制开始菜单"
},
"statusCanvas": {
"_leaf": true,
"_type": "checkbox",
"_docs": "自绘状态栏",
"_docs": "开启自绘状态栏",
"_data": "是否状态栏canvas化即手动自定义绘制状态栏。\n如果此项开启则可在脚本编辑的drawStatusBar中自定义绘制菜单栏。"
},
"displayEnemyDamage": {

View File

@ -2068,15 +2068,17 @@ actions.prototype._keyUpSwitchs = function (keycode) {
}
if (keycode == 37) {
switch (core.status.event.selection) {
case 2: return this._clickSwitchs_userVolume(-1);
case 3: return this._clickSwitchs_moveSpeed(-10);
case 4: this._clickSwitchs_floorChangeTime(-100);
case 1: return this._clickSwitchs_userVolume(-1);
case 2: return this._clickSwitchs_moveSpeed(-10);
case 3: return this._clickSwitchs_floorChangeTime(-100);
case 4: return this._clickSwitchs_setSize(-1);
}
} else if (keycode == 39) {
switch (core.status.event.selection) {
case 2: return this._clickSwitchs_userVolume(1);
case 3: return this._clickSwitchs_moveSpeed(10);
case 4: this._clickSwitchs_floorChangeTime(100);
case 1: return this._clickSwitchs_userVolume(1);
case 2: return this._clickSwitchs_moveSpeed(10);
case 3: return this._clickSwitchs_floorChangeTime(100);
case 4: return this._clickSwitchs_setSize(1);
}
}
this._selectChoices(core.status.event.ui.choices.length, keycode, this._clickSwitchs);

View File

@ -146,6 +146,11 @@ control.prototype._animationFrame_globalAnimate = function (timestamp) {
core.status.autotileAnimateObjs.blocks.forEach(function (block) {
core.maps._drawAutotileAnimate(block, core.status.globalAnimateStatus);
});
// Global hero animate
if ((core.status.hero || {}).animate && core.status.heroMoving == 0) {
core.drawHero('stop', null, core.status.globalAnimateStatus);
}
}
// Box animate
core.drawBoxAnimate();
@ -768,7 +773,7 @@ control.prototype.tryMoveDirectly = function (destX, destY) {
}
////// 绘制勇士 //////
control.prototype.drawHero = function (status, offset) {
control.prototype.drawHero = function (status, offset, frame) {
if (!core.isPlaying() || !core.status.floorId || core.status.gameOver) return;
var x = core.getHeroLoc('x'), y = core.getHeroLoc('y'), direction = core.getHeroLoc('direction');
status = status || 'stop';
@ -783,7 +788,7 @@ control.prototype.drawHero = function (status, offset) {
core.status.heroCenter.py = 32 * y + offsetY + 32 - core.material.icons.hero.height / 2;
if (!core.hasFlag('hideHero')) {
this._drawHero_draw(direction, x, y, status, offset);
this._drawHero_draw(direction, x, y, status, offset, frame);
}
this._drawHero_updateViewport();
@ -794,9 +799,9 @@ control.prototype._drawHero_updateViewport = function () {
core.setGameCanvasTranslate('hero', 0, 0);
}
control.prototype._drawHero_draw = function (direction, x, y, status, offset) {
control.prototype._drawHero_draw = function (direction, x, y, status, offset, frame) {
this._drawHero_getDrawObjs(direction, x, y, status, offset).forEach(function (block) {
core.drawImage('hero', block.img, block.heroIcon[block.status]*block.width,
core.drawImage('hero', block.img, (block.heroIcon[block.status] + (frame || 0))%4*block.width,
block.heroIcon.loc * block.height, block.width, block.height,
block.posx+(32-block.width)/2, block.posy+32-block.height, block.width, block.height);
});
@ -2691,7 +2696,7 @@ control.prototype.resize = function() {
core.domStyle.isVertical = false;
core.domStyle.availableScale = [];
[1, 1.25, 1.5, 2].forEach(function (v) {
[1, 1.25, 1.5, 1.75, 2].forEach(function (v) {
if (clientWidth - 3 * BORDER >= v*(CANVAS_WIDTH + BAR_WIDTH) && clientHeight - 2 * BORDER >= v * CANVAS_WIDTH) {
core.domStyle.availableScale.push(v); // 64x64
}

View File

@ -31,7 +31,6 @@ items.prototype.getItemEffect = function (itemId, itemNum) {
var itemCls = core.material.items[itemId].cls;
// 消耗品
if (itemCls === 'items') {
var ratio = parseInt(core.status.thisMap.item_ratio) || 1;
var curr_hp = core.status.hero.hp;
if (itemId in this.itemEffect) {
try {
@ -64,10 +63,9 @@ items.prototype.getItemEffectTip = function (itemId) {
var itemCls = core.material.items[itemId].cls;
// 消耗品
if (itemCls === 'items') {
var ratio = parseInt(core.status.thisMap.item_ratio) || 1;
if (itemId in this.itemEffectTip) {
try {
return eval(this.itemEffectTip[itemId]) || "";
return core.replaceText(this.itemEffectTip[itemId]) || "";
} catch (e) {
main.log(e);
return "";
@ -95,7 +93,6 @@ items.prototype.useItem = function (itemId, noRoute, callback) {
items.prototype._useItemEffect = function (itemId) {
if (itemId in this.useItemEffect) {
try {
var ratio = parseInt(core.status.thisMap.item_ratio) || 1;
eval(this.useItemEffect[itemId]);
}
catch (e) {

View File

@ -1400,11 +1400,19 @@ ui.prototype._drawTextBox_drawTitleAndIcon = function (titleInfo, hPos, vPos, al
core.status.boxAnimateObjs = [];
// --- 勇士
if (titleInfo.image == core.material.images.hero) {
if (core.status.hero.animate) {
core.status.boxAnimateObjs.push({
'bgx': hPos.left + 15, 'bgy': image_top, 'bgWidth': 32, 'bgHeight': titleInfo.height,
'x': hPos.left + 15, 'y': image_top, 'height': titleInfo.height, 'animate': 4,
'image': titleInfo.image, 'pos': core.material.icons.hero[core.getHeroLoc('direction')].loc * titleInfo.height
})
} else {
core.clearMap('ui', hPos.left + 15, image_top, 32, titleInfo.height);
core.fillRect('ui', hPos.left + 15, image_top, 32, titleInfo.height, core.material.groundPattern);
core.drawImage('ui', titleInfo.image, 0, 0, core.material.icons.hero.width || 32, core.material.icons.hero.height,
hPos.left + 15, image_top, 32, titleInfo.height);
}
}
else {
core.status.boxAnimateObjs.push({
'bgx': hPos.left + 15, 'bgy': image_top, 'bgWidth': 32, 'bgHeight': titleInfo.height,
@ -2836,7 +2844,6 @@ ui.prototype._drawStatistics_items = function (floorId, floor, id, obj) {
if (obj.cls[id]=='items' && id!='superPotion') {
var temp = core.clone(core.status.hero);
core.setFlag("__statistics__", true);
var ratio = floor.item_ratio||1;
try { eval(core.items.itemEffect[id]); }
catch (e) {}
hp = core.status.hero.hp - temp.hp;

View File

@ -90,6 +90,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"floorId": "sample0",
"hero": {
"image": "hero.png",
"animate": false,
"name": "阳光",
"lv": 1,
"hpmax": 9999,

View File

@ -8,7 +8,7 @@ main.floors.MT0=
"cannotViewMap": false,
"defaultGround": "ground",
"images": [],
"item_ratio": 1,
"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],

View File

@ -8,7 +8,7 @@ main.floors.sample0=
"defaultGround": "ground",
"images": [],
"bgm": "bgm.mp3",
"item_ratio": 1,
"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],

View File

@ -20,7 +20,7 @@ main.floors.sample1=
"snow",
6
],
"item_ratio": 1,
"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],

View File

@ -8,7 +8,7 @@ main.floors.sample2=
"cannotViewMap": false,
"defaultGround": "ground",
"images": [],
"item_ratio": 1,
"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],

View File

@ -18,7 +18,7 @@ main.floors.sample3=
10
],
"bgm": "bgm.mp3",
"item_ratio": 1,
"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],

View File

@ -22,17 +22,17 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"redGem": {
"cls": "items",
"name": "红宝石",
"text": "'攻击+${core.values.redGem}'"
"text": "攻击+${core.values.redGem}"
},
"blueGem": {
"cls": "items",
"name": "蓝宝石",
"text": "',防御+${core.values.blueGem}'"
"text": ",防御+${core.values.blueGem}"
},
"greenGem": {
"cls": "items",
"name": "绿宝石",
"text": "',护盾+${core.values.greenGem}'"
"text": ",护盾+${core.values.greenGem}"
},
"yellowGem": {
"cls": "items",
@ -42,22 +42,22 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"redPotion": {
"cls": "items",
"name": "红血瓶",
"text": "',生命+${core.values.redPotion}'"
"text": ",生命+${core.values.redPotion}"
},
"bluePotion": {
"cls": "items",
"name": "蓝血瓶",
"text": "',生命+${core.values.bluePotion}'"
"text": ",生命+${core.values.bluePotion}"
},
"yellowPotion": {
"cls": "items",
"name": "黄血瓶",
"text": "',生命+${core.values.yellowPotion'}"
"text": ",生命+${core.values.yellowPotion}"
},
"greenPotion": {
"cls": "items",
"name": "绿血瓶",
"text": "',生命+${core.values.greenPotion}'"
"text": ",生命+${core.values.greenPotion}"
},
"sword0": {
"cls": "items",
@ -341,14 +341,14 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
}
},
"itemEffect": {
"redGem": "core.status.hero.atk += core.values.redGem * ratio",
"blueGem": "core.status.hero.def += core.values.blueGem * ratio",
"greenGem": "core.status.hero.mdef += core.values.greenGem * ratio",
"redGem": "core.status.hero.atk += core.values.redGem * core.status.thisMap.ratio",
"blueGem": "core.status.hero.def += core.values.blueGem * core.status.thisMap.ratio",
"greenGem": "core.status.hero.mdef += core.values.greenGem * core.status.thisMap.ratio",
"yellowGem": "core.status.hero.hp+=1000;core.status.hero.atk+=6;core.status.hero.def+=6;core.status.hero.mdef+=10;",
"redPotion": "core.status.hero.hp += core.values.redPotion * ratio",
"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",
"redPotion": "core.status.hero.hp += core.values.redPotion * core.status.thisMap.ratio",
"bluePotion": "core.status.hero.hp += core.values.bluePotion * core.status.thisMap.ratio",
"yellowPotion": "core.status.hero.hp += core.values.yellowPotion * core.status.thisMap.ratio",
"greenPotion": "core.status.hero.hp += core.values.greenPotion * core.status.thisMap.ratio",
"sword0": "core.status.hero.atk += 0",
"sword1": "core.status.hero.atk += 10",
"sword2": "core.status.hero.atk += 20",
@ -366,29 +366,29 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"silverCoin": "core.status.hero.money += 500"
},
"itemEffectTip": {
"redGem": "',攻击+'+core.values.redGem * ratio",
"blueGem": "',防御+'+core.values.blueGem * ratio",
"greenGem": "',护盾+'+core.values.greenGem * ratio",
"yellowGem": "',全属性提升'",
"redPotion": "',生命+'+core.values.redPotion * ratio",
"bluePotion": "',生命+'+core.values.bluePotion * ratio",
"yellowPotion": "',生命+'+core.values.yellowPotion * ratio",
"greenPotion": "',生命+'+core.values.greenPotion * ratio",
"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": "',生命值翻倍'",
"silverCoin": "',金币+500'"
"redGem": ",攻击+${core.values.redGem * core.status.thisMap.ratio}",
"blueGem": ",防御+${core.values.blueGem * core.status.thisMap.ratio}",
"greenGem": ",护盾+${core.values.greenGem * core.status.thisMap.ratio}",
"yellowGem": ",全属性提升",
"redPotion": ",生命+${core.values.redPotion * core.status.thisMap.ratio}",
"bluePotion": ",生命+${core.values.bluePotion * core.status.thisMap.ratio}",
"yellowPotion": ",生命+${core.values.yellowPotion * core.status.thisMap.ratio}",
"greenPotion": ",生命+${core.values.greenPotion * core.status.thisMap.ratio}",
"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": ",生命值翻倍",
"silverCoin": ",金币+500"
},
"useItemEffect": {
"book": "core.ui.drawBook(0);",

View File

@ -103,10 +103,10 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"130": {"cls":"npcs","id":"expShop"},
"131": {"cls":"npcs","id":"moneyShop"},
"132": {"cls":"npcs","id":"princess"},
"133": {"cls":"npc48","id":"npc0","faceIds":{"down":"npc0","left":"npc1","right":"npc2","up":"npc3"}},
"134": {"cls":"npc48","id":"npc1","faceIds":{"down":"npc0","left":"npc1","right":"npc2","up":"npc3"}},
"135": {"cls":"npc48","id":"npc2","faceIds":{"down":"npc0","left":"npc1","right":"npc2","up":"npc3"}},
"136": {"cls":"npc48","id":"npc3","faceIds":{"down":"npc0","left":"npc1","right":"npc2","up":"npc3"}},
"133": {"cls":"npc48","id":"npc0","faceIds":{"down":"npc0","left":"npc1","right":"npc2","up":"npc3"},"animate":1},
"134": {"cls":"npc48","id":"npc1","faceIds":{"down":"npc0","left":"npc1","right":"npc2","up":"npc3"},"animate":1},
"135": {"cls":"npc48","id":"npc2","faceIds":{"down":"npc0","left":"npc1","right":"npc2","up":"npc3"},"animate":1},
"136": {"cls":"npc48","id":"npc3","faceIds":{"down":"npc0","left":"npc1","right":"npc2","up":"npc3"},"animate":1},
"137": {"cls":"npcs","id":"greenMan"},
"138": {"cls":"npcs","id":"blueTrader"},
"139": {"cls":"npcs","id":"redMSNpc"},

8
runtime.d.ts vendored
View File

@ -42,7 +42,7 @@ type Animate = {
type Floor = {
title: string,
item_ratio: number
ratio: number
}
type ResolvedMap = {
@ -651,9 +651,9 @@ declare class events {
/**
*
* @example core.setFloorInfo('item_ratio', 2, 'MT0'); // 把主塔0层的血瓶和宝石变为双倍效果
* @param name 'title','name','canFlyTo','canUseQuickShop','cannotViewMap','cannotMoveDirectly','upFloor','downFloor','defaultGround','images','color','weather','bgm','item_ratio','underGround'
* @param values 'title''name''defaultGround''bgm''underGround''canXxx''xxxFloor''item_ratio'
* @example core.setFloorInfo('ratio', 2, 'MT0'); // 把主塔0层的血瓶和宝石变为双倍效果
* @param name 'title','name','canFlyTo','canUseQuickShop','cannotViewMap','cannotMoveDirectly','upFloor','downFloor','defaultGround','images','color','weather','bgm','ratio','underGround'
* @param values 'title''name''defaultGround''bgm''underGround''canXxx''xxxFloor''ratio'
* @param floorId id
* @param prefix
*/

View File

@ -64,8 +64,7 @@
(已完成!) 右键图块选择复制/粘贴事件
(已完成!) showImage, drawImage立绘等加上对称选项
(已完成!) 更多的图块blockly化
勇士帧抖动
怪物名和特殊属性自动缩小
(已完成!) 勇士帧动画
行走动画?

View File

@ -89,4 +89,6 @@ V2.6.6 -> V2.7 接档说明:
其他:
Jewel改名Gem
道具效果提示文字replaceText