提交秽翼的尤斯蒂娅所有文件

This commit is contained in:
草莓 2024-11-29 13:01:40 +08:00
parent f393512caa
commit 33ad4c1903
174 changed files with 46643 additions and 0 deletions

BIN
_server/img_md/view1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 KiB

BIN
_server/img_md/view2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

BIN
_server/img_md/view3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

797
_server/table/comment.js Normal file
View File

@ -0,0 +1,797 @@
/*
* 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括道具怪物图块属性楼层属性等内容
* 相关文档 _docs/editor.md ~ http://127.0.0.1:1055/_docs/#/editor?id=修改表格
*/
var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object",
"_data": {
// --------------------------- 【道具】相关的表格配置 --------------------------- //
"items": {
"_type": "object",
"_data": {
"id": {
"_leaf": true,
"_type": "disable",
"_docs": "道具ID",
"_data": "道具ID可于页面底部修改"
},
"cls": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [
"items",
"constants",
"tools",
"equips"
]
},
"_docs": "道具类别",
"_data": "items(宝石、血瓶) constants(永久物品) tools(消耗道具) equips(装备)"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "道具名称"
},
"text": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_docs": "道具描述",
"_data": "道具在道具栏中显示的描述"
},
"hideInToolbox": {
"_leaf": true,
"_type": "checkbox",
"_docs": "不显示在道具栏",
},
"equip": {
"_leaf": true,
"_type": "event",
"_event": "equip",
"_docs": "道具的装备属性"
},
"hideInReplay": {
"_leaf": true,
"_type": "checkbox",
"_docs": "回放不绘制道具栏",
"_data": "此项建议在会频繁连续多次使用的道具开启(如开启技能,或者《镜子》那样的镜像切换等等)"
},
"itemEffect": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_docs": "即捡即用效果",
"_data": "即捡即用类物品的效果仅对cls为items有效。"
},
"itemEffectTip": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_docs": "即捡即用提示",
"_data": "即捡即用类物品在获得时提示的文字仅对cls为items有效。"
},
"useItemEvent": {
"_leaf": true,
"_type": "event",
"_event": "item",
"_docs": "碰触或使用事件",
"_data": "碰触或使用本道具所执行的事件对所有cls有效"
},
"useItemEffect": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_docs": "使用效果",
"_data": "道具效果仅对cls为tools或constants有效。"
},
"canUseItemEffect": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_docs": "能否使用或装备",
"_data": "当前能否使用或装备该道具仅对cls不为items有效。null表示始终不可使用但可装备"
}
}
},
"items_template": { 'cls': 'items', 'name': '新物品', 'canUseItemEffect': 'true' },
// --------------------------- 【怪物】相关的表格配置 --------------------------- //
"enemys": {
"_type": "object",
"_data": {
"id": {
"_leaf": true,
"_type": "disable",
"_docs": "怪物ID",
"_data": "怪物ID可于页面底部修改"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "名称"
},
"description": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_docs": "怪物描述",
"_data": "可在怪物详细信息页面写的怪物描述,支持颜色、字体大小和样式、粗体斜体等转义方式。"
},
"displayIdInBook": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_docs": "手册ID",
"_data": "在怪物手册中映射到的怪物ID。如果此项不为null则在怪物手册中将用目标ID来替换该怪物原本的ID。常被运用在同一个怪物的多朝向上。"
},
"faceIds": {
"_leaf": true,
"_type": "event",
"_event": "faceIds",
"_docs": "行走朝向",
"_data": "行走图朝向。在勇士撞上图块时,或图块在移动时,会自动选择最合适的朝向图块(如果存在定义)来进行绘制。"
},
"bigImage": {
"_leaf": true,
"_type": "material",
"_directory": "./project/images/:images",
"_transform": (function (one) {
if (one.endsWith('.png')) return one;
return null;
}).toString(),
"_onconfirm": (function (previous, current) {
if (current.length == 0) return null;
return current[0];
}).toString(),
"_docs": "绑定贴图",
"_data": "该怪物绑定的怪物贴图,用法详见文档"
},
"hp": {
"_leaf": true,
"_type": "textarea",
"_data": "生命值"
},
"atk": {
"_leaf": true,
"_type": "textarea",
"_data": "攻击力"
},
"def": {
"_leaf": true,
"_type": "textarea",
"_data": "防御力"
},
"money": {
"_leaf": true,
"_type": "textarea",
"_data": "金币"
},
"exp": {
"_leaf": true,
"_type": "textarea",
"_data": "经验"
},
"point": {
"_leaf": true,
"_type": "textarea",
"_data": "加点"
},
"special": {
"_leaf": true,
"_type": "popCheckboxSet",
"_checkboxSet": function () {
var array = functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a.enemys.getSpecials()
var b = [],
c = [];
for (var index = 0; index < array.length; index++) {
b.push(array[index][0])
var name = array[index][1];
if (name instanceof Function) name = name({});
c.push(name + "(" + array[index][0] + ")")
}
return {
"prefix": c,
"key": b
}
},
"_data": "特殊属性"
},
"value": {
"_leaf": true,
"_type": "textarea",
"_docs": "特殊属性数值",
"_data": "特殊属性的数值\n如领域/阻激/激光怪的伤害值;光环怪增加生命的比例"
},
"zone": {
"_leaf": true,
"_type": "textarea",
"_docs": "领域伤害",
"_data": "领域怪的伤害值"
},
"repulse": {
"_leaf": true,
"_type": "textarea",
"_docs": "阻击伤害",
"_data": "阻击怪的伤害值"
},
"laser": {
"_leaf": true,
"_type": "textarea",
"_docs": "激光伤害",
"_data": "激光怪的伤害值"
},
"breakArmor": {
"_leaf": true,
"_type": "textarea",
"_docs": "破甲比例",
"_data": "破甲百分比"
},
"counterAttack": {
"_leaf": true,
"_type": "textarea",
"_docs": "反击比例",
"_data": "反击百分比"
},
"vampire": {
"_leaf": true,
"_type": "textarea",
"_docs": "吸血比例",
"_data": "吸血怪的吸血百分比"
},
"hpBuff": {
"_leaf": true,
"_type": "textarea",
"_docs": "光环加血",
"_data": "光环怪增加生命的比例"
},
"atkBuff": {
"_leaf": true,
"_type": "textarea",
"_docs": "光环加攻",
"_data": "光环怪增加攻击的比例"
},
"defBuff": {
"_leaf": true,
"_type": "textarea",
"_docs": "光环加防",
"_data": "光环怪增加防御的比例"
},
"zoneSquare": {
"_leaf": true,
"_type": "checkbox",
"_docs": "九宫格",
"_data": "领域、阻击或捕捉怪是否九宫格"
},
"haloSquare": {
"_leaf": true,
"_type": "checkbox",
"_docs": "九宫格",
"_data": "光环怪是否九宫格"
},
"range": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null",
"_docs": "领域范围",
"_data": "领域的范围不加默认为1"
},
"haloRange": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null",
"_docs": "光环范围",
"_data": "光环的范围;不加为全图效果"
},
"notBomb": {
"_leaf": true,
"_type": "checkbox",
"_docs": "不可炸",
"_data": "该怪物不可被炸"
},
"n": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null",
"_docs": "连击数",
"_data": "多连击的连击数,净化怪的净化倍率"
},
"purify": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null",
"_docs": "净化倍率",
"_data": "净化百分比"
},
"add": {
"_leaf": true,
"_type": "checkbox",
"_docs": "吸血加到自身",
"_data": "吸血后是否加到自身"
},
"haloAdd": {
"_leaf": true,
"_type": "checkbox",
"_docs": "光环是否叠加",
"_data": "光环是否叠加"
},
"atkValue": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_docs": "退化扣攻",
"_data": "退化时勇士下降的攻击力点数"
},
"defValue": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_docs": "退化扣防",
"_data": "退化时勇士下降的防御力点数"
},
"damage": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval||thiseval==null",
"_docs": "固伤",
"_data": "战前扣血的点数"
},
"beforeBattle": {
"_leaf": true,
"_type": "event",
"_event": "beforeBattle",
"_docs": "战前事件",
"_data": "和该怪物战斗前触发的事件列表"
},
"afterBattle": {
"_leaf": true,
"_type": "event",
"_event": "afterBattle",
"_docs": "战后事件",
"_data": "和该怪物战斗后触发的事件列表"
}
}
},
"enemys_template": { 'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'exp': 0, 'point': 0, 'special': [] },
// --------------------------- 【图块属性】相关的表格配置 --------------------------- //
"maps": {
"_type": "object",
"_data": {
"id": {
"_leaf": true,
"_type": "disable",
"_range": "false",
"_docs": "图块ID",
"_data": "图块唯一ID可在页面底部修改"
},
"idnum": {
"_leaf": true,
"_type": "disable",
"_range": "false",
"_data": "图块数字"
},
"cls": {
"_leaf": true,
"_type": "disable",
"_range": "false",
"_data": "图块类别"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "图块名称"
},
"trigger": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [
null,
"openDoor",
"pushBox",
"ski",
"custom"
]
},
"_docs": "触发器",
"_data": "该图块的默认触发器"
},
"canPass": {
"_leaf": true,
"_type": "checkbox",
"_docs": "可通行性",
},
"script": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_docs": "碰触脚本",
"_data": "触碰到该图块时自动执行的脚本内容;此脚本会在该点的触发器执行前执行"
},
"event": {
"_leaf": true,
"_type": "event",
"_event": "item",
"_docs": "碰触事件",
"_data": "触碰到该图块时自动执行的事件内容;如果存在本事件则不会执行默认触发器"
},
"cannotOut": {
"_leaf": true,
"_type": "checkboxSet",
"_checkboxSet": {
"prefix": ["上: ", "下: ", "<br>左: ", "右: "],
"key": ["up", "down", "left", "right"]
},
"_docs": "不可出方向",
"_data": "该图块的不可出方向\n对背景层、事件层、前景层上的图块均有效"
},
"cannotIn": {
"_leaf": true,
"_type": "checkboxSet",
"_checkboxSet": {
"prefix": ["上: ", "下: ", "<br>左: ", "右: "],
"key": ["up", "down", "left", "right"]
},
"_docs": "不可入方向",
"_data": "该图块的不可入方向\n对背景层、事件层、前景层上的图块均有效"
},
"canBreak": {
"_leaf": true,
"_type": "checkbox",
"_docs": "可破震",
"_data": "该图块是否可被破墙或地震"
},
"animate": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [null, 1, 2, 3, 4],
},
"_docs": "动画帧数",
"_data": "null代表素材默认帧数"
},
"doorInfo": {
"_leaf": true,
"_type": "event",
"_event": "doorInfo",
"_docs": "门信息",
"_data": "该图块的门信息仅对animates和npc48生效。"
},
"faceIds": {
"_leaf": true,
"_type": "event",
"_event": "faceIds",
"_docs": "行走图朝向",
"_data": "行走图朝向。在勇士撞上图块时,或图块在移动时,会自动选择最合适的朝向图块(如果存在定义)来进行绘制。"
},
"bigImage": {
"_leaf": true,
"_type": "material",
"_directory": "./project/images/:images",
"_transform": (function (one) {
if (one.endsWith('.png')) return one;
return null;
}).toString(),
"_onconfirm": (function (previous, current) {
if (current.length == 0) return null;
return current[0];
}).toString(),
"_docs": "绑定贴图",
"_data": "该图块绑定的贴图,用法详见文档"
}
}
},
// --------------------------- 【楼层属性】相关的表格配置 --------------------------- //
"floors": {
"_type": "object",
"_data": {
"floor": {
"_type": "object",
"_data": {
"floorId": {
"_leaf": true,
"_type": "disable",
"_range": "false",
"_docs": "楼层ID",
"_data": "文件名和floorId需要保持完全一致可在页面底部修改"
},
"title": {
"_leaf": true,
"_type": "textarea",
"_docs": "楼层名",
"_data": "楼层中文名,将在切换楼层和浏览地图时显示"
},
"areas": {
"_leaf": true,
"_type": "textarea",
"_docs": "区域名",
"_data": "小地图及楼传区域显示"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_docs": "状态栏显示",
"_data": "显示在状态栏中的层数"
},
"width": {
"_leaf": true,
"_type": "disable",
"_range": "false",
"_docs": "宽度",
"_data": "地图x方向大小,请在表格最下方修改"
},
"height": {
"_leaf": true,
"_type": "disable",
"_range": "false",
"_docs": "高度",
"_data": "地图y方向大小,请在表格最下方修改"
},
"canFlyTo": {
"_leaf": true,
"_type": "checkbox",
"_docs": "可楼传飞到",
"_data": "该楼能否被楼传器飞到"
},
"canFlyFrom": {
"_leaf": true,
"_type": "checkbox",
"_docs": "可楼传飞出",
"_data": "该楼能否用楼传器飞出"
},
"canUseQuickShop": {
"_leaf": true,
"_type": "checkbox",
"_docs": "快捷商店",
"_data": "该层是否允许使用快捷商店"
},
"cannotViewMap": {
"_leaf": true,
"_type": "checkbox",
"_docs": "不可浏览",
"_data": "该层是否不允许被浏览地图看到;如果勾上则浏览地图会跳过该层"
},
"cannotMoveDirectly": {
"_leaf": true,
"_type": "checkbox",
"_docs": "不可瞬移",
"_data": "该层是否不允许瞬间移动;如果勾上则不可在此层进行瞬移"
},
"underGround": {
"_leaf": true,
"_type": "checkbox",
"_docs": "地下层",
"_data": "是否是地下层如果该项为true则同层传送将传送至上楼梯"
},
"firstArrive": {
"_leaf": true,
"_type": "event",
"_event": "firstArrive",
"_docs": "首次到达事件",
"_data": "第一次到该楼层触发的事件,可以双击进入事件编辑器。"
},
"eachArrive": {
"_leaf": true,
"_type": "event",
"_event": "eachArrive",
"_docs": "每次到达事件",
"_data": "每次到该楼层触发的事件可以双击进入事件编辑器该事件会在firstArrive执行后再执行。"
},
"parallelDo": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_lint": true,
"_template": "(function (timestamp) {\\n\\t// 在这里写楼层并行脚本大约每16.6ms执行一次\\n\\t// timestamp: 从游戏开始到当前所经过的毫秒数。\\n\\t\\n})(timestamp);",
"_docs": "并行处理脚本",
"_data": "在该层楼时执行的并行脚本处理。\n可以在这里写上任意需要自动执行的脚本比如打怪自动开门等。\n详见文档-事件-并行事件处理。"
},
"upFloor": {
"_leaf": true,
"_type": "point",
"_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)",
"_docs": "上楼点",
"_data": "该层上楼点,如[2,3]。\n如果此项不为null则楼层转换时的stair:upFloor以及楼传器的落点会被替换成该点而不是该层的上楼梯。"
},
"downFloor": {
"_leaf": true,
"_type": "point",
"_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)",
"_docs": "下楼点",
"_data": "该层下楼点,如[2,3]。\n如果此项不为null则楼层转换时的stair:downFloor以及楼传器的落点会被替换成该点而不是该层的下楼梯。"
},
"flyPoint": {
"_leaf": true,
"_type": "point",
"_range": "thiseval==null||((thiseval instanceof Array) && thiseval.length==2)",
"_docs": "楼传落点",
"_data": "该层楼传落点,如[2,3]。\n如果此项不为null则楼层飞行器强行落到此点无视上下楼或平面塔属性。"
},
"defaultGround": {
"_leaf": true,
"_type": "textarea",
"_docs": "地面图块",
"_data": "默认地面的图块ID此项修改后需要刷新才能看到效果。不填则默认是ground"
},
"images": {
"_leaf": true,
"_type": "event",
"_event": "floorImage",
"_docs": "楼层贴图"
},
"color": {
"_leaf": true,
"_type": "color",
"_docs": "色调",
"_data": "该层的默认画面色调。本项可不写代表无色调如果写需要是一个RGBA数组如[255,0,0,0.3]"
},
"weather": {
"_leaf": true,
"_type": "textarea",
"_docs": "天气",
"_data": "该层的默认天气。本项可忽略表示晴天,如果写则第一项为\"rain\"\"snow\", \"sun\", \"fog\", \"cloud\“代表对应的天气第二项为1-10之间的数代表强度。\n如[\"rain\", 8]代表8级雨天。"
},
"bgm": {
"_leaf": true,
"_type": "material",
"_directory": "./project/bgms/",
"_transform": (function (one) {
if (one.endsWith('.mp3') || one.endsWith('.ogg') || one.endsWith('.wav') || one.endsWith('.m4a') || one.endsWith('.flac'))
return one;
return null;
}).toString(),
"_onconfirm": (function (previous, current) {
if (current.length == 0) return null;
if (current.length == 1) return current[0];
return current;
}).toString(),
"_docs": "背景音乐",
"_data": "到达该层后默认播放的BGM"
},
"ratio": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval <= Number.MAX_SAFE_INTEGER && thiseval>=0",
"_docs": "宝石血瓶效果",
"_data": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。"
}
}
},
"loc": {
"_type": "object",
"_data": {
"events": {
"_leaf": true,
"_type": "event",
"_event": "event",
"_docs": "普通事件",
"_data": "该点的可能事件列表,可以双击进入事件编辑器。"
},
"autoEvent": {
"_type": "object",
"_leaf": false,
"_action": function (args) {
args.vobj = args.vobj || {};
for (var ii = 0; ii < 2; ii++) {
args.vobj[ii] = args.vobj[ii] || null;
}
},
"_data": function (key) {
return {
"_leaf": true,
"_type": "event",
"_event": "autoEvent",
"_data": "自动事件"
}
}
},
"changeFloor": {
"_leaf": true,
"_type": "event",
"_event": "changeFloor",
"_docs": "楼层转换",
"_data": "该点楼层转换事件该事件不能和上面的events同时出现否则会被覆盖"
},
"beforeBattle": {
"_leaf": true,
"_type": "event",
"_event": "beforeBattle",
"_docs": "战前事件",
"_data": "该点战斗前可能触发的事件列表,可以双击进入事件编辑器。"
},
"afterBattle": {
"_leaf": true,
"_type": "event",
"_event": "afterBattle",
"_docs": "战后事件",
"_data": "该点战斗后可能触发的事件列表,可以双击进入事件编辑器。"
},
"afterGetItem": {
"_leaf": true,
"_type": "event",
"_event": "afterGetItem",
"_docs": "道具后事件",
"_data": "该点获得道具后可能触发的事件列表,可以双击进入事件编辑器。"
},
"afterOpenDoor": {
"_leaf": true,
"_type": "event",
"_event": "afterOpenDoor",
"_docs": "开门后事件",
"_data": "该点开完门后可能触发的事件列表,可以双击进入事件编辑器。"
},
"cannotMove": {
"_leaf": true,
"_type": "checkboxSet",
"_checkboxSet": {
"prefix": ["上: ", "下: ", "<br>左: ", "右: "],
"key": ["up", "down", "left", "right"]
},
"_docs": "不可出方向",
"_data": "该点不可通行出的方向 \n 可以在这里定义该点不能前往哪个方向,可以达到悬崖之类的效果"
},
"cannotMoveIn": {
"_leaf": true,
"_type": "checkboxSet",
"_checkboxSet": {
"prefix": ["上: ", "下: ", "<br>左: ", "右: "],
"key": ["up", "down", "left", "right"]
},
"_docs": "不可入方向",
"_data": "该点不可通行入的方向 \n 可以在这里定义从哪个方向前往该点,可以达到悬崖之类的效果"
},
}
}
}
},
"floors_template": {
"floorId": "to be covered",
"title": "new floor",
"name": "new floor",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"cannotViewMap": false,
"cannotMoveDirectly": false,
"images": [],
"ratio": 1,
"defaultGround": "ground",
"bgm": null,
"upFloor": null,
"downFloor": null,
"color": null,
"weather": null,
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {}
}
}
}

View File

@ -0,0 +1,684 @@
/*
* 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括全塔属性的配置项
* 相关文档 _docs/editor.md ~ http://127.0.0.1:1055/_docs/#/editor?id=修改表格
*/
var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object",
"_data": {
"main": {
"_type": "object",
"_data": {
"floorIds": {
"_leaf": true,
"_type": "textarea",
"_range": "editor.mode.checkFloorIds(thiseval)",
"_docs": "楼层列表",
"_data": "在这里按顺序放所有的楼层;其顺序直接影响到楼层传送器、浏览地图和上/下楼器的顺序"
},
"floorPartitions": {
"_leaf": true,
"_type": "event",
"_event": "floorPartition",
"_docs": "分区指定",
"_data": "可以在这里指定楼层分区;主要适用于不可返回的高层塔;进入新分区后将自动调用砍层插件以减少空间消耗;未在任何分区的楼层将被视为公共区域"
},
"images": {
"_leaf": true,
"_type": "material",
"_range": "editor.mode.checkImages(thiseval, './project/images/')",
"_directory": "./project/images/",
"_transform": (function (one) {
if (one.endsWith('.png') || one.endsWith('.jpg') || one.endsWith('.jpeg') || one.endsWith('.gif'))
return one;
return null;
}).toString(),
"_docs": "使用图片",
"_data": "在此存放所有可能使用的图片tilesets除外 \n图片可以被作为背景图的一部分也可以直接用自定义事件进行显示。 \n 图片名不能使用中文,不能带空格或特殊字符;可以直接改名拼音就好 \n 建议对于较大的图片,在网上使用在线的“图片压缩工具(http://compresspng.com/zh/)”来进行压缩,以节省流量 \n 依次向后添加",
},
"splitImages": {
"_leaf": true,
"_type": "event",
"_event": "splitImages",
"_docs": "图片切分",
"_data": "可以在这里对使用到的图片进行按照一定宽高切分,生成若干新的小图供使用"
},
"tilesets": {
"_leaf": true,
"_type": "material",
"_range": "editor.mode.checkImages(thiseval, './project/tilesets/')",
"_directory": "./project/tilesets/",
"_transform": (function (one) {
if (one.endsWith('.png'))
return one;
return null;
}).toString(),
"_onconfirm": (function (previous, current) {
// 额外素材是有序的,因此根据之前的内容进行排序,然后在之后追加新的
previous = previous || [];
current = current.sort(function (a, b) {
var i = previous.indexOf(a);
var j = previous.indexOf(b);
if (i >= 0 && j >= 0) return i - j;
return j >= 0 ? 1 : -1;
});
return core.subarray(current, previous) == null &&
!confirm("您修改了现有额外素材的内容或顺序,这可能导致已经使用的额外素材无法正确显示。确定要修改么?") ?
previous : current;
}).toString(),
"_docs": "额外素材",
"_data": "在此存放额外素材的图片名, \n可以自定导入任意张素材图片无需PS无需注册即可直接在游戏中使用 \n 形式如[\"1.png\", \"2.png\"] ,将需要的素材图片放在images目录下 \n 素材的宽高必须都是32的倍数且图片上的总图块数不超过1000即最多有1000个32*32的图块在该图片上"
},
"animates": {
"_leaf": true,
"_type": "material",
"_range": "editor.mode.checkUnique(thiseval)",
"_directory": "./project/animates/",
"_transform": (function (one) {
if (one.endsWith(".animate")) return one.substring(0, one.lastIndexOf('.'));
return null;
}).toString(),
"_docs": "使用动画",
"_data": "在此存放所有可能使用的动画必须是animate格式在这里不写后缀名 \n动画必须放在animates目录下文件名不能使用中文不能带空格或特殊字符 \n \"jianji\", \"thunder\" 根据需求自行添加"
},
"bgms": {
"_leaf": true,
"_type": "material",
"_range": "editor.mode.checkUnique(thiseval)",
"_directory": "./project/bgms/",
"_transform": (function (one) {
if (one.endsWith('.mp3') || one.endsWith('.ogg') || one.endsWith('.wav') || one.endsWith('.m4a') || one.endsWith('.flac'))
return one;
return null;
}).toString(),
"_docs": "使用音乐",
"_data": "在此存放所有的bgm和文件名一致。 \n音频名不能使用中文不能带空格或特殊字符可以直接改名拼音就好"
},
"sounds": {
"_leaf": true,
"_type": "material",
"_range": "editor.mode.checkUnique(thiseval)",
"_directory": "./project/sounds/",
"_transform": (function (one) {
if (one.endsWith('.mp3') || one.endsWith('.ogg') || one.endsWith('.wav') || one.endsWith('.m4a') || one.endsWith('.flac'))
return one;
return null;
}).toString(),
"_docs": "使用音效",
"_data": "在此存放所有的SE和文件名一致 \n音频名不能使用中文不能带空格或特殊字符可以直接改名拼音就好"
},
"fonts": {
"_leaf": true,
"_type": "material",
"_range": "editor.mode.checkUnique(thiseval)",
"_directory": "./project/fonts/",
"_transform": (function (one) {
if (one.endsWith(".ttf")) return one.substring(0, one.lastIndexOf('.'));
return null;
}).toString(),
"_docs": "使用字体",
"_data": "在此存放所有可能使用的字体 \n 字体名不能使用中文,不能带空格或特殊字符"
},
"nameMap": {
"_leaf": true,
"_type": "event",
"_event": "nameMap",
"_docs": "文件别名",
"_data": "文件别名设置目前仅对images, animates, bgms, sounds有效。"
},
"levelChoose": {
"_leaf": true,
"_type": "event",
"_event": "levelChoose",
"_docs": "难度分歧",
"_data": "难度分歧定义和对应的事件;此处留空数组表示将直接开始游戏"
},
"equipName": {
"_leaf": true,
"_type": "textarea",
"_range": "(thiseval instanceof Array)||thiseval==null",
"_docs": "装备孔",
"_data": "装备位名称为一个数组此项的顺序与equiptype数值关联例如可写[\"武器\",\"防具\",\"首饰\"]等等。"
},
"startBgm": {
"_leaf": true,
"_type": "material",
"_directory": "./project/bgms/",
"_transform": (function (one) {
if (one.endsWith('.mp3') || one.endsWith('.ogg') || one.endsWith('.wav') || one.endsWith('.m4a') || one.endsWith('.flac'))
return one;
return null;
}).toString(),
"_onconfirm": (function (previous, current) {
if (current.length == 0) return null;
return current[0];
}).toString(),
"_docs": "标题音乐",
"_data": "在标题界面应该播放的bgm内容"
},
"styles": {
"_leaf": true,
"_type": "event",
"_event": "mainStyle",
"_docs": "主样式",
"_data": "主要样式设置,包括标题、按钮、状态栏等的背景色等"
}
}
},
"firstData": {
"_type": "object",
"_data": {
"title": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_docs": "游戏名",
"_data": "游戏名,将显示在标题页面以及切换楼层的界面中"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_range": "/^[a-zA-Z0-9_]{1,30}$/.test(thiseval)",
"_docs": "唯一英文标识符",
"_data": "游戏的唯一英文标识符。由英文、数字、下划线组成不能超过30个字符。\n此项必须修改其将直接影响到存档的定位"
},
"version": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_docs": "游戏版本",
"_data": "当前游戏版本;版本不一致的存档不能通用。"
},
"floorId": {
"_leaf": true,
"_type": "select",
"_select": {
"values": data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds
},
"_range": "data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main.floorIds.indexOf(thiseval)!==-1",
"_docs": "初始楼层",
"_data": "初始楼层的ID"
},
"hero": {
"_type": "object",
"_data": {
"image": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [null].concat(Object.keys(editor.core.material.images.images).filter(function (name) {
return name.endsWith('.png');
}))
},
"_data": "行走图"
},
"animate": {
"_leaf": true,
"_type": "checkbox",
"_docs": "帧动画",
"_data": "是否开启停止状态和对话框的帧动画"
},
"name": {
"_leaf": true,
"_type": "textarea",
"_string": true,
"_data": "勇士名"
},
"lv": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval==~~thiseval &&thiseval>0",
"_data": "初始等级"
},
"hpmax": {
"_leaf": true,
"_type": "textarea",
"_data": "生命上限"
},
"hp": {
"_leaf": true,
"_type": "textarea",
"_data": "初始生命"
},
"manamax": {
"_leaf": true,
"_type": "textarea",
"_docs": "魔力上限",
"_data": "魔力上限此项非负才会生效null或小于0都不会生效"
},
"mana": {
"_leaf": true,
"_type": "textarea",
"_data": "初始魔力"
},
"atk": {
"_leaf": true,
"_type": "textarea",
"_data": "初始攻击"
},
"def": {
"_leaf": true,
"_type": "textarea",
"_data": "初始防御"
},
"mdef": {
"_leaf": true,
"_type": "textarea",
"_data": "初始护盾"
},
"money": {
"_leaf": true,
"_type": "textarea",
"_data": "初始金币"
},
"exp": {
"_leaf": true,
"_type": "textarea",
"_data": "初始经验"
},
"equipment": {
"_leaf": true,
"_type": "textarea",
"_hide": true,
"_range": "thiseval instanceof Array",
"_data": "初始装备"
},
"items": {
"_type": "object",
"_hide": true,
"_data": {
"constants": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_docs": "永久道具",
"_data": "初始永久道具个数,例如初始送手册可以写 {\"book\": 1}"
},
"tools": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_docs": "消耗道具",
"_data": "初始消耗道具个数,例如初始有两破可以写 {\"pickaxe\": 2}"
},
"equips": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_docs": "初始拥有装备个数",
"_data": "初始装备个数,例如初始送铁剑可以写 {\"sword1\": 1}"
}
}
},
"loc": {
"_type": "object",
"_data": {
"direction": {
"_leaf": true,
"_type": "select",
"_data": "初始朝向",
"_select": {
"values": [
"up",
"down",
"left",
"right"
]
},
},
"x": {
"_leaf": true,
"_type": "textarea",
"_data": "横坐标"
},
"y": {
"_leaf": true,
"_type": "textarea",
"_data": "纵坐标"
}
}
},
"flags": {
"_leaf": true,
"_type": "textarea",
"_range": "thiseval instanceof Object && !(thiseval instanceof Array)",
"_data": "游戏变量"
},
"followers": {
"_leaf": true,
"_type": "disable",
"_hide": true,
"_data": "跟随者"
},
"steps": {
"_leaf": true,
"_type": "disable",
"_hide": true,
"_data": "行走步数"
}
}
},
"startCanvas": {
"_leaf": true,
"_type": "event",
"_event": "firstArrive",
"_range": "thiseval==null || thiseval instanceof Array",
"_docs": "标题事件",
"_data": "标题界面事件化,可以使用事件流的形式来绘制开始界面等。\n需要开启startUsingCanvas这个开关。\n详见文档-个性化-标题界面事件化。"
},
"startText": {
"_leaf": true,
"_type": "event",
"_event": "firstArrive",
"_range": "thiseval==null || thiseval instanceof Array",
"_docs": "开场剧情",
"_data": "游戏开始前剧情,可以执行任意自定义事件。\n双击进入事件编辑器。\n如果无剧情直接留一个空数组即可。"
},
"shops": {
"_leaf": true,
"_type": "event",
"_event": "shop",
"_range": "thiseval instanceof Array",
"_docs": "全局商店",
"_data": "全局商店,是一个数组,可以双击进入事件编辑器。"
},
"levelUp": {
"_leaf": true,
"_type": "event",
"_event": "level",
"_range": "thiseval==null || thiseval instanceof Array",
"_docs": "等级提升",
"_data": "经验升级所需要的数值,是一个数组,可以双击进行编辑。 \n 第一项为初始等级仅title生效 \n 每一个里面可以含有三个参数 need, title, action \n need为所需要的经验数值可以是个表达式。请确保need依次递增 \n title为该等级的名称也可以省略代表使用系统默认值本项将显示在状态栏中 \n action为本次升级所执行的事件可由若干项组成"
}
}
},
"values": {
"_type": "object",
"_data": {
"lavaDamage": {
"_leaf": true,
"_type": "textarea",
"_data": "血网伤害"
},
"poisonDamage": {
"_leaf": true,
"_type": "textarea",
"_data": "中毒伤害"
},
"weakValue": {
"_leaf": true,
"_type": "textarea",
"_docs": "衰弱效果",
"_data": "衰弱状态下攻防减少的数值\n如果此项不小于1则作为实际下降的数值比如10就是攻防各下降10\n如果在0到1之间则为下降的比例比如0.3就是下降30%的攻防)"
},
"redGem": {
"_leaf": true,
"_type": "textarea",
"_docs": "红宝石值",
},
"blueGem": {
"_leaf": true,
"_type": "textarea",
"_docs": "蓝宝石值",
},
"greenGem": {
"_leaf": true,
"_type": "textarea",
"_docs": "绿宝石值",
},
"redPotion": {
"_leaf": true,
"_type": "textarea",
"_docs": "红血瓶值",
},
"bluePotion": {
"_leaf": true,
"_type": "textarea",
"_docs": "蓝血瓶值",
},
"yellowPotion": {
"_leaf": true,
"_type": "textarea",
"_docs": "黄血瓶值",
},
"greenPotion": {
"_leaf": true,
"_type": "textarea",
"_docs": "绿血瓶值",
},
"breakArmor": {
"_leaf": true,
"_type": "textarea",
"_docs": "破甲比例",
"_data": "破甲的比例战斗前怪物附加角色防御的x倍作为伤害可以用怪物的 defValue 覆盖此值。"
},
"counterAttack": {
"_leaf": true,
"_type": "textarea",
"_docs": "反击比例",
"_data": "反击的比例战斗时怪物每回合附加角色攻击的x倍作为伤害无视角色防御可以用怪物的 atkValue 覆盖此值。"
},
"purify": {
"_leaf": true,
"_type": "textarea",
"_docs": "净化比例",
"_data": "净化的比例战斗前怪物附加勇士护盾的x倍作为伤害可以用怪物的 n 覆盖此值。"
},
"hatred": {
"_leaf": true,
"_type": "textarea",
"_docs": "仇恨增值",
"_data": "仇恨属性中,每杀死一个怪物获得的仇恨值"
},
"animateSpeed": {
"_leaf": true,
"_type": "textarea",
"_docs": "全局帧动画时间",
"_data": "全局帧动画时间即怪物振动频率一般300比较合适"
},
"moveSpeed": {
"_leaf": true,
"_type": "textarea",
"_docs": "勇士移速",
"_data": "勇士每一格的移速默认是100此项可被用户修改覆盖"
},
"statusCanvasRowsOnMobile": {
"_leaf": true,
"_type": "select",
"_select": {
"values": [1, 2, 3, 4, 5]
},
"_docs": "竖状态栏自绘行数",
"_data": "竖屏模式下顶端状态栏canvas化后的行数。\n此项将决定竖屏的状态栏高度如果设置则不小于1且不大于5。\n仅在statusCanvas开启时才有效"
},
"floorChangeTime": {
"_leaf": true,
"_type": "textarea",
"_docs": "楼层切换时间",
"_data": "默认楼层切换时间;当楼层切换没有显式设置时间时将用此值;可以被用户在系统设置内手动修改"
}
}
},
"flags": {
"_type": "object",
"_data": {
"statusBarItems": {
"_leaf": true,
"_type": "checkboxSet",
"_checkboxSet": {
"prefix": [
"楼层",
"名字",
"<br>等级",
"血限",
"<br>生命",
"魔力",
"<br>攻击",
"防御",
"<br>护盾",
"金币",
"<br>经验",
"升级",
"<br>升级扣除模式",
"<br>钥匙",
"绿钥",
"<br>破炸",
"负面",
"<br>技能"
],
"key": [
"enableFloor",
"enableName",
"enableLv",
"enableHPMax",
"enableHP",
"enableMana",
"enableAtk",
"enableDef",
"enableMDef",
"enableMoney",
"enableExp",
"enableLevelUp",
"levelUpLeftMode",
"enableKeys",
"enableGreenKey",
"enablePZF",
"enableDebuff",
"enableSkill"
]
},
"_data": "状态栏显示项"
},
"autoScale": {
"_leaf": true,
"_type": "checkbox",
"_docs": "自动缩放",
"_data": "是否自动缩放至合适值"
},
"extendToolbar": {
"_leaf": true,
"_type": "checkbox",
"_docs": "画面下方道具栏",
"_data": "开启后道具栏会被挪动至游戏画面的下方"
},
"hideLeftStatusBar": {
"_leaf": true,
"_type": "checkbox",
"_docs": "隐藏左侧状态栏",
"_data": "是否隐藏左侧状态栏,开启后强制开启画面下方道具栏"
},
"flyNearStair": {
"_leaf": true,
"_type": "checkbox",
"_docs": "楼传需在楼梯边",
"_data": "传送器是否需要在楼梯边使用如果flyRecordPosition开启则此项对箭头也有效。"
},
"flyRecordPosition": {
"_leaf": true,
"_type": "checkbox",
"_docs": "楼传开平面模式",
"_data": "传送器平面塔模式;此模式下楼层传送器将飞到上次离开该楼层的位置。"
},
"itemFirstText": {
"_leaf": true,
"_type": "checkbox",
"_docs": "首次道具进行提示",
"_data": "首次获得道具是否提示"
},
"equipboxButton": {
"_leaf": true,
"_type": "checkbox",
"_docs": "状态栏装备按钮",
"_data": "状态栏的装备按钮。若此项为true则将状态栏中的楼层转换器按钮换为装备栏按钮"
},
"enableAddPoint": {
"_leaf": true,
"_type": "checkbox",
"_docs": "开启加点",
"_data": "是否支持加点"
},
"enableNegativeDamage": {
"_leaf": true,
"_type": "checkbox",
"_docs": "开启负伤",
"_data": "是否支持负伤害(回血)"
},
"betweenAttackMax": {
"_leaf": true,
"_type": "checkbox",
"_docs": "夹击不超伤害值",
"_data": "夹击伤害是否不超过怪物伤害值。"
},
"useLoop": {
"_leaf": true,
"_type": "checkbox",
"_docs": "二分临界",
"_data": "是否循环计算临界如果此项为true则使用循环法而不是回合数计算法来算临界\n从V2.5.3开始,对于大数据的循环法将改为使用二分法进行计算"
},
"startUsingCanvas": {
"_leaf": true,
"_type": "checkbox",
"_docs": "标题开启事件化",
"_data": "是否开始菜单canvas化如果此项为true则将使用canvas来绘制开始菜单"
},
"statusCanvas": {
"_leaf": true,
"_type": "checkbox",
"_docs": "开启自绘状态栏",
"_data": "是否状态栏canvas化即手动自定义绘制状态栏。\n如果此项开启则可在脚本编辑的drawStatusBar中自定义绘制菜单栏。"
},
"enableEnemyPoint": {
"_leaf": true,
"_type": "checkbox",
"_docs": "定点怪显",
"_data": "是否开启怪物的定点显示功能,即属性不同的怪物会在怪物手册单列;用户可以手动在菜单栏中开关"
},
"enableGentleClick": {
"_leaf": true,
"_type": "checkbox",
"_docs": "允许轻按",
"_data": "是否允许轻触(获得面前物品)"
},
"ignoreChangeFloor": {
"_leaf": true,
"_type": "checkbox",
"_docs": "允许穿透楼梯",
"_data": "经过楼梯、传送门时是否能“穿透”。\n穿透的意思是自动寻路得到的的路径中间经过了楼梯行走时是否触发楼层转换事件"
},
"canGoDeadZone": {
"_leaf": true,
"_type": "checkbox",
"_docs": "允许将死领域",
"_data": "是否允许走到将死的领域上。如果此项为true则可以走到将死的领域上"
},
"enableMoveDirectly": {
"_leaf": true,
"_type": "checkbox",
"_docs": "允许瞬移",
"_data": "是否允许瞬间移动"
},
"enableRouteFolding": {
"_leaf": true,
"_type": "checkbox",
"_docs": "录像折叠",
"_data": "是否开启录像折叠功能。\n此功能将尽可能的通过优化无损耗反复走的方式来缩短录像但在某些情况下尤其是创新向塔中可能会存在副作用影响录像的正确性。"
},
"disableShopOnDamage": {
"_leaf": true,
"_type": "checkbox",
"_docs": "伤害禁用商店",
"_data": "是否在经过领域/夹击/路障等伤害后禁用快捷商店。"
},
"blurFg": {
"_leaf": true,
"_type": "checkbox",
"_docs": "虚化前景层",
"_data": "是否虚化前景层;如果此项开启,则在游戏中事件层有东西(如宝石等)时虚化前景层。"
}
}
}
}
}

View File

@ -0,0 +1,39 @@
/*
* 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括公共事件
* 相关文档 _docs/editor.md ~ http://127.0.0.1:1055/_docs/#/editor?id=修改表格
*/
var events_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object",
"_data": {
"commonEvent": {
"_type": "object",
"_data": function (key) {
var obj = {
"加点事件": {
"_leaf": true,
"_type": "event",
"_range": "thiseval instanceof Array",
"_event": "commonEvent",
"_data": "加点事件"
},
"回收钥匙商店": {
"_leaf": true,
"_type": "event",
"_event": "commonEvent",
"_data": "回收钥匙商店"
},
}
if (obj[key]) return obj[key];
return {
"_leaf": true,
"_type": "event",
"_event": "commonEvent",
"_data": "公共事件"
}
}
}
}
}

View File

@ -0,0 +1,213 @@
/*
* 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括脚本编辑
* 相关文档 _docs/editor.md ~ http://127.0.0.1:1055/_docs/#/editor?id=修改表格
*/
var functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object",
"_data": {
"events": {
"_type": "object",
"_data": {
"resetGame": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "重置游戏"
},
"win": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "游戏获胜"
},
"lose": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "游戏失败"
},
"changingFloor": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "切换楼层中"
},
"afterChangeFloor": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "切换楼层后"
},
"flyTo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "楼层飞行"
},
"beforeBattle": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "战前判定"
},
"afterBattle": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "战后脚本"
},
"afterOpenDoor": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "开门后脚本"
},
"afterGetItem": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "道具后脚本"
},
"afterPushBox": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "推箱子后"
}
}
},
"enemys": {
"_type": "object",
"_data": {
"getSpecials": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "怪物特殊属性"
},
"getEnemyInfo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "怪物真实属性"
},
"getDamageInfo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "战斗伤害信息"
}
}
},
"actions": {
"_type": "object",
"_data": {
"onKeyUp": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "按键处理"
},
"onStatusBarClick": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_docs": "点击状态栏",
"_data": "状态栏点击事件,仅在开启自绘状态栏时生效"
}
}
},
"control": {
"_type": "object",
"_data": {
"saveData": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "存档操作"
},
"loadData": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "读档操作"
},
"getStatusLabel": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "状态名定义"
},
"triggerDebuff": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "毒衰咒处理"
},
"updateStatusBar": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "更新状态栏"
},
"updateCheckBlock": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "阻激夹域伤害"
},
"moveOneStep": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "每步后操作"
},
"moveDirectly": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "瞬间移动"
},
"parallelDo": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "并行脚本"
}
}
},
"ui": {
"_type": "object",
"_data": {
"getToolboxItems": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "道具栏显示项"
},
"drawStatusBar": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_preview": "statusBar",
"_data": "自绘状态栏"
},
"drawStatistics": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "数据统计"
},
"drawAbout": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "关于界面"
}
}
}
}
}

View File

@ -0,0 +1,124 @@
/*
* 表格配置项
* 在这里可以对表格中的各项显示进行配置包括表格项提示内容等内容具体写法照葫芦画瓢即可
* 本配置项包括插件编写
* 相关文档 _docs/editor.md ~ http://127.0.0.1:1055/_docs/#/editor?id=修改表格
*/
var plugins_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "object",
"_data": function (key) {
var obj = {
"init": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string'",
"_data": "初始化"
},
"shop": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string'",
"_data": "全局商店"
},
"drawLight": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "灯光效果"
},
"removeMap": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "砍层插件"
},
"fiveLayers": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "五图层(背景前景2)"
},
"itemShop": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "道具商店"
},
"enemyLevel": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "手册显示怪物境界"
},
"multiHeros": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "多角色"
},
"heroFourFrames": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "勇士四帧行走动画"
},
"routeFixing": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "录像精修"
},
"numpad": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "整数输入面板美化"
},
"sprite": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "基于canvas的sprite化"
},
"hotReload": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "热重载"
},
"statusBar": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "自定义状态栏"
},
"override": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "函数复写"
},
"animate": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "高级动画"
},
"func": {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_data": "实用函数集"
}
}
if (obj[key]) return obj[key];
return {
"_leaf": true,
"_type": "textarea",
"_range": "typeof(thiseval)=='string' || thiseval==null",
"_template": "function () {\\n\\t// 在此增加新插件\\n\\t\\n}",
"_data": "自定义插件"
}
}
}

60
_server/thirdparty/LICENSE.md vendored Normal file
View File

@ -0,0 +1,60 @@
/* jsColor */
The MIT License (MIT)
Copyright (c) 2014 Peter Dematté
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
/* awesomplete */
The MIT License (MIT)
Copyright (c) 2015 Lea Verou
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
/* caret-position */
The MIT License (MIT)
Copyright (c) 2015 Jonathan Ong me@jongleberry.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

75
_server/thirdparty/awesomplete.css vendored Normal file
View File

@ -0,0 +1,75 @@
.awesomplete [hidden] {
display: none;
}
.awesomplete .visually-hidden {
position: absolute;
clip: rect(0, 0, 0, 0);
}
.awesomplete {
display: inline-block;
position: relative;
}
.awesomplete > input {
display: block;
}
.awesomplete > ul {
position: absolute;
left: 0;
z-index: 1;
box-sizing: border-box;
list-style: none;
padding: 0;
margin: 0;
white-space: nowrap;
}
.awesomplete > ul:empty {
display: none;
}
.awesomplete > ul {
border-radius: .3em;
margin: .8em 0 0;
text-shadow: none;
}
@supports (transform: scale(0)) {
.awesomplete > ul {
transition: .3s cubic-bezier(.4,.2,.5,1.4);
transform-origin: 1.43em -.43em;
}
.awesomplete > ul[hidden],
.awesomplete > ul:empty {
opacity: 0;
transform: scale(0);
display: block;
transition-timing-function: ease;
}
}
/* Pointer */
.awesomplete > ul:before {
content: "";
position: absolute;
top: -.43em;
left: 1em;
width: 0; height: 0;
padding: .4em;
border: inherit;
border-right: 0;
border-bottom: 0;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.awesomplete > ul > li {
position: relative;
padding: .2em .5em;
cursor: pointer;
word-break: keep-all;
}

2
_server/thirdparty/awesomplete.min.js vendored Normal file

File diff suppressed because one or more lines are too long

158
_server/thirdparty/caret-position.js vendored Normal file
View File

@ -0,0 +1,158 @@
/* jshint browser: true */
(function () {
// We'll copy the properties below into the mirror div.
// Note that some browsers, such as Firefox, do not concatenate properties
// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),
// so we have to list every single property explicitly.
var properties = [
'direction', // RTL support
'boxSizing',
'width', // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does
'height',
'overflowX',
'overflowY', // copy the scrollbar for IE
'borderTopWidth',
'borderRightWidth',
'borderBottomWidth',
'borderLeftWidth',
'borderStyle',
'paddingTop',
'paddingRight',
'paddingBottom',
'paddingLeft',
// https://developer.mozilla.org/en-US/docs/Web/CSS/font
'fontStyle',
'fontVariant',
'fontWeight',
'fontStretch',
'fontSize',
'fontSizeAdjust',
'lineHeight',
'fontFamily',
'textAlign',
'textTransform',
'textIndent',
'textDecoration', // might not make a difference, but better be safe
'letterSpacing',
'wordSpacing',
'tabSize',
'MozTabSize'
];
var isBrowser = (typeof window !== 'undefined');
var isFirefox = (isBrowser && window.mozInnerScreenX != null);
function getCaretCoordinates(element, position, options) {
if (!isBrowser) {
throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser');
}
var debug = options && options.debug || false;
if (debug) {
var el = document.querySelector('#input-textarea-caret-position-mirror-div');
if (el) el.parentNode.removeChild(el);
}
// The mirror div will replicate the textarea's style
var div = document.createElement('div');
div.id = 'input-textarea-caret-position-mirror-div';
document.body.appendChild(div);
var style = div.style;
var computed = window.getComputedStyle ? window.getComputedStyle(element) : element.currentStyle; // currentStyle for IE < 9
var isInput = element.nodeName === 'INPUT';
// Default textarea styles
style.whiteSpace = 'nowrap';
style.zIndex = 2000;
if (!isInput)
style.wordWrap = 'break-word'; // only for textarea-s
// Position off-screen
style.position = 'absolute'; // required to return coordinates properly
if (!debug)
style.visibility = 'hidden'; // not 'display: none' because we want rendering
// Transfer the element's properties to the div
properties.forEach(function (prop) {
if (isInput && prop === 'lineHeight') {
// Special case for <input>s because text is rendered centered and line height may be != height
if (computed.boxSizing === "border-box") {
var height = parseInt(computed.height);
var outerHeight =
parseInt(computed.paddingTop) +
parseInt(computed.paddingBottom) +
parseInt(computed.borderTopWidth) +
parseInt(computed.borderBottomWidth);
var targetHeight = outerHeight + parseInt(computed.lineHeight);
if (height > targetHeight) {
style.lineHeight = height - outerHeight + "px";
} else if (height === targetHeight) {
style.lineHeight = computed.lineHeight;
} else {
style.lineHeight = 0;
}
} else {
style.lineHeight = computed.height;
}
} else {
style[prop] = computed[prop];
}
});
if (!isInput)
style.whiteSpace = 'pre-wrap';
if (isFirefox) {
// Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275
if (element.scrollHeight > parseInt(computed.height))
style.overflowY = 'scroll';
} else {
style.overflow = 'hidden'; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'
}
div.textContent = element.value.substring(0, position);
// The second special handling for input type="text" vs textarea:
// spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037
if (isInput)
div.textContent = div.textContent.replace(/\s/g, '\u00a0');
var span = document.createElement('span');
// Wrapping must be replicated *exactly*, including when a long word gets
// onto the next line, with whitespace at the end of the line before (#7).
// The *only* reliable way to do that is to copy the *entire* rest of the
// textarea's content into the <span> created at the caret position.
// For inputs, just '.' would be enough, but no need to bother.
span.textContent = element.value.substring(position) || '.'; // || because a completely empty faux span doesn't render at all
div.appendChild(span);
var coordinates = {
top: span.offsetTop + parseInt(computed['borderTopWidth']),
left: span.offsetLeft + parseInt(computed['borderLeftWidth']),
height: parseInt(computed['lineHeight'])
};
if (debug) {
span.style.backgroundColor = '#aaa';
} else {
document.body.removeChild(div);
}
return coordinates;
}
if (typeof module != 'undefined' && typeof module.exports != 'undefined') {
module.exports = getCaretCoordinates;
} else if(isBrowser) {
window.getCaretCoordinates = getCaretCoordinates;
}
}());

4
_server/thirdparty/color.all.min.js vendored Normal file

File diff suppressed because one or more lines are too long

305
_server/thirdparty/jsColor.js vendored Normal file
View File

@ -0,0 +1,305 @@
// ------ ColorPicker ------ //
(function (window) {
window.jsColorPicker = function(selectors, config) {
var renderCallback = function(colors, mode) {
var options = this,
input = options.input,
patch = options.patch,
RGB = colors.RND.rgb,
HSL = colors.RND.hsl,
AHEX = options.isIE8 ? (colors.alpha < 0.16 ? '0' : '') +
(Math.round(colors.alpha * 100)).toString(16).toUpperCase() + colors.HEX : '',
RGBInnerText = RGB.r + ',' + RGB.g + ',' + RGB.b,
RGBAText = RGBInnerText + ',' + colors.alpha,
isAlpha = colors.alpha !== 1 && !options.isIE8,
colorMode = input.getAttribute('data-colorMode');
patch.style.cssText =
'color:' + (colors.rgbaMixCustom.luminance > 0.22 ? '#222' : '#ddd') + ';' + // Black...???
'background-color: rgba(' + RGBAText + ');' +
'filter:' + (options.isIE8 ? 'progid:DXImageTransform.Microsoft.gradient(' + // IE<9
'startColorstr=#' + AHEX + ',' + 'endColorstr=#' + AHEX + ')' : '');
input.value = RGBAText;
if (options.displayCallback) {
options.displayCallback(colors, mode, options);
}
},
extractValue = function(elm) {
var val = elm.value || elm.getAttribute('value') || elm.style.backgroundColor || "0,0,0,1";
if (/^[0-9 ]+,[0-9 ]+,[0-9 ]+,[0-9. ]+$/.test(val)) return "rgba("+val+")";
if (/^[0-9 ]+,[0-9 ]+,[0-9 ]+$/.test(val)) return "rgba("+val+",1)";
return null;
},
actionCallback = function(event, action) {
var options = this,
colorPicker = colorPickers.current;
if (action === 'toMemory') {
var memos = colorPicker.nodes.memos,
backgroundColor = '',
opacity = 0,
cookieTXT = [];
for (var n = 0, m = memos.length; n < m; n++) {
backgroundColor = memos[n].style.backgroundColor;
opacity = memos[n].style.opacity;
opacity = Math.round((opacity === '' ? 1 : opacity) * 100) / 100;
cookieTXT.push(backgroundColor.
replace(/, /g, ',').
replace('rgb(', 'rgba(').
replace(')', ',' + opacity + ')')
);
}
cookieTXT = '\'' + cookieTXT.join('\',\'') + '\'';
ColorPicker.docCookies('colorPickerMemos' + (options.noAlpha ? 'NoAlpha' : ''), cookieTXT);
} else if (action === 'resizeApp') {
ColorPicker.docCookies('colorPickerSize', colorPicker.color.options.currentSize);
} else if (action === 'modeChange') {
var mode = colorPicker.color.options.mode;
ColorPicker.docCookies('colorPickerMode', mode.type + '-' + mode.z);
}
},
createInstance = function(elm, config) {
var initConfig = {
klass: window.ColorPicker,
input: elm,
patch: elm,
isIE8: !!document.all && !document.addEventListener, // Opera???
// *** animationSpeed: 200,
// *** draggable: true,
margin: {left: -1, top: 2},
customBG: '#FFFFFF',
// displayCallback: displayCallback,
/* --- regular colorPicker options from this point --- */
color: extractValue(elm),
initStyle: 'display: none',
mode: ColorPicker.docCookies('colorPickerMode') || 'hsv-h',
// memoryColors: (function(colors, config) {
// return config.noAlpha ?
// colors.replace(/\,\d*\.*\d*\)/g, ',1)') : colors;
// })($.docCookies('colorPickerMemos'), config || {}),
memoryColors: ColorPicker.docCookies('colorPickerMemos' +
((config || {}).noAlpha ? 'NoAlpha' : '')),
size: ColorPicker.docCookies('colorPickerSize') || 1,
renderCallback: renderCallback,
actionCallback: actionCallback
};
for (var n in config) {
initConfig[n] = config[n];
}
return new initConfig.klass(initConfig);
},
doEventListeners = function(elm, multiple, off) {
var onOff = off ? 'removeEventListener' : 'addEventListener',
inputListener = function(e) {
var index = multiple ? Array.prototype.indexOf.call(elms, this) : 0,
colorPicker = colorPickers[index] ||
(colorPickers[index] = createInstance(this, config)),
options = colorPicker.color.options;
options.color = extractValue(elm); // brings color to default on reset
//检查颜色合法性
if (options.color != null && options.color == options.color.match(/rgba\([0-9 ]+,[0-9 ]+,[0-9 ]+,[0-9. ]+\)/)[0]) {
var chec = options.color.match(/[0-9.]+/g);
if (chec.length != 4)
return;
for (var i = 0; i < 3; i++) {
if (chec[i] != chec[i].match(/\d+/)[0] || +chec[i] < 0 || +chec[i] > 255)
return;
}
if (chec[3] != chec[3].match(/\d+(\.\d+)?/)[0] || parseFloat(chec[3]) > 1 || parseFloat(chec[3] < 0))
return;
if (!multiple) {
colorPicker.setColor(extractValue(elm), undefined, undefined, true);
colorPicker.saveAsBackground();
}
colorPickers.current = colorPickers[index];
}
},
createListener = function() {
elm = document.getElementById("colorPicker");
var input = elm,
position = window.ColorPicker.getOrigin(input),
index = multiple ? Array.prototype.indexOf.call(elms, elm) : 0,
colorPicker = colorPickers[index] ||
(colorPickers[index] = createInstance(elm, config)),
options = colorPicker.color.options,
colorPickerUI = colorPicker.nodes.colorPicker,
appendTo = (options.appendTo || document.body),
isStatic = /static/.test(window.getComputedStyle(appendTo).position),
atrect = isStatic ? {left: 0, top: 0} : appendTo.getBoundingClientRect(),
waitTimer = 0;
options.color = extractValue(elm); // brings color to default on reset
colorPickerUI.style.cssText =
'position: absolute;' + (!colorPickers[index].cssIsReady ? 'display: none;' : '') +
'left:' + (position.left + options.margin.left - atrect.left) + 'px;' +
'top:' + (position.top + +input.offsetHeight + options.margin.top - atrect.top) + 'px;';
if (!multiple) {
options.input = elm;
options.patch = elm; // check again???
colorPicker.setColor(extractValue(elm), undefined, undefined, true);
colorPicker.saveAsBackground();
}
colorPickers.current = colorPickers[index];
appendTo.appendChild(colorPickerUI);
waitTimer = setInterval(function() { // compensating late style on onload in colorPicker
if (colorPickers.current.cssIsReady) {
waitTimer = clearInterval(waitTimer);
colorPickerUI.style.display = 'block';
}
}, 10);
},
hideListener = function(e) {
var colorPicker = colorPickers.current,
colorPickerUI = (colorPicker ? colorPicker.nodes.colorPicker : undefined),
animationSpeed = colorPicker ? colorPicker.color.options.animationSpeed : 0,
isColorPicker = colorPicker && (function(elm) {
while (elm) {
if ((elm.className || '').indexOf('cpPanel') !== -1) return elm;
elm = elm.parentNode;
}
return false;
})(e.target),
inputIndex = Array.prototype.indexOf.call(elms, e.target);
if (isColorPicker && Array.prototype.indexOf.call(colorPickers, isColorPicker)) {
if (e.target === colorPicker.nodes.exit) {
colorPickerUI.parentNode.style.display = 'none';
document.activeElement.blur();
} else {
// ...
}
} else if (inputIndex !== -1) {
// ...
} else if (colorPickerUI) {
colorPickerUI.parentNode.style.display = 'none';
}
};
elm[onOff]('input', inputListener);
window.jsColorPicker.create = createListener;
},
// this is a way to prevent data binding on HTMLElements
colorPickers = window.jsColorPicker.colorPickers || [],
elms = document.querySelectorAll(selectors),
testColors = new window.Colors({customBG: config.customBG, allMixDetails: true});
window.jsColorPicker.colorPickers = colorPickers;
for (var n = 0, m = elms.length; n < m; n++) {
var elm = elms[n];
if (config === 'destroy') {
doEventListeners(elm, (config && config.multipleInstances), true);
if (colorPickers[n]) {
colorPickers[n].destroyAll();
}
} else {
var color = extractValue(elm);
var value = color.split('(');
testColors.setColor(color);
if (config && config.init) {
config.init(elm, testColors.colors);
}
elm.setAttribute('data-colorMode', value[1] ? value[0].substr(0, 3) : 'HEX');
doEventListeners(elm, (config && config.multipleInstances), false);
if (config && config.readOnly) {
elm.readOnly = true;
}
}
};
return window.jsColorPicker.colorPickers;
};
window.ColorPicker.docCookies = function(key, val, options) {
var encode = encodeURIComponent, decode = decodeURIComponent,
cookies, n, tmp, cache = {},
days;
if (val === undefined) { // all about reading cookies
cookies = document.cookie.split(/;\s*/) || [];
for (n = cookies.length; n--; ) {
tmp = cookies[n].split('=');
if (tmp[0]) cache[decode(tmp.shift())] = decode(tmp.join('=')); // there might be '='s in the value...
}
if (!key) return cache; // return Json for easy access to all cookies
else return cache[key]; // easy access to cookies from here
} else { // write/delete cookie
options = options || {};
if (val === '' || options.expires < 0) { // prepare deleteing the cookie
options.expires = -1;
// options.path = options.domain = options.secure = undefined; // to make shure the cookie gets deleted...
}
if (options.expires !== undefined) { // prepare date if any
days = new Date();
days.setDate(days.getDate() + options.expires);
}
document.cookie = encode(key) + '=' + encode(val) +
(days ? '; expires=' + days.toUTCString() : '') +
(options.path ? '; path=' + options.path : '') +
(options.domain ? '; domain=' + options.domain : '') +
(options.secure ? '; secure' : '');
}
};
})(this);
// Added
jsColorPicker('input.color', {
customBG: '#222',
readOnly: false,
// patch: false,
init: function(elm, colors) { // colors is a different instance (not connected to colorPicker)
elm.style.backgroundColor = elm.value;
elm.style.color = colors.rgbaMixCustom.luminance > 0.22 ? '#222' : '#ddd';
},
appendTo: document.getElementById("colorPanel"),
size: 1,
});
function openColorPicker(px, py, callback) {
window.jsColorPicker.confirm = callback;
var colorPanel = document.getElementById('colorPanel');
if (colorPanel.style.display=='none' && px != null && py != null) {
colorPanel.style.display = "inline-block";
colorPanel.style.left = px + 'px';
colorPanel.style.top = py + 'px';
window.jsColorPicker.create();
}
else {
colorPanel.style.display = 'none';
delete window.jsColorPicker.confirm;
}
}
function confirmColor() {
var colorPicker = document.getElementById("colorPicker");
if (window.jsColorPicker.confirm) { /* 存在块 */
// 检测需要是合法数值
var val = colorPicker.value;
if (/^[0-9 ]+,[0-9 ]+,[0-9 ]+,[0-9. ]+$/.test(val)) val = "rgba("+val+")";
else if (/^[0-9 ]+,[0-9 ]+,[0-9 ]+$/.test(val)) val = "rgba("+val+",1)";
else val = null;
if (val) window.jsColorPicker.confirm(val);
}
else {
colorPicker.select();
document.execCommand("Copy");
}
colorPanel.style.display = 'none';
delete window.jsColorPicker.confirm;
}
// ------ AutoCompletion ------

501
editor-mobile.html Normal file
View File

@ -0,0 +1,501 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,initial-scale=1,user-scalable=no" />
<link href="_server/css/editor_mobile.css" rel="stylesheet">
<link href="_server/CodeMirror/codemirror.css" rel="stylesheet">
<link href="_server/thirdparty/awesomplete.css" rel="stylesheet">
<link id="color_css" rel="stylesheet">
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
</head>
<body>
<script>
if(innerWidth>innerHeight){ //pic:1242*2208 | chrome info:1340*2380
confirm('宽大于高的设备请使用正常版本的editor, 点击确定跳转')?(window.location='./editor.html'):'';
}
if (location.protocol.indexOf("http")!=0) {
alert("请在启动服务中打开本编辑器!不然包括编辑在内的绝大多数功能都无法使用。");
}
</script>
<div class="main">
<div id="left" style="z-index:-1;opacity: 0;"><!-- map -->
<div id="arrEditor">
<table class="col" id='arrColMark'></table>
<table class="row" id='arrRowMark'></table>
<div id="mapEditArea">
<textarea cols="10" rows="10" id="pout"></textarea>
</div>
<div id="editTip">
<input id='newFileName' placeholder="新楼层id" style="width: 100px"/>
<span style="vertical-align: bottom"></span>
<input id='newMapWidth' style="width: 20px"/>
<span style="vertical-align: bottom"></span>
<input id='newMapHeight' style="width: 20px"/>
<input type="checkbox" id='newMapStatus' checked='checked' style='vertical-align: bottom'/>
<span style='vertical-align: bottom;'>保留楼层属性</span>
<br/>
<input type="button" value="新建空白地图" id='newMap'/>
</div>
<div id='editBtns'>
<input type="button" value="导出并复制地图" id="exportMap"/>
<input type="button" value="导入地图" id="importMap"/>
<input type="button" value="清除地图" id='clearMapButton'/>
<input type="button" value="删除地图" id="deleteMap"/>
</div>
<input type="button" value="批量创建空白地图 ↓" id='newMaps'/>
<div id='newFloors' style='display:none'>
<span style="vertical-align: bottom">楼层ID格式: </span>
<input id='newFloorIds' style="width: 70px" value='MT${i}'/>
<br/>
<span style="vertical-align: bottom">地图中文名格式: </span>
<input id='newFloorTitles' style="width: 100px" value='主塔 ${i} 层'/>
<br/>
<span style="vertical-align: bottom">状态栏名称: </span>
<input id='newFloorNames' style="width: 70px" value='${i}'/>
<br/>
<span style="vertical-align: bottom"></span>
<input id='newMapsWidth' style="width: 20px"/>
<span style="vertical-align: bottom"></span>
<input id='newMapsHeight' style="width: 20px"/>
<input type="checkbox" id='newMapsStatus' checked='checked' style='vertical-align: bottom'/>
<span style='vertical-align: bottom; margin-left: -4px'>保留楼层属性</span>
<br/>
<span style="vertical-align: bottom">从 i=</span>
<input id='newMapsFrom' value="1" style="width: 20px"/>
<span style="vertical-align: bottom"></span>
<input id='newMapsTo' value="5" style="width: 20px"/>
<input type="button" value="确认创建" id='createNewMaps'>
</div>
</div>
</div>
<div id="left1" class='leftTab' style="z-index:-1;opacity: 0;"><!-- appendpic -->
<h3 class="leftTabHeader">追加素材</h3>
<div class="leftTabContent">
<p>
<input id="selectFileBtn" type="button" value="导入文件到画板"/>
<select id="selectAppend"></select>
<!-- ["terrains", "animates", "enemys", "enemy48", "items", "npcs", "npc48"] -->
<input id="appendConfirm" type="button" value="追加"/>
<input id="quickAppendConfirm" type="button" value="快速追加"/>
<span style="font-size: 13px">自动注册</span><input id="appendRegister" type="checkbox" checked/>
</p>
<p>
色相:<input id='changeColorInput' type="range" min="0" max="12" step="1" value="0" list="huelists" style="width: 60%;margin-left: 3%;vertical-align: middle">
<datalist id="huelists" style="display: none">
<option value="0"/><option value="1"/><option value="2"/>
<option value="3"/><option value="4"/><option value="5"/>
<option value="6"/><option value="7"/><option value="8"/>
<option value="9"/><option value="10"/><option value="11"/><option value="12"/>
</datalist>
</p>
<div id="appendPicCanvas" style="position:relative;overflow: auto;height:470px;">
<canvas style="position:absolute"></canvas><!-- 用于画出灰白相间背景 -->
<canvas style="position:absolute"></canvas><!-- 用于画出选中文件 -->
<canvas style="position:absolute;z-index:100"></canvas><!-- 用于响应鼠标点击 -->
<canvas style="position:absolute;display:none;"></canvas><!-- 画出追加后的sprite用于储存 -->
<div id="appendPicSelection">
<div class="appendSelection"><span style="top: 0; left: 2px;">1</span></div>
<div class="appendSelection"><span style="top: 0; left: 14px;">2</span></div>
<div class="appendSelection"><span style="top: 12px; left: 2px;">3</span></div>
<div class="appendSelection"><span style="top: 12px; left: 14px;">4</span></div>
</div>
</div>
</div>
</div>
<div id="left2" class='leftTab' style="z-index:-1;opacity: 0;"><!-- loc -->
<h3 class="leftTabHeader">地图选点&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.uifunctions.addAutoEvent()">添加自动事件页</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('loc')">配置表格</button>
</h3>
<div class="leftTabContent">
<p id='pos_a6771a78_a099_417c_828f_0a24851ebfce' style="margin-left: 15px">0,0</p>
<div class='etable'>
<table>
<tbody id='table_3d846fc4_7644_44d1_aa04_433d266a73df'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="left3" class='leftTab' style="z-index:-1;opacity: 0;"><!-- enemyitem -->
<h3 class="leftTabHeader">图块属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('enemyitem')">配置表格</button>
</h3>
<div class="leftTabContent">
<div id="enemyItemTable"><!-- enemy and item -->
<div class='etable'>
<table>
<tbody id='table_a3f03d4c_55b8_4ef6_b362_b345783acd72'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div style="margin-top: -10px; margin-bottom: 10px">
<button id="copyEnemyItem">复制属性</button>
<button id="pasteEnemyItem">粘贴属性</button>
<button id="clearEnemyItem">清空属性</button>
<button id="clearAllEnemyItem">批量清空属性</button>
</div>
</div>
<div id='newIdIdnum'><!-- id and idnum -->
<input placeholder="新id唯一标识符"/>
<input placeholder="新idnum10000以内数字"/>
<button>确定</button>
<br/>
<button style="margin-top: 10px">自动注册</button>
<button style="margin-top: 10px; margin-left: 5px">删除此素材</button>
<button style="margin-top: 10px; margin-left: 5px">以此素材为模板追加</button>
</div>
<div id='changeId'><!-- id and idnum -->
<input placeholder="修改图块id为" style="width: 100px"/>
<button>确定</button>
<button style="margin-left: 5px">删除此素材</button>
<button style="margin-left: 5px">以此素材为模板追加</button>
</div>
</div>
</div>
<div id="left4" class='leftTab' style="z-index:-1;opacity: 0;"><!-- floor -->
<h3 class="leftTabHeader">楼层属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('floor')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
<table>
<tbody id='table_4a3b1b09_b2fb_4bdf_b9ab_9f4cdac14c74'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div id='changeFloorId'><!-- id and idnum -->
<input placeholder="修改floorId为"/>
<button>确定</button>
</div>
<div id='changeFloorSize' style="font-size: 13px;">
修改地图大小:宽<input style="width: 25px;" value="13" />,高<input style="width: 25px;" value="13" />
偏移x<input style="width: 25px;" value="0" /> y<input style="width: 25px;" value="0" />
<button>确定</button>
</div>
</div>
</div>
<div id="left5" class='leftTab' style="z-index:-1;opacity: 0;"><!-- tower -->
<h3 class="leftTabHeader">全塔属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('tower')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
<table>
<tbody id='table_b6a03e4c_5968_4633_ac40_0dfdd2c9cde5'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="left6" class='leftTab' style="z-index:-1;opacity: 0;">
<div style="position: relative; height: 95%"><!-- eventsEditor -->
<h3>事件编辑器 &nbsp;&nbsp;
<!--
<button onclick="editor_blockly.showXML()">Show XML</button>
<button onclick="editor_blockly.runCode()">console.log(obj=code)</button>
-->
<button onclick="editor_blockly.confirm()">确认</button>
<button onclick="editor_blockly.confirm(true)">应用</button>
<button id='blocklyParse' onclick="editor_blockly.parse()">解析</button>
<button onclick="editor_blockly.cancel()">取消</button>
<!-- 手机端放不下,因此不显示搜索框 -->
<div style="display: none">
<div class="searchLogo"></div>
<input type="text" id="searchBlock" placeholder="搜索事件块..."/>
</div>
<button class="cpPanel" onclick="editor_blockly.selectPointFromButton()">地图选点</button>
<button class="cpPanel" onclick="editor.uievent.searchUsedFlags()" style="margin-left:5px">变量出现位置搜索</button>
<input type="checkbox" class="cpPanel" id="blocklyReplace" onchange="editor_blockly.triggerReplace()" style="margin-left: 10px" />
<span class="cpPanel" style="margin-left: -4px; font-size: 13px">开启中文名替换</span>
<input type="checkbox" class="cpPanel" id="blocklyExpandCompare" onchange="editor_blockly.triggerExpandCompare()" style="margin-left: 10px" />
<span class="cpPanel" style="margin-left: -4px; font-size: 13px">展开值块逻辑运算</span>
<xml id="toolbox" style="display:none">
</xml>
</h3>
<div style="position: relative;height: 100%">
<div id="blocklyArea">
<div id="blocklyDiv"></div>
</div>
<textarea id="codeArea" spellcheck="false"></textarea>
</div>
</div>
</div>
<div id="colorPanel" class="cpPanel" style="display: none">
<input class="color" id="colorPicker" value="255,215,0,1"/>
<button onclick="confirmColor()">确定</button>
</div>
<div id="left7" style="z-index:-1;opacity: 0;"><!-- 多行文本编辑器 -->
<div>
<button onclick="editor_multi.confirm()">确认</button>
<button onclick="editor_multi.cancel()">取消</button>
<button onclick="editor_multi.confirm(true)">应用</button>
<button onclick="editor_multi.format()">格式化</button>
<button id="editor_multi_preview" style="display: none;">预览</button>
<input type="checkbox" onclick="editor_multi.toggerLint()" id="lintCheckbox"
style="vertical-align: middle;margin-left:6px"/>
<span style="vertical-align: middle; margin-left: -3px">语法检查</span>
<select id="codemirrorCommands" onchange="editor_multi.doCommand(this)" style="vertical-align: middle; margin-left: 6px;"></select>
<span>字体大小</span>
<input style="width: 40px" type="number" onchange="editor_multi.setFontSize()" id="editor_multi_fontsize" />
<span>字体加粗</span>
<input style="width: 40px" type="checkbox" onchange="editor_multi.setFontSize()" id="editor_multi_fontweight" />
</div>
<textarea id="multiLineCode" name="multiLineCode"></textarea>
</div>
<div id="left8" class='leftTab' style="z-index:-1;opacity: 0;"><!-- functions -->
<h3 class="leftTabHeader">脚本编辑&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('functions')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
<table>
<tbody id='table_e260a2be_5690_476a_b04e_dacddede78b3'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="left9" class='leftTab' style="z-index:-1;opacity: 0;"><!-- commonevent -->
<h3 class="leftTabHeader">公共事件&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.table.addfunc()">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('commonevent')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
<table>
<tbody id='table_b7bf0124_99fd_4af8_ae2f_0017f04a7c7d'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="left10" class='leftTab' style="z-index:-1;opacity: 0;"><!-- plugins -->
<h3 class="leftTabHeader">插件编写&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.table.addfunc()">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('plugins')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
<table>
<tbody id='table_e2c034ec_47c6_48ae_8db8_4f8f32fea2d6'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="mid">
<div class="col" id='mapColMark'></div>
<div class="row" id='mapRowMark'></div>
<div class="map" id="mapEdit">
<canvas class='gameCanvas' id='ebm'></canvas>
<canvas class='gameCanvas' id='efg'></canvas>
<canvas class='gameCanvas' id='eui' style='z-index:100'></canvas>
</div>
</div>
<div id="mid2" style="display: none">
<p style="margin: 10px"><span id='lastUsedTitle'></span> <button id='clearLastUsedBtn'>清除</button></p>
<div class="map" style="height: 160px; margin-top: 25px" id="lastUsedDiv">
<canvas class='gameCanvas' id='lastUsed'></canvas>
</div>
</div>
<div id="right" style="z-index:-1;opacity: 0;">
<div id="iconLib">
<div id="iconImages"></div>
<div id="selectBox">
<div id='dataSelection' style="display:none"></div>
</div>
</div>
<button id="iconExpandBtn"></button>
</div>
<div id="down">
<div style="margin:0.5rem">
<div class="tools">
<div id="tip"></div>
<span id='mobileview'>
<input type="button" value="数据区"/>
<input type="button" value="地图区"/>
<br />
<input type="button" value="素材库"/>
<input type="button" value="前往游戏" onclick="window.location='./index.html'"/>
</span>
<div id="menuDiv">
<div id="midMenu" style="display:none">
<div id='extraEvent' class='menuitem' style="display:none"><div class="menuitem-content"></div></div>
<div id='chooseThis' class="menuitem"><div class="menuitem-content">选中此点</div></div>
<div id='chooseInRight' class="menuitem"><div class="menuitem-content">在素材区选中此图块</div></div>
<div id='copyLoc' class="menuitem"><div class="menuitem-content">复制此事件</div></div>
<div id='pasteLoc' class="menuitem"><div class="menuitem-content">粘贴到此事件</div></div>
<div id='clearEvent' class="menuitem"><div class="menuitem-content">仅清空此点事件</div></div>
<div id='clearLoc' class="menuitem"><div class="menuitem-content">清空此点及事件</div></div>
</div>
</div>
<select id="editModeSelect" style="font-size: 12px">
<option value="map">地图编辑</option>
<option value="loc">地图选点</option>
<option value="enemyitem">图块属性</option>
<option value="floor">楼层属性</option>
<option value="tower">全塔属性</option>
<option value="functions">脚本编辑</option>
<option value="appendpic">追加素材</option>
<option value="commonevent">公共事件</option>
<option value="plugins">插件编写</option>
</select>
<span style="font-size: 12px"><input type="checkbox" id="showMovable"/>通行度</span>
<select id="editorTheme" style="font-size: 11px;">
<option value="editor_color">默认白</option>
<option value="editor_color_dark">夜间黑</option>
</select>
<select id="brushMod" style="clear:right">
<option value="line">画线</option>
<option value="rectangle">画矩形</option>
<option value="tileset">tile平铺</option>
<option value="fill">填充模式</option>
</select>
<select id="layerMod" style="float:left;margin-right:3px">
<option value="bgmap">背景层</option>
<option value="map" selected>事件层</option>
<option value="fgmap">前景层</option>
</select>
<div id="viewportButtons" style="float:left">
<input type="button" style="padding:1px 1px" value="←"/>
<input type="button" style="padding:1px 6px" value="↑"/>
<input type="button" style="padding:1px 6px" value="↓"/>
<input type="button" style="padding:1px 1px" value="→"/>
<input type="button" id="bigmapBtn" value="大地图" style="margin-left: 5px"/>
</div>
<select id="selectFloor" style="clear:left"></select>
<input type="button" value="选层" id='selectFloorBtn'/>
<input type="button" value="保存地图" id='saveFloor'/>
<input type="button" value="后退" id="undoFloor" style="display: none;"/>
<input type="button" value="帮助文档" id="openDoc" />
<span id='mobileeditdata' style="display:none">
<input type="button" value="编辑"/>
<input type="button" value="显示完整名称" style="display: none;"/>
<input type="button" value="显示完整注释"/>
</span>
</div>
</div>
</div>
</div>
<!-- <script>/* -->
<div id="gameInject" style='display: none'></div>
<!-- UI预览 & 地图选点 -->
<div id='uieventDiv' style='display: none'>
<div id='uieventDialog'>
<div id="uieventHead">
<span id="uieventTitle"></span>
<select id="uieventSelect" style="margin-left: 20px"></select>
<button id="uieventNo">关闭</button>
<button id="uieventYes">确定</button>
</div>
<hr style="clear: both; margin-top: 0"/>
<div id='uieventBody'>
<canvas class='gameCanvas' id='uievent'></canvas>
<div id="selectPointBox"></div>
<div id="uieventExtraBody" style="display: none"></div>
</div>
<div id="selectPoint">
<select id="selectPointFloor"></select>
<div id="selectPointButtons">
<input type="button" value="←"/>
<input type="button" value="↑"/>
<input type="button" value="↓"/>
<input type="button" value="→"/>
<input type="button" value="大地图" style="margin-left: 5px"/>
<input type="button" value="复制楼层ID">
</div>
</div>
</div>
</div>
<!-- */</script> -->
<!-- =========================================================== -->
<!-- <script src='_server/vendor/vue.min.js'></script> -->
<!-- <script src="https://cdn.bootcss.com/vue/2.5.13/vue.js"></script> -->
<!-- <script src='_server/vendor/polyfill.min.js'></script> -->
<script src='_server/fs.js'></script>
<script src='_server/editor_config.js'></script>
<script src='_server/editor_util.js'></script>
<script src='_server/editor_game.js'></script>
<script src='_server/editor_file.js'></script>
<script src='_server/editor_table.js'></script>
<script src='_server/editor_mode.js'></script>
<script src='_server/editor_ui.js'></script>
<script src='_server/editor_uievent.js'></script>
<script src='_server/editor_mappanel.js'></script>
<script src='_server/editor_datapanel.js'></script>
<script src='_server/editor_materialpanel.js'></script>
<script src='_server/editor_listen.js'></script>
<script src='libs/thirdparty/lz-string.min.js'></script>
<script src='libs/thirdparty/localforage.min.js'></script>
<script src='libs/thirdparty/zip.min.js'></script>
<script src='_server/editor.js'></script>
<script>
editor.isMobile=true;
editor.init(function () {
editor.listen();
editor.mode_listen();
editor.mobile_listen();
});
//main.listen();
</script>
<!-- hightlight textarea -->
<script src='_server/editor_multi.js'></script>
<!-- blockly -->
<script src="_server/blockly/Converter.bundle.min.js"></script>
<script src="_server/blockly/blockly_compressed.js"></script>
<script src="_server/blockly/blocks_compressed.js"></script>
<script src="_server/blockly/javascript_compressed.js"></script>
<script src="_server/blockly/zh-hans.js"></script>
<script src='_server/MotaActionParser.js'></script>
<script src='_server/editor_blocklyconfig.js'></script>
<script src='_server/editor_blockly.js'></script>
<!-- codemirror -->
<script src="_server/CodeMirror/codeMirror.bundle.min.js"></script>
<script src="_server/CodeMirror/beautify.min.js"></script>
<script src="_server/CodeMirror/jshint.min.js"></script>
<script src="_server/CodeMirror/codeMirror.plugin.min.js"></script>
<script src="_server/CodeMirror/acorn.min.js"></script>
<script src="_server/CodeMirror/defs.js"></script>
<script src="_server/CodeMirror/tern.min.js"></script>
<!-- thirdparty -->
<script src="_server/thirdparty/color.all.min.js"></script>
<script src="_server/thirdparty/awesomplete.min.js"></script>
<script src="_server/thirdparty/caret-position.js"></script>
<script src="_server/thirdparty/jsColor.js"></script>
</body>
</html>

485
editor.html Normal file
View File

@ -0,0 +1,485 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href="_server/css/editor.css" rel="stylesheet">
<link href="_server/CodeMirror/codemirror.css" rel="stylesheet">
<link href="_server/thirdparty/awesomplete.css" rel="stylesheet">
<link id="color_css" rel="stylesheet">
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
</head>
<body>
<script>
if(innerWidth<innerHeight){ //pic:1242*2208 | chrome info:1340*2380
confirm('高大于宽的设备请使用移动版本的editor, 点击确定跳转')?(window.location='./editor-mobile.html'):'';
}
if (location.protocol.indexOf("http")!=0) {
alert("请在启动服务中打开本编辑器!不然包括编辑在内的绝大多数功能都无法使用。");
}
</script>
<div class="main">
<div id="left" style="z-index:-1;opacity: 0;"><!-- map -->
<div id="arrEditor">
<table class="col" id='arrColMark'></table>
<table class="row" id='arrRowMark'></table>
<div id="mapEditArea">
<textarea cols="10" rows="10" id="pout"></textarea>
</div>
<div id="editTip">
<input type="button" value="新建空白地图" id='newMap'/>
<input id='newFileName' placeholder="新楼层id" style="width: 70px"/>
<span style="vertical-align: bottom"></span>
<input id='newMapWidth' style="width: 20px"/>
<span style="vertical-align: bottom"></span>
<input id='newMapHeight' style="width: 20px"/>
<input type="checkbox" id='newMapStatus' checked='checked' style='vertical-align: bottom'/>
<span style='vertical-align: bottom; margin-left: -4px'>保留楼层属性</span>
</div>
<div id="editBtns">
<input type="button" value="导出并复制地图" id="exportMap"/>
<input type="button" value="从框中导入地图" id="importMap"/>
<input type="button" value="清除地图" id='clearMapButton'/>
<input type="button" value="删除地图" id="deleteMap"/>
</div>
<input type="button" value="批量创建空白地图 ↓" id='newMaps'/>
<div id='newFloors' style='display:none'>
<span style="vertical-align: bottom">楼层ID格式: </span>
<input id='newFloorIds' style="width: 70px" value='MT${i}'/>
<span style="vertical-align: bottom">地图中文名格式: </span>
<input id='newFloorTitles' style="width: 100px" value='主塔 ${i} 层'/>
<br/>
<span style="vertical-align: bottom">状态栏名称: </span>
<input id='newFloorNames' style="width: 70px" value='${i}'/>
<span style="vertical-align: bottom"></span>
<input id='newMapsWidth' style="width: 20px"/>
<span style="vertical-align: bottom"></span>
<input id='newMapsHeight' style="width: 20px"/>
<input type="checkbox" id='newMapsStatus' checked='checked' style='vertical-align: bottom'/>
<span style='vertical-align: bottom; margin-left: -4px'>保留楼层属性</span>
<br/>
<span style="vertical-align: bottom">从 i=</span>
<input id='newMapsFrom' value="1" style="width: 20px"/>
<span style="vertical-align: bottom"></span>
<input id='newMapsTo' value="5" style="width: 20px"/>
<input type="button" value="确认创建" id='createNewMaps'>
</div>
</div>
</div>
<div id="left1" class='leftTab' style="z-index:-1;opacity: 0;"><!-- appendpic -->
<h3 class="leftTabHeader">追加素材</h3>
<div class="leftTabContent">
<p>
<input id="selectFileBtn" type="button" value="导入文件到画板"/>
<select id="selectAppend"></select>
<!-- ["terrains", "animates", "enemys", "enemy48", "items", "npcs", "npc48"] -->
<input id="appendConfirm" type="button" value="追加"/>
<input id="quickAppendConfirm" type="button" value="快速追加"/>
<span style="font-size: 13px">&nbsp;&nbsp;自动注册</span><input id="appendRegister" type="checkbox" checked/>
</p>
<p><small>从V2.7.1开始你可以直接将素材图片拖到对应的素材区将自动追加并注册。同时4x4的道具素材已支持快速追加一次16个。</small></p>
<p>
色相:<input id='changeColorInput' type="range" min="0" max="12" step="1" value="0" list="huelists" style="width: 60%;margin-left: 3%;vertical-align: middle">
<datalist id="huelists" style="display: none">
<option value="0"/><option value="1"/><option value="2"/>
<option value="3"/><option value="4"/><option value="5"/>
<option value="6"/><option value="7"/><option value="8"/>
<option value="9"/><option value="10"/><option value="11"/><option value="12"/>
</datalist>
</p>
<div id="appendPicCanvas" style="position:relative;overflow: auto;height:470px;">
<canvas style="position:absolute"></canvas><!-- 用于画出灰白相间背景 -->
<canvas style="position:absolute"></canvas><!-- 用于画出选中文件 -->
<canvas style="position:absolute;z-index:100"></canvas><!-- 用于响应鼠标点击 -->
<canvas style="position:absolute;display:none;"></canvas><!-- 画出追加后的sprite用于储存 -->
<div id="appendPicSelection">
<div class="appendSelection"><span style="top: 0; left: 2px;">1</span></div>
<div class="appendSelection"><span style="top: 0; left: 14px;">2</span></div>
<div class="appendSelection"><span style="top: 12px; left: 2px;">3</span></div>
<div class="appendSelection"><span style="top: 12px; left: 14px;">4</span></div>
</div>
</div>
</div>
</div>
<div id="left2" class='leftTab' style="z-index:-1;opacity: 0;"><!-- loc -->
<h3 class="leftTabHeader">地图选点&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.uifunctions.addAutoEvent()">添加自动事件页</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('loc')">配置表格</button>
</h3>
<div class="leftTabContent">
<p id='pos_a6771a78_a099_417c_828f_0a24851ebfce' style="margin-left: 15px">0,0</p>
<div class='etable'>
<table>
<tbody id='table_3d846fc4_7644_44d1_aa04_433d266a73df'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="left3" class='leftTab' style="z-index:-1;opacity: 0;"><!-- enemyitem -->
<h3 class="leftTabHeader">图块属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('enemyitem')">配置表格</button>
</h3>
<div class="leftTabContent">
<div id="enemyItemTable"><!-- enemy and item -->
<div class='etable'>
<table>
<tbody id='table_a3f03d4c_55b8_4ef6_b362_b345783acd72'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div style="margin-top: -10px; margin-bottom: 10px">
<button id="copyEnemyItem">复制属性</button>
<button id="pasteEnemyItem">粘贴属性</button>
<button id="clearEnemyItem">清空属性</button>
<button id="clearAllEnemyItem">批量清空属性</button>
</div>
</div>
<div id='newIdIdnum'><!-- id and idnum -->
<input placeholder="新id唯一标识符"/>
<input placeholder="新idnum10000以内数字"/>
<button>确定</button>
<br/>
<button style="margin-top: 10px">自动注册</button>
<button style="margin-top: 10px; margin-left: 5px">删除此素材</button>
<button style="margin-top: 10px; margin-left: 5px">以此素材为模板追加</button>
</div>
<div id='changeId'><!-- id and idnum -->
<input placeholder="修改图块id为" style="width: 100px"/>
<button>确定</button>
<button style="margin-left: 5px">删除此素材</button>
<button style="margin-left: 5px">以此素材为模板追加</button>
</div>
</div>
</div>
<div id="left4" class='leftTab' style="z-index:-1;opacity: 0;"><!-- floor -->
<h3 class="leftTabHeader">楼层属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('floor')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
<table>
<tbody id='table_4a3b1b09_b2fb_4bdf_b9ab_9f4cdac14c74'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div id='changeFloorId'><!-- id and idnum -->
<input placeholder="修改floorId为"/>
<button>确定</button>
</div>
<div id='changeFloorSize' style="font-size: 13px;">
修改地图大小:宽<input style="width: 25px;" value="13" />,高<input style="width: 25px;" value="13" />
偏移x<input style="width: 25px;" value="0" /> y<input style="width: 25px;" value="0" />
<button>确定</button>
</div>
</div>
</div>
<div id="left5" class='leftTab' style="z-index:-1;opacity: 0;"><!-- tower -->
<h3 class="leftTabHeader">全塔属性&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('add')">添加</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('tower')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
<table>
<tbody id='table_b6a03e4c_5968_4633_ac40_0dfdd2c9cde5'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="left6" class='leftTab' style="z-index:-1;opacity: 0;">
<div style="position: relative; height: 95%"><!-- eventsEditor -->
<h3>事件编辑器 &nbsp;&nbsp;
<!--
<button onclick="editor_blockly.showXML()">Show XML</button>
<button onclick="editor_blockly.runCode()">console.log(obj=code)</button>
-->
<button onclick="editor_blockly.confirm()">确认</button>
<button onclick="editor_blockly.confirm(true)">应用</button>
<button id='blocklyParse' onclick="editor_blockly.parse()">解析</button>
<button onclick="editor_blockly.cancel()">取消</button>
<div style="position: relative; display: inline-block; margin-left: 10px">
<div class="searchLogo"></div>
<input type="text" id="searchBlock" placeholder="搜索事件块..."/>
</div>
<button class="cpPanel" onclick="editor_blockly.selectPointFromButton()" style="margin-left:5px">地图选点</button>
<button class="cpPanel" onclick="editor.uievent.searchUsedFlags()" style="margin-left:5px">变量出现位置搜索</button>
<input type="checkbox" class="cpPanel" id="blocklyReplace" onchange="editor_blockly.triggerReplace()" style="margin-left: 10px" />
<span class="cpPanel" style="margin-left: -4px; font-size: 13px">开启中文名替换</span>
<input type="checkbox" class="cpPanel" id="blocklyExpandCompare" onchange="editor_blockly.triggerExpandCompare()" style="margin-left: 10px" />
<span class="cpPanel" style="margin-left: -4px; font-size: 13px">展开值块逻辑运算</span>
<xml id="toolbox" style="display:none">
</xml>
</h3>
<div style="position: relative;height: 100%">
<div id="blocklyArea">
<div id="blocklyDiv"></div>
</div>
<textarea id="codeArea" spellcheck="false"></textarea>
</div>
</div>
</div>
<div id="colorPanel" class="cpPanel" style="display: none">
<input class="color" id="colorPicker" value="255,215,0,1"/>
<button onclick="confirmColor()">确定</button>
</div>
<div id="left7" style="z-index:-1;opacity: 0;"><!-- 多行文本编辑器 -->
<div>
<button onclick="editor_multi.confirm()">确认</button>
<button onclick="editor_multi.cancel()">取消</button>
<button onclick="editor_multi.confirm(true)">应用</button>
<button onclick="editor_multi.format()">格式化</button>
<button id="editor_multi_preview" style="display: none;">预览</button>
<input type="checkbox" onclick="editor_multi.toggerLint()" id="lintCheckbox"
style="vertical-align: middle;margin-left:6px"/>
<span style="vertical-align: middle; margin-left: -3px">语法检查</span>
<select id="codemirrorCommands" onchange="editor_multi.doCommand(this)" style="vertical-align: middle; margin-left: 6px;"></select>
<span>字体大小</span>
<input style="width: 40px" type="number" onchange="editor_multi.setFontSize()" id="editor_multi_fontsize" />
<span>字体加粗</span>
<input style="width: 40px" type="checkbox" onchange="editor_multi.setFontSize()" id="editor_multi_fontweight" />
</div>
<textarea id="multiLineCode" name="multiLineCode"></textarea>
</div>
<div id="left8" class='leftTab' style="z-index:-1;opacity: 0;"><!-- functions -->
<h3 class="leftTabHeader">脚本编辑&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('functions')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
<table>
<tbody id='table_e260a2be_5690_476a_b04e_dacddede78b3'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="left9" class='leftTab' style="z-index:-1;opacity: 0;"><!-- commonevent -->
<h3 class="leftTabHeader">公共事件&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.table.addfunc()">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('commonevent')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
<table>
<tbody id='table_b7bf0124_99fd_4af8_ae2f_0017f04a7c7d'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="left10" class='leftTab' style="z-index:-1;opacity: 0;"><!-- plugins -->
<h3 class="leftTabHeader">插件编写&nbsp;&nbsp;<button onclick="editor.mode.onmode('save')">保存</button>&nbsp;&nbsp;<button onclick="editor.table.addfunc()">添加</button>&nbsp;&nbsp;<button onclick="editor.mode.changeDoubleClickModeByButton('delete')">删除</button>&nbsp;&nbsp;<button onclick="editor_multi.editCommentJs('plugins')">配置表格</button>
</h3>
<div class="leftTabContent">
<div class='etable'>
<table>
<tbody id='table_e2c034ec_47c6_48ae_8db8_4f8f32fea2d6'>
<tr>
<td>条目</td>
<td>注释</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="mid">
<table class="col" id='mapColMark'></table>
<table class="row" id='mapRowMark'></table>
<div class="map" id="mapEdit">
<canvas class='gameCanvas' id='ebm'></canvas>
<canvas class='gameCanvas' id='efg'></canvas>
<canvas class='gameCanvas' id='eui' style='z-index:100'></canvas>
</div>
<div class="tools">
<div id="tip"></div>
<select id="editModeSelect" style="font-size: 12px">
<option value="map">地图编辑(Z)</option>
<option value="loc">地图选点(X)</option>
<option value="enemyitem">图块属性(C)</option>
<option value="floor">楼层属性(V)</option>
<option value="tower">全塔属性(B)</option>
<option value="functions">脚本编辑(N)</option>
<option value="appendpic">追加素材(M)</option>
<option value="commonevent">公共事件(,)</option>
<option value="plugins">插件编写(.)</option>
</select>
<span style="font-size: 12px"><input type="checkbox" id="showMovable" style="margin-left:0;margin-right: 2px"/>通行度</span>
<select id="editorTheme" style="margin-left: 0; font-size: 11px;">
<option value="editor_color">默认白</option>
<option value="editor_color_dark">夜间黑</option>
</select>
<br/>
<span style="font-size: 12px;">
<input type="radio" id="brushMod" name="brushMod" value="line" checked="checked" />线
<input type="radio" id="brushMod2" name="brushMod" value="rectangle" />矩形
<input type="radio" id="brushMod3" name="brushMod" value="tileset" />tile平铺
<input type="radio" id="brushMod4" name="brushMod" value="fill" />填充
</span>
<br/>
<span style="font-size: 12px">
<input type="radio" id="layerMod2" name="layerMod" value="bgmap" />背景层
<input type="radio" id="layerMod" name="layerMod" value="map" checked="checked" style="margin-left: 5px" />事件层
<input type="radio" id="layerMod3" name="layerMod" value="fgmap" style="margin-left: 5px" />前景层
</span>
<br>
<div id="viewportButtons" style="margin-bottom: 7px">
<input type="button" value="←"/>
<input type="button" value="↑"/>
<input type="button" value="↓"/>
<input type="button" value="→"/>
<input type="button" id='bigmapBtn' value="大地图" style="margin-left: 5px"/>
</div>
<select id="selectFloor" style="margin-bottom: 5px;"></select>
<input type="button" value="选层" id='selectFloorBtn'/>
<input type="button" value="保存地图" id='saveFloor'/>
<input type="button" value="后退" id="undoFloor" style="display: none;" />
<input type="button" value="帮助文档" id="openDoc" />
<input type="button" value="前往游戏" onclick="window.open('./index.html', '_blank')"/>
</div>
</div>
<div id="mid2">
<p style="margin: 10px"><span id='lastUsedTitle'></span><small>Ctrl+滚轮放缩,右键置顶)</small> <button id='clearLastUsedBtn'>清除</button></p>
<div class="map" id="lastUsedDiv">
<canvas id='lastUsed' class="gameCanvas" style="overflow: hidden"></canvas>
</div>
</div>
<div id="right">
<div id="iconLib">
<div id="iconImages"></div>
<div id="selectBox">
<div id='dataSelection' style="display:none"></div>
</div>
</div>
<button id="iconExpandBtn"></button>
</div>
<div id="menuDiv">
<div id="midMenu" style="display:none">
<div id='extraEvent' class='menuitem' style="display:none"><div class="menuitem-content"></div></div>
<div id='chooseThis' class="menuitem"><div class="menuitem-content">选中此点</div></div>
<div id='chooseInRight' class="menuitem"><div class="menuitem-content">在素材区选中此图块</div></div>
<div id='copyLoc' class="menuitem"><div class="menuitem-content">复制此事件</div></div>
<div id='pasteLoc' class="menuitem"><div class="menuitem-content">粘贴到此事件</div></div>
<div id='clearEvent' class="menuitem"><div class="menuitem-content">仅清空此点事件</div></div>
<div id='clearLoc' class="menuitem"><div class="menuitem-content">清空此点及事件</div></div>
</div>
</div>
</div>
<!-- <script>/* -->
<div id="gameInject" style='display: none'></div>
<!-- UI预览 & 地图选点 -->
<div id='uieventDiv' style='display: none'>
<div id='uieventDialog'>
<div id="uieventHead">
<span id="uieventTitle"></span>
<select id="uieventSelect" style="margin-left: 20px"></select>
<button id="uieventNo">关闭</button>
<button id="uieventYes">确定</button>
</div>
<hr style="clear: both; margin-top: 0"/>
<div id='uieventBody'>
<canvas class='gameCanvas' id='uievent'></canvas>
<div id="selectPointBox"></div>
<div id="uieventExtraBody" style="display: none; margin-top: -10px"></div>
</div>
<div id="selectPoint">
<select id="selectPointFloor"></select>
<div id="selectPointButtons">
<input type="button" value="←"/>
<input type="button" value="↑"/>
<input type="button" value="↓"/>
<input type="button" value="→"/>
<input type="button" value="切换大地图" style="margin-left: 10px;">
<input type="button" value="复制楼层ID">
</div>
</div>
</div>
</div>
<!-- */</script> -->
<!-- =========================================================== -->
<!-- <script src='_server/vendor/vue.min.js'></script> -->
<!-- <script src="https://cdn.bootcss.com/vue/2.5.13/vue.js"></script> -->
<!-- <script src='_server/vendor/polyfill.min.js'></script> -->
<script src='_server/fs.js'></script>
<script src='_server/editor_config.js'></script>
<script src='_server/editor_util.js'></script>
<script src='_server/editor_game.js'></script>
<script src='_server/editor_file.js'></script>
<script src='_server/editor_table.js'></script>
<script src='_server/editor_mode.js'></script>
<script src='_server/editor_ui.js'></script>
<script src='_server/editor_uievent.js'></script>
<script src='_server/editor_mappanel.js'></script>
<script src='_server/editor_datapanel.js'></script>
<script src='_server/editor_materialpanel.js'></script>
<script src='_server/editor_listen.js'></script>
<script src='libs/thirdparty/lz-string.min.js'></script>
<script src='libs/thirdparty/localforage.min.js'></script>
<script src='libs/thirdparty/zip.min.js'></script>
<script src='_server/editor.js'></script>
<script>
editor.init(function () {
editor.listen();
editor.mode_listen();
editor.mobile_listen();
});
//main.listen();
</script>
<!-- hightlight textarea -->
<script src='_server/editor_multi.js'></script>
<!-- blockly -->
<script src="_server/blockly/Converter.bundle.min.js"></script>
<script src="_server/blockly/blockly_compressed.js"></script>
<script src="_server/blockly/blocks_compressed.js"></script>
<script src="_server/blockly/javascript_compressed.js"></script>
<script src="_server/blockly/zh-hans.js"></script>
<script src='_server/MotaActionParser.js'></script>
<script src='_server/editor_blocklyconfig.js'></script>
<script src='_server/editor_blockly.js'></script>
<!-- codemirror -->
<script src="_server/CodeMirror/codeMirror.bundle.min.js"></script>
<script src="_server/CodeMirror/beautify.min.js"></script>
<script src="_server/CodeMirror/jshint.min.js"></script>
<script src="_server/CodeMirror/codeMirror.plugin.min.js"></script>
<script src="_server/CodeMirror/acorn.min.js"></script>
<script src="_server/CodeMirror/defs.js"></script>
<script src="_server/CodeMirror/tern.min.js"></script>
<!-- thirdparty -->
<script src="_server/thirdparty/color.all.min.js"></script>
<script src="_server/thirdparty/awesomplete.min.js"></script>
<script src="_server/thirdparty/caret-position.js"></script>
<script src="_server/thirdparty/jsColor.js"></script>
</body>
</html>

110
extensions/localSave.js Normal file
View File

@ -0,0 +1,110 @@
/**
* 离线游戏使用本地存储扩展
* 开启本拓展后将会把所有存档存至 _saves 目录下
* 需配合样板V2.8.2+使用
*/
"use strict";
(function () {
// 将这一行改成 false 可以禁用本拓展
var __enabled = true;
if (window.jsinterface || !window.fs || !__enabled) return;
function rewrite() {
core.utils._setLocalForage_set = function (name, str, callback) {
var data = LZString.compressToBase64(str);
core.saves.cache[name] = data;
fs.writeFile('_saves/' + name, data, 'utf-8', callback);
}
core.utils._getLocalForage_get = function (name, callback) {
fs.readFile('_saves/' + name, 'utf-8', function (err, data) {
if (err) return callback(err);
callback(null, data);
});
}
core.utils.decompress = function (data) {
try {
return JSON.parse(LZString.decompressFromBase64(data))
} catch (e) {
return null;
}
}
core.utils._removeLocalForage_remove = function (name, callback) {
fs.deleteFile('_saves/' + name, callback);
}
core.utils.clearLocalForage = function (callback) {
fs.deleteFile('_saves', function () {
fs.mkdir('_saves', callback);
})
}
core.utils.iterateLocalForage = function (iter, callback) {
fs.readdir('_saves', function (err, data) {
if (err) callback(err);
else {
data.forEach(function (one) {
iter(null, one, null);
});
callback();
}
});
}
core.utils.keysLocalForage = function (callback) {
fs.readdir('_saves', callback);
}
core.utils.lengthLocalForage = function (callback) {
fs.readdir('_saves', function (err, data) {
if (err) callback(err);
else callback(null, data.length);
});
}
}
var _export = function () {
var toExport = [];
localforage.iterate(function (value, key, n) {
if (value == null || !key.startsWith(core.firstData.name)) return;
value = core.decompress(value);
if (value == null) return;
var str = JSON.stringify(value).replace(/[\u007F-\uFFFF]/g, function (chr) {
return "\\u" + ("0000" + chr.charCodeAt(0).toString(16)).substr(-4)
});
str = LZString.compressToBase64(str);
toExport.push(key);
core.saves.cache[key] = str;
fs.writeFile('_saves/' + key, str, 'utf-8', function () {});
}, function () {
if (toExport.length > 0) {
alert('提示!本塔已开启存档本地化!原始存档已全部导出至 _saves/ 目录下。');
}
fs.writeFile('_saves/.exported', '1', 'utf-8', function () {});
rewrite();
core.control.getSaveIndexes(function (indexes) { core.saves.ids = indexes; });
});
}
fs.mkdir('_saves', function (err) {
if (err) return;
fs.readFile('_saves/.exported', 'utf-8', function(err, data) {
if (!err && data) {
rewrite();
core.control.getSaveIndexes(function (indexes) { core.saves.ids = indexes; });
return;
}
_export();
});
});
})();

204
index.html Normal file
View File

@ -0,0 +1,204 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='content-type' content='text/html' charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=Edge, chrome=1'>
<meta name='author' content='ckcz123'>
<meta name='viewport'
content='width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=yes'>
<title>HTML5魔塔</title>
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="screen-orientation" content="portrait">
<meta name="full-screen" content="yes">
<meta name="browsermode" content="application">
<meta name="x5-orientation" content="portrait">
<meta name="x5-fullscreen" content="true">
<meta name="x5-page-mode" content="app">
<link type='text/css' href='styles.css' rel='stylesheet'>
</head>
<body>
<div id='startImageBackgroundDiv'>
<div id='startImageDiv'></div>
<img id='startImageLogo' />
</div>
<script>
(function () {
var startImageBackgroundDiv = document.getElementById('startImageBackgroundDiv');
var startImageLogo = document.getElementById('startImageLogo');
var startImageDiv = document.getElementById('startImageDiv');
startImageLogo.onload = function () {
startImageBackgroundDiv.style.display = 'block';
var onAnimationEnd = function () {
startImageBackgroundDiv.style.display = 'none';
startImageLogo.classList.remove("startImageAnimation");
startImageDiv.classList.remove("startImageDivAnimation");
}
startImageDiv.addEventListener("webkitAnimationEnd", onAnimationEnd);
startImageDiv.addEventListener("animationend", onAnimationEnd);
startImageLogo.classList.add("startImageAnimation");
startImageDiv.classList.add("startImageDivAnimation");
// 注释下面这句话以禁止单击立刻跳过开场动画
startImageBackgroundDiv.onclick = onAnimationEnd;
}
startImageLogo.onerror = function () { }
startImageLogo.src = "logo.png";
})();
</script>
<!-- injection -->
<div id='gameGroup'>
<p id='mainTips'>请稍候...</p>
<img id='musicBtn'>
<div id='startPanel'>
<div id='startTop'>
<div id='startTopProgressBar'>
<div id='startTopProgress'></div>
</div>
<p id='startTopLoadTips'>资源即将开始加载</p>
<p id='startTopHint'>HTML5魔塔游戏平台享受更多魔塔游戏<br />https://h5mota.com/</p>
</div>
<img id='startBackground'>
<p id='startLogo'></p>
<div id='startButtonGroup'>
<div id='startButtons'>
<span class='startButton' id='playGame'>开始游戏</span>
<span class='startButton' id='loadGame'>载入游戏</span>
<span class='startButton' id='replayGame'>录像回放</span>
</div>
<div id='levelChooseButtons'></div>
</div>
</div>
<div id='floorMsgGroup'>
<p id='logoLabel'></p>
<p id='versionLabel'></p>
<p id='floorNameLabel'></p>
</div>
<div id='statusBar' class="clearfix">
<div class="status" id="floorCol">
<img id="img-floor">
<p class='statusLabel statusText' id='floor'></p>
</div>
<div class="status" id="nameCol">
<img id="img-name">
<p class='statusLabel statusText' id='name'></p>
</div>
<div class="status" id="lvCol">
<img id="img-lv">
<p class='statusLabel statusText' id='lv'></p>
</div>
<div class="status" id='hpmaxCol'>
<img id="img-hpmax">
<p class='statusLabel statusText' id='hpmax'></p>
</div>
<div class="status" id='hpCol'>
<img id="img-hp">
<p class='statusLabel statusText' id='hp'></p>
</div>
<div class="status" id='manaCol'>
<img id="img-mana">
<p class='statusLabel statusText' id='mana'></p>
</div>
<div class="status" id='atkCol'>
<img id="img-atk">
<p class='statusLabel statusText' id='atk'></p>
</div>
<div class="status" id='defCol'>
<img id="img-def">
<p class='statusLabel statusText' id='def'></p>
</div>
<div class="status" id="mdefCol">
<img id="img-mdef">
<p class='statusLabel statusText' id='mdef'></p>
</div>
<div class="status" id="moneyCol">
<img id="img-money">
<p class='statusLabel statusText' id='money'></p>
</div>
<div class="status" id="expCol">
<img id="img-exp">
<p class='statusLabel statusText' id='exp'></p>
</div>
<div class="status" id="upCol">
<img id="img-up">
<p class='statusLabel statusText' id='up'></p>
</div>
<div class="status" id="skillCol">
<img id="img-skill">
<p class='statusLabel statusText' id='skill' style='font-style: normal'></p>
</div>
<div class="status" id='keyCol'>
<span class='statusLabel' id='yellowKey' style="color:#FFCCAA"></span>
<span class='statusLabel' id='blueKey' style="color:#AAAADD"></span>
<span class='statusLabel' id='redKey' style="color:#FF8888"></span>
<span class='statusLabel' id='greenKey' style="color:#88FF88"></span>
</div>
<div class="status" id='pzfCol'>
<span class='statusLabel' id='pickaxe' style="color: #BC6E27"></span>
<span class='statusLabel' id='bomb' style="color: #FA14B9"></span>
<span class='statusLabel' id='fly' style="color: #8DB600"></span>
</div>
<div class="status" id="debuffCol">
<span class='statusLabel' id='poison' style="color: #AFFCA8;"></span>
<span class='statusLabel' id='weak' style="color: #FECCD0;"></span>
<span class='statusLabel' id='curse' style="color: #C2F4E7;"></span>
</div>
<!-- 状态栏canvas化 -->
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0;"></canvas>
</div>
<div id="toolBar" class="clearfix">
<img class="tools" id='img-book'>
<img class="tools" id='img-fly'>
<img class="tools" id='img-toolbox'>
<img class="tools" id='img-keyboard'>
<img class="tools" id='img-shop'>
<img class="tools" id='img-save'>
<img class="tools" id='img-load'>
<img class="tools" id='img-settings'>
<img class="tools" id='img-btn1' style='display:none'>
<img class="tools" id='img-btn2' style='display:none'>
<img class="tools" id='img-btn3' style='display:none'>
<img class="tools" id='img-btn4' style='display:none'>
<img class="tools" id='img-btn5' style='display:none'>
<img class="tools" id='img-btn6' style='display:none'>
<img class="tools" id='img-btn7' style='display:none'>
<img class="tools" id='img-btn8' style='display:none'>
<p class="statusLabel tools" id="hard"></p>
</div>
<div id="gameDraw">
<div id="gif"></div>
<div id="gif2"></div>
<canvas class='gameCanvas anti-aliasing' id='bg'></canvas>
<canvas class='gameCanvas anti-aliasing' id='event'></canvas>
<canvas class='gameCanvas anti-aliasing' id='hero'></canvas>
<canvas class='gameCanvas anti-aliasing' id='event2'></canvas>
<canvas class='gameCanvas anti-aliasing' id='fg'></canvas>
<canvas class='gameCanvas' id='damage'></canvas>
<canvas class='gameCanvas' id='animate'></canvas>
<canvas class='gameCanvas' id='curtain'></canvas>
<canvas class='gameCanvas' id='ui'></canvas>
<canvas class='gameCanvas' id='data'>此浏览器不支持HTML5</canvas>
<div id="next"></div>
</div>
</div>
<div id='inputDiv'>
<div id='inputDialog'>
<p id="inputMessage">请输入文字...</p>
<input id='inputBox' type="text" autocomplete="off" />
<button id='inputYes'>确定</button>
<button id='inputNo'>取消</button>
</div>
</div>
<div id="ui-editor"></div>
<!-- injection -->
<script src='libs/thirdparty/lz-string.min.js'></script>
<script src='libs/thirdparty/priority-queue.min.js'></script>
<script src='libs/thirdparty/localforage.min.js'></script>
<script src='libs/thirdparty/zip.min.js'></script>
<script id='mainScript' src='main.js'></script>
<script>main.init('play'); main.listen();</script>
</body>
</html>

3165
libs/actions.js Normal file

File diff suppressed because it is too large Load Diff

3565
libs/control.js Normal file

File diff suppressed because it is too large Load Diff

547
libs/core.js Normal file
View File

@ -0,0 +1,547 @@
/**
* 初始化 start
*/
"use strict";
// /**
// * @type {CoreMixin}
// */
// const core = (() => {
function core () {
this._WIDTH_ = 13;
this._HEIGHT_ = 13;
this._PX_ = this._WIDTH_ * 32;
this._PY_ = this._HEIGHT_ * 32;
this._HALF_WIDTH_ = Math.floor(this._WIDTH_ / 2);
this._HALF_HEIGHT_ = Math.floor(this._HEIGHT_ / 2);
this.__SIZE__ = main.mode == 'editor' ? 13 : this._HEIGHT_;
this.__PIXELS__ = this.__SIZE__ * 32;
this.__HALF_SIZE__ = Math.floor(this.__SIZE__ / 2);
this.material = {
'animates': {},
'images': {},
'bgms': {},
'sounds': {},
'items': {},
'enemys': {},
'icons': {},
'ground': null,
'grundCanvas': null,
'groundPattern': null,
'autotileEdges': {},
}
this.timeout = {
'turnHeroTimeout': null,
'onDownTimeout': null,
'sleepTimeout': null,
}
this.interval = {
'heroMoveInterval': null,
'onDownInterval': null,
}
this.animateFrame = {
'totalTime': 0,
'totalTimeStart': 0,
'globalAnimate': false,
'globalTime': 0,
'selectorTime': 0,
'selectorUp': true,
'animateTime': 0,
'moveTime': 0,
'lastLegTime': 0,
'leftLeg': true,
'weather': {
'time': 0,
'type': null,
'level': 1,
'nodes': [],
'data': null,
'fog': null,
'cloud': null,
'sun': null
},
"tip": null,
"asyncId": {},
"lastAsyncId": null
}
this.musicStatus = {
'audioContext': null, // WebAudioContext
'bgmStatus': false, // 是否播放BGM
'soundStatus': true, // 是否播放SE
'playingBgm': null, // 正在播放的BGM
'pauseTime': 0, // 上次暂停的时间
'lastBgm': null, // 上次播放的bgm
'gainNode': null,
'playingSounds': {}, // 正在播放的SE
'userVolume': 1.0, // 用户音量
'designVolume': 1.0, //设计音量
'bgmSpeed': 100, // 背景音乐速度
'bgmUsePitch': null, // 是否同时修改音调
'cachedBgms': [], // 缓存BGM内容
'cachedBgmCount': 8, // 缓存的bgm数量
}
this.platform = {
'isOnline': true, // 是否http
'isPC': true, // 是否是PC
'isAndroid': false, // 是否是Android
'isIOS': false, // 是否是iOS
'string': 'PC',
'isWeChat': false, // 是否是微信
'isQQ': false, // 是否是QQ
'isChrome': false, // 是否是Chrome
'supportCopy': false, // 是否支持复制到剪切板
'fileInput': null, // FileInput
'fileReader': null, // 是否支持FileReader
'successCallback': null, // 读取成功
'errorCallback': null, // 读取失败
}
// 样式
this.domStyle = {
scale: 1.0,
ratio: 1.0,
hdCanvas: ["damage", "ui", "data"],
availableScale: [],
isVertical: false,
showStatusBar: true,
toolbarBtn: false,
}
this.bigmap = {
canvas: ["bg", "event", "event2", "fg", "damage"],
offsetX: 0, // in pixel
offsetY: 0,
posX: 0, //
posY: 0,
width: main.mode == 'editor' ? this.__SIZE__ : this._WIDTH_, // map width and height
height: main.mode == 'editor' ? this.__SIZE__ : this._HEIGHT_,
v2: false,
threshold: 1024,
extend: 10,
scale: 1.0,
tempCanvas: null, // A temp canvas for drawing
cacheCanvas: null, // A cache canvas
}
this.saves = {
"saveIndex": null,
"ids": {},
"autosave": {
"data": null,
"time": 0,
"updated": false,
"storage": true, // 是否把自动存档写入文件a
"max": 50, // 自动存档最大回退数
"now": 0,
},
"favorite": [],
"favoriteName": {},
"cache": {}
}
this.initStatus = {
'played': false,
'gameOver': false,
// 勇士属性
'hero': {},
'heroCenter': { 'px': null, 'py': null },
// 当前地图
'floorId': null,
'thisMap': null,
'maps': null,
'bgmaps': {},
'fgmaps': {},
'mapBlockObjs': {},
'checkBlock': {}, // 每个点的阻激夹域信息
'damage': { // 每个点的显伤绘制
'posX': 0,
'posY': 0,
'data': [],
'extraData': [],
},
'lockControl': false,
// 勇士移动状态
'heroMoving': 0,
'heroStop': true,
// 自动寻路相关
'automaticRoute': {
'autoHeroMove': false,
'autoStep': 0,
'movedStep': 0,
'destStep': 0,
'destX': null,
'destY': null,
'offsetX': null,
'offsetY': null,
'autoStepRoutes': [],
'moveStepBeforeStop': [],
'lastDirection': null,
'cursorX': 0,
'cursorY': 0,
"moveDirectly": false,
},
// 按下键的时间:为了判定双击
'downTime': null,
'ctrlDown': false,
'preview': {
'enabled': false,
'prepareDragging': false,
'dragging': false,
'px': 0,
'py': 0,
},
// 路线&回放
'route': [],
'replay': {
'replaying': false,
'pausing': false,
'animate': false, // 正在某段动画中
'failed': false,
'toReplay': [],
'totalList': [],
'speed': 1.0,
'steps': 0,
'save': [],
},
// 录像折叠
'routeFolding': {},
// event事件
'shops': {},
'event': {
'id': null,
'data': null,
'selection': null,
'ui': null,
'interval': null,
},
'autoEvents': [],
'textAttribute': {
'position': "center",
"offset": 0,
"title": [255, 215, 0, 1],
"background": [0, 0, 0, 0.85],
"text": [255, 255, 255, 1],
"titlefont": 22,
"textfont": 16,
"bold": false,
"time": 0,
"letterSpacing": 0,
"animateTime": 0,
},
"globalAttribute": {
'equipName': main.equipName || [],
"statusLeftBackground": main.styles.statusLeftBackground || "url(project/materials/ground.png) repeat",
"statusTopBackground": main.styles.statusTopBackground || "url(project/materials/ground.png) repeat",
"toolsBackground": main.styles.toolsBackground || "url(project/materials/ground.png) repeat",
"borderColor": main.styles.borderColor || [204, 204, 204, 1],
"statusBarColor": main.styles.statusBarColor || [255, 255, 255, 1],
"floorChangingStyle": main.styles.floorChangingStyle || "background-color: black; color: white",
"selectColor": main.styles.selectColor || [255, 215, 0, 1],
"font": main.styles.font || "Verdana"
},
'curtainColor': null,
// 动画
'globalAnimateObjs': [],
'floorAnimateObjs': [],
'boxAnimateObjs': [],
'autotileAnimateObjs': [],
"globalAnimateStatus": 0,
'animateObjs': [],
};
// 标记的楼层列表,用于数据统计
this.markedFloorIds = {};
this.status = {};
this.dymCanvas = {};
if (main.mode == 'editor') {
document.documentElement.style.setProperty('--size', this.__SIZE__);
document.documentElement.style.setProperty('--pixel', this.__PIXELS__ + 'px');
}
}
/////////// 系统事件相关 ///////////
////// 初始化 //////
core.prototype.init = function (coreData, callback) {
this._forwardFuncs();
for (var key in coreData)
core[key] = coreData[key];
this._init_flags();
this._init_platform();
this._init_others();
this._init_plugins();
var b = main.mode == 'editor';
// 初始化画布
for (var name in core.canvas) {
if (core.domStyle.hdCanvas.indexOf(name) >= 0)
core.maps._setHDCanvasSize(core.canvas[name], b ? core.__PIXELS__ : core._PX_, b ? core.__PIXELS__ : core._PY_);
else {
core.canvas[name].canvas.width = (b ? core.__PIXELS__ : core._PX_);
core.canvas[name].canvas.height = (b ? core.__PIXELS__ : core._PY_);
}
}
core.loader._load(function () {
core.extensions._load(function () {
core._afterLoadResources(callback);
});
});
core.dom.musicBtn.style.display = 'block';
core.setMusicBtn();
}
core.prototype._init_flags = function () {
core.flags = core.clone(core.data.flags);
core.values = core.clone(core.data.values);
core.firstData = core.clone(core.data.firstData);
this._init_sys_flags();
// 让你总是拼错!
window.on = true;
window.off = false;
window.ture = true;
window.flase = false;
core.dom.versionLabel.innerText = core.firstData.version;
core.dom.logoLabel.innerText = core.firstData.title;
document.title = core.firstData.title + " - HTML5魔塔";
document.getElementById("startLogo").innerText = core.firstData.title;
(core.firstData.shops || []).forEach(function (t) { core.initStatus.shops[t.id] = t; });
core.maps._initFloors();
// 初始化怪物、道具等
core.material.enemys = core.enemys.getEnemys();
core.material.items = core.items.getItems();
core.material.icons = core.icons.getIcons();
// 初始化自动事件
for (var floorId in core.floors) {
var autoEvents = core.floors[floorId].autoEvent || {};
for (var loc in autoEvents) {
var locs = loc.split(","), x = parseInt(locs[0]), y = parseInt(locs[1]);
for (var index in autoEvents[loc]) {
var autoEvent = core.clone(autoEvents[loc][index]);
if (autoEvent && autoEvent.condition && autoEvent.data) {
autoEvent.floorId = floorId;
autoEvent.x = x;
autoEvent.y = y;
autoEvent.index = index;
autoEvent.symbol = floorId + "@" + x + "@" + y + "@" + index;
autoEvent.condition = core.replaceValue(autoEvent.condition);
autoEvent.data = core.precompile(autoEvent.data);
core.initStatus.autoEvents.push(autoEvent);
}
}
}
}
// 道具的穿上/脱下,视为自动事件
for (var equipId in core.material.items) {
var equip = core.material.items[equipId];
if (equip.cls != 'equips' || !equip.equip) continue;
if (!equip.equip.equipEvent && !equip.equip.unequipEvent) continue;
var equipFlag = '_equipEvent_' + equipId;
var autoEvent1 = {
symbol: "_equipEvent_" + equipId,
currentFloor: false,
multiExecute: true,
condition: "core.hasEquip('" + equipId + "') && !core.hasFlag('" + equipFlag + "')",
data: core.precompile([{ "type": "setValue", "name": "flag:" + equipFlag, "value": "true" }].concat(equip.equip.equipEvent || [])),
};
var autoEvent2 = {
symbol: "_unequipEvent_" + equipId,
currentFloor: false,
multiExecute: true,
condition: "!core.hasEquip('" + equipId + "') && core.hasFlag('" + equipFlag + "')",
data: core.precompile([{ "type": "setValue", "name": "flag:" + equipFlag, "value": "null" }].concat(equip.equip.unequipEvent || [])),
};
core.initStatus.autoEvents.push(autoEvent1);
core.initStatus.autoEvents.push(autoEvent2);
}
core.initStatus.autoEvents.sort(function (e1, e2) {
if (e1.floorId == null) return 1;
if (e2.floorId == null) return -1;
if (e1.priority != e2.priority) return e2.priority - e1.priority;
if (e1.floorId != e2.floorId) return core.floorIds.indexOf(e1.floorId) - core.floorIds.indexOf(e2.floorId);
if (e1.x != e2.x) return e1.x - e2.x;
if (e1.y != e2.y) return e1.y - e2.y;
return e1.index - e2.index;
})
}
core.prototype._init_sys_flags = function () {
if (core.flags.equipboxButton) core.flags.equipment = true;
core.flags.displayEnemyDamage = core.getLocalStorage('enemyDamage', true);
core.flags.displayCritical = core.getLocalStorage('critical', true);
core.flags.displayExtraDamage = core.getLocalStorage('extraDamage', true);
core.flags.enableEnemyPoint = core.getLocalStorage('enableEnemyPoint', core.flags.enableEnemyPoint);
core.flags.leftHandPrefer = core.getLocalStorage('leftHandPrefer', false);
core.flags.extraDamageType = core.getLocalStorage('extraDamageType', 2);
// 行走速度
core.values.moveSpeed = core.getLocalStorage('moveSpeed', core.values.moveSpeed || 100);
core.values.floorChangeTime = core.getLocalStorage('floorChangeTime', core.values.floorChangeTime);
if (core.values.floorChangeTime == null) core.values.floorChangeTime = 500;
core.flags.enableHDCanvas = core.getLocalStorage('enableHDCanvas', !core.platform.isIOS);
}
core.prototype._init_platform = function () {
core.platform.isOnline = location.protocol.indexOf("http") == 0;
if (!core.platform.isOnline) alert("请勿直接打开html文件使用启动服务或者APP进行离线游戏。");
window.AudioContext = window.AudioContext || window.webkitAudioContext || window.mozAudioContext || window.msAudioContext;
core.musicStatus.bgmStatus = core.getLocalStorage('bgmStatus', true);
core.musicStatus.soundStatus = core.getLocalStorage('soundStatus', true);
//新增 userVolume 默认值0.09
core.musicStatus.userVolume = core.getLocalStorage('userVolume', 0.09);
try {
core.musicStatus.audioContext = new window.AudioContext();
core.musicStatus.gainNode = core.musicStatus.audioContext.createGain();
core.musicStatus.gainNode.gain.value = core.musicStatus.userVolume;
core.musicStatus.gainNode.connect(core.musicStatus.audioContext.destination);
} catch (e) {
console.log("该浏览器不支持AudioContext");
core.musicStatus.audioContext = null;
}
["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"].forEach(function (t) {
if (navigator.userAgent.indexOf(t) >= 0) {
if (t == 'iPhone' || t == 'iPad' || t == 'iPod') core.platform.isIOS = true;
if (t == 'Android') core.platform.isAndroid = true;
core.platform.isPC = false;
}
});
core.platform.string = core.platform.isPC ? "PC" : core.platform.isAndroid ? "Android" : core.platform.isIOS ? "iOS" : "";
core.platform.supportCopy = document.queryCommandSupported && document.queryCommandSupported("copy");
var chrome = /Chrome\/(\d+)\./i.exec(navigator.userAgent);
if (chrome && parseInt(chrome[1]) >= 50) core.platform.isChrome = true;
core.platform.isSafari = /Safari/i.test(navigator.userAgent) && !/Chrome/i.test(navigator.userAgent);
core.platform.isQQ = /QQ/i.test(navigator.userAgent);
core.platform.isWeChat = /MicroMessenger/i.test(navigator.userAgent);
if (window.FileReader) {
core.platform.fileReader = new FileReader();
core.platform.fileReader.onload = function () {
core.readFileContent(core.platform.fileReader.result);
};
core.platform.fileReader.onerror = function () {
if (core.platform.errorCallback)
core.platform.errorCallback();
}
}
core.flags.enableHDCanvas = core.getLocalStorage('enableHDCanvas', !core.platform.isIOS);
if (main.mode != 'editor') {
core.domStyle.scale = core.getLocalStorage('scale', 1);
if (core.flags.enableHDCanvas) core.domStyle.ratio = Math.max(window.devicePixelRatio || 1, core.domStyle.scale);
}
}
core.prototype._init_others = function () {
// 一些额外的东西
core.material.groundCanvas = document.createElement('canvas').getContext('2d');
core.material.groundCanvas.canvas.width = core.material.groundCanvas.canvas.height = 32;
core.material.groundPattern = core.material.groundCanvas.createPattern(core.material.groundCanvas.canvas, 'repeat');
core.bigmap.tempCanvas = document.createElement('canvas').getContext('2d');
core.bigmap.cacheCanvas = document.createElement('canvas').getContext('2d');
core.loadImage("materials", 'fog', function (name, img) { core.animateFrame.weather.fog = img; });
core.loadImage("materials", "cloud", function (name, img) { core.animateFrame.weather.cloud = img; })
core.loadImage("materials", "sun", function (name, img) { core.animateFrame.weather.sun = img; })
core.loadImage("materials", 'keyboard', function (name, img) { core.material.images.keyboard = img; });
// 记录存档编号
core.saves.saveIndex = core.getLocalStorage('saveIndex', 1);
core.control.getSaveIndexes(function (indexes) { core.saves.ids = indexes; });
}
core.prototype._afterLoadResources = function (callback) {
// 初始化地图
core.initStatus.maps = core.maps._initMaps();
core.control._setRequestAnimationFrame();
// 图片裁剪
(main.splitImages || []).forEach(function (one) {
var name = core.getMappedName(one.name);
if (!core.material.images.images[name]) {
console.warn('找不到图片:' + name + ',无法裁剪');
return;
}
if (!name.endsWith('.png')) {
console.warn('无法裁剪非png格式图片' + name);
return;
}
var arr = core.splitImage(core.material.images.images[name], one.width, one.height);
for (var i = 0; i < arr.length; ++i) {
core.material.images.images[(one.prefix || "") + i + '.png'] = arr[i];
}
});
if (core.plugin._afterLoadResources)
core.plugin._afterLoadResources();
core.showStartAnimate();
if (callback) callback();
}
core.prototype._init_plugins = function () {
core.plugin = new function () { };
for (var name in plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1) {
if (plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1[name] instanceof Function) {
try {
plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1[name].apply(core.plugin);
}
catch (e) {
console.error(e);
console.error("无法初始化插件" + name);
}
}
}
core._forwardFunc("plugin");
}
core.prototype._forwardFuncs = function () {
for (var i = 0; i < main.loadList.length; ++i) {
var name = main.loadList[i];
if (name == 'core') continue;
this._forwardFunc(name);
}
}
core.prototype._forwardFunc = function (name, funcname) {
if (funcname == null) {
for (funcname in core[name]) {
if (funcname.charAt(0) != "_" && core[name][funcname] instanceof Function) {
this._forwardFunc(name, funcname);
}
}
return;
}
if (core[funcname]) {
console.error("ERROR: 无法转发 " + name + " 中的函数 " + funcname + " 到 core 中!同名函数已存在。");
return;
}
var parameterInfo = /^\s*function\s*[\w_$]*\(([\w_,$\s]*)\)\s*\{/.exec(core[name][funcname].toString());
var parameters = (parameterInfo == null ? "" : parameterInfo[1]).replace(/\s*/g, '').replace(/,/g, ', ');
// core[funcname] = new Function(parameters, "return core."+name+"."+funcname+"("+parameters+");");
eval("core." + funcname + " = function (" + parameters + ") {\n\treturn core." + name + "." + funcname + ".apply(core." + name + ", arguments);\n}");
}
core.prototype.doFunc = function (func, _this) {
if (typeof func == 'string') {
func = core.plugin[func];
_this = core.plugin;
}
return func.apply(_this, Array.prototype.slice.call(arguments, 2));
}
// return new Core();
// })();
var core = new core();

13
libs/data.js Normal file
View File

@ -0,0 +1,13 @@
"use strict";
function data () {
this._init();
}
data.prototype._init = function () {
this.firstData = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.firstData;
this.values = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.values;
this.flags = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.flags;
//delete(data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d);
}

523
libs/enemys.js Normal file
View File

@ -0,0 +1,523 @@
"use strict";
function enemys () {
this._init();
}
////// 初始化 //////
enemys.prototype._init = function () {
this.enemys = enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80;
this.enemydata = functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a.enemys;
for (var enemyId in this.enemys) {
this.enemys[enemyId].id = enemyId;
}
if (main.mode == 'play') {
this.enemydata.hasSpecial = function (a, b) {
return core.enemys.hasSpecial(a, b)
};
}
}
enemys.prototype.getEnemys = function () {
var enemys = core.clone(this.enemys);
var enemyInfo = core.getFlag('enemyInfo');
if (enemyInfo) {
for (var id in enemyInfo) {
for (var name in enemyInfo[id]) {
enemys[id][name] = core.clone(enemyInfo[id][name]);
}
}
}
// 将所有怪物的各项属性映射到朝下的
for (var id in enemys) {
if (enemys[id].faceIds) {
var downId = enemys[id].faceIds.down;
if (downId != null && downId != id && enemys[downId]) {
enemys[id] = { id: id };
for (var property in enemys[downId]) {
if (property != 'id' && enemys[downId].hasOwnProperty(property)) {
(function (id, downId, property) {
Object.defineProperty(enemys[id], property, {
get: function () { return enemys[downId][property] },
set: function (v) { enemys[downId][property] = v },
enumerable: true
})
})(id, downId, property);
}
}
}
}
}
return enemys;
}
////// 判断是否含有某特殊属性 //////
enemys.prototype.hasSpecial = function (special, test) {
if (special == null) return false;
if (special instanceof Array) {
return special.indexOf(test) >= 0;
}
if (typeof special == 'number') {
return special === test;
}
if (typeof special == 'string') {
return this.hasSpecial(core.material.enemys[special], test);
}
if (special.special != null) {
return this.hasSpecial(special.special, test);
}
return false;
}
enemys.prototype.getSpecials = function () {
return this.enemydata.getSpecials();
}
////// 获得所有特殊属性的名称 //////
enemys.prototype.getSpecialText = function (enemy) {
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
if (!enemy) return [];
var special = enemy.special;
var text = [];
var specials = this.getSpecials();
if (specials) {
for (var i = 0; i < specials.length; i++) {
if (this.hasSpecial(special, specials[i][0]))
text.push(this._calSpecialContent(enemy, specials[i][1]));
}
}
return text;
}
////// 获得所有特殊属性的颜色 //////
enemys.prototype.getSpecialColor = function (enemy) {
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
if (!enemy) return [];
var special = enemy.special;
var colors = [];
var specials = this.getSpecials();
if (specials) {
for (var i = 0; i < specials.length; i++) {
if (this.hasSpecial(special, specials[i][0]))
colors.push(specials[i][3] || null);
}
}
return colors;
}
////// 获得所有特殊属性的额外标记 //////
enemys.prototype.getSpecialFlag = function (enemy) {
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
if (!enemy) return [];
var special = enemy.special;
var flag = 0;
var specials = this.getSpecials();
if (specials) {
for (var i = 0; i < specials.length; i++) {
if (this.hasSpecial(special, specials[i][0]))
flag |= (specials[i][4] || 0);
}
}
return flag;
}
////// 获得每个特殊属性的说明 //////
enemys.prototype.getSpecialHint = function (enemy, special) {
var specials = this.getSpecials();
if (special == null) {
if (specials == null) return [];
var hints = [];
for (var i = 0; i < specials.length; i++) {
if (this.hasSpecial(enemy, specials[i][0]))
hints.push("\r[" + core.arrayToRGBA(specials[i][3] || "#FF6A6A") + "]\\d" + this._calSpecialContent(enemy, specials[i][1]) +
"\\d\r[]" + this._calSpecialContent(enemy, specials[i][2]));
}
return hints;
}
if (specials == null) return "";
for (var i = 0; i < specials.length; i++) {
if (special == specials[i][0])
return "\r[#FF6A6A]\\d" + this._calSpecialContent(enemy, specials[i][1]) + "\\d\r[]" + this._calSpecialContent(enemy, specials[i][2]);
}
return "";
}
enemys.prototype._calSpecialContent = function (enemy, content) {
if (typeof content == 'string') return content;
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
if (content instanceof Function) {
return content(enemy);
}
return "";
}
////// 获得某个点上某个怪物的某项属性 //////
enemys.prototype.getEnemyValue = function (enemy, name, x, y, floorId) {
floorId = floorId || core.status.floorId;
if ((((flags.enemyOnPoint || {})[floorId] || {})[x + "," + y] || {})[name] != null) {
return flags.enemyOnPoint[floorId][x + "," + y][name];
}
if (enemy == null) {
var block = core.getBlock(x, y, floorId);
if (block == null) return null;
enemy = core.material.enemys[block.event.id];
}
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
if (enemy == null) return null;
return enemy[name];
}
////// 能否获胜 //////
enemys.prototype.canBattle = function (enemy, x, y, floorId) {
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
var damage = this.getDamage(enemy, x, y, floorId);
return damage != null && damage < core.status.hero.hp;
}
enemys.prototype.getDamageString = function (enemy, x, y, floorId) {
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
var damage = this.getDamage(enemy, x, y, floorId);
var color = '#000000';
if (damage == null) {
damage = "???";
color = '#FF2222';
}
else {
if (damage <= 0) color = '#11FF11';
else if (damage < core.status.hero.hp / 3) color = '#FFFFFF';
else if (damage < core.status.hero.hp * 2 / 3) color = '#FFFF00';
else if (damage < core.status.hero.hp) color = '#FF9933';
else color = '#FF2222';
damage = core.formatBigNumber(damage, true);
if (core.enemys.hasSpecial(enemy, 19))
damage += "+";
if (core.enemys.hasSpecial(enemy, 21))
damage += "-";
if (core.enemys.hasSpecial(enemy, 11))
damage += "^";
}
return {
"damage": damage,
"color": color
};
}
////// 接下来N个临界值和临界减伤计算 //////
enemys.prototype.nextCriticals = function (enemy, number, x, y, floorId) {
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
number = number || 1;
var specialCriticals = this._nextCriticals_special(enemy, number, x, y, floorId);
if (specialCriticals != null) return specialCriticals;
var info = this.getDamageInfo(enemy, null, x, y, floorId);
if (info == null) { // 如果未破防...
var overAtk = this._nextCriticals_overAtk(enemy, x, y, floorId);
if (overAtk == null) return [];
if (typeof overAtk[1] == 'number') return [[overAtk[0], -overAtk[1]]];
info = overAtk[1];
info.__over__ = true;
info.__overAtk__ = overAtk[0];
}
if (typeof info == 'number') return [[0, 0]];
if (info.damage <= 0 && !core.flags.enableNegativeDamage) {
return [[info.__overAtk__ || 0, 0]];
}
if (core.flags.useLoop) {
if (core.status.hero.atk <= (main.criticalUseLoop || 1)) {
return this._nextCriticals_useLoop(enemy, info, number, x, y, floorId);
}
else {
return this._nextCriticals_useBinarySearch(enemy, info, number, x, y, floorId);
}
}
else {
return this._nextCriticals_useTurn(enemy, info, number, x, y, floorId);
}
}
/// 未破防临界采用二分计算
enemys.prototype._nextCriticals_overAtk = function (enemy, x, y, floorId) {
var calNext = function (currAtk, maxAtk) {
var start = currAtk, end = maxAtk;
if (start > end) return null;
while (start < end) {
var mid = Math.floor((start + end) / 2);
if (mid - start > end - mid) mid--;
var nextInfo = core.enemys.getDamageInfo(enemy, { "atk": mid }, x, y, floorId);
if (nextInfo != null) end = mid;
else start = mid + 1;
}
var nextInfo = core.enemys.getDamageInfo(enemy, { "atk": start }, x, y, floorId);
return nextInfo == null ? null : [start - core.status.hero.atk, nextInfo];
}
return calNext(core.status.hero.atk + 1,
core.getEnemyValue(enemy, 'hp', x, y, floorId) + core.getEnemyValue(enemy, 'def', x, y, floorId));
}
enemys.prototype._nextCriticals_special = function (enemy, number, x, y, floorId) {
if (this.hasSpecial(enemy.special, 10) || this.hasSpecial(enemy.special, 3))
return []; // 模仿or坚固临界
return null;
}
enemys.prototype._nextCriticals_useLoop = function (enemy, info, number, x, y, floorId) {
var mon_hp = info.mon_hp, hero_atk = core.status.hero.atk, mon_def = info.mon_def, pre = info.damage;
var list = [];
var start_atk = hero_atk;
if (info.__over__) {
start_atk += info.__overAtk__;
list.push([info.__overAtk__, -info.damage]);
}
for (var atk = start_atk + 1; atk <= mon_hp + mon_def; atk++) {
var nextInfo = this.getDamageInfo(enemy, { "atk": atk }, x, y, floorId);
if (nextInfo == null || (typeof nextInfo == 'number')) break;
if (pre > nextInfo.damage) {
pre = nextInfo.damage;
list.push([atk - hero_atk, info.damage - nextInfo.damage]);
if (nextInfo.damage <= 0 && !core.flags.enableNegativeDamage) break;
if (list.length >= number) break;
}
}
if (list.length == 0) list.push([0, 0]);
return list;
}
enemys.prototype._nextCriticals_useBinarySearch = function (enemy, info, number, x, y, floorId) {
var mon_hp = info.mon_hp, hero_atk = core.status.hero.atk, mon_def = info.mon_def, pre = info.damage;
var list = [];
var start_atk = hero_atk;
if (info.__over__) {
start_atk += info.__overAtk__;
list.push([info.__overAtk__, -info.damage]);
}
var calNext = function (currAtk, maxAtk) {
var start = Math.floor(currAtk), end = Math.floor(maxAtk);
if (start > end) return null;
while (start < end) {
var mid = Math.floor((start + end) / 2);
if (mid - start > end - mid) mid--;
var nextInfo = core.enemys.getDamageInfo(enemy, { "atk": mid }, x, y, floorId);
if (nextInfo == null || (typeof nextInfo == 'number')) return null;
if (pre > nextInfo.damage) end = mid;
else start = mid + 1;
}
var nextInfo = core.enemys.getDamageInfo(enemy, { "atk": start }, x, y, floorId);
return nextInfo == null || (typeof nextInfo == 'number') || nextInfo.damage >= pre ? null : [start, nextInfo.damage];
}
var currAtk = start_atk;
while (true) {
var next = calNext(currAtk + 1, mon_hp + mon_def, pre);
if (next == null) break;
currAtk = next[0];
pre = next[1];
list.push([currAtk - hero_atk, info.damage - pre]);
if (pre <= 0 && !core.flags.enableNegativeDamage) break;
if (list.length >= number) break;
}
if (list.length == 0) list.push([0, 0]);
return list;
}
enemys.prototype._nextCriticals_useTurn = function (enemy, info, number, x, y, floorId) {
var mon_hp = info.mon_hp, hero_atk = core.status.hero.atk, mon_def = info.mon_def, turn = info.turn;
// ------ 超大回合数强制使用二分算临界
// 以避免1攻10e回合2攻5e回合导致下述循环卡死问题
if (turn >= 1e6) { // 100w回合以上强制二分计算临界
return this._nextCriticals_useBinarySearch(enemy, info, number, x, y, floorId);
}
var list = [], pre = null;
var start_atk = hero_atk;
if (info.__over__) {
start_atk += info.__overAtk__;
list.push([info.__overAtk__, -info.damage]);
}
for (var t = turn - 1; t >= 1; t--) {
var nextAtk = Math.ceil(mon_hp / t) + mon_def;
// 装备提升比例的计算临界
nextAtk = Math.ceil(nextAtk / core.getBuff('atk'));
if (nextAtk <= start_atk) break;
if (nextAtk != pre) {
var nextInfo = this.getDamageInfo(enemy, { "atk": nextAtk }, x, y, floorId);
if (nextInfo == null || (typeof nextInfo == 'number')) break;
list.push([nextAtk - hero_atk, Math.floor(info.damage - nextInfo.damage)]);
if (nextInfo.damage <= 0 && !core.flags.enableNegativeDamage) break;
pre = nextAtk;
}
if (list.length >= number)
break;
}
if (list.length == 0) list.push([0, 0]);
return list;
}
////// N防减伤计算 //////
enemys.prototype.getDefDamage = function (enemy, k, x, y, floorId) {
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
k = k || 1;
var nowDamage = this._getDamage(enemy, null, x, y, floorId);
var nextDamage = this._getDamage(enemy, { "def": core.status.hero.def + k }, x, y, floorId);
if (nowDamage == null || nextDamage == null) return "???";
return nowDamage - nextDamage;
}
enemys.prototype.getEnemyInfo = function (enemy, hero, x, y, floorId) {
if (enemy == null) return null;
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
return this.enemydata.getEnemyInfo(enemy, hero, x, y, floorId)
}
////// 获得战斗伤害信息(实际伤害计算函数) //////
enemys.prototype.getDamageInfo = function (enemy, hero, x, y, floorId) {
if (enemy == null) return null;
// 移动到了脚本编辑 - getDamageInfo中
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
return this.enemydata.getDamageInfo(enemy, hero, x, y, floorId);
}
////// 获得在某个勇士属性下怪物伤害 //////
enemys.prototype.getDamage = function (enemy, x, y, floorId) {
return this._getDamage(enemy, null, x, y, floorId);
}
enemys.prototype._getDamage = function (enemy, hero, x, y, floorId) {
if (enemy == null) enemy = core.getBlockId(x, y, floorId);
if (typeof enemy == 'string') enemy = core.material.enemys[enemy];
if (enemy == null) return null;
var info = this.getDamageInfo(enemy, hero, x, y, floorId);
if (info == null) return null;
if (typeof info == 'number') return info;
return info.damage;
}
////// 获得当前楼层的怪物列表 //////
enemys.prototype.getCurrentEnemys = function (floorId) {
floorId = floorId || core.status.floorId;
var enemys = [], used = {};
core.extractBlocks(floorId);
core.status.maps[floorId].blocks.forEach(function (block) {
if (!block.disable && block.event.cls.indexOf('enemy') == 0) {
this._getCurrentEnemys_addEnemy(block.event.id, enemys, used, block.x, block.y, floorId);
}
}, this);
return this._getCurrentEnemys_sort(enemys);
}
enemys.prototype._getCurrentEnemys_getEnemy = function (enemyId) {
var enemy = core.material.enemys[enemyId];
if (!enemy) return null;
// 检查朝向displayIdInBook
return core.material.enemys[enemy.displayIdInBook] || core.material.enemys[(enemy.faceIds || {}).down] || enemy;
}
enemys.prototype._getCurrentEnemys_addEnemy = function (enemyId, enemys, used, x, y, floorId) {
var enemy = this._getCurrentEnemys_getEnemy(enemyId);
if (enemy == null) return;
var id = enemy.id;
var enemyInfo = this.getEnemyInfo(enemy, null, null, null, floorId);
var locEnemyInfo = this.getEnemyInfo(enemy, null, x, y, floorId);
if (!core.flags.enableEnemyPoint ||
(locEnemyInfo.atk == enemyInfo.atk && locEnemyInfo.def == enemyInfo.def && locEnemyInfo.hp == enemyInfo.hp)) {
x = null;
y = null;
} else {
// 检查enemys里面是否使用了存在的内容
for (var i = 0; i < enemys.length; ++i) {
var one = enemys[i];
if (id == one.id && one.locs != null &&
locEnemyInfo.atk == one.atk && locEnemyInfo.def == one.def && locEnemyInfo.hp == one.hp) {
one.locs.push([x, y]);
return;
}
}
enemyInfo = locEnemyInfo;
}
var id = enemy.id + ":" + x + ":" + y;
if (used[id]) return;
used[id] = true;
var specialText = core.enemys.getSpecialText(enemy);
var specialColor = core.enemys.getSpecialColor(enemy);
var critical = this.nextCriticals(enemy, 1, x, y, floorId);
if (critical.length > 0) critical = critical[0];
var e = core.clone(enemy);
for (var v in enemyInfo) {
e[v] = enemyInfo[v];
}
if (x != null && y != null) {
e.locs = [[x, y]];
}
e.name = core.getEnemyValue(enemy, 'name', x, y, floorId);
e.specialText = specialText;
e.specialColor = specialColor;
e.damage = this.getDamage(enemy, x, y, floorId);
e.critical = critical[0];
e.criticalDamage = critical[1];
e.defDamage = this._getCurrentEnemys_addEnemy_defDamage(enemy, x, y, floorId);
enemys.push(e);
}
enemys.prototype._getCurrentEnemys_addEnemy_defDamage = function (enemy, x, y, floorId) {
var ratio = core.status.maps[floorId || core.status.floorId].ratio || 1;
return this.getDefDamage(enemy, ratio, x, y, floorId);
}
enemys.prototype._getCurrentEnemys_sort = function (enemys) {
return enemys.sort(function (a, b) {
if (a.damage == b.damage) {
return a.money - b.money;
}
if (a.damage == null) {
return 1;
}
if (b.damage == null) {
return -1;
}
return a.damage - b.damage;
});
}
enemys.prototype.hasEnemyLeft = function (enemyId, floorId) {
if (floorId == null) floorId = core.status.floorId;
if (!(floorId instanceof Array)) floorId = [floorId];
var enemyMap = {};
if (enemyId instanceof Array) enemyId.forEach(function (v) { enemyMap[v] = true; });
else if (enemyId) enemyMap[enemyId] = true;
else enemyMap = null;
for (var i = 0; i < floorId.length; i++) {
core.extractBlocks(floorId[i]);
var mapBlocks = core.status.maps[floorId[i]].blocks;
for (var b = 0; b < mapBlocks.length; b++) {
if (!mapBlocks[b].disable && mapBlocks[b].event.cls.indexOf('enemy') === 0) {
if (enemyMap === null || enemyMap[core.getFaceDownId(mapBlocks[b])]) return true;
}
}
}
return false;
}

3788
libs/events.js Normal file

File diff suppressed because it is too large Load Diff

51
libs/extensions.js Normal file
View File

@ -0,0 +1,51 @@
/*
extensions.js负责拓展插件
*/
"use strict";
function extensions () {
}
extensions.prototype._load = function (callback) {
if (main.replayChecking) return callback();
if (!window.fs) {
this._loadJs('_server/fs.js', function () {
core.extensions._listExtensions(callback);
}, callback);
} else this._listExtensions(callback);
}
extensions.prototype._loadJs = function (file, callback, onerror) {
var script = document.createElement('script');
script.src = file + '?v=' + main.version;
script.onload = callback;
script.onerror = onerror;
main.dom.body.appendChild(script);
}
extensions.prototype._listExtensions = function (callback) {
if (!window.fs) return callback();
fs.readdir('extensions', function (error, data) {
if (error || !(data instanceof Array)) return callback();
var list = [];
data.forEach(function (name) {
if (/^[\w.-]+\.js$/.test(name)) {
list.push(name);
}
});
list.sort();
core.extensions._loadExtensions(list, callback);
});
}
extensions.prototype._loadExtensions = function (list, callback) {
var i = 0;
var load = function () {
if (i == list.length) return callback();
core.extensions._loadJs('extensions/' + list[i++], load, load);
}
load();
}

77
libs/icons.js Normal file
View File

@ -0,0 +1,77 @@
"use strict";
function icons () {
this._init();
}
icons.prototype._init = function () {
this.icons = icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1;
//delete(icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1);
// tileset的起点
this.tilesetStartOffset = 10000;
}
icons.prototype.getIcons = function () {
var icons = core.clone(this.icons);
icons.hero.leftup = icons.hero.leftdown = icons.hero.left;
icons.hero.rightup = icons.hero.rightdown = icons.hero.right;
return icons;
}
////// 根据道具ID获得其cls //////
icons.prototype.getClsFromId = function (id) {
for (var cls in core.material.icons) {
if (cls != 'hero' && id in core.material.icons[cls])
return cls;
}
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) {
if (cls == 'enemys' || cls == 'npcs') {
return 2;
}
if (cls == 'animates' || cls == 'enemy48' || cls == 'npc48') {
return 4;
}
return 1;
}
////// 根据图块数字或ID获得所在的tileset和坐标信息 //////
icons.prototype.getTilesetOffset = function (id) {
if (typeof id == 'string') {
id = core.getIdOfThis(id);
// Tileset的ID必须是 X+数字 的形式
if (!/^X\d+$/.test(id)) return null;
id = parseInt(id.substring(1));
}
else if (typeof id != 'number') {
return null;
}
core.tilesets = core.tilesets || [];
var startOffset = this.tilesetStartOffset;
for (var i in core.tilesets) {
var imgName = core.tilesets[i];
var img = core.material.images.tilesets[imgName];
var width = Math.floor(parseInt(img.getAttribute('_width')) / 32), height = Math.floor(parseInt(img.getAttribute('_height')) / 32);
if (id >= startOffset && id < startOffset + width * height) {
var x = (id - startOffset) % width, y = parseInt((id - startOffset) / width);
return { "image": imgName, "x": x, "y": y };
}
startOffset += this.tilesetStartOffset;
}
return null;
}

434
libs/items.js Normal file
View File

@ -0,0 +1,434 @@
"use strict";
function items () {
this._init();
}
////// 初始化 //////
items.prototype._init = function () {
this.items = items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a;
for (var itemId in this.items) {
this.items[itemId].id = itemId;
}
}
////// 获得所有道具 //////
items.prototype.getItems = function () {
var items = core.clone(this.items);
var equipInfo = core.getFlag('equipInfo');
if (equipInfo) {
for (var id in equipInfo) {
items[id].equip = core.clone(equipInfo[id]);
}
}
return items;
}
////// “即捡即用类”道具的使用效果 //////
items.prototype.getItemEffect = function (itemId, itemNum) {
var itemCls = core.material.items[itemId].cls;
// 消耗品
if (itemCls === 'items') {
var curr_hp = core.status.hero.hp;
var itemEffect = core.material.items[itemId].itemEffect;
if (itemEffect) {
try {
for (var i = 0; i < itemNum; ++i)
eval(itemEffect);
}
catch (e) {
console.error(e);
}
}
core.status.hero.statistics.hp += core.status.hero.hp - curr_hp;
var useItemEvent = core.material.items[itemId].useItemEvent;
if (useItemEvent) {
try {
core.insertAction(useItemEvent);
}
catch (e) {
console.error(e);
}
}
core.updateStatusBar(false, true);
}
else {
core.addItem(itemId, itemNum);
}
}
////// “即捡即用类”道具的文字提示 //////
items.prototype.getItemEffectTip = function (itemId) {
var itemCls = core.material.items[itemId].cls;
// 消耗品
if (itemCls === 'items') {
var itemEffectTip = core.material.items[itemId].itemEffectTip;
if (itemEffectTip) {
try {
return core.replaceText(itemEffectTip) || "";
} catch (e) {
console.error(e);
return "";
}
}
}
return "";
}
////// 使用道具 //////
items.prototype.useItem = function (itemId, noRoute, callback) {
if (!this.canUseItem(itemId)) {
if (callback) callback();
return;
}
// 执行道具效果
this._useItemEffect(itemId);
// 执行完毕
this._afterUseItem(itemId);
// 记录路线
if (!noRoute) core.status.route.push("item:" + itemId);
if (callback) callback();
}
items.prototype._useItemEffect = function (itemId) {
var useItemEffect = core.material.items[itemId].useItemEffect;
if (useItemEffect) {
try {
eval(useItemEffect);
}
catch (e) {
console.error(e);
}
}
var useItemEvent = core.material.items[itemId].useItemEvent;
if (useItemEvent) {
try {
core.insertAction(useItemEvent);
}
catch (e) {
console.error(e);
}
}
}
items.prototype._afterUseItem = function (itemId) {
// 道具使用完毕:删除
var itemCls = core.material.items[itemId].cls;
if (itemCls == 'tools')
core.status.hero.items[itemCls][itemId]--;
if (core.status.hero.items[itemCls][itemId] <= 0)
delete core.status.hero.items[itemCls][itemId];
core.updateStatusBar(false, true);
}
////// 当前能否使用道具 //////
items.prototype.canUseItem = function (itemId) {
// 没有道具
if (!core.hasItem(itemId)) return false;
var canUseItemEffect = core.material.items[itemId].canUseItemEffect;
if (canUseItemEffect) {
try {
return eval(canUseItemEffect);
}
catch (e) {
console.error(e);
return false;
}
}
}
////// 获得某个物品的个数 //////
items.prototype.itemCount = function (itemId) {
if (!core.material.items[itemId] || !core.isPlaying()) return 0;
var itemCls = core.material.items[itemId].cls;
if (itemCls == "items") return 0;
return core.status.hero.items[itemCls][itemId] || 0;
}
////// 是否存在某个物品 //////
items.prototype.hasItem = function (itemId) {
return this.itemCount(itemId) > 0;
}
////// 是否装备某件装备 //////
items.prototype.hasEquip = function (itemId) {
if (!(core.material.items[itemId] || {}).equip || !core.isPlaying()) return null;
for (var i in core.status.hero.equipment)
if (core.status.hero.equipment[i] == itemId)
return true;
return false
}
////// 获得某个装备类型的当前装备 //////
items.prototype.getEquip = function (equipType) {
return core.status.hero.equipment[equipType] || null;
}
////// 设置某个物品的个数 //////
items.prototype.setItem = function (itemId, itemNum) {
itemNum = itemNum || 0;
var itemCls = core.material.items[itemId].cls;
if (itemCls == 'items') return;
core.status.hero.items[itemCls][itemId] = itemNum;
if (core.status.hero.items[itemCls][itemId] <= 0) {
delete core.status.hero.items[itemCls][itemId];
}
core.updateStatusBar();
}
////// 增加某个物品的个数 //////
items.prototype.addItem = function (itemId, itemNum) {
if (itemNum == null) itemNum = 1;
var itemData = core.material.items[itemId];
var itemCls = itemData.cls;
if (itemCls == 'items') return;
if (core.status.hero.items[itemCls][itemId] == null) {
core.status.hero.items[itemCls][itemId] = 0;
}
core.status.hero.items[itemCls][itemId] += itemNum;
if (core.status.hero.items[itemCls][itemId] <= 0) {
delete core.status.hero.items[itemCls][itemId];
}
// 永久道具只能有一个
if (itemCls == 'constants' && core.status.hero.items[itemCls][itemId] > 1)
core.status.hero.items[itemCls][itemId] = 1;
core.updateStatusBar();
}
////// 删除某个物品 //////
items.prototype.removeItem = function (itemId, itemNum) {
if (itemNum == null) itemNum = 1;
if (!core.hasItem(itemId)) return false;
var itemCls = core.material.items[itemId].cls;
core.status.hero.items[itemCls][itemId] -= itemNum;
if (core.status.hero.items[itemCls][itemId] <= 0) {
delete core.status.hero.items[itemCls][itemId];
}
core.updateStatusBar();
return true;
}
// ---------- 装备相关 ------------ //
items.prototype.getEquipTypeByName = function (name) {
var names = core.status.globalAttribute.equipName;
var types = [];
for (var i = 0; i < names.length; ++i) {
if (names[i] === name) {
types.push(i);
if (!core.status.hero.equipment[i]) return i;
}
}
return types.length == 1 ? types[0] : -1;
}
items.prototype.getEquipTypeById = function (equipId) {
var type = core.material.items[equipId].equip.type;
if (typeof type == 'string')
type = this.getEquipTypeByName(type);
return type;
}
// 当前能否撞上某装备
items.prototype.canEquip = function (equipId, hint) {
// 装备是否合法
var equip = core.material.items[equipId] || {};
if (!equip.equip) {
if (hint) {
core.playSound('操作失败');
core.drawTip("不合法的装备!");
}
return false;
}
// 是否拥有该装备
if (!core.hasItem(equipId) && !core.hasEquip(equipId)) {
if (hint) {
core.playSound('操作失败');
core.drawTip("你当前没有" + equip.name + ",无法换装");
}
return false;
}
// 可装备条件
var canUseItemEffect = core.material.items[equipId].canUseItemEffect;
if (canUseItemEffect) {
try {
if (!eval(canUseItemEffect)) {
if (hint) {
core.playSound('操作失败');
core.drawTip("当前不可换上" + equip.name);
}
return false;
}
}
catch (e) {
console.error(e);
return false;
}
}
return true;
}
////// 换上 //////
items.prototype.loadEquip = function (equipId, callback) {
if (!this.canEquip(equipId, true)) {
if (callback) callback();
return;
}
var loadEquip = core.material.items[equipId] || {};
var type = this.getEquipTypeById(equipId);
if (type < 0) {
core.playSound('操作失败');
core.drawTip("当前没有" + loadEquip.equip.type + "的空位!");
if (callback) callback();
return;
}
this._realLoadEquip(type, equipId, core.status.hero.equipment[type], callback);
}
////// 卸下 //////
items.prototype.unloadEquip = function (equipType, callback) {
var unloadEquipId = core.status.hero.equipment[equipType];
if (!unloadEquipId) {
if (callback) callback();
return;
}
this._realLoadEquip(equipType, null, unloadEquipId, callback);
}
items.prototype.compareEquipment = function (compareEquipId, beComparedEquipId) {
var result = { "value": {}, "percentage": {} };
var first = core.material.items[compareEquipId], second = core.material.items[beComparedEquipId];
for (var one in result) {
for (var name in core.status.hero) {
if (typeof core.status.hero[name] == 'number') {
var ans = 0;
if (first) ans += ((first.equip || {})[one] || {})[name] || 0;
if (second) ans -= ((second.equip || {})[one] || {})[name] || 0;
if (ans != 0) result[one][name] = ans;
}
}
}
return result;
}
////// 实际换装的效果 //////
items.prototype._loadEquipEffect = function (equipId, unloadEquipId) {
// 比较能力值
var result = core.compareEquipment(equipId, unloadEquipId);
for (var name in result.percentage)
core.addBuff(name, result.percentage[name] / 100);
for (var name in result.value)
core.status.hero[name] += result.value[name];
}
items.prototype._realLoadEquip = function (type, loadId, unloadId, callback) {
var loadEquip = core.material.items[loadId] || {}, unloadEquip = core.material.items[unloadId] || {};
// --- 音效
this._realLoadEquip_playSound();
// --- 实际换装
this._loadEquipEffect(loadId, unloadId);
// --- 加减
if (loadId) core.removeItem(loadId);
if (unloadId) core.addItem(unloadId);
core.status.hero.equipment[type] = loadId || null;
// --- 提示
if (loadId) core.drawTip("已装备上" + loadEquip.name, loadId);
else if (unloadId) core.drawTip("已卸下" + unloadEquip.name, unloadId);
if (callback) callback();
}
items.prototype._realLoadEquip_playSound = function () {
if (core.hasFlag("__quickLoadEquip__")) return;
core.stopSound();
core.playSound('穿脱装备');
}
////// 保存装备 //////
items.prototype.quickSaveEquip = function (index) {
var saveEquips = core.getFlag("saveEquips", []);
saveEquips[index] = core.clone(core.status.hero.equipment);
core.setFlag("saveEquips", saveEquips);
core.status.route.push("saveEquip:" + index);
core.drawTip("已保存" + index + "号套装");
}
////// 读取装备 //////
items.prototype.quickLoadEquip = function (index) {
var current = core.getFlag("saveEquips", [])[index];
if (!current) {
core.playSound('操作失败');
core.drawTip(index + "号套装不存在");
return;
}
// 检查所有的装备
var equipSize = core.status.globalAttribute.equipName.length;
for (var i = 0; i < equipSize; i++) {
var v = current[i];
if (v && !this.canEquip(v, true))
return;
}
core.status.route.push("loadEquip:" + index);
core.setFlag("__quickLoadEquip__", true);
// 快速换装
var toEquip = [];
for (var i = 0; i < equipSize; i++) {
var now = core.status.hero.equipment[i];
// --- 只考虑diff的装备
var to = current[i];
if (now != to) {
toEquip.push(to || null);
if (now) {
this.unloadEquip(i);
}
}
}
for (var i in toEquip) {
var to = toEquip[i];
if (to) {
this.loadEquip(to);
}
}
core.removeFlag("__quickLoadEquip__");
this._realLoadEquip_playSound();
core.drawTip("成功换上" + index + "号套装");
}
////// 设置装备属性 //////
items.prototype.setEquip = function (equipId, valueType, name, value, operator, prefix) {
var equip = core.material.items[equipId];
if (!equip || equip.cls != 'equips') return;
var equipInfo = equip.equip || {};
if (!equipInfo[valueType]) equipInfo[valueType] = {};
var toEquipInfo = core.clone(equipInfo);
toEquipInfo[valueType][name] = core.events._updateValueByOperator(core.calValue(value, prefix), equipInfo[valueType][name], operator);
// 如果是穿上状态,则还需要直接修改当前数值
if (core.hasEquip(equipId)) {
// 设置一个临时装备,然后模拟换装操作
var tempId = 'temp:' + equipId;
core.material.items[tempId] = { 'cls': 'equips', 'equip': core.clone(toEquipInfo) };
this._loadEquipEffect(tempId, equipId);
delete core.material.items[tempId];
core.updateStatusBar();
}
equip.equip = core.clone(toEquipInfo);
flags.equipInfo = flags.equipInfo || {};
flags.equipInfo[equipId] = core.clone(toEquipInfo);
}

516
libs/loader.js Normal file
View File

@ -0,0 +1,516 @@
/*
loader.js负责对资源的加载
*/
"use strict";
function loader () {
this._init();
}
loader.prototype._init = function () {
}
////// 设置加载进度条进度 //////
loader.prototype._setStartProgressVal = function (val) {
core.dom.startTopProgress.style.width = val + '%';
}
////// 设置加载进度条提示文字 //////
loader.prototype._setStartLoadTipText = function (text) {
core.dom.startTopLoadTips.innerText = text;
}
loader.prototype._load = function (callback) {
if (main.useCompress) {
this._load_async(callback);
} else {
this._load_sync(callback);
}
}
loader.prototype._load_sync = function (callback) {
this._loadAnimates_sync();
this._loadMusic_sync();
core.loader._loadMaterials_sync(function () {
core.loader._loadExtraImages_sync(function () {
core.loader._loadAutotiles_sync(function () {
core.loader._loadTilesets_sync(callback);
})
})
});
}
loader.prototype._load_async = function (callback) {
core.loader._setStartLoadTipText('正在加载资源文件...');
var all = {};
var _makeOnProgress = function (name) {
if (!all[name]) all[name] = { loaded: 0, total: 0, finished: false };
return function (loaded, total) {
all[name].loaded = loaded;
all[name].total = total;
var allLoaded = 0, allTotal = 0;
for (var one in all) {
allLoaded += all[one].loaded;
allTotal += all[one].total;
}
if (allTotal > 0) {
if (allLoaded == allTotal) {
core.loader._setStartLoadTipText("正在处理资源文件... 请稍候...");
} else {
core.loader._setStartLoadTipText('正在加载资源文件... ' +
core.formatSize(allLoaded) + " / " + core.formatSize(allTotal) +
" (" + (allLoaded / allTotal * 100).toFixed(2) + "%)");
}
core.loader._setStartProgressVal(allLoaded / allTotal * 100);
}
};
}
var _makeOnFinished = function (name) {
return function () {
setTimeout(function () {
all[name].finished = true;
for (var one in all) {
if (!all[one].finished) return;
}
callback();
});
}
}
this._loadAnimates_async(_makeOnProgress('animates'), _makeOnFinished('animates'));
this._loadMusic_async(_makeOnProgress('sounds'), _makeOnFinished('sounds'));
this._loadMaterials_async(_makeOnProgress('materials'), _makeOnFinished('materials'));
this._loadExtraImages_async(_makeOnProgress('images'), _makeOnFinished('images'));
this._loadAutotiles_async(_makeOnProgress('autotiles'), _makeOnFinished('autotiles'));
this._loadTilesets_async(_makeOnProgress('tilesets'), _makeOnFinished('tilesets'));
}
// ----- 加载资源文件 ------ //
loader.prototype._loadMaterials_sync = function (callback) {
this._setStartLoadTipText("正在加载资源文件...");
this.loadImages("materials", core.materials, core.material.images, function () {
core.loader._loadMaterials_afterLoad();
callback();
});
}
loader.prototype._loadMaterials_async = function (onprogress, onfinished) {
this.loadImagesFromZip('project/materials/materials.h5data', core.materials, core.material.images, onprogress, function () {
core.loader._loadMaterials_afterLoad();
onfinished();
});
}
loader.prototype._loadMaterials_afterLoad = function () {
var images = core.splitImage(core.material.images['icons']);
for (var key in core.statusBar.icons) {
if (typeof core.statusBar.icons[key] == 'number') {
core.statusBar.icons[key] = images[core.statusBar.icons[key]];
if (core.statusBar.image[key] != null)
core.statusBar.image[key].src = core.statusBar.icons[key].src;
}
}
}
// ------ 加载使用的图片 ------ //
loader.prototype._loadExtraImages_sync = function (callback) {
core.material.images.images = {};
this._setStartLoadTipText("正在加载图片文件...");
core.loadImages("images", core.images, core.material.images.images, callback);
}
loader.prototype._loadExtraImages_async = function (onprogress, onfinished) {
core.material.images.images = {};
var images = core.images;
// Check .gif
var gifs = images.filter(function (name) {
return name.toLowerCase().endsWith('.gif');
});
images = images.filter(function (name) {
return !name.toLowerCase().endsWith('.gif');
});
this.loadImagesFromZip('project/images/images.h5data', images, core.material.images.images, onprogress, onfinished);
// gif没有被压缩在zip中延迟加载...
gifs.forEach(function (gif) {
this.loadImage("images", gif, function (id, image) {
if (image != null) {
core.material.images.images[gif] = image;
}
});
}, this);
}
// ------ 加载自动元件 ------ //
loader.prototype._loadAutotiles_sync = function (callback) {
core.material.images.autotile = {};
var keys = Object.keys(core.material.icons.autotile);
var autotiles = {};
this._setStartLoadTipText("正在加载自动元件...");
this.loadImages("autotiles", keys, autotiles, function () {
core.loader._loadAutotiles_afterLoad(keys, autotiles);
callback();
});
}
loader.prototype._loadAutotiles_async = function (onprogress, onfinished) {
core.material.images.autotile = {};
var keys = Object.keys(core.material.icons.autotile);
var autotiles = {};
this.loadImagesFromZip('project/autotiles/autotiles.h5data', keys, autotiles, onprogress, function () {
core.loader._loadAutotiles_afterLoad(keys, autotiles);
onfinished();
});
}
loader.prototype._loadAutotiles_afterLoad = function (keys, autotiles) {
// autotile需要保证顺序
keys.forEach(function (v) {
core.material.images.autotile[v] = autotiles[v];
});
setTimeout(function () {
core.maps._makeAutotileEdges();
});
}
// ------ 加载额外素材 ------ //
loader.prototype._loadTilesets_sync = function (callback) {
core.material.images.tilesets = {};
this._setStartLoadTipText("正在加载额外素材...");
this.loadImages("tilesets", core.tilesets, core.material.images.tilesets, function () {
core.loader._loadTilesets_afterLoad();
callback();
});
}
loader.prototype._loadTilesets_async = function (onprogress, onfinished) {
core.material.images.tilesets = {};
this.loadImagesFromZip('project/tilesets/tilesets.h5data', core.tilesets, core.material.images.tilesets, onprogress, function () {
core.loader._loadTilesets_afterLoad();
onfinished();
});
}
loader.prototype._loadTilesets_afterLoad = function () {
// 检查宽高是32倍数如果出错在控制台报错
for (var imgName in core.material.images.tilesets) {
var img = core.material.images.tilesets[imgName];
if (img.width % 32 != 0 || img.height % 32 != 0) {
console.warn("警告!" + imgName + "的宽或高不是32的倍数");
}
if (img.width * img.height > 32 * 32 * 3000) {
console.warn("警告!" + imgName + "上的图块素材个数大于3000");
}
}
}
// ------ 实际加载一系列图片 ------ //
loader.prototype.loadImages = function (dir, names, toSave, callback) {
if (!names || names.length == 0) {
if (callback) callback();
return;
}
var items = 0;
for (var i = 0; i < names.length; i++) {
this.loadImage(dir, names[i], function (id, image) {
core.loader._setStartLoadTipText('正在加载图片 ' + id + "...");
if (toSave[id] !== undefined) {
if (image != null)
toSave[id] = image;
return;
}
toSave[id] = image;
items++;
core.loader._setStartProgressVal(items * (100 / names.length));
if (items == names.length) {
if (callback) callback();
}
})
}
}
loader.prototype.loadImage = function (dir, imgName, callback) {
try {
var name = imgName;
if (name.indexOf(".") < 0)
name = name + ".png";
var image = new Image();
image.onload = function () {
image.setAttribute('_width', image.width);
image.setAttribute('_height', image.height);
callback(imgName, image);
}
image.onerror = function () {
callback(imgName, null);
}
image.src = 'project/' + dir + '/' + name + "?v=" + main.version;
if (name.endsWith('.gif'))
callback(imgName, null);
}
catch (e) {
console.error(e);
}
}
// ------ 从zip中加载一系列图片 ------ //
loader.prototype.loadImagesFromZip = function (url, names, toSave, onprogress, onfinished) {
if (!names || names.length == 0) {
if (onfinished) onfinished();
return;
}
core.unzip(url + "?v=" + main.version, function (data) {
var cnt = 1;
names.forEach(function (name) {
var imgName = name;
if (imgName.indexOf('.') < 0) imgName += '.png';
if (imgName in data) {
var img = new Image();
var url = URL.createObjectURL(data[imgName]);
cnt++;
img.onload = function () {
cnt--;
URL.revokeObjectURL(url);
img.setAttribute('_width', img.width);
img.setAttribute('_height', img.height);
if (cnt == 0 && onfinished) onfinished();
}
img.src = url;
toSave[name] = img;
}
});
cnt--;
if (cnt == 0 && onfinished) onfinished();
}, null, false, onprogress);
}
// ------ 加载动画文件 ------ //
loader.prototype._loadAnimates_sync = function () {
this._setStartLoadTipText("正在加载动画文件...");
if (main.supportBunch) {
if (core.animates.length > 0) {
core.http('GET', '__all_animates__?v=' + main.version + '&id=' + core.animates.join(','), null, function (content) {
var u = content.split('@@@~~~###~~~@@@');
for (var i = 0; i < core.animates.length; ++i) {
if (u[i] != '') {
core.material.animates[core.animates[i]] = core.loader._loadAnimate(u[i]);
} else {
console.error('无法找到动画文件' + core.animates[i] + '');
}
}
}, "text/plain; charset=x-user-defined");
}
return;
}
core.animates.forEach(function (t) {
core.http('GET', 'project/animates/' + t + ".animate?v=" + main.version, null, function (content) {
core.material.animates[t] = core.loader._loadAnimate(content);
}, function (e) {
console.error(e);
core.material.animates[t] = null;
}, "text/plain; charset=x-user-defined")
});
}
loader.prototype._loadAnimates_async = function (onprogress, onfinished) {
core.unzip('project/animates/animates.h5data?v=' + main.version, function (animates) {
for (var name in animates) {
if (name.endsWith(".animate")) {
var t = name.substring(0, name.length - 8);
if (core.animates.indexOf(t) >= 0)
core.material.animates[t] = core.loader._loadAnimate(animates[name]);
}
}
onfinished();
}, null, true, onprogress);
}
loader.prototype._loadAnimate = function (content) {
try {
content = JSON.parse(content);
var data = {};
data.ratio = content.ratio;
data.se = content.se;
data.pitch = content.pitch;
data.images = [];
content.bitmaps.forEach(function (t2) {
if (!t2) {
data.images.push(null);
}
else {
try {
var image = new Image();
image.src = t2;
data.images.push(image);
} catch (e) {
console.error(e);
data.images.push(null);
}
}
})
data.frame = content.frame_max;
data.frames = [];
content.frames.forEach(function (t2) {
var info = [];
t2.forEach(function (t3) {
info.push({
'index': t3[0],
'x': t3[1],
'y': t3[2],
'zoom': t3[3],
'opacity': t3[4],
'mirror': t3[5] || 0,
'angle': t3[6] || 0,
})
})
data.frames.push(info);
});
return data;
}
catch (e) {
console.error(e);
return null;
}
}
// ------ 加载音乐和音效 ------ //
loader.prototype._loadMusic_sync = function () {
this._setStartLoadTipText("正在加载音效文件...");
core.bgms.forEach(function (t) {
core.loader.loadOneMusic(t);
});
core.sounds.forEach(function (t) {
core.loader.loadOneSound(t);
});
// 直接开始播放
core.playBgm(main.startBgm);
}
loader.prototype._loadMusic_async = function (onprogress, onfinished) {
core.bgms.forEach(function (t) {
core.loader.loadOneMusic(t);
});
core.unzip('project/sounds/sounds.h5data?v=' + main.version, function (data) {
// 延迟解析
setTimeout(function () {
for (var name in data) {
if (core.sounds.indexOf(name) >= 0) {
core.loader._loadOneSound_decodeData(name, data[name]);
}
}
});
onfinished();
}, null, false, onprogress);
// 直接开始播放
core.playBgm(main.startBgm);
}
loader.prototype.loadOneMusic = function (name) {
var music = new Audio();
music.preload = 'none';
if (main.bgmRemote) music.src = main.bgmRemoteRoot + core.firstData.name + '/' + name;
else music.src = 'project/bgms/' + name;
music.loop = 'loop';
core.material.bgms[name] = music;
}
loader.prototype.loadOneSound = function (name) {
core.http('GET', 'project/sounds/' + name + "?v=" + main.version, null, function (data) {
core.loader._loadOneSound_decodeData(name, data);
}, function (e) {
console.error(e);
core.material.sounds[name] = null;
}, null, 'arraybuffer');
}
loader.prototype._loadOneSound_decodeData = function (name, data) {
if (data instanceof Blob) {
var blobReader = new zip.BlobReader(data);
blobReader.init(function () {
blobReader.readUint8Array(0, blobReader.size, function (uint8) {
core.loader._loadOneSound_decodeData(name, uint8.buffer);
})
});
return;
}
try {
core.musicStatus.audioContext.decodeAudioData(data, function (buffer) {
core.material.sounds[name] = buffer;
}, function (e) {
console.error(e);
core.material.sounds[name] = null;
})
}
catch (e) {
console.error(e);
core.material.sounds[name] = null;
}
}
loader.prototype.loadBgm = function (name) {
name = core.getMappedName(name);
if (!core.material.bgms[name]) return;
// 如果没开启音乐,则不预加载
if (!core.musicStatus.bgmStatus) return;
// 是否已经预加载过
var index = core.musicStatus.cachedBgms.indexOf(name);
if (index >= 0) {
core.musicStatus.cachedBgms.splice(index, 1);
}
else {
// 预加载BGM
this._preloadBgm(core.material.bgms[name]);
// core.material.bgms[name].load();
// 清理尾巴
if (core.musicStatus.cachedBgms.length == core.musicStatus.cachedBgmCount) {
this.freeBgm(core.musicStatus.cachedBgms.pop());
}
}
// 移动到缓存最前方
core.musicStatus.cachedBgms.unshift(name);
}
loader.prototype._preloadBgm = function (bgm) {
bgm.volume = 0;
bgm.play();
}
loader.prototype.freeBgm = function (name) {
name = core.getMappedName(name);
if (!core.material.bgms[name]) return;
// 从cachedBgms中删除
core.musicStatus.cachedBgms = core.musicStatus.cachedBgms.filter(function (t) {
return t != name;
});
// 清掉缓存
core.material.bgms[name].removeAttribute("src");
core.material.bgms[name].load();
core.material.bgms[name] = null;
if (name == core.musicStatus.playingBgm) {
core.musicStatus.playingBgm = null;
}
// 三秒后重新加载
setTimeout(function () {
core.loader.loadOneMusic(name);
}, 3000);
}

3112
libs/maps.js Normal file

File diff suppressed because it is too large Load Diff

254
libs/thirdparty/LICENSE.md vendored Normal file
View File

@ -0,0 +1,254 @@
lzstring
============
MIT License
Copyright (c) 2013 pieroxy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
localforage
============
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2014 Mozilla
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
zip
============
Copyright (c) 2013 Gildas Lormeau. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

13
libs/thirdparty/corejs.min.js vendored Normal file

File diff suppressed because one or more lines are too long

7
libs/thirdparty/localforage.min.js vendored Normal file

File diff suppressed because one or more lines are too long

139
libs/thirdparty/lodash.min.js vendored Normal file
View File

@ -0,0 +1,139 @@
/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function e(n,t){for(var r=null==n?0:n.length;r--&&t(n[r],r,n)!==!1;);return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;
return!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!!(null==n?0:n.length)&&y(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);
return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.split("")}function _(n){return n.match(Bt)||[]}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function g(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function y(n,t,r){return t===t?q(n,t,r):g(n,b,r)}function d(n,t,r,e){
for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function b(n){return n!==n}function w(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:Sn}function m(n){return function(t){return null==t?Y:t[n]}}function x(n){return function(t){return null==n?Y:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==Y&&(r=r===Y?i:r+i);
}return r}function O(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function I(n,t){return c(t,function(t){return[t,n[t]]})}function R(n){return function(t){return n(t)}}function z(n,t){return c(t,function(t){return n[t]})}function E(n,t){return n.has(t)}function S(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function W(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}function C(n){return"\\"+Gr[n]}function U(n,t){
return null==n?Y:n[t]}function B(n){return Dr.test(n)}function T(n){return Mr.test(n)}function $(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function D(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function M(n,t){return function(r){return n(t(r))}}function F(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==un||(n[r]=un,i[u++]=r)}return i}function N(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}function P(n){
var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function q(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function Z(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function K(n){return B(n)?G(n):se(n)}function V(n){return B(n)?H(n):p(n)}function G(n){for(var t=Tr.lastIndex=0;Tr.test(n);)++t;return t}function H(n){return n.match(Tr)||[]}function J(n){return n.match($r)||[]}var Y,Q="4.17.19",X=200,nn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",tn="Expected a function",rn="__lodash_hash_undefined__",en=500,un="__lodash_placeholder__",on=1,fn=2,cn=4,an=1,ln=2,sn=1,hn=2,pn=4,_n=8,vn=16,gn=32,yn=64,dn=128,bn=256,wn=512,mn=30,xn="...",jn=800,An=16,kn=1,On=2,In=3,Rn=1/0,zn=9007199254740991,En=1.7976931348623157e308,Sn=NaN,Wn=4294967295,Ln=Wn-1,Cn=Wn>>>1,Un=[["ary",dn],["bind",sn],["bindKey",hn],["curry",_n],["curryRight",vn],["flip",wn],["partial",gn],["partialRight",yn],["rearg",bn]],Bn="[object Arguments]",Tn="[object Array]",$n="[object AsyncFunction]",Dn="[object Boolean]",Mn="[object Date]",Fn="[object DOMException]",Nn="[object Error]",Pn="[object Function]",qn="[object GeneratorFunction]",Zn="[object Map]",Kn="[object Number]",Vn="[object Null]",Gn="[object Object]",Hn="[object Promise]",Jn="[object Proxy]",Yn="[object RegExp]",Qn="[object Set]",Xn="[object String]",nt="[object Symbol]",tt="[object Undefined]",rt="[object WeakMap]",et="[object WeakSet]",ut="[object ArrayBuffer]",it="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",ct="[object Int8Array]",at="[object Int16Array]",lt="[object Int32Array]",st="[object Uint8Array]",ht="[object Uint8ClampedArray]",pt="[object Uint16Array]",_t="[object Uint32Array]",vt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,dt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,wt=RegExp(dt.source),mt=RegExp(bt.source),xt=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ot=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,zt=RegExp(Rt.source),Et=/^\s+|\s+$/g,St=/^\s+/,Wt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ct=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Bt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Tt=/\\(\\)?/g,$t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dt=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Nt=/^\[object .+?Constructor\]$/,Pt=/^0o[0-7]+$/i,qt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Kt=/($^)/,Vt=/['\n\r\u2028\u2029\\]/g,Gt="\\ud800-\\udfff",Ht="\\u0300-\\u036f",Jt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Qt=Ht+Jt+Yt,Xt="\\u2700-\\u27bf",nr="a-z\\xdf-\\xf6\\xf8-\\xff",tr="\\xac\\xb1\\xd7\\xf7",rr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",er="\\u2000-\\u206f",ur=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ir="A-Z\\xc0-\\xd6\\xd8-\\xde",or="\\ufe0e\\ufe0f",fr=tr+rr+er+ur,cr="['\u2019]",ar="["+Gt+"]",lr="["+fr+"]",sr="["+Qt+"]",hr="\\d+",pr="["+Xt+"]",_r="["+nr+"]",vr="[^"+Gt+fr+hr+Xt+nr+ir+"]",gr="\\ud83c[\\udffb-\\udfff]",yr="(?:"+sr+"|"+gr+")",dr="[^"+Gt+"]",br="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",mr="["+ir+"]",xr="\\u200d",jr="(?:"+_r+"|"+vr+")",Ar="(?:"+mr+"|"+vr+")",kr="(?:"+cr+"(?:d|ll|m|re|s|t|ve))?",Or="(?:"+cr+"(?:D|LL|M|RE|S|T|VE))?",Ir=yr+"?",Rr="["+or+"]?",zr="(?:"+xr+"(?:"+[dr,br,wr].join("|")+")"+Rr+Ir+")*",Er="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wr=Rr+Ir+zr,Lr="(?:"+[pr,br,wr].join("|")+")"+Wr,Cr="(?:"+[dr+sr+"?",sr,br,wr,ar].join("|")+")",Ur=RegExp(cr,"g"),Br=RegExp(sr,"g"),Tr=RegExp(gr+"(?="+gr+")|"+Cr+Wr,"g"),$r=RegExp([mr+"?"+_r+"+"+kr+"(?="+[lr,mr,"$"].join("|")+")",Ar+"+"+Or+"(?="+[lr,mr+jr,"$"].join("|")+")",mr+"?"+jr+"+"+kr,mr+"+"+Or,Sr,Er,hr,Lr].join("|"),"g"),Dr=RegExp("["+xr+Gt+Qt+or+"]"),Mr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Nr=-1,Pr={};
Pr[ot]=Pr[ft]=Pr[ct]=Pr[at]=Pr[lt]=Pr[st]=Pr[ht]=Pr[pt]=Pr[_t]=!0,Pr[Bn]=Pr[Tn]=Pr[ut]=Pr[Dn]=Pr[it]=Pr[Mn]=Pr[Nn]=Pr[Pn]=Pr[Zn]=Pr[Kn]=Pr[Gn]=Pr[Yn]=Pr[Qn]=Pr[Xn]=Pr[rt]=!1;var qr={};qr[Bn]=qr[Tn]=qr[ut]=qr[it]=qr[Dn]=qr[Mn]=qr[ot]=qr[ft]=qr[ct]=qr[at]=qr[lt]=qr[Zn]=qr[Kn]=qr[Gn]=qr[Yn]=qr[Qn]=qr[Xn]=qr[nt]=qr[st]=qr[ht]=qr[pt]=qr[_t]=!0,qr[Nn]=qr[Pn]=qr[rt]=!1;var Zr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a",
"\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae",
"\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g",
"\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O",
"\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w",
"\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Kr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Vr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Gr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Hr=parseFloat,Jr=parseInt,Yr="object"==typeof global&&global&&global.Object===Object&&global,Qr="object"==typeof self&&self&&self.Object===Object&&self,Xr=Yr||Qr||Function("return this")(),ne="object"==typeof exports&&exports&&!exports.nodeType&&exports,te=ne&&"object"==typeof module&&module&&!module.nodeType&&module,re=te&&te.exports===ne,ee=re&&Yr.process,ue=function(){
try{var n=te&&te.require&&te.require("util").types;return n?n:ee&&ee.binding&&ee.binding("util")}catch(n){}}(),ie=ue&&ue.isArrayBuffer,oe=ue&&ue.isDate,fe=ue&&ue.isMap,ce=ue&&ue.isRegExp,ae=ue&&ue.isSet,le=ue&&ue.isTypedArray,se=m("length"),he=x(Zr),pe=x(Kr),_e=x(Vr),ve=function p(x){function q(n){if(oc(n)&&!yh(n)&&!(n instanceof Bt)){if(n instanceof H)return n;if(yl.call(n,"__wrapped__"))return to(n)}return new H(n)}function G(){}function H(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,
this.__index__=0,this.__values__=Y}function Bt(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wn,this.__views__=[]}function Gt(){var n=new Bt(this.__wrapped__);return n.__actions__=Uu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Uu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Uu(this.__views__),n}function Ht(){if(this.__filtered__){var n=new Bt(this);n.__dir__=-1,
n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Jt(){var n=this.__wrapped__.value(),t=this.__dir__,r=yh(n),e=t<0,u=r?n.length:0,i=Ai(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Vl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return du(n,this.__actions__);var _=[];n:for(;c--&&h<p;){a+=t;for(var v=-1,g=n[a];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(b==On)g=w;else if(!w){if(b==kn)continue n;break n}}_[h++]=g}return _}function Yt(n){
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Qt(){this.__data__=es?es(null):{},this.size=0}function Xt(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function nr(n){var t=this.__data__;if(es){var r=t[n];return r===rn?Y:r}return yl.call(t,n)?t[n]:Y}function tr(n){var t=this.__data__;return es?t[n]!==Y:yl.call(t,n)}function rr(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=es&&t===Y?rn:t,this}function er(n){
var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function ur(){this.__data__=[],this.size=0}function ir(n){var t=this.__data__,r=Er(t,n);return!(r<0)&&(r==t.length-1?t.pop():Sl.call(t,r,1),--this.size,!0)}function or(n){var t=this.__data__,r=Er(t,n);return r<0?Y:t[r][1]}function fr(n){return Er(this.__data__,n)>-1}function cr(n,t){var r=this.__data__,e=Er(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function ar(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){
var e=n[t];this.set(e[0],e[1])}}function lr(){this.size=0,this.__data__={hash:new Yt,map:new(Xl||er),string:new Yt}}function sr(n){var t=wi(this,n).delete(n);return this.size-=t?1:0,t}function hr(n){return wi(this,n).get(n)}function pr(n){return wi(this,n).has(n)}function _r(n,t){var r=wi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function vr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new ar;++t<r;)this.add(n[t])}function gr(n){return this.__data__.set(n,rn),this}function yr(n){
return this.__data__.has(n)}function dr(n){this.size=(this.__data__=new er(n)).size}function br(){this.__data__=new er,this.size=0}function wr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function mr(n){return this.__data__.get(n)}function xr(n){return this.__data__.has(n)}function jr(n,t){var r=this.__data__;if(r instanceof er){var e=r.__data__;if(!Xl||e.length<X-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new ar(e)}return r.set(n,t),this.size=r.size,this}function Ar(n,t){
var r=yh(n),e=!r&&gh(n),u=!r&&!e&&bh(n),i=!r&&!e&&!u&&Ah(n),o=r||e||u||i,f=o?O(n.length,ll):[],c=f.length;for(var a in n)!t&&!yl.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Wi(a,c))||f.push(a);return f}function kr(n){var t=n.length;return t?n[Xe(0,t-1)]:Y}function Or(n,t){return Yi(Uu(n),$r(t,0,n.length))}function Ir(n){return Yi(Uu(n))}function Rr(n,t,r){(r===Y||Kf(n[t],r))&&(r!==Y||t in n)||Cr(n,t,r)}function zr(n,t,r){var e=n[t];
yl.call(n,t)&&Kf(e,r)&&(r!==Y||t in n)||Cr(n,t,r)}function Er(n,t){for(var r=n.length;r--;)if(Kf(n[r][0],t))return r;return-1}function Sr(n,t,r,e){return vs(n,function(n,u,i){t(e,n,r(n),i)}),e}function Wr(n,t){return n&&Bu(t,Fc(t),n)}function Lr(n,t){return n&&Bu(t,Nc(t),n)}function Cr(n,t,r){"__proto__"==t&&Ul?Ul(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function Tr(n,t){for(var r=-1,e=t.length,u=el(e),i=null==n;++r<e;)u[r]=i?Y:$c(n,t[r]);return u}function $r(n,t,r){return n===n&&(r!==Y&&(n=n<=r?n:r),
t!==Y&&(n=n>=t?n:t)),n}function Dr(n,t,e,u,i,o){var f,c=t&on,a=t&fn,l=t&cn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==Y)return f;if(!ic(n))return n;var s=yh(n);if(s){if(f=Ii(n),!c)return Uu(n,f)}else{var h=Is(n),p=h==Pn||h==qn;if(bh(n))return ku(n,c);if(h==Gn||h==Bn||p&&!i){if(f=a||p?{}:Ri(n),!c)return a?$u(n,Lr(f,n)):Tu(n,Wr(f,n))}else{if(!qr[h])return i?n:{};f=zi(n,h,c)}}o||(o=new dr);var _=o.get(n);if(_)return _;o.set(n,f),jh(n)?n.forEach(function(r){f.add(Dr(r,t,e,r,n,o))}):mh(n)&&n.forEach(function(r,u){
f.set(u,Dr(r,t,e,u,n,o))});var v=l?a?gi:vi:a?Nc:Fc,g=s?Y:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),zr(f,u,Dr(r,t,e,u,n,o))}),f}function Mr(n){var t=Fc(n);return function(r){return Zr(r,n,t)}}function Zr(n,t,r){var e=r.length;if(null==n)return!e;for(n=cl(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===Y&&!(u in n)||!i(o))return!1}return!0}function Kr(n,t,r){if("function"!=typeof n)throw new sl(tn);return Es(function(){n.apply(Y,r)},t)}function Vr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length;
if(!l)return s;r&&(t=c(t,R(r))),e?(i=f,a=!1):t.length>=X&&(i=E,a=!1,t=new vr(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Gr(n,t){var r=!0;return vs(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Yr(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===Y?o===o&&!yc(o):r(o,f)))var f=o,c=i}return c}function Qr(n,t,r,e){var u=n.length;for(r=jc(r),r<0&&(r=-r>u?0:u+r),
e=e===Y||e>u?u:jc(e),e<0&&(e+=u),e=r>e?0:Ac(e);r<e;)n[r++]=t;return n}function ne(n,t){var r=[];return vs(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function te(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Si),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?te(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ee(n,t){return n&&ys(n,t,Fc)}function ue(n,t){return n&&ds(n,t,Fc)}function se(n,t){return i(t,function(t){return rc(n[t])})}function ve(n,t){t=ju(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[Qi(t[r++])];
return r&&r==e?n:Y}function ye(n,t,r){var e=t(n);return yh(n)?e:a(e,r(n))}function de(n){return null==n?n===Y?tt:Vn:Cl&&Cl in cl(n)?ji(n):qi(n)}function be(n,t){return n>t}function we(n,t){return null!=n&&yl.call(n,t)}function me(n,t){return null!=n&&t in cl(n)}function xe(n,t,r){return n>=Vl(t,r)&&n<Kl(t,r)}function je(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=el(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,R(t))),s=Vl(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new vr(a&&p):Y}p=n[0];
var _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?E(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?E(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function Ae(n,t,r,e){return ee(n,function(n,u,i){t(e,r(n),u,i)}),e}function ke(t,r,e){r=ju(r,t),t=Ki(t,r);var u=null==t?t:t[Qi(mo(r))];return null==u?Y:n(u,t,e)}function Oe(n){return oc(n)&&de(n)==Bn}function Ie(n){return oc(n)&&de(n)==ut}function Re(n){return oc(n)&&de(n)==Mn}function ze(n,t,r,e,u){
return n===t||(null==n||null==t||!oc(n)&&!oc(t)?n!==n&&t!==t:Ee(n,t,r,e,ze,u))}function Ee(n,t,r,e,u,i){var o=yh(n),f=yh(t),c=o?Tn:Is(n),a=f?Tn:Is(t);c=c==Bn?Gn:c,a=a==Bn?Gn:a;var l=c==Gn,s=a==Gn,h=c==a;if(h&&bh(n)){if(!bh(t))return!1;o=!0,l=!1}if(h&&!l)return i||(i=new dr),o||Ah(n)?si(n,t,r,e,u,i):hi(n,t,c,r,e,u,i);if(!(r&an)){var p=l&&yl.call(n,"__wrapped__"),_=s&&yl.call(t,"__wrapped__");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new dr),u(v,g,r,e,i)}}return!!h&&(i||(i=new dr),pi(n,t,r,e,u,i));
}function Se(n){return oc(n)&&Is(n)==Zn}function We(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=cl(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<i;){f=r[u];var c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===Y&&!(c in n))return!1}else{var s=new dr;if(e)var h=e(a,l,c,n,t,s);if(!(h===Y?ze(l,a,an|ln,e,s):h))return!1}}return!0}function Le(n){return!(!ic(n)||Ti(n))&&(rc(n)?jl:Nt).test(Xi(n))}function Ce(n){return oc(n)&&de(n)==Yn}function Ue(n){return oc(n)&&Is(n)==Qn;
}function Be(n){return oc(n)&&uc(n.length)&&!!Pr[de(n)]}function Te(n){return"function"==typeof n?n:null==n?Sa:"object"==typeof n?yh(n)?Pe(n[0],n[1]):Ne(n):Da(n)}function $e(n){if(!$i(n))return Zl(n);var t=[];for(var r in cl(n))yl.call(n,r)&&"constructor"!=r&&t.push(r);return t}function De(n){if(!ic(n))return Pi(n);var t=$i(n),r=[];for(var e in n)("constructor"!=e||!t&&yl.call(n,e))&&r.push(e);return r}function Me(n,t){return n<t}function Fe(n,t){var r=-1,e=Vf(n)?el(n.length):[];return vs(n,function(n,u,i){
e[++r]=t(n,u,i)}),e}function Ne(n){var t=mi(n);return 1==t.length&&t[0][2]?Mi(t[0][0],t[0][1]):function(r){return r===n||We(r,n,t)}}function Pe(n,t){return Ci(n)&&Di(t)?Mi(Qi(n),t):function(r){var e=$c(r,n);return e===Y&&e===t?Mc(r,n):ze(t,e,an|ln)}}function qe(n,t,r,e,u){n!==t&&ys(t,function(i,o){if(u||(u=new dr),ic(i))Ze(n,t,o,r,qe,e,u);else{var f=e?e(Gi(n,o),i,o+"",n,t,u):Y;f===Y&&(f=i),Rr(n,o,f)}},Nc)}function Ze(n,t,r,e,u,i,o){var f=Gi(n,r),c=Gi(t,r),a=o.get(c);if(a)return Rr(n,r,a),Y;var l=i?i(f,c,r+"",n,t,o):Y,s=l===Y;
if(s){var h=yh(c),p=!h&&bh(c),_=!h&&!p&&Ah(c);l=c,h||p||_?yh(f)?l=f:Gf(f)?l=Uu(f):p?(s=!1,l=ku(c,!0)):_?(s=!1,l=Eu(c,!0)):l=[]:_c(c)||gh(c)?(l=f,gh(f)?l=Oc(f):ic(f)&&!rc(f)||(l=Ri(c))):s=!1}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),Rr(n,r,l)}function Ke(n,t){var r=n.length;if(r)return t+=t<0?r:0,Wi(t,r)?n[t]:Y}function Ve(n,t,r){t=t.length?c(t,function(n){return yh(n)?function(t){return ve(t,1===n.length?n[0]:n)}:n}):[Sa];var e=-1;return t=c(t,R(bi())),A(Fe(n,function(n,r,u){return{criteria:c(t,function(t){
return t(n)}),index:++e,value:n}}),function(n,t){return Wu(n,t,r)})}function Ge(n,t){return He(n,t,function(t,r){return Mc(n,r)})}function He(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=ve(n,o);r(f,o)&&iu(i,ju(o,n),f)}return i}function Je(n){return function(t){return ve(t,n)}}function Ye(n,t,r,e){var u=e?d:y,i=-1,o=t.length,f=n;for(n===t&&(t=Uu(t)),r&&(f=c(n,R(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Sl.call(f,a,1),Sl.call(n,a,1);return n}function Qe(n,t){for(var r=n?t.length:0,e=r-1;r--;){
var u=t[r];if(r==e||u!==i){var i=u;Wi(u)?Sl.call(n,u,1):vu(n,u)}}return n}function Xe(n,t){return n+Ml(Jl()*(t-n+1))}function nu(n,t,r,e){for(var u=-1,i=Kl(Dl((t-n)/(r||1)),0),o=el(i);i--;)o[e?i:++u]=n,n+=r;return o}function tu(n,t){var r="";if(!n||t<1||t>zn)return r;do t%2&&(r+=n),t=Ml(t/2),t&&(n+=n);while(t);return r}function ru(n,t){return Ss(Zi(n,t,Sa),n+"")}function eu(n){return kr(na(n))}function uu(n,t){var r=na(n);return Yi(r,$r(t,0,r.length))}function iu(n,t,r,e){if(!ic(n))return n;t=ju(t,n);
for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=Qi(t[u]),a=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(u!=o){var l=f[c];a=e?e(l,c,f):Y,a===Y&&(a=ic(l)?l:Wi(t[u+1])?[]:{})}zr(f,c,a),f=f[c]}return n}function ou(n){return Yi(na(n))}function fu(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=el(u);++e<u;)i[e]=n[e+t];return i}function cu(n,t){var r;return vs(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function au(n,t,r){
var e=0,u=null==n?e:n.length;if("number"==typeof t&&t===t&&u<=Cn){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!yc(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return lu(n,t,Sa,r)}function lu(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;t=r(t);for(var o=t!==t,f=null===t,c=yc(t),a=t===Y;u<i;){var l=Ml((u+i)/2),s=r(n[l]),h=s!==Y,p=null===s,_=s===s,v=yc(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return Vl(i,Ln)}function su(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){
var o=n[r],f=t?t(o):o;if(!r||!Kf(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function hu(n){return"number"==typeof n?n:yc(n)?Sn:+n}function pu(n){if("string"==typeof n)return n;if(yh(n))return c(n,pu)+"";if(yc(n))return ps?ps.call(n):"";var t=n+"";return"0"==t&&1/n==-Rn?"-0":t}function _u(n,t,r){var e=-1,u=o,i=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(i>=X){var s=t?null:js(n);if(s)return N(s);c=!1,u=E,l=new vr}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p===p){for(var _=l.length;_--;)if(l[_]===p)continue n;
t&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function vu(n,t){return t=ju(t,n),n=Ki(n,t),null==n||delete n[Qi(mo(t))]}function gu(n,t,r,e){return iu(n,t,r(ve(n,t)),e)}function yu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?fu(n,e?0:i,e?i+1:u):fu(n,e?i+1:0,e?u:i)}function du(n,t){var r=n;return r instanceof Bt&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function bu(n,t,r){var e=n.length;if(e<2)return e?_u(n[0]):[];
for(var u=-1,i=el(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Vr(i[u]||o,n[f],t,r));return _u(te(i,1),t,r)}function wu(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;){r(o,n[e],e<i?t[e]:Y)}return o}function mu(n){return Gf(n)?n:[]}function xu(n){return"function"==typeof n?n:Sa}function ju(n,t){return yh(n)?n:Ci(n,t)?[n]:Ws(Rc(n))}function Au(n,t,r){var e=n.length;return r=r===Y?e:r,!t&&r>=e?n:fu(n,t,r)}function ku(n,t){if(t)return n.slice();var r=n.length,e=Il?Il(r):new n.constructor(r);
return n.copy(e),e}function Ou(n){var t=new n.constructor(n.byteLength);return new Ol(t).set(new Ol(n)),t}function Iu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Ru(n){var t=new n.constructor(n.source,Dt.exec(n));return t.lastIndex=n.lastIndex,t}function zu(n){return hs?cl(hs.call(n)):{}}function Eu(n,t){return new n.constructor(t?Ou(n.buffer):n.buffer,n.byteOffset,n.length)}function Su(n,t){if(n!==t){var r=n!==Y,e=null===n,u=n===n,i=yc(n),o=t!==Y,f=null===t,c=t===t,a=yc(t);
if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Wu(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var c=Su(u[e],i[e]);if(c){if(e>=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Lu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Kl(i-o,0),l=el(c+a),s=!e;++f<c;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l;
}function Cu(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Kl(i-f,0),s=el(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Uu(n,t){var r=-1,e=n.length;for(t||(t=el(e));++r<e;)t[r]=n[r];return t}function Bu(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):Y;c===Y&&(c=n[f]),u?Cr(r,f,c):zr(r,f,c)}return r}function Tu(n,t){return Bu(n,ks(n),t)}function $u(n,t){return Bu(n,Os(n),t);
}function Du(n,r){return function(e,u){var i=yh(e)?t:Sr,o=r?r():{};return i(e,n,bi(u,2),o)}}function Mu(n){return ru(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:Y,o=u>2?r[2]:Y;for(i=n.length>3&&"function"==typeof i?(u--,i):Y,o&&Li(r[0],r[1],o)&&(i=u<3?Y:i,u=1),t=cl(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t})}function Fu(n,t){return function(r,e){if(null==r)return r;if(!Vf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=cl(r);(t?i--:++i<u)&&e(o[i],i,o)!==!1;);return r}}function Nu(n){return function(t,r,e){
for(var u=-1,i=cl(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(r(i[c],c,i)===!1)break}return t}}function Pu(n,t,r){function e(){return(this&&this!==Xr&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=t&sn,i=Ku(n);return e}function qu(n){return function(t){t=Rc(t);var r=B(t)?V(t):Y,e=r?r[0]:t.charAt(0),u=r?Au(r,1).join(""):t.slice(1);return e[n]()+u}}function Zu(n){return function(t){return l(Oa(oa(t).replace(Ur,"")),n,"")}}function Ku(n){return function(){var t=arguments;switch(t.length){
case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=_s(n.prototype),e=n.apply(r,t);return ic(e)?e:r}}function Vu(t,r,e){function u(){for(var o=arguments.length,f=el(o),c=o,a=di(u);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:F(f,a);
return o-=l.length,o<e?ui(t,r,Ju,u.placeholder,Y,f,l,Y,Y,e-o):n(this&&this!==Xr&&this instanceof u?i:t,this,f)}var i=Ku(t);return u}function Gu(n){return function(t,r,e){var u=cl(t);if(!Vf(t)){var i=bi(r,3);t=Fc(t),r=function(n){return i(u[n],n,u)}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:Y}}function Hu(n){return _i(function(t){var r=t.length,e=r,u=H.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new sl(tn);if(u&&!o&&"wrapper"==yi(i))var o=new H([],!0)}for(e=o?e:r;++e<r;){
i=t[e];var f=yi(i),c="wrapper"==f?As(i):Y;o=c&&Bi(c[0])&&c[1]==(dn|_n|gn|bn)&&!c[4].length&&1==c[9]?o[yi(c[0])].apply(o,c[3]):1==i.length&&Bi(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&yh(e))return o.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Ju(n,t,r,e,u,i,o,f,c,a){function l(){for(var y=arguments.length,d=el(y),b=y;b--;)d[b]=arguments[b];if(_)var w=di(l),m=L(d,w);if(e&&(d=Lu(d,e,u,_)),i&&(d=Cu(d,i,o,_)),
y-=m,_&&y<a){return ui(n,t,Ju,l.placeholder,r,d,F(d,w),f,c,a-y)}var x=h?r:this,j=p?x[n]:n;return y=d.length,f?d=Vi(d,f):v&&y>1&&d.reverse(),s&&c<y&&(d.length=c),this&&this!==Xr&&this instanceof l&&(j=g||Ku(j)),j.apply(x,d)}var s=t&dn,h=t&sn,p=t&hn,_=t&(_n|vn),v=t&wn,g=p?Y:Ku(n);return l}function Yu(n,t){return function(r,e){return Ae(r,n,t(e),{})}}function Qu(n,t){return function(r,e){var u;if(r===Y&&e===Y)return t;if(r!==Y&&(u=r),e!==Y){if(u===Y)return e;"string"==typeof r||"string"==typeof e?(r=pu(r),
e=pu(e)):(r=hu(r),e=hu(e)),u=n(r,e)}return u}}function Xu(t){return _i(function(r){return r=c(r,R(bi())),ru(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ni(n,t){t=t===Y?" ":pu(t);var r=t.length;if(r<2)return r?tu(t,n):t;var e=tu(t,Dl(n/K(t)));return B(t)?Au(V(e),0,n).join(""):e.slice(0,n)}function ti(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=el(l+c),h=this&&this!==Xr&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];
return n(h,o?e:this,s)}var o=r&sn,f=Ku(t);return i}function ri(n){return function(t,r,e){return e&&"number"!=typeof e&&Li(t,r,e)&&(r=e=Y),t=xc(t),r===Y?(r=t,t=0):r=xc(r),e=e===Y?t<r?1:-1:xc(e),nu(t,r,e,n)}}function ei(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=kc(t),r=kc(r)),n(t,r)}}function ui(n,t,r,e,u,i,o,f,c,a){var l=t&_n,s=l?o:Y,h=l?Y:o,p=l?i:Y,_=l?Y:i;t|=l?gn:yn,t&=~(l?yn:gn),t&pn||(t&=~(sn|hn));var v=[n,t,u,p,s,_,h,f,c,a],g=r.apply(Y,v);return Bi(n)&&zs(g,v),g.placeholder=e,
Hi(g,n,t)}function ii(n){var t=fl[n];return function(n,r){if(n=kc(n),r=null==r?0:Vl(jc(r),292),r&&Pl(n)){var e=(Rc(n)+"e").split("e");return e=(Rc(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function oi(n){return function(t){var r=Is(t);return r==Zn?D(t):r==Qn?P(t):I(t,n(t))}}function fi(n,t,r,e,u,i,o,f){var c=t&hn;if(!c&&"function"!=typeof n)throw new sl(tn);var a=e?e.length:0;if(a||(t&=~(gn|yn),e=u=Y),o=o===Y?o:Kl(jc(o),0),f=f===Y?f:jc(f),a-=u?u.length:0,t&yn){var l=e,s=u;
e=u=Y}var h=c?Y:As(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&Ni(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],f=p[9]=p[9]===Y?c?0:n.length:Kl(p[9]-a,0),!f&&t&(_n|vn)&&(t&=~(_n|vn)),t&&t!=sn)_=t==_n||t==vn?Vu(n,t,f):t!=gn&&t!=(sn|gn)||u.length?Ju.apply(Y,p):ti(n,t,r,e);else var _=Pu(n,t,r);return Hi((h?bs:zs)(_,p),n,t)}function ci(n,t,r,e){return n===Y||Kf(n,_l[r])&&!yl.call(e,r)?t:n}function ai(n,t,r,e,u,i){return ic(n)&&ic(t)&&(i.set(t,n),qe(n,t,Y,ai,i),i.delete(t)),n}function li(n){return _c(n)?Y:n}function si(n,t,r,e,u,i){
var o=r&an,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&ln?new vr:Y;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==Y){if(y)continue;p=!1;break}if(_){if(!h(t,function(n,t){if(!E(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)})){p=!1;break}}else if(v!==g&&!u(v,g,r,e,i)){p=!1;break}}return i.delete(n),i.delete(t),p}function hi(n,t,r,e,u,i,o){switch(r){case it:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;
n=n.buffer,t=t.buffer;case ut:return!(n.byteLength!=t.byteLength||!i(new Ol(n),new Ol(t)));case Dn:case Mn:case Kn:return Kf(+n,+t);case Nn:return n.name==t.name&&n.message==t.message;case Yn:case Xn:return n==t+"";case Zn:var f=D;case Qn:var c=e&an;if(f||(f=N),n.size!=t.size&&!c)return!1;var a=o.get(n);if(a)return a==t;e|=ln,o.set(n,t);var l=si(f(n),f(t),e,u,i,o);return o.delete(n),l;case nt:if(hs)return hs.call(n)==hs.call(t)}return!1}function pi(n,t,r,e,u,i){var o=r&an,f=vi(n),c=f.length;if(c!=vi(t).length&&!o)return!1;
for(var a=c;a--;){var l=f[a];if(!(o?l in t:yl.call(t,l)))return!1}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=!0;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){l=f[a];var v=n[l],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);if(!(y===Y?v===g||u(v,g,r,e,i):y)){p=!1;break}_||(_="constructor"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&"constructor"in n&&"constructor"in t&&!("function"==typeof d&&d instanceof d&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(n),
i.delete(t),p}function _i(n){return Ss(Zi(n,Y,ho),n+"")}function vi(n){return ye(n,Fc,ks)}function gi(n){return ye(n,Nc,Os)}function yi(n){for(var t=n.name+"",r=is[t],e=yl.call(is,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function di(n){return(yl.call(q,"placeholder")?q:n).placeholder}function bi(){var n=q.iteratee||Wa;return n=n===Wa?Te:n,arguments.length?n(arguments[0],arguments[1]):n}function wi(n,t){var r=n.__data__;return Ui(t)?r["string"==typeof t?"string":"hash"]:r.map;
}function mi(n){for(var t=Fc(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Di(u)]}return t}function xi(n,t){var r=U(n,t);return Le(r)?r:Y}function ji(n){var t=yl.call(n,Cl),r=n[Cl];try{n[Cl]=Y;var e=!0}catch(n){}var u=wl.call(n);return e&&(t?n[Cl]=r:delete n[Cl]),u}function Ai(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Vl(t,n+o);break;case"takeRight":n=Kl(n,t-o)}}return{start:n,end:t}}function ki(n){var t=n.match(Ct);
return t?t[1].split(Ut):[]}function Oi(n,t,r){t=ju(t,n);for(var e=-1,u=t.length,i=!1;++e<u;){var o=Qi(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&uc(u)&&Wi(o,u)&&(yh(n)||gh(n)))}function Ii(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&yl.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ri(n){return"function"!=typeof n.constructor||$i(n)?{}:_s(Rl(n))}function zi(n,t,r){var e=n.constructor;switch(t){case ut:return Ou(n);
case Dn:case Mn:return new e(+n);case it:return Iu(n,r);case ot:case ft:case ct:case at:case lt:case st:case ht:case pt:case _t:return Eu(n,r);case Zn:return new e;case Kn:case Xn:return new e(n);case Yn:return Ru(n);case Qn:return new e;case nt:return zu(n)}}function Ei(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Lt,"{\n/* [wrapped with "+t+"] */\n")}function Si(n){return yh(n)||gh(n)||!!(Wl&&n&&n[Wl])}function Wi(n,t){var r=typeof n;
return t=null==t?zn:t,!!t&&("number"==r||"symbol"!=r&&qt.test(n))&&n>-1&&n%1==0&&n<t}function Li(n,t,r){if(!ic(r))return!1;var e=typeof t;return!!("number"==e?Vf(r)&&Wi(t,r.length):"string"==e&&t in r)&&Kf(r[t],n)}function Ci(n,t){if(yh(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!yc(n))||(Ot.test(n)||!kt.test(n)||null!=t&&n in cl(t))}function Ui(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}function Bi(n){
var t=yi(n),r=q[t];if("function"!=typeof r||!(t in Bt.prototype))return!1;if(n===r)return!0;var e=As(r);return!!e&&n===e[0]}function Ti(n){return!!bl&&bl in n}function $i(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||_l)}function Di(n){return n===n&&!ic(n)}function Mi(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==Y||n in cl(r)))}}function Fi(n){var t=Wf(n,function(n){return r.size===en&&r.clear(),n}),r=t.cache;return t}function Ni(n,t){var r=n[1],e=t[1],u=r|e,i=u<(sn|hn|dn),o=e==dn&&r==_n||e==dn&&r==bn&&n[7].length<=t[8]||e==(dn|bn)&&t[7].length<=t[8]&&r==_n;
if(!i&&!o)return n;e&sn&&(n[2]=t[2],u|=r&sn?0:pn);var f=t[3];if(f){var c=n[3];n[3]=c?Lu(c,f,t[4]):f,n[4]=c?F(n[3],un):t[4]}return f=t[5],f&&(c=n[5],n[5]=c?Cu(c,f,t[6]):f,n[6]=c?F(n[5],un):t[6]),f=t[7],f&&(n[7]=f),e&dn&&(n[8]=null==n[8]?t[8]:Vl(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u,n}function Pi(n){var t=[];if(null!=n)for(var r in cl(n))t.push(r);return t}function qi(n){return wl.call(n)}function Zi(t,r,e){return r=Kl(r===Y?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Kl(u.length-r,0),f=el(o);++i<o;)f[i]=u[r+i];
i=-1;for(var c=el(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function Ki(n,t){return t.length<2?n:ve(n,fu(t,0,-1))}function Vi(n,t){for(var r=n.length,e=Vl(t.length,r),u=Uu(n);e--;){var i=t[e];n[e]=Wi(i,r)?u[i]:Y}return n}function Gi(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function Hi(n,t,r){var e=t+"";return Ss(n,Ei(e,no(ki(e),r)))}function Ji(n){var t=0,r=0;return function(){var e=Gl(),u=An-(e-r);if(r=e,u>0){if(++t>=jn)return arguments[0]}else t=0;
return n.apply(Y,arguments)}}function Yi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===Y?e:t;++r<t;){var i=Xe(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function Qi(n){if("string"==typeof n||yc(n))return n;var t=n+"";return"0"==t&&1/n==-Rn?"-0":t}function Xi(n){if(null!=n){try{return gl.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function no(n,t){return r(Un,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function to(n){if(n instanceof Bt)return n.clone();var t=new H(n.__wrapped__,n.__chain__);
return t.__actions__=Uu(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function ro(n,t,r){t=(r?Li(n,t,r):t===Y)?1:Kl(jc(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=el(Dl(e/t));u<e;)o[i++]=fu(n,u,u+=t);return o}function eo(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u}function uo(){var n=arguments.length;if(!n)return[];for(var t=el(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(yh(r)?Uu(r):[r],te(t,1));
}function io(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===Y?1:jc(t),fu(n,t<0?0:t,e)):[]}function oo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===Y?1:jc(t),t=e-t,fu(n,0,t<0?0:t)):[]}function fo(n,t){return n&&n.length?yu(n,bi(t,3),!0,!0):[]}function co(n,t){return n&&n.length?yu(n,bi(t,3),!0):[]}function ao(n,t,r,e){var u=null==n?0:n.length;return u?(r&&"number"!=typeof r&&Li(n,t,r)&&(r=0,e=u),Qr(n,t,r,e)):[]}function lo(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:jc(r);
return u<0&&(u=Kl(e+u,0)),g(n,bi(t,3),u)}function so(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==Y&&(u=jc(r),u=r<0?Kl(e+u,0):Vl(u,e-1)),g(n,bi(t,3),u,!0)}function ho(n){return(null==n?0:n.length)?te(n,1):[]}function po(n){return(null==n?0:n.length)?te(n,Rn):[]}function _o(n,t){return(null==n?0:n.length)?(t=t===Y?1:jc(t),te(n,t)):[]}function vo(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e}function go(n){return n&&n.length?n[0]:Y}function yo(n,t,r){
var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:jc(r);return u<0&&(u=Kl(e+u,0)),y(n,t,u)}function bo(n){return(null==n?0:n.length)?fu(n,0,-1):[]}function wo(n,t){return null==n?"":ql.call(n,t)}function mo(n){var t=null==n?0:n.length;return t?n[t-1]:Y}function xo(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==Y&&(u=jc(r),u=u<0?Kl(e+u,0):Vl(u,e-1)),t===t?Z(n,t,u):g(n,b,u,!0)}function jo(n,t){return n&&n.length?Ke(n,jc(t)):Y}function Ao(n,t){return n&&n.length&&t&&t.length?Ye(n,t):n;
}function ko(n,t,r){return n&&n.length&&t&&t.length?Ye(n,t,bi(r,2)):n}function Oo(n,t,r){return n&&n.length&&t&&t.length?Ye(n,t,Y,r):n}function Io(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=bi(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return Qe(n,u),r}function Ro(n){return null==n?n:Yl.call(n)}function zo(n,t,r){var e=null==n?0:n.length;return e?(r&&"number"!=typeof r&&Li(n,t,r)?(t=0,r=e):(t=null==t?0:jc(t),r=r===Y?e:jc(r)),fu(n,t,r)):[]}function Eo(n,t){
return au(n,t)}function So(n,t,r){return lu(n,t,bi(r,2))}function Wo(n,t){var r=null==n?0:n.length;if(r){var e=au(n,t);if(e<r&&Kf(n[e],t))return e}return-1}function Lo(n,t){return au(n,t,!0)}function Co(n,t,r){return lu(n,t,bi(r,2),!0)}function Uo(n,t){if(null==n?0:n.length){var r=au(n,t,!0)-1;if(Kf(n[r],t))return r}return-1}function Bo(n){return n&&n.length?su(n):[]}function To(n,t){return n&&n.length?su(n,bi(t,2)):[]}function $o(n){var t=null==n?0:n.length;return t?fu(n,1,t):[]}function Do(n,t,r){
return n&&n.length?(t=r||t===Y?1:jc(t),fu(n,0,t<0?0:t)):[]}function Mo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===Y?1:jc(t),t=e-t,fu(n,t<0?0:t,e)):[]}function Fo(n,t){return n&&n.length?yu(n,bi(t,3),!1,!0):[]}function No(n,t){return n&&n.length?yu(n,bi(t,3)):[]}function Po(n){return n&&n.length?_u(n):[]}function qo(n,t){return n&&n.length?_u(n,bi(t,2)):[]}function Zo(n,t){return t="function"==typeof t?t:Y,n&&n.length?_u(n,Y,t):[]}function Ko(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){
if(Gf(n))return t=Kl(n.length,t),!0}),O(t,function(t){return c(n,m(t))})}function Vo(t,r){if(!t||!t.length)return[];var e=Ko(t);return null==r?e:c(e,function(t){return n(r,Y,t)})}function Go(n,t){return wu(n||[],t||[],zr)}function Ho(n,t){return wu(n||[],t||[],iu)}function Jo(n){var t=q(n);return t.__chain__=!0,t}function Yo(n,t){return t(n),n}function Qo(n,t){return t(n)}function Xo(){return Jo(this)}function nf(){return new H(this.value(),this.__chain__)}function tf(){this.__values__===Y&&(this.__values__=mc(this.value()));
var n=this.__index__>=this.__values__.length;return{done:n,value:n?Y:this.__values__[this.__index__++]}}function rf(){return this}function ef(n){for(var t,r=this;r instanceof G;){var e=to(r);e.__index__=0,e.__values__=Y,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function uf(){var n=this.__wrapped__;if(n instanceof Bt){var t=n;return this.__actions__.length&&(t=new Bt(this)),t=t.reverse(),t.__actions__.push({func:Qo,args:[Ro],thisArg:Y}),new H(t,this.__chain__)}return this.thru(Ro);
}function of(){return du(this.__wrapped__,this.__actions__)}function ff(n,t,r){var e=yh(n)?u:Gr;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function cf(n,t){return(yh(n)?i:ne)(n,bi(t,3))}function af(n,t){return te(vf(n,t),1)}function lf(n,t){return te(vf(n,t),Rn)}function sf(n,t,r){return r=r===Y?1:jc(r),te(vf(n,t),r)}function hf(n,t){return(yh(n)?r:vs)(n,bi(t,3))}function pf(n,t){return(yh(n)?e:gs)(n,bi(t,3))}function _f(n,t,r,e){n=Vf(n)?n:na(n),r=r&&!e?jc(r):0;var u=n.length;return r<0&&(r=Kl(u+r,0)),
gc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function vf(n,t){return(yh(n)?c:Fe)(n,bi(t,3))}function gf(n,t,r,e){return null==n?[]:(yh(t)||(t=null==t?[]:[t]),r=e?Y:r,yh(r)||(r=null==r?[]:[r]),Ve(n,t,r))}function yf(n,t,r){var e=yh(n)?l:j,u=arguments.length<3;return e(n,bi(t,4),r,u,vs)}function df(n,t,r){var e=yh(n)?s:j,u=arguments.length<3;return e(n,bi(t,4),r,u,gs)}function bf(n,t){return(yh(n)?i:ne)(n,Lf(bi(t,3)))}function wf(n){return(yh(n)?kr:eu)(n)}function mf(n,t,r){return t=(r?Li(n,t,r):t===Y)?1:jc(t),
(yh(n)?Or:uu)(n,t)}function xf(n){return(yh(n)?Ir:ou)(n)}function jf(n){if(null==n)return 0;if(Vf(n))return gc(n)?K(n):n.length;var t=Is(n);return t==Zn||t==Qn?n.size:$e(n).length}function Af(n,t,r){var e=yh(n)?h:cu;return r&&Li(n,t,r)&&(t=Y),e(n,bi(t,3))}function kf(n,t){if("function"!=typeof t)throw new sl(tn);return n=jc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Of(n,t,r){return t=r?Y:t,t=n&&null==t?n.length:t,fi(n,dn,Y,Y,Y,Y,t)}function If(n,t){var r;if("function"!=typeof t)throw new sl(tn);
return n=jc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=Y),r}}function Rf(n,t,r){t=r?Y:t;var e=fi(n,_n,Y,Y,Y,Y,Y,t);return e.placeholder=Rf.placeholder,e}function zf(n,t,r){t=r?Y:t;var e=fi(n,vn,Y,Y,Y,Y,Y,t);return e.placeholder=zf.placeholder,e}function Ef(n,t,r){function e(t){var r=h,e=p;return h=p=Y,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Es(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Vl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===Y||r>=t||r<0||w&&e>=_;
}function f(){var n=ih();return o(n)?c(n):(g=Es(f,i(n)),Y)}function c(n){return g=Y,m&&h?e(n):(h=p=Y,v)}function a(){g!==Y&&xs(g),d=0,h=y=p=g=Y}function l(){return g===Y?v:c(ih())}function s(){var n=ih(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===Y)return u(y);if(w)return xs(g),g=Es(f,t),e(y)}return g===Y&&(g=Es(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new sl(tn);return t=kc(t)||0,ic(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Kl(kc(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m),
s.cancel=a,s.flush=l,s}function Sf(n){return fi(n,wn)}function Wf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new sl(tn);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Wf.Cache||ar),r}function Lf(n){if("function"!=typeof n)throw new sl(tn);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:
return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Cf(n){return If(2,n)}function Uf(n,t){if("function"!=typeof n)throw new sl(tn);return t=t===Y?t:jc(t),ru(n,t)}function Bf(t,r){if("function"!=typeof t)throw new sl(tn);return r=null==r?0:Kl(jc(r),0),ru(function(e){var u=e[r],i=Au(e,0,r);return u&&a(i,u),n(t,this,i)})}function Tf(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new sl(tn);return ic(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),
Ef(n,t,{leading:e,maxWait:t,trailing:u})}function $f(n){return Of(n,1)}function Df(n,t){return sh(xu(t),n)}function Mf(){if(!arguments.length)return[];var n=arguments[0];return yh(n)?n:[n]}function Ff(n){return Dr(n,cn)}function Nf(n,t){return t="function"==typeof t?t:Y,Dr(n,cn,t)}function Pf(n){return Dr(n,on|cn)}function qf(n,t){return t="function"==typeof t?t:Y,Dr(n,on|cn,t)}function Zf(n,t){return null==t||Zr(n,t,Fc(t))}function Kf(n,t){return n===t||n!==n&&t!==t}function Vf(n){return null!=n&&uc(n.length)&&!rc(n);
}function Gf(n){return oc(n)&&Vf(n)}function Hf(n){return n===!0||n===!1||oc(n)&&de(n)==Dn}function Jf(n){return oc(n)&&1===n.nodeType&&!_c(n)}function Yf(n){if(null==n)return!0;if(Vf(n)&&(yh(n)||"string"==typeof n||"function"==typeof n.splice||bh(n)||Ah(n)||gh(n)))return!n.length;var t=Is(n);if(t==Zn||t==Qn)return!n.size;if($i(n))return!$e(n).length;for(var r in n)if(yl.call(n,r))return!1;return!0}function Qf(n,t){return ze(n,t)}function Xf(n,t,r){r="function"==typeof r?r:Y;var e=r?r(n,t):Y;return e===Y?ze(n,t,Y,r):!!e;
}function nc(n){if(!oc(n))return!1;var t=de(n);return t==Nn||t==Fn||"string"==typeof n.message&&"string"==typeof n.name&&!_c(n)}function tc(n){return"number"==typeof n&&Pl(n)}function rc(n){if(!ic(n))return!1;var t=de(n);return t==Pn||t==qn||t==$n||t==Jn}function ec(n){return"number"==typeof n&&n==jc(n)}function uc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=zn}function ic(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function oc(n){return null!=n&&"object"==typeof n}function fc(n,t){
return n===t||We(n,t,mi(t))}function cc(n,t,r){return r="function"==typeof r?r:Y,We(n,t,mi(t),r)}function ac(n){return pc(n)&&n!=+n}function lc(n){if(Rs(n))throw new il(nn);return Le(n)}function sc(n){return null===n}function hc(n){return null==n}function pc(n){return"number"==typeof n||oc(n)&&de(n)==Kn}function _c(n){if(!oc(n)||de(n)!=Gn)return!1;var t=Rl(n);if(null===t)return!0;var r=yl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&gl.call(r)==ml}function vc(n){
return ec(n)&&n>=-zn&&n<=zn}function gc(n){return"string"==typeof n||!yh(n)&&oc(n)&&de(n)==Xn}function yc(n){return"symbol"==typeof n||oc(n)&&de(n)==nt}function dc(n){return n===Y}function bc(n){return oc(n)&&Is(n)==rt}function wc(n){return oc(n)&&de(n)==et}function mc(n){if(!n)return[];if(Vf(n))return gc(n)?V(n):Uu(n);if(Ll&&n[Ll])return $(n[Ll]());var t=Is(n);return(t==Zn?D:t==Qn?N:na)(n)}function xc(n){if(!n)return 0===n?n:0;if(n=kc(n),n===Rn||n===-Rn){return(n<0?-1:1)*En}return n===n?n:0}function jc(n){
var t=xc(n),r=t%1;return t===t?r?t-r:t:0}function Ac(n){return n?$r(jc(n),0,Wn):0}function kc(n){if("number"==typeof n)return n;if(yc(n))return Sn;if(ic(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=ic(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=n.replace(Et,"");var r=Ft.test(n);return r||Pt.test(n)?Jr(n.slice(2),r?2:8):Mt.test(n)?Sn:+n}function Oc(n){return Bu(n,Nc(n))}function Ic(n){return n?$r(jc(n),-zn,zn):0===n?n:0}function Rc(n){return null==n?"":pu(n)}function zc(n,t){var r=_s(n);
return null==t?r:Wr(r,t)}function Ec(n,t){return v(n,bi(t,3),ee)}function Sc(n,t){return v(n,bi(t,3),ue)}function Wc(n,t){return null==n?n:ys(n,bi(t,3),Nc)}function Lc(n,t){return null==n?n:ds(n,bi(t,3),Nc)}function Cc(n,t){return n&&ee(n,bi(t,3))}function Uc(n,t){return n&&ue(n,bi(t,3))}function Bc(n){return null==n?[]:se(n,Fc(n))}function Tc(n){return null==n?[]:se(n,Nc(n))}function $c(n,t,r){var e=null==n?Y:ve(n,t);return e===Y?r:e}function Dc(n,t){return null!=n&&Oi(n,t,we)}function Mc(n,t){return null!=n&&Oi(n,t,me);
}function Fc(n){return Vf(n)?Ar(n):$e(n)}function Nc(n){return Vf(n)?Ar(n,!0):De(n)}function Pc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,t(n,e,u),n)}),r}function qc(n,t){var r={};return t=bi(t,3),ee(n,function(n,e,u){Cr(r,e,t(n,e,u))}),r}function Zc(n,t){return Kc(n,Lf(bi(t)))}function Kc(n,t){if(null==n)return{};var r=c(gi(n),function(n){return[n]});return t=bi(t),He(n,r,function(n,r){return t(n,r[0])})}function Vc(n,t,r){t=ju(t,n);var e=-1,u=t.length;for(u||(u=1,n=Y);++e<u;){var i=null==n?Y:n[Qi(t[e])];
i===Y&&(e=u,i=r),n=rc(i)?i.call(n):i}return n}function Gc(n,t,r){return null==n?n:iu(n,t,r)}function Hc(n,t,r,e){return e="function"==typeof e?e:Y,null==n?n:iu(n,t,r,e)}function Jc(n,t,e){var u=yh(n),i=u||bh(n)||Ah(n);if(t=bi(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:ic(n)&&rc(o)?_s(Rl(n)):{}}return(i?r:ee)(n,function(n,r,u){return t(e,n,r,u)}),e}function Yc(n,t){return null==n||vu(n,t)}function Qc(n,t,r){return null==n?n:gu(n,t,xu(r))}function Xc(n,t,r,e){return e="function"==typeof e?e:Y,
null==n?n:gu(n,t,xu(r),e)}function na(n){return null==n?[]:z(n,Fc(n))}function ta(n){return null==n?[]:z(n,Nc(n))}function ra(n,t,r){return r===Y&&(r=t,t=Y),r!==Y&&(r=kc(r),r=r===r?r:0),t!==Y&&(t=kc(t),t=t===t?t:0),$r(kc(n),t,r)}function ea(n,t,r){return t=xc(t),r===Y?(r=t,t=0):r=xc(r),n=kc(n),xe(n,t,r)}function ua(n,t,r){if(r&&"boolean"!=typeof r&&Li(n,t,r)&&(t=r=Y),r===Y&&("boolean"==typeof t?(r=t,t=Y):"boolean"==typeof n&&(r=n,n=Y)),n===Y&&t===Y?(n=0,t=1):(n=xc(n),t===Y?(t=n,n=0):t=xc(t)),n>t){
var e=n;n=t,t=e}if(r||n%1||t%1){var u=Jl();return Vl(n+u*(t-n+Hr("1e-"+((u+"").length-1))),t)}return Xe(n,t)}function ia(n){return Jh(Rc(n).toLowerCase())}function oa(n){return n=Rc(n),n&&n.replace(Zt,he).replace(Br,"")}function fa(n,t,r){n=Rc(n),t=pu(t);var e=n.length;r=r===Y?e:$r(jc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function ca(n){return n=Rc(n),n&&mt.test(n)?n.replace(bt,pe):n}function aa(n){return n=Rc(n),n&&zt.test(n)?n.replace(Rt,"\\$&"):n}function la(n,t,r){n=Rc(n),t=jc(t);
var e=t?K(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ni(Ml(u),r)+n+ni(Dl(u),r)}function sa(n,t,r){n=Rc(n),t=jc(t);var e=t?K(n):0;return t&&e<t?n+ni(t-e,r):n}function ha(n,t,r){n=Rc(n),t=jc(t);var e=t?K(n):0;return t&&e<t?ni(t-e,r)+n:n}function pa(n,t,r){return r||null==t?t=0:t&&(t=+t),Hl(Rc(n).replace(St,""),t||0)}function _a(n,t,r){return t=(r?Li(n,t,r):t===Y)?1:jc(t),tu(Rc(n),t)}function va(){var n=arguments,t=Rc(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function ga(n,t,r){return r&&"number"!=typeof r&&Li(n,t,r)&&(t=r=Y),
(r=r===Y?Wn:r>>>0)?(n=Rc(n),n&&("string"==typeof t||null!=t&&!xh(t))&&(t=pu(t),!t&&B(n))?Au(V(n),0,r):n.split(t,r)):[]}function ya(n,t,r){return n=Rc(n),r=null==r?0:$r(jc(r),0,n.length),t=pu(t),n.slice(r,r+t.length)==t}function da(n,t,r){var e=q.templateSettings;r&&Li(n,t,r)&&(t=Y),n=Rc(n),t=zh({},t,e,ci);var u,i,o=zh({},t.imports,e.imports,ci),f=Fc(o),c=z(o,f),a=0,l=t.interpolate||Kt,s="__p += '",h=al((t.escape||Kt).source+"|"+l.source+"|"+(l===At?$t:Kt).source+"|"+(t.evaluate||Kt).source+"|$","g"),p="//# sourceURL="+(yl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Nr+"]")+"\n";
n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Vt,C),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=yl.call(t,"variable")&&t.variable;_||(s="with (obj) {\n"+s+"\n}\n"),s=(i?s.replace(vt,""):s).replace(gt,"$1").replace(yt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}";
var v=Yh(function(){return ol(f,p+"return "+s).apply(Y,c)});if(v.source=s,nc(v))throw v;return v}function ba(n){return Rc(n).toLowerCase()}function wa(n){return Rc(n).toUpperCase()}function ma(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Et,"");if(!n||!(t=pu(t)))return n;var e=V(n),u=V(t);return Au(e,S(e,u),W(e,u)+1).join("")}function xa(n,t,r){if(n=Rc(n),n&&(r||t===Y))return n.replace(Wt,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,0,W(e,V(t))+1).join("")}function ja(n,t,r){if(n=Rc(n),
n&&(r||t===Y))return n.replace(St,"");if(!n||!(t=pu(t)))return n;var e=V(n);return Au(e,S(e,V(t))).join("")}function Aa(n,t){var r=mn,e=xn;if(ic(t)){var u="separator"in t?t.separator:u;r="length"in t?jc(t.length):r,e="omission"in t?pu(t.omission):e}n=Rc(n);var i=n.length;if(B(n)){var o=V(n);i=o.length}if(r>=i)return n;var f=r-K(e);if(f<1)return e;var c=o?Au(o,0,f).join(""):n.slice(0,f);if(u===Y)return c+e;if(o&&(f+=c.length-f),xh(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=al(u.source,Rc(Dt.exec(u))+"g")),
u.lastIndex=0;a=u.exec(l);)var s=a.index;c=c.slice(0,s===Y?f:s)}}else if(n.indexOf(pu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function ka(n){return n=Rc(n),n&&wt.test(n)?n.replace(dt,_e):n}function Oa(n,t,r){return n=Rc(n),t=r?Y:t,t===Y?T(n)?J(n):_(n):n.match(t)||[]}function Ia(t){var r=null==t?0:t.length,e=bi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new sl(tn);return[e(n[0]),n[1]]}):[],ru(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e);
}})}function Ra(n){return Mr(Dr(n,on))}function za(n){return function(){return n}}function Ea(n,t){return null==n||n!==n?t:n}function Sa(n){return n}function Wa(n){return Te("function"==typeof n?n:Dr(n,on))}function La(n){return Ne(Dr(n,on))}function Ca(n,t){return Pe(n,Dr(t,on))}function Ua(n,t,e){var u=Fc(t),i=se(t,u);null!=e||ic(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=se(t,Fc(t)));var o=!(ic(e)&&"chain"in e&&!e.chain),f=rc(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){
var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Uu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function Ba(){return Xr._===this&&(Xr._=xl),this}function Ta(){}function $a(n){return n=jc(n),ru(function(t){return Ke(t,n)})}function Da(n){return Ci(n)?m(Qi(n)):Je(n)}function Ma(n){return function(t){return null==n?Y:ve(n,t)}}function Fa(){return[]}function Na(){return!1}function Pa(){return{};
}function qa(){return""}function Za(){return!0}function Ka(n,t){if(n=jc(n),n<1||n>zn)return[];var r=Wn,e=Vl(n,Wn);t=bi(t),n-=Wn;for(var u=O(e,t);++r<n;)t(r);return u}function Va(n){return yh(n)?c(n,Qi):yc(n)?[n]:Uu(Ws(Rc(n)))}function Ga(n){var t=++dl;return Rc(n)+t}function Ha(n){return n&&n.length?Yr(n,Sa,be):Y}function Ja(n,t){return n&&n.length?Yr(n,bi(t,2),be):Y}function Ya(n){return w(n,Sa)}function Qa(n,t){return w(n,bi(t,2))}function Xa(n){return n&&n.length?Yr(n,Sa,Me):Y}function nl(n,t){
return n&&n.length?Yr(n,bi(t,2),Me):Y}function tl(n){return n&&n.length?k(n,Sa):0}function rl(n,t){return n&&n.length?k(n,bi(t,2)):0}x=null==x?Xr:ge.defaults(Xr.Object(),x,ge.pick(Xr,Fr));var el=x.Array,ul=x.Date,il=x.Error,ol=x.Function,fl=x.Math,cl=x.Object,al=x.RegExp,ll=x.String,sl=x.TypeError,hl=el.prototype,pl=ol.prototype,_l=cl.prototype,vl=x["__core-js_shared__"],gl=pl.toString,yl=_l.hasOwnProperty,dl=0,bl=function(){var n=/[^.]+$/.exec(vl&&vl.keys&&vl.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:"";
}(),wl=_l.toString,ml=gl.call(cl),xl=Xr._,jl=al("^"+gl.call(yl).replace(Rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Al=re?x.Buffer:Y,kl=x.Symbol,Ol=x.Uint8Array,Il=Al?Al.allocUnsafe:Y,Rl=M(cl.getPrototypeOf,cl),zl=cl.create,El=_l.propertyIsEnumerable,Sl=hl.splice,Wl=kl?kl.isConcatSpreadable:Y,Ll=kl?kl.iterator:Y,Cl=kl?kl.toStringTag:Y,Ul=function(){try{var n=xi(cl,"defineProperty");return n({},"",{}),n}catch(n){}}(),Bl=x.clearTimeout!==Xr.clearTimeout&&x.clearTimeout,Tl=ul&&ul.now!==Xr.Date.now&&ul.now,$l=x.setTimeout!==Xr.setTimeout&&x.setTimeout,Dl=fl.ceil,Ml=fl.floor,Fl=cl.getOwnPropertySymbols,Nl=Al?Al.isBuffer:Y,Pl=x.isFinite,ql=hl.join,Zl=M(cl.keys,cl),Kl=fl.max,Vl=fl.min,Gl=ul.now,Hl=x.parseInt,Jl=fl.random,Yl=hl.reverse,Ql=xi(x,"DataView"),Xl=xi(x,"Map"),ns=xi(x,"Promise"),ts=xi(x,"Set"),rs=xi(x,"WeakMap"),es=xi(cl,"create"),us=rs&&new rs,is={},os=Xi(Ql),fs=Xi(Xl),cs=Xi(ns),as=Xi(ts),ls=Xi(rs),ss=kl?kl.prototype:Y,hs=ss?ss.valueOf:Y,ps=ss?ss.toString:Y,_s=function(){
function n(){}return function(t){if(!ic(t))return{};if(zl)return zl(t);n.prototype=t;var r=new n;return n.prototype=Y,r}}();q.templateSettings={escape:xt,evaluate:jt,interpolate:At,variable:"",imports:{_:q}},q.prototype=G.prototype,q.prototype.constructor=q,H.prototype=_s(G.prototype),H.prototype.constructor=H,Bt.prototype=_s(G.prototype),Bt.prototype.constructor=Bt,Yt.prototype.clear=Qt,Yt.prototype.delete=Xt,Yt.prototype.get=nr,Yt.prototype.has=tr,Yt.prototype.set=rr,er.prototype.clear=ur,er.prototype.delete=ir,
er.prototype.get=or,er.prototype.has=fr,er.prototype.set=cr,ar.prototype.clear=lr,ar.prototype.delete=sr,ar.prototype.get=hr,ar.prototype.has=pr,ar.prototype.set=_r,vr.prototype.add=vr.prototype.push=gr,vr.prototype.has=yr,dr.prototype.clear=br,dr.prototype.delete=wr,dr.prototype.get=mr,dr.prototype.has=xr,dr.prototype.set=jr;var vs=Fu(ee),gs=Fu(ue,!0),ys=Nu(),ds=Nu(!0),bs=us?function(n,t){return us.set(n,t),n}:Sa,ws=Ul?function(n,t){return Ul(n,"toString",{configurable:!0,enumerable:!1,value:za(t),
writable:!0})}:Sa,ms=ru,xs=Bl||function(n){return Xr.clearTimeout(n)},js=ts&&1/N(new ts([,-0]))[1]==Rn?function(n){return new ts(n)}:Ta,As=us?function(n){return us.get(n)}:Ta,ks=Fl?function(n){return null==n?[]:(n=cl(n),i(Fl(n),function(t){return El.call(n,t)}))}:Fa,Os=Fl?function(n){for(var t=[];n;)a(t,ks(n)),n=Rl(n);return t}:Fa,Is=de;(Ql&&Is(new Ql(new ArrayBuffer(1)))!=it||Xl&&Is(new Xl)!=Zn||ns&&Is(ns.resolve())!=Hn||ts&&Is(new ts)!=Qn||rs&&Is(new rs)!=rt)&&(Is=function(n){var t=de(n),r=t==Gn?n.constructor:Y,e=r?Xi(r):"";
if(e)switch(e){case os:return it;case fs:return Zn;case cs:return Hn;case as:return Qn;case ls:return rt}return t});var Rs=vl?rc:Na,zs=Ji(bs),Es=$l||function(n,t){return Xr.setTimeout(n,t)},Ss=Ji(ws),Ws=Fi(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(It,function(n,r,e,u){t.push(e?u.replace(Tt,"$1"):r||n)}),t}),Ls=ru(function(n,t){return Gf(n)?Vr(n,te(t,1,Gf,!0)):[]}),Cs=ru(function(n,t){var r=mo(t);return Gf(r)&&(r=Y),Gf(n)?Vr(n,te(t,1,Gf,!0),bi(r,2)):[]}),Us=ru(function(n,t){
var r=mo(t);return Gf(r)&&(r=Y),Gf(n)?Vr(n,te(t,1,Gf,!0),Y,r):[]}),Bs=ru(function(n){var t=c(n,mu);return t.length&&t[0]===n[0]?je(t):[]}),Ts=ru(function(n){var t=mo(n),r=c(n,mu);return t===mo(r)?t=Y:r.pop(),r.length&&r[0]===n[0]?je(r,bi(t,2)):[]}),$s=ru(function(n){var t=mo(n),r=c(n,mu);return t="function"==typeof t?t:Y,t&&r.pop(),r.length&&r[0]===n[0]?je(r,Y,t):[]}),Ds=ru(Ao),Ms=_i(function(n,t){var r=null==n?0:n.length,e=Tr(n,t);return Qe(n,c(t,function(n){return Wi(n,r)?+n:n}).sort(Su)),e}),Fs=ru(function(n){
return _u(te(n,1,Gf,!0))}),Ns=ru(function(n){var t=mo(n);return Gf(t)&&(t=Y),_u(te(n,1,Gf,!0),bi(t,2))}),Ps=ru(function(n){var t=mo(n);return t="function"==typeof t?t:Y,_u(te(n,1,Gf,!0),Y,t)}),qs=ru(function(n,t){return Gf(n)?Vr(n,t):[]}),Zs=ru(function(n){return bu(i(n,Gf))}),Ks=ru(function(n){var t=mo(n);return Gf(t)&&(t=Y),bu(i(n,Gf),bi(t,2))}),Vs=ru(function(n){var t=mo(n);return t="function"==typeof t?t:Y,bu(i(n,Gf),Y,t)}),Gs=ru(Ko),Hs=ru(function(n){var t=n.length,r=t>1?n[t-1]:Y;return r="function"==typeof r?(n.pop(),
r):Y,Vo(n,r)}),Js=_i(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Bt&&Wi(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:Qo,args:[u],thisArg:Y}),new H(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(Y),n})):this.thru(u)}),Ys=Du(function(n,t,r){yl.call(n,r)?++n[r]:Cr(n,r,1)}),Qs=Gu(lo),Xs=Gu(so),nh=Du(function(n,t,r){yl.call(n,r)?n[r].push(t):Cr(n,r,[t])}),th=ru(function(t,r,e){var u=-1,i="function"==typeof r,o=Vf(t)?el(t.length):[];
return vs(t,function(t){o[++u]=i?n(r,t,e):ke(t,r,e)}),o}),rh=Du(function(n,t,r){Cr(n,r,t)}),eh=Du(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),uh=ru(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Li(n,t[0],t[1])?t=[]:r>2&&Li(t[0],t[1],t[2])&&(t=[t[0]]),Ve(n,te(t,1),[])}),ih=Tl||function(){return Xr.Date.now()},oh=ru(function(n,t,r){var e=sn;if(r.length){var u=F(r,di(oh));e|=gn}return fi(n,e,t,r,u)}),fh=ru(function(n,t,r){var e=sn|hn;if(r.length){var u=F(r,di(fh));e|=gn;
}return fi(t,e,n,r,u)}),ch=ru(function(n,t){return Kr(n,1,t)}),ah=ru(function(n,t,r){return Kr(n,kc(t)||0,r)});Wf.Cache=ar;var lh=ms(function(t,r){r=1==r.length&&yh(r[0])?c(r[0],R(bi())):c(te(r,1),R(bi()));var e=r.length;return ru(function(u){for(var i=-1,o=Vl(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)})}),sh=ru(function(n,t){return fi(n,gn,Y,t,F(t,di(sh)))}),hh=ru(function(n,t){return fi(n,yn,Y,t,F(t,di(hh)))}),ph=_i(function(n,t){return fi(n,bn,Y,Y,Y,t)}),_h=ei(be),vh=ei(function(n,t){
return n>=t}),gh=Oe(function(){return arguments}())?Oe:function(n){return oc(n)&&yl.call(n,"callee")&&!El.call(n,"callee")},yh=el.isArray,dh=ie?R(ie):Ie,bh=Nl||Na,wh=oe?R(oe):Re,mh=fe?R(fe):Se,xh=ce?R(ce):Ce,jh=ae?R(ae):Ue,Ah=le?R(le):Be,kh=ei(Me),Oh=ei(function(n,t){return n<=t}),Ih=Mu(function(n,t){if($i(t)||Vf(t))return Bu(t,Fc(t),n),Y;for(var r in t)yl.call(t,r)&&zr(n,r,t[r])}),Rh=Mu(function(n,t){Bu(t,Nc(t),n)}),zh=Mu(function(n,t,r,e){Bu(t,Nc(t),n,e)}),Eh=Mu(function(n,t,r,e){Bu(t,Fc(t),n,e);
}),Sh=_i(Tr),Wh=ru(function(n,t){n=cl(n);var r=-1,e=t.length,u=e>2?t[2]:Y;for(u&&Li(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=Nc(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===Y||Kf(l,_l[a])&&!yl.call(n,a))&&(n[a]=i[a])}return n}),Lh=ru(function(t){return t.push(Y,ai),n($h,Y,t)}),Ch=Yu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=wl.call(t)),n[t]=r},za(Sa)),Uh=Yu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=wl.call(t)),yl.call(n,t)?n[t].push(r):n[t]=[r]},bi),Bh=ru(ke),Th=Mu(function(n,t,r){
qe(n,t,r)}),$h=Mu(function(n,t,r,e){qe(n,t,r,e)}),Dh=_i(function(n,t){var r={};if(null==n)return r;var e=!1;t=c(t,function(t){return t=ju(t,n),e||(e=t.length>1),t}),Bu(n,gi(n),r),e&&(r=Dr(r,on|fn|cn,li));for(var u=t.length;u--;)vu(r,t[u]);return r}),Mh=_i(function(n,t){return null==n?{}:Ge(n,t)}),Fh=oi(Fc),Nh=oi(Nc),Ph=Zu(function(n,t,r){return t=t.toLowerCase(),n+(r?ia(t):t)}),qh=Zu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Zh=Zu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Kh=qu("toLowerCase"),Vh=Zu(function(n,t,r){
return n+(r?"_":"")+t.toLowerCase()}),Gh=Zu(function(n,t,r){return n+(r?" ":"")+Jh(t)}),Hh=Zu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Jh=qu("toUpperCase"),Yh=ru(function(t,r){try{return n(t,Y,r)}catch(n){return nc(n)?n:new il(n)}}),Qh=_i(function(n,t){return r(t,function(t){t=Qi(t),Cr(n,t,oh(n[t],n))}),n}),Xh=Hu(),np=Hu(!0),tp=ru(function(n,t){return function(r){return ke(r,n,t)}}),rp=ru(function(n,t){return function(r){return ke(n,r,t)}}),ep=Xu(c),up=Xu(u),ip=Xu(h),op=ri(),fp=ri(!0),cp=Qu(function(n,t){
return n+t},0),ap=ii("ceil"),lp=Qu(function(n,t){return n/t},1),sp=ii("floor"),hp=Qu(function(n,t){return n*t},1),pp=ii("round"),_p=Qu(function(n,t){return n-t},0);return q.after=kf,q.ary=Of,q.assign=Ih,q.assignIn=Rh,q.assignInWith=zh,q.assignWith=Eh,q.at=Sh,q.before=If,q.bind=oh,q.bindAll=Qh,q.bindKey=fh,q.castArray=Mf,q.chain=Jo,q.chunk=ro,q.compact=eo,q.concat=uo,q.cond=Ia,q.conforms=Ra,q.constant=za,q.countBy=Ys,q.create=zc,q.curry=Rf,q.curryRight=zf,q.debounce=Ef,q.defaults=Wh,q.defaultsDeep=Lh,
q.defer=ch,q.delay=ah,q.difference=Ls,q.differenceBy=Cs,q.differenceWith=Us,q.drop=io,q.dropRight=oo,q.dropRightWhile=fo,q.dropWhile=co,q.fill=ao,q.filter=cf,q.flatMap=af,q.flatMapDeep=lf,q.flatMapDepth=sf,q.flatten=ho,q.flattenDeep=po,q.flattenDepth=_o,q.flip=Sf,q.flow=Xh,q.flowRight=np,q.fromPairs=vo,q.functions=Bc,q.functionsIn=Tc,q.groupBy=nh,q.initial=bo,q.intersection=Bs,q.intersectionBy=Ts,q.intersectionWith=$s,q.invert=Ch,q.invertBy=Uh,q.invokeMap=th,q.iteratee=Wa,q.keyBy=rh,q.keys=Fc,q.keysIn=Nc,
q.map=vf,q.mapKeys=Pc,q.mapValues=qc,q.matches=La,q.matchesProperty=Ca,q.memoize=Wf,q.merge=Th,q.mergeWith=$h,q.method=tp,q.methodOf=rp,q.mixin=Ua,q.negate=Lf,q.nthArg=$a,q.omit=Dh,q.omitBy=Zc,q.once=Cf,q.orderBy=gf,q.over=ep,q.overArgs=lh,q.overEvery=up,q.overSome=ip,q.partial=sh,q.partialRight=hh,q.partition=eh,q.pick=Mh,q.pickBy=Kc,q.property=Da,q.propertyOf=Ma,q.pull=Ds,q.pullAll=Ao,q.pullAllBy=ko,q.pullAllWith=Oo,q.pullAt=Ms,q.range=op,q.rangeRight=fp,q.rearg=ph,q.reject=bf,q.remove=Io,q.rest=Uf,
q.reverse=Ro,q.sampleSize=mf,q.set=Gc,q.setWith=Hc,q.shuffle=xf,q.slice=zo,q.sortBy=uh,q.sortedUniq=Bo,q.sortedUniqBy=To,q.split=ga,q.spread=Bf,q.tail=$o,q.take=Do,q.takeRight=Mo,q.takeRightWhile=Fo,q.takeWhile=No,q.tap=Yo,q.throttle=Tf,q.thru=Qo,q.toArray=mc,q.toPairs=Fh,q.toPairsIn=Nh,q.toPath=Va,q.toPlainObject=Oc,q.transform=Jc,q.unary=$f,q.union=Fs,q.unionBy=Ns,q.unionWith=Ps,q.uniq=Po,q.uniqBy=qo,q.uniqWith=Zo,q.unset=Yc,q.unzip=Ko,q.unzipWith=Vo,q.update=Qc,q.updateWith=Xc,q.values=na,q.valuesIn=ta,
q.without=qs,q.words=Oa,q.wrap=Df,q.xor=Zs,q.xorBy=Ks,q.xorWith=Vs,q.zip=Gs,q.zipObject=Go,q.zipObjectDeep=Ho,q.zipWith=Hs,q.entries=Fh,q.entriesIn=Nh,q.extend=Rh,q.extendWith=zh,Ua(q,q),q.add=cp,q.attempt=Yh,q.camelCase=Ph,q.capitalize=ia,q.ceil=ap,q.clamp=ra,q.clone=Ff,q.cloneDeep=Pf,q.cloneDeepWith=qf,q.cloneWith=Nf,q.conformsTo=Zf,q.deburr=oa,q.defaultTo=Ea,q.divide=lp,q.endsWith=fa,q.eq=Kf,q.escape=ca,q.escapeRegExp=aa,q.every=ff,q.find=Qs,q.findIndex=lo,q.findKey=Ec,q.findLast=Xs,q.findLastIndex=so,
q.findLastKey=Sc,q.floor=sp,q.forEach=hf,q.forEachRight=pf,q.forIn=Wc,q.forInRight=Lc,q.forOwn=Cc,q.forOwnRight=Uc,q.get=$c,q.gt=_h,q.gte=vh,q.has=Dc,q.hasIn=Mc,q.head=go,q.identity=Sa,q.includes=_f,q.indexOf=yo,q.inRange=ea,q.invoke=Bh,q.isArguments=gh,q.isArray=yh,q.isArrayBuffer=dh,q.isArrayLike=Vf,q.isArrayLikeObject=Gf,q.isBoolean=Hf,q.isBuffer=bh,q.isDate=wh,q.isElement=Jf,q.isEmpty=Yf,q.isEqual=Qf,q.isEqualWith=Xf,q.isError=nc,q.isFinite=tc,q.isFunction=rc,q.isInteger=ec,q.isLength=uc,q.isMap=mh,
q.isMatch=fc,q.isMatchWith=cc,q.isNaN=ac,q.isNative=lc,q.isNil=hc,q.isNull=sc,q.isNumber=pc,q.isObject=ic,q.isObjectLike=oc,q.isPlainObject=_c,q.isRegExp=xh,q.isSafeInteger=vc,q.isSet=jh,q.isString=gc,q.isSymbol=yc,q.isTypedArray=Ah,q.isUndefined=dc,q.isWeakMap=bc,q.isWeakSet=wc,q.join=wo,q.kebabCase=qh,q.last=mo,q.lastIndexOf=xo,q.lowerCase=Zh,q.lowerFirst=Kh,q.lt=kh,q.lte=Oh,q.max=Ha,q.maxBy=Ja,q.mean=Ya,q.meanBy=Qa,q.min=Xa,q.minBy=nl,q.stubArray=Fa,q.stubFalse=Na,q.stubObject=Pa,q.stubString=qa,
q.stubTrue=Za,q.multiply=hp,q.nth=jo,q.noConflict=Ba,q.noop=Ta,q.now=ih,q.pad=la,q.padEnd=sa,q.padStart=ha,q.parseInt=pa,q.random=ua,q.reduce=yf,q.reduceRight=df,q.repeat=_a,q.replace=va,q.result=Vc,q.round=pp,q.runInContext=p,q.sample=wf,q.size=jf,q.snakeCase=Vh,q.some=Af,q.sortedIndex=Eo,q.sortedIndexBy=So,q.sortedIndexOf=Wo,q.sortedLastIndex=Lo,q.sortedLastIndexBy=Co,q.sortedLastIndexOf=Uo,q.startCase=Gh,q.startsWith=ya,q.subtract=_p,q.sum=tl,q.sumBy=rl,q.template=da,q.times=Ka,q.toFinite=xc,q.toInteger=jc,
q.toLength=Ac,q.toLower=ba,q.toNumber=kc,q.toSafeInteger=Ic,q.toString=Rc,q.toUpper=wa,q.trim=ma,q.trimEnd=xa,q.trimStart=ja,q.truncate=Aa,q.unescape=ka,q.uniqueId=Ga,q.upperCase=Hh,q.upperFirst=Jh,q.each=hf,q.eachRight=pf,q.first=go,Ua(q,function(){var n={};return ee(q,function(t,r){yl.call(q.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),q.VERSION=Q,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){q[n].placeholder=q}),r(["drop","take"],function(n,t){Bt.prototype[n]=function(r){
r=r===Y?1:Kl(jc(r),0);var e=this.__filtered__&&!t?new Bt(this):this.clone();return e.__filtered__?e.__takeCount__=Vl(r,e.__takeCount__):e.__views__.push({size:Vl(r,Wn),type:n+(e.__dir__<0?"Right":"")}),e},Bt.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==kn||r==In;Bt.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:bi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){
var r="take"+(t?"Right":"");Bt.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Bt.prototype[n]=function(){return this.__filtered__?new Bt(this):this[r](1)}}),Bt.prototype.compact=function(){return this.filter(Sa)},Bt.prototype.find=function(n){return this.filter(n).head()},Bt.prototype.findLast=function(n){return this.reverse().find(n)},Bt.prototype.invokeMap=ru(function(n,t){return"function"==typeof n?new Bt(this):this.map(function(r){
return ke(r,n,t)})}),Bt.prototype.reject=function(n){return this.filter(Lf(bi(n)))},Bt.prototype.slice=function(n,t){n=jc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Bt(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==Y&&(t=jc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Bt.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Bt.prototype.toArray=function(){return this.take(Wn)},ee(Bt.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=q[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);
u&&(q.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Bt,c=o[0],l=f||yh(t),s=function(n){var t=u.apply(q,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Bt(this);var g=n.apply(t,o);return g.__actions__.push({func:Qo,args:[s],thisArg:Y}),new H(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){
var t=hl[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);q.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(yh(u)?u:[],n)}return this[r](function(r){return t.apply(yh(r)?r:[],n)})}}),ee(Bt.prototype,function(n,t){var r=q[t];if(r){var e=r.name+"";yl.call(is,e)||(is[e]=[]),is[e].push({name:t,func:r})}}),is[Ju(Y,hn).name]=[{name:"wrapper",func:Y}],Bt.prototype.clone=Gt,Bt.prototype.reverse=Ht,Bt.prototype.value=Jt,q.prototype.at=Js,
q.prototype.chain=Xo,q.prototype.commit=nf,q.prototype.next=tf,q.prototype.plant=ef,q.prototype.reverse=uf,q.prototype.toJSON=q.prototype.valueOf=q.prototype.value=of,q.prototype.first=q.prototype.head,Ll&&(q.prototype[Ll]=rf),q},ge=ve();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Xr._=ge,define(function(){return ge})):te?((te.exports=ge)._=ge,ne._=ge):Xr._=ge}).call(this);

1
libs/thirdparty/lz-string.min.js vendored Normal file
View File

@ -0,0 +1 @@
var LZString=function(){function o(o,r){if(!t[o]){t[o]={};for(var n=0;n<o.length;n++)t[o][o.charAt(n)]=n}return t[o][r]}var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",t={},i={compressToBase64:function(o){if(null==o)return"";var r=i._compress(o,6,function(o){return n.charAt(o)});switch(r.length%4){default:case 0:return r;case 1:return r+"===";case 2:return r+"==";case 3:return r+"="}},decompressFromBase64:function(r){return null==r?"":""==r?null:i._decompress(r.length,32,function(e){return o(n,r.charAt(e))})},compressToUTF16:function(o){return null==o?"":i._compress(o,15,function(o){return r(o+32)})+" "},decompressFromUTF16:function(o){return null==o?"":""==o?null:i._decompress(o.length,16384,function(r){return o.charCodeAt(r)-32})},compressToUint8Array:function(o){for(var r=i.compress(o),n=new Uint8Array(2*r.length),e=0,t=r.length;t>e;e++){var s=r.charCodeAt(e);n[2*e]=s>>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null===o||void 0===o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;t>e;e++)n[e]=256*o[2*e]+o[2*e+1];var s=[];return n.forEach(function(o){s.push(r(o))}),i.decompress(s.join(""))},compressToEncodedURIComponent:function(o){return null==o?"":i._compress(o,6,function(o){return e.charAt(o)})},decompressFromEncodedURIComponent:function(r){return null==r?"":""==r?null:(r=r.replace(/ /g,"+"),i._decompress(r.length,32,function(n){return o(e,r.charAt(n))}))},compress:function(o){return i._compress(o,16,function(o){return r(o)})},_compress:function(o,r,n){if(null==o)return"";var e,t,i,s={},p={},u="",c="",a="",l=2,f=3,h=2,d=[],m=0,v=0;for(i=0;i<o.length;i+=1)if(u=o.charAt(i),Object.prototype.hasOwnProperty.call(s,u)||(s[u]=f++,p[u]=!0),c=a+u,Object.prototype.hasOwnProperty.call(s,c))a=c;else{if(Object.prototype.hasOwnProperty.call(p,a)){if(a.charCodeAt(0)<256){for(e=0;h>e;e++)m<<=1,v==r-1?(v=0,d.push(n(m)),m=0):v++;for(t=a.charCodeAt(0),e=0;8>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;h>e;e++)m=m<<1|t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=a.charCodeAt(0),e=0;16>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}l--,0==l&&(l=Math.pow(2,h),h++),delete p[a]}else for(t=s[a],e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;l--,0==l&&(l=Math.pow(2,h),h++),s[c]=f++,a=String(u)}if(""!==a){if(Object.prototype.hasOwnProperty.call(p,a)){if(a.charCodeAt(0)<256){for(e=0;h>e;e++)m<<=1,v==r-1?(v=0,d.push(n(m)),m=0):v++;for(t=a.charCodeAt(0),e=0;8>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;h>e;e++)m=m<<1|t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=a.charCodeAt(0),e=0;16>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}l--,0==l&&(l=Math.pow(2,h),h++),delete p[a]}else for(t=s[a],e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;l--,0==l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;h>e;e++)m=m<<1|1&t,v==r-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==r-1){d.push(n(m));break}v++}return d.join("")},decompress:function(o){return null==o?"":""==o?null:i._decompress(o.length,32768,function(r){return o.charCodeAt(r)})},_decompress:function(o,n,e){var t,i,s,p,u,c,a,l,f=[],h=4,d=4,m=3,v="",w=[],A={val:e(0),position:n,index:1};for(i=0;3>i;i+=1)f[i]=i;for(p=0,c=Math.pow(2,2),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;switch(t=p){case 0:for(p=0,c=Math.pow(2,8),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;l=r(p);break;case 1:for(p=0,c=Math.pow(2,16),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;l=r(p);break;case 2:return""}for(f[3]=l,s=l,w.push(l);;){if(A.index>o)return"";for(p=0,c=Math.pow(2,m),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;switch(l=p){case 0:for(p=0,c=Math.pow(2,8),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;f[d++]=r(p),l=d-1,h--;break;case 1:for(p=0,c=Math.pow(2,16),a=1;a!=c;)u=A.val&A.position,A.position>>=1,0==A.position&&(A.position=n,A.val=e(A.index++)),p|=(u>0?1:0)*a,a<<=1;f[d++]=r(p),l=d-1,h--;break;case 2:return w.join("")}if(0==h&&(h=Math.pow(2,m),m++),f[l])v=f[l];else{if(l!==d)return null;v=s+s.charAt(0)}w.push(v),f[d++]=s+v.charAt(0),h--,s=v,0==h&&(h=Math.pow(2,m),m++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module&&(module.exports=LZString);

1
libs/thirdparty/priority-queue.min.js vendored Normal file

File diff suppressed because one or more lines are too long

2895
libs/thirdparty/zip.js vendored Normal file

File diff suppressed because it is too large Load Diff

1
libs/thirdparty/zip.min.js vendored Normal file

File diff suppressed because one or more lines are too long

3500
libs/ui.js Normal file

File diff suppressed because it is too large Load Diff

1340
libs/utils.js Normal file

File diff suppressed because it is too large Load Diff

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

995
main.js Normal file
View File

@ -0,0 +1,995 @@
/// <reference path="./runtime.d.ts" />
function main() {
//------------------------ 用户修改内容 ------------------------//
this.version = '2.10.3'; // 游戏版本号如果更改了游戏内容建议修改此version以免造成缓存问题。
this.useCompress = false; // 是否使用压缩文件
// 当你即将发布你的塔时请使用“JS代码压缩工具”将所有js代码进行压缩然后将这里的useCompress改为true。
// 请注意只有useCompress是false时才会读取floors目录下的文件为true时会直接读取libs目录下的floors.min.js文件。
// 如果要进行剧本的修改请务必将其改成false。
this.bgmRemote = false; // 是否采用远程BGM
this.bgmRemoteRoot = 'https://h5mota.com/music/'; // 远程BGM的根目录
this.isCompetition = false; // 是否是比赛模式
this.savePages = 1000; // 存档页数每页可存5个默认为1000页5000个存档
this.criticalUseLoop = 1; // 循环临界的分界
//------------------------ 用户修改内容 END ------------------------//
this.dom = {
body: document.body,
gameGroup: document.getElementById('gameGroup'),
mainTips: document.getElementById('mainTips'),
musicBtn: document.getElementById('musicBtn'),
enlargeBtn: document.createElement('img'),
startPanel: document.getElementById('startPanel'),
startTop: document.getElementById('startTop'),
startTopProgressBar: document.getElementById('startTopProgressBar'),
startTopProgress: document.getElementById('startTopProgress'),
startTopLoadTips: document.getElementById('startTopLoadTips'),
startBackground: document.getElementById('startBackground'),
startLogo: document.getElementById('startLogo'),
startButtonGroup: document.getElementById('startButtonGroup'),
floorMsgGroup: document.getElementById('floorMsgGroup'),
logoLabel: document.getElementById('logoLabel'),
versionLabel: document.getElementById('versionLabel'),
floorNameLabel: document.getElementById('floorNameLabel'),
statusBar: document.getElementById('statusBar'),
status: document.getElementsByClassName('status'),
toolBar: document.getElementById('toolBar'),
tools: document.getElementsByClassName('tools'),
gameCanvas: document.getElementsByClassName('gameCanvas'),
gif: document.getElementById('gif'),
gif2: document.getElementById('gif2'),
gameDraw: document.getElementById('gameDraw'),
startButtons: document.getElementById('startButtons'),
playGame: document.getElementById('playGame'),
loadGame: document.getElementById('loadGame'),
replayGame: document.getElementById('replayGame'),
levelChooseButtons: document.getElementById('levelChooseButtons'),
data: document.getElementById('data'),
statusLabels: document.getElementsByClassName('statusLabel'),
statusTexts: document.getElementsByClassName('statusText'),
floorCol: document.getElementById('floorCol'),
nameCol: document.getElementById('nameCol'),
lvCol: document.getElementById('lvCol'),
hpmaxCol: document.getElementById('hpmaxCol'),
hpCol: document.getElementById('hpCol'),
manaCol: document.getElementById('manaCol'),
atkCol: document.getElementById('atkCol'),
defCol: document.getElementById('defCol'),
mdefCol: document.getElementById('mdefCol'),
moneyCol: document.getElementById('moneyCol'),
expCol: document.getElementById('expCol'),
upCol: document.getElementById('upCol'),
keyCol: document.getElementById('keyCol'),
pzfCol: document.getElementById('pzfCol'),
debuffCol: document.getElementById('debuffCol'),
skillCol: document.getElementById('skillCol'),
hard: document.getElementById('hard'),
statusCanvas: document.getElementById('statusCanvas'),
statusCanvasCtx: document
.getElementById('statusCanvas')
.getContext('2d'),
inputDiv: document.getElementById('inputDiv'),
inputMessage: document.getElementById('inputMessage'),
inputBox: document.getElementById('inputBox'),
inputYes: document.getElementById('inputYes'),
inputNo: document.getElementById('inputNo'),
next: document.getElementById('next')
};
this.mode = 'play';
this.loadList = [
'loader',
'control',
'utils',
'items',
'icons',
'maps',
'enemys',
'events',
'actions',
'data',
'ui',
'extensions',
'core'
];
this.pureData = [
'data',
'enemys',
'icons',
'maps',
'items',
'functions',
'events',
'plugins'
];
this.materials = [
'animates',
'enemys',
'items',
'npcs',
'terrains',
'enemy48',
'npc48',
'icons'
];
this.statusBar = {
image: {
floor: document.getElementById('img-floor'),
name: document.getElementById('img-name'),
lv: document.getElementById('img-lv'),
hpmax: document.getElementById('img-hpmax'),
hp: document.getElementById('img-hp'),
mana: document.getElementById('img-mana'),
atk: document.getElementById('img-atk'),
def: document.getElementById('img-def'),
mdef: document.getElementById('img-mdef'),
money: document.getElementById('img-money'),
exp: document.getElementById('img-exp'),
up: document.getElementById('img-up'),
skill: document.getElementById('img-skill'),
book: document.getElementById('img-book'),
fly: document.getElementById('img-fly'),
toolbox: document.getElementById('img-toolbox'),
keyboard: document.getElementById('img-keyboard'),
shop: document.getElementById('img-shop'),
save: document.getElementById('img-save'),
load: document.getElementById('img-load'),
settings: document.getElementById('img-settings'),
btn1: document.getElementById('img-btn1'),
btn2: document.getElementById('img-btn2'),
btn3: document.getElementById('img-btn3'),
btn4: document.getElementById('img-btn4'),
btn5: document.getElementById('img-btn5'),
btn6: document.getElementById('img-btn6'),
btn7: document.getElementById('img-btn7'),
btn8: document.getElementById('img-btn8')
},
icons: {
floor: 0,
name: null,
lv: 1,
hpmax: 2,
hp: 3,
atk: 4,
def: 5,
mdef: 6,
money: 7,
exp: 8,
up: 9,
book: 10,
fly: 11,
toolbox: 12,
keyboard: 13,
shop: 14,
save: 15,
load: 16,
settings: 17,
play: 18,
pause: 19,
stop: 20,
speedDown: 21,
speedUp: 22,
rewind: 23,
equipbox: 24,
mana: 25,
skill: 26,
btn1: 27,
btn2: 28,
btn3: 29,
btn4: 30,
btn5: 31,
btn6: 32,
btn7: 33,
btn8: 34
},
floor: document.getElementById('floor'),
name: document.getElementById('name'),
lv: document.getElementById('lv'),
hpmax: document.getElementById('hpmax'),
hp: document.getElementById('hp'),
mana: document.getElementById('mana'),
atk: document.getElementById('atk'),
def: document.getElementById('def'),
mdef: document.getElementById('mdef'),
money: document.getElementById('money'),
exp: document.getElementById('exp'),
up: document.getElementById('up'),
skill: document.getElementById('skill'),
yellowKey: document.getElementById('yellowKey'),
blueKey: document.getElementById('blueKey'),
redKey: document.getElementById('redKey'),
greenKey: document.getElementById('greenKey'),
poison: document.getElementById('poison'),
weak: document.getElementById('weak'),
curse: document.getElementById('curse'),
pickaxe: document.getElementById('pickaxe'),
bomb: document.getElementById('bomb'),
fly: document.getElementById('fly'),
hard: document.getElementById('hard')
};
this.floors = {};
this.canvas = {};
this.__VERSION__ = '2.10.3';
this.__VERSION_CODE__ = 512;
}
main.prototype.init = function (mode, callback) {
for (var i = 0; i < main.dom.gameCanvas.length; i++) {
main.canvas[main.dom.gameCanvas[i].id] =
main.dom.gameCanvas[i].getContext('2d');
}
main.mode = mode;
main.loadJs('project', main.pureData, function () {
var mainData = data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d.main;
for (var ii in mainData) main[ii] = mainData[ii];
main.dom.startLogo.style = main.styles.startLogoStyle;
main.dom.startButtonGroup.style = main.styles.startButtonsStyle;
main.levelChoose = main.levelChoose || [];
main.levelChoose.forEach(function (value) {
var span = document.createElement('span');
span.setAttribute('class', 'startButton');
span.innerText = value.title || '';
(function (span, str_) {
span.onclick = function () {
core.events.startGame(str_);
};
})(span, value.name || '');
main.dom.levelChooseButtons.appendChild(span);
});
main.createOnChoiceAnimation();
main.importFonts(main.fonts);
main.loadJs('libs', main.loadList, function () {
main.core = core;
for (i = 0; i < main.loadList.length; i++) {
var name = main.loadList[i];
if (name === 'core') continue;
main.core[name] = new window[name]();
}
main.loadFloors(function () {
var coreData = {};
[
'dom',
'statusBar',
'canvas',
'images',
'tilesets',
'materials',
'animates',
'bgms',
'sounds',
'floorIds',
'floors',
'floorPartitions'
].forEach(function (t) {
coreData[t] = main[t];
});
main.core.init(coreData, callback);
main.core.resize();
// 自动放缩最大化
if (!main.replayChecking) {
if (core.getLocalStorage('autoScale') == null) {
core.setLocalStorage('autoScale', true);
}
if (
core.getLocalStorage('autoScale') &&
!core.domStyle.isVertical
) {
try {
if (main.core) {
var index =
main.core.domStyle.availableScale.indexOf(
core.domStyle.scale
);
main.core.control.setDisplayScale(
main.core.domStyle.availableScale.length -
1 -
index
);
if (
!main.core.isPlaying() &&
main.core.flags.enableHDCanvas
) {
main.core.domStyle.ratio = Math.max(
window.devicePixelRatio || 1,
main.core.domStyle.scale
);
main.core.resize();
}
requestAnimationFrame(function () {
var style = getComputedStyle(
main.dom.gameGroup
);
var height = parseFloat(style.height);
if (height > window.innerHeight * 0.95) {
main.core.control.setDisplayScale(-1);
if (
!main.core.isPlaying() &&
main.core.flags.enableHDCanvas
) {
main.core.domStyle.ratio = Math.max(
window.devicePixelRatio || 1,
main.core.domStyle.scale
);
main.core.resize();
}
}
});
}
} catch (e) {
console.error(e);
}
}
}
});
});
});
};
////// 动态加载所有核心JS文件 //////
main.prototype.loadJs = function (dir, loadList, callback) {
// 加载js
main.setMainTipsText('正在加载核心js文件...');
if (this.useCompress) {
main.loadMod(dir, dir, function () {
callback();
});
} else {
var instanceNum = 0;
for (var i = 0; i < loadList.length; i++) {
main.loadMod(dir, loadList[i], function (modName) {
main.setMainTipsText(modName + '.js 加载完毕');
instanceNum++;
if (instanceNum === loadList.length) {
callback();
}
});
}
}
};
////// 加载某一个JS文件 //////
main.prototype.loadMod = function (dir, modName, callback, onerror) {
var script = document.createElement('script');
var name = modName;
script.src =
dir +
'/' +
modName +
(this.useCompress ? '.min' : '') +
'.js?v=' +
this.version;
script.onload = function () {
callback(name);
};
main.dom.body.appendChild(script);
};
////// 动态加载所有楼层(剧本) //////
main.prototype.loadFloors = function (callback) {
// 加载js
main.setMainTipsText('正在加载楼层文件...');
if (this.useCompress) {
// 读取压缩文件
var script = document.createElement('script');
script.src = 'project/floors.min.js?v=' + this.version;
main.dom.body.appendChild(script);
script.onload = function () {
main.dom.mainTips.style.display = 'none';
callback();
};
return;
}
// 高层塔优化
var script = document.createElement('script');
script.src =
'__all_floors__.js?v=' +
this.version +
'&id=' +
main.floorIds.join(',');
script.onload = function () {
main.dom.mainTips.style.display = 'none';
main.supportBunch = true;
callback();
};
script.onerror =
script.onabort =
script.ontimeout =
function (e) {
// console.clear();
for (var i = 0; i < main.floorIds.length; i++) {
main.loadFloor(main.floorIds[i], function (modName) {
main.setMainTipsText(
'楼层 ' + modName + '.js 加载完毕'
);
if (
Object.keys(main.floors).length ===
main.floorIds.length
) {
main.dom.mainTips.style.display = 'none';
callback();
}
});
}
};
main.dom.body.appendChild(script);
};
////// 加载某一个楼层 //////
main.prototype.loadFloor = function (floorId, callback) {
var script = document.createElement('script');
script.src = 'project/floors/' + floorId + '.js?v=' + this.version;
main.dom.body.appendChild(script);
script.onload = function () {
callback(floorId);
};
};
////// 加载过程提示 //////
main.prototype.setMainTipsText = function (text) {
main.dom.mainTips.innerHTML = text;
};
main.prototype.log = function (e, error) {
if (e) {
if (error) return console.error(e);
if (main.core && main.core.platform && !main.core.platform.isPC) {
console.log(e.stack || e.toString());
} else {
console.log(e);
}
}
};
main.prototype.createOnChoiceAnimation = function () {
var borderColor =
main.dom.startButtonGroup.style.caretColor || 'rgb(255, 215, 0)';
// get rgb value
var rgb =
/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*\d+\s*)?\)$/.exec(
borderColor
);
if (rgb != null) {
var value = rgb[1] + ', ' + rgb[2] + ', ' + rgb[3];
var style = document.createElement('style');
style.type = 'text/css';
var keyFrames =
'onChoice { ' +
'0% { border-color: rgba(' +
value +
', 0.9); } ' +
'50% { border-color: rgba(' +
value +
', 0.3); } ' +
'100% { border-color: rgba(' +
value +
', 0.9); } ' +
'}';
style.innerHTML =
'@-webkit-keyframes ' + keyFrames + ' @keyframes ' + keyFrames;
document.body.appendChild(style);
}
};
////// 选项 //////
main.prototype.selectButton = function (index) {
var select = function (children) {
index = (index + children.length) % children.length;
for (var i = 0; i < children.length; ++i) {
children[i].classList.remove('onChoiceAnimate');
}
children[index].classList.add('onChoiceAnimate');
if (main.selectedButton == index) {
children[index].click();
} else {
main.selectedButton = index;
}
};
if (core.dom.startPanel.style.display != 'block') return;
if (main.dom.startButtons.style.display == 'block') {
select(main.dom.startButtons.children);
} else if (main.dom.levelChooseButtons.style.display == 'block') {
select(main.dom.levelChooseButtons.children);
}
};
////// 创建字体 //////
main.prototype.importFonts = function (fonts) {
if (!(fonts instanceof Array) || fonts.length == 0) return;
var style = document.createElement('style');
style.type = 'text/css';
var html = '';
fonts.forEach(function (font) {
html +=
'@font-face { font-family: "' +
font +
'"; src: url("project/fonts/' +
font +
'.ttf") format("truetype"); }';
});
style.innerHTML = html;
document.body.appendChild(style);
};
main.prototype.listen = function () {
////// 窗口大小变化时 //////
window.onresize = function () {
try {
main.core.resize();
} catch (ee) {
console.error(ee);
}
};
////// 在界面上按下某按键时 //////
main.dom.body.onkeydown = function (e) {
if (main.editorOpened) return;
try {
if (main.dom.inputDiv.style.display == 'block') return;
if (
main.core &&
(main.core.isPlaying() || main.core.status.lockControl)
)
main.core.onkeyDown(e);
} catch (ee) {
console.error(ee);
}
};
////// 在界面上放开某按键时 //////
main.dom.body.onkeyup = function (e) {
if (main.editorOpened) return;
try {
if (
main.dom.startPanel.style.display == 'block' &&
(main.dom.startButtons.style.display == 'block' ||
main.dom.levelChooseButtons.style.display == 'block')
) {
if (e.keyCode == 38 || e.keyCode == 33)
// up/pgup
main.selectButton((main.selectedButton || 0) - 1);
else if (e.keyCode == 40 || e.keyCode == 34)
// down/pgdn
main.selectButton((main.selectedButton || 0) + 1);
else if (e.keyCode == 67 || e.keyCode == 13 || e.keyCode == 32)
// C/Enter/Space
main.selectButton(main.selectedButton);
else if (
e.keyCode == 27 &&
main.dom.levelChooseButtons.style.display == 'block'
) {
// ESC
main.core.showStartAnimate(true);
}
e.stopPropagation();
return;
}
if (main.dom.inputDiv.style.display == 'block') {
if (e.keyCode == 13) {
setTimeout(function () {
main.dom.inputYes.click();
}, 50);
} else if (e.keyCode == 27) {
setTimeout(function () {
main.dom.inputNo.click();
}, 50);
}
return;
}
if (
main.core &&
main.core.isPlaying &&
main.core.status &&
(main.core.isPlaying() || main.core.status.lockControl)
)
main.core.onkeyUp(e);
} catch (ee) {
console.error(ee);
}
};
[main.dom.startButtons, main.dom.levelChooseButtons].forEach(function (
dom
) {
dom.onmousemove = function (e) {
for (var i = 0; i < dom.children.length; ++i) {
if (
dom.children[i] == e.target &&
i != (main.selectedButton || 0)
) {
main.selectButton(i);
}
}
};
});
////// 开始选择时 //////
main.dom.body.onselectstart = function () {
return false;
};
////// 鼠标按下时 //////
main.dom.data.onmousedown = function (e) {
try {
e.stopPropagation();
var loc = main.core.actions._getClickLoc(e.clientX, e.clientY);
if (loc == null) return;
main.core.ondown(loc);
} catch (ee) {
console.error(ee);
}
};
////// 鼠标移动时 //////
main.dom.data.onmousemove = function (e) {
try {
e.stopPropagation();
var loc = main.core.actions._getClickLoc(e.clientX, e.clientY);
if (loc == null) return;
main.core.onmove(loc);
} catch (ee) {
console.error(ee);
}
};
////// 鼠标放开时 //////
main.dom.data.onmouseup = function (e) {
try {
e.stopPropagation();
var loc = main.core.actions._getClickLoc(e.clientX, e.clientY);
if (loc == null) return;
main.core.onup(loc);
} catch (ee) {
console.error(ee);
}
};
////// 鼠标滑轮滚动时 //////
main.dom.data.onmousewheel = function (e) {
try {
if (e.wheelDelta) main.core.onmousewheel(Math.sign(e.wheelDelta));
else if (e.detail) main.core.onmousewheel(Math.sign(e.detail));
} catch (ee) {
console.error(ee);
}
};
////// 手指在触摸屏开始触摸时 //////
main.dom.data.ontouchstart = function (e) {
try {
e.preventDefault();
var loc = main.core.actions._getClickLoc(
e.targetTouches[0].clientX,
e.targetTouches[0].clientY
);
if (loc == null) return;
main.lastTouchLoc = loc;
main.core.ondown(loc);
} catch (ee) {
console.error(ee);
}
};
////// 手指在触摸屏上移动时 //////
main.dom.data.ontouchmove = function (e) {
try {
e.preventDefault();
var loc = main.core.actions._getClickLoc(
e.targetTouches[0].clientX,
e.targetTouches[0].clientY
);
if (loc == null) return;
main.lastTouchLoc = loc;
main.core.onmove(loc);
} catch (ee) {
console.error(ee);
}
};
////// 手指离开触摸屏时 //////
main.dom.data.ontouchend = function (e) {
try {
e.preventDefault();
if (main.lastTouchLoc == null) return;
var loc = main.lastTouchLoc;
delete main.lastTouchLoc;
main.core.onup(loc);
} catch (e) {
console.error(e);
}
};
main.dom.statusCanvas.onclick = function (e) {
try {
e.preventDefault();
main.core.onStatusBarClick(e);
} catch (e) {
console.error(e);
}
};
////// 点击状态栏中的怪物手册时 //////
main.statusBar.image.book.onclick = function (e) {
e.stopPropagation();
if (core.isReplaying()) {
core.triggerReplay();
return;
}
if (main.core.isPlaying()) main.core.openBook(true);
};
////// 点击状态栏中的楼层传送器/装备栏时 //////
main.statusBar.image.fly.onclick = function (e) {
e.stopPropagation();
// 播放录像时
if (core.isReplaying()) {
core.stopReplay();
return;
}
if (main.core.isPlaying()) {
if (!main.core.flags.equipboxButton) {
main.core.useFly(true);
} else {
main.core.openEquipbox(true);
}
}
};
////// 点击状态栏中的工具箱时 //////
main.statusBar.image.toolbox.onclick = function (e) {
e.stopPropagation();
if (core.isReplaying()) {
core.rewindReplay();
return;
}
if (main.core.isPlaying()) {
main.core.openToolbox(core.status.event.id != 'equipbox');
}
};
////// 双击状态栏中的工具箱时 //////
main.statusBar.image.toolbox.ondblclick = function (e) {
e.stopPropagation();
if (core.isReplaying()) {
return;
}
if (main.core.isPlaying()) main.core.openEquipbox(true);
};
////// 点击状态栏中的虚拟键盘时 //////
main.statusBar.image.keyboard.onclick = function (e) {
e.stopPropagation();
if (core.isReplaying()) {
core.control._replay_book();
return;
}
if (main.core.isPlaying()) main.core.openKeyBoard(true);
};
////// 点击状态栏中的快捷商店时 //////
main.statusBar.image.shop.onclick = function (e) {
e.stopPropagation();
if (core.isReplaying()) {
core.control._replay_viewMap();
return;
}
if (main.core.isPlaying()) main.core.openQuickShop(true);
};
////// 点击金币时也可以开启快捷商店 //////
main.statusBar.image.money.onclick = function (e) {
e.stopPropagation();
if (main.core.isPlaying()) main.core.openQuickShop(true);
};
////// 点击楼梯图标也可以浏览地图 //////
main.statusBar.image.floor.onclick = function (e) {
e.stopPropagation();
if (
main.core &&
main.core.isPlaying() &&
!core.isMoving() &&
!core.status.lockControl
) {
core.ui._drawViewMaps();
}
};
////// 点击状态栏中的存档按钮时 //////
main.statusBar.image.save.onclick = function (e) {
e.stopPropagation();
if (core.isReplaying()) {
core.speedDownReplay();
return;
}
if (main.core.isPlaying()) main.core.save(true);
};
////// 点击状态栏中的读档按钮时 //////
main.statusBar.image.load.onclick = function (e) {
e.stopPropagation();
if (core.isReplaying()) {
core.speedUpReplay();
return;
}
if (main.core.isPlaying()) main.core.load(true);
};
////// 点击状态栏中的系统菜单时 //////
main.statusBar.image.settings.onclick = function (e) {
e.stopPropagation();
if (core.isReplaying()) {
core.control._replay_SL();
return;
}
if (main.core.isPlaying()) main.core.openSettings(true);
};
////// 点击工具栏时 //////
main.dom.hard.onclick = function () {
main.core.control.setToolbarButton(!core.domStyle.toolbarBtn);
};
////// 手机端的按钮1-7 //////
main.statusBar.image.btn1.onclick = function (e) {
e.stopPropagation();
main.core.onkeyUp({
keyCode: 49,
altKey: core.getLocalStorage('altKey')
});
};
main.statusBar.image.btn2.onclick = function (e) {
e.stopPropagation();
main.core.onkeyUp({
keyCode: 50,
altKey: core.getLocalStorage('altKey')
});
};
main.statusBar.image.btn3.onclick = function (e) {
e.stopPropagation();
main.core.onkeyUp({
keyCode: 51,
altKey: core.getLocalStorage('altKey')
});
};
main.statusBar.image.btn4.onclick = function (e) {
e.stopPropagation();
main.core.onkeyUp({
keyCode: 52,
altKey: core.getLocalStorage('altKey')
});
};
main.statusBar.image.btn5.onclick = function (e) {
e.stopPropagation();
main.core.onkeyUp({
keyCode: 53,
altKey: core.getLocalStorage('altKey')
});
};
main.statusBar.image.btn6.onclick = function (e) {
e.stopPropagation();
main.core.onkeyUp({
keyCode: 54,
altKey: core.getLocalStorage('altKey')
});
};
main.statusBar.image.btn7.onclick = function (e) {
e.stopPropagation();
main.core.onkeyUp({
keyCode: 55,
altKey: core.getLocalStorage('altKey')
});
};
main.statusBar.image.btn8.onclick = function (e) {
e.stopPropagation();
if (core.getLocalStorage('altKey')) {
core.removeLocalStorage('altKey');
core.drawTip('Alt模式已关闭。');
main.statusBar.image.btn8.style.filter = '';
} else {
core.setLocalStorage('altKey', true);
core.drawTip('Alt模式已开启此模式下1~7按钮视为Alt+1~7。');
main.statusBar.image.btn8.style.filter = 'sepia(1) contrast(1.5)';
}
};
////// 点击“开始游戏”时 //////
main.dom.playGame.onclick = function () {
main.dom.startButtons.style.display = 'none';
main.core.control.checkBgm();
if (main.levelChoose.length == 0) {
core.events.startGame('');
} else {
main.dom.levelChooseButtons.style.display = 'block';
main.selectedButton = null;
main.selectButton(0);
}
};
////// 点击“载入游戏”时 //////
main.dom.loadGame.onclick = function () {
main.core.control.checkBgm();
main.core.load();
};
////// 点击“录像回放”时 //////
main.dom.replayGame.onclick = function () {
main.core.control.checkBgm();
main.core.chooseReplayFile();
};
main.dom.musicBtn.onclick = function () {
try {
if (main.core) main.core.triggerBgm();
} catch (ee) {
console.error(ee);
}
};
window.onblur = function () {
if (main.core && main.core.control) {
try {
main.core.control.checkAutosave();
} catch (e) {}
}
};
main.dom.inputYes.onclick = function () {
main.dom.inputDiv.style.display = 'none';
var func = core.platform.successCallback;
core.platform.successCallback = core.platform.errorCallback = null;
if (func) func(main.dom.inputBox.value);
};
main.dom.inputNo.onclick = function () {
main.dom.inputDiv.style.display = 'none';
var func = core.platform.errorCallback;
core.platform.successCallback = core.platform.errorCallback = null;
if (func) func(null);
};
}; //listen end
var main = new main();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"ratio":2,"bitmaps":["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAD6SURBVHhe7dQ9SsVAFAXg+MNTeAhaWCrWLsHGUlCwsHMXgo2NjZ31a1yBVtaCrSvQ1i24hSSegbuEBAS/Dw7M3JnqZEgHAAAAAAAAAAAAAP/NOI5rySI5GobhNDlJ9uuYqaXo9RR83Pf9U/KevGV/kxwkW+2D1FWmkmKXKfYuZf8k38lrZpeZHSaLusaU2ktOyRcp+zP5Sl6yv858t53VNaaWcrdT9mPSXvpHskrxO3XMnNpvJYW3F/+Q9XmNmVv7raT055R+n/VejZlbyt5M6VfJbdYbNWZureyUvkzOagQAAAAAAAAAAAAAAAAAAAAAAAAAAADwd3XdL135q9NaPZ6+AAAAAElFTkSuQmCC","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJ4SURBVHhe7de7alRRFMbx3DSIgqiNIBJsBUUESyutBAsLO9/CWtL4BtorlgFBRGIEEQwxMSBiMWouGo2TCyaTC0lmJjM5ey+/HVfeYPZB8P+DNefsS/WdxZ5zugAAAAAAAAAAAAAAAAAAAID/lZkdVnX7ELmkkA+C1rU3xngthHBf1xsa9+1vQmcdhK7qUdAXFPh4URSjur+r6vdt6DQP/ZDqkkL/ZlZs6jqh8WnfghzU1UcOQlclmop3fBk5KPA+hXxRYb9LiWtsujR0Oe5b0Gke+hUF/TaFLtHrh29BDgr9jEJOoReqeur2RPfTvgWdpnzTG8yAQm6oYgq8uWfWLvaD1y+vkNko3G6FPJ9CT7ZbZpVVs9m1/Ydw3bchB3X9+dTxqVLwk4tmH1T1VnjlW5CDGj11/XDq+HTgfFwye/rVbKpmNjzDx1N2Cn8jhb+qF8mRObOX381m1sPww4od8y3IQZn3KPzdogjNyorZ8xmzaXX9cjOe8y3IxcNvNtq2OV41ezFrttYMv30ZOSn8dOavqBrjC3+PnfVGvOfLyE0P4HH6qhr9Zfbmp7p/Lg74EnJT+LdbeyGk4F/PhfhgMp7yJeSm9/yTavza2HyIYwuhPTRkvb6E3NT5fQr/2cRS2HhfDfVB/Qn7EnJLf7rq/pvTq6H9uRa2fBplSOGrTixvhdrUWqj7NMqi8HsV/shsLez5FMq004qXq+th14cok879/upO+FKp2GGfQll09PSsNOLVxXq85VMoUzr7F7fDIx+iTOnNR8fP2UGOnvKl8NPx8+RTPOpTKFt6CH4LAAAAAAAAAAAAAAAAAAAAAAAAAACAf1RX1x9x4x3SPdhnTAAAAABJRU5ErkJggg==","","","","","","","","","","","","","","","","","",""],"frame_max":5,"frames":[[[0,8,32,30,100]],[[0,-16,32,50,130]],[[0,-24,40,80,150]],[[0,-48,24,90,180],[1,-8,40,100,255]],[[0,-56,24,100,200],[1,-8,24,100,255]]]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
project/bgms/bgm.mp3 Normal file

Binary file not shown.

827
project/data.js Normal file
View File

@ -0,0 +1,827 @@
var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
{
"main": {
"floorIds": [
"MT0",
"MT1",
"MT2",
"MT3",
"MT4",
"MT5",
"MT6",
"MT7",
"MT8",
"MT9",
"MT10",
"MT11"
],
"floorPartitions": [],
"images": [
"HPGaugeEnemy_A.png",
"HPGaugeEnemy_B.png",
"bear.png",
"bg.jpg",
"bg2.jpg",
"brave.png",
"d.png",
"dl.png",
"dlr.png",
"dr.png",
"dragon.png",
"green.png",
"h25.png",
"hero.png",
"l.png",
"light.png",
"lock.png",
"lr.png",
"maba.png",
"now.png",
"null.png",
"r.png",
"status.png",
"statusBackground.jpg",
"statusBackground.png",
"statusBackground2.png",
"statusBackground_vertical.png",
"statusBackgroundv4.png",
"t012d0ffd2cc7d751fc.jpg",
"t015d97564abe3b6a74.jpg",
"t0187fe5a5fa586419d.jpg",
"t01c16e1361b78b9412.jpg",
"u.png",
"ud.png",
"udl.png",
"udlr.png",
"udr.png",
"ul.png",
"ulr.png",
"unknow.png",
"ur.png",
"winskin.png",
"winskin1.png"
],
"tilesets": [
"magictower.png"
],
"animates": [
"hand",
"sword",
"zone"
],
"bgms": [
"bgm.mp3"
],
"sounds": [
"attack.mp3",
"bomb.mp3",
"cancel.mp3",
"centerFly.mp3",
"confirm.mp3",
"cursor.mp3",
"door.mp3",
"equip.mp3",
"error.mp3",
"floor.mp3",
"gem.mp3",
"icePickaxe.mp3",
"item.mp3",
"jump.mp3",
"load.mp3",
"open_ui.mp3",
"pickaxe.mp3",
"recovery.mp3",
"save.mp3",
"shop.mp3",
"zone.mp3"
],
"fonts": [],
"nameMap": {
"确定": "confirm.mp3",
"取消": "cancel.mp3",
"操作失败": "error.mp3",
"光标移动": "cursor.mp3",
"打开界面": "open_ui.mp3",
"读档": "load.mp3",
"存档": "save.mp3",
"获得道具": "item.mp3",
"回血": "recovery.mp3",
"炸弹": "bomb.mp3",
"飞行器": "centerFly.mp3",
"开关门": "door.mp3",
"上下楼": "floor.mp3",
"跳跃": "jump.mp3",
"破墙镐": "pickaxe.mp3",
"破冰镐": "icePickaxe.mp3",
"宝石": "gem.mp3",
"阻激夹域": "zone.mp3",
"穿脱装备": "equip.mp3",
"背景音乐": "bgm.mp3",
"攻击": "attack.mp3",
"背景图": "bg.jpg",
"商店": "shop.mp3",
"领域": "zone"
},
"levelChoose": [
{
"title": "简单",
"name": "Easy",
"hard": 1,
"color": [
64,
255,
85,
1
],
"action": [
{
"type": "comment",
"text": "在这里写该难度需执行的事件"
}
]
},
{
"title": "普通",
"name": "Normal",
"hard": 2,
"color": [
255,
221,
32,
1
],
"action": []
},
{
"title": "困难",
"name": "Hard",
"hard": 3,
"color": [
255,
68,
64,
1
],
"action": []
}
],
"equipName": [
"武器",
"盾牌"
],
"startBgm": null,
"styles": {
"startBackground": "project/images/bg.jpg",
"startVerticalBackground": "project/images/bg2.jpg",
"startLogoStyle": "color: black",
"startButtonsStyle": "background-color: #32369F; opacity: 0.85; color: #FFFFFF; border: #FFFFFF 2px solid; caret-color: #FFD700;",
"statusLeftBackground": "url(project/materials/ground.png) repeat",
"statusTopBackground": "url(project/materials/ground.png) repeat",
"toolsBackground": "url(project/materials/ground.png) repeat",
"floorChangingStyle": "background-color: black; color: white",
"statusBarColor": [
255,
255,
255,
1
],
"borderColor": [
204,
204,
204,
1
],
"selectColor": [
255,
215,
0,
1
],
"font": "Verdana"
},
"splitImages": [
{
"name": "dragon.png",
"width": 384,
"height": 96,
"prefix": "dragon_"
}
]
},
"firstData": {
"title": "秽翼的尤斯蒂娅",
"name": "Eustia",
"version": "鸽子窝造塔小队",
"floorId": "MT0",
"hero": {
"image": "hero.png",
"animate": false,
"name": "阳光",
"lv": 1,
"hpmax": 9999,
"hp": 1000,
"manamax": -1,
"mana": 0,
"atk": 100,
"def": 100,
"mdef": 0,
"money": 0,
"exp": 0,
"equipment": [],
"items": {
"constants": {},
"tools": {},
"equips": {}
},
"loc": {
"direction": "up",
"x": 6,
"y": 10
},
"flags": {
"itemDetail": true,
"useBetweenLight": true
},
"followers": [],
"steps": 0
},
"startCanvas": [
{
"type": "comment",
"text": "在这里可以用事件来自定义绘制标题界面的背景图等"
},
{
"type": "comment",
"text": "也可以直接切换到其他楼层(比如某个开始剧情楼层)进行操作。"
},
{
"type": "previewUI",
"action": [
{
"type": "fillRect",
"x": 0,
"y": 0,
"width": "core._PX_ || core.__PIXELS__",
"height": "core._PY_ || core.__PIXELS__",
"style": [
82,
82,
82,
1
]
},
{
"type": "setAttribute",
"align": "center"
},
{
"type": "fillBoldText",
"x": "(core._PX_ || core.__PIXELS__) / 2",
"y": 80,
"style": [
255,
255,
255,
1
],
"strokeStyle": [
0,
0,
0,
1
],
"font": "bold 40px Verdana",
"text": "${core.firstData.title}"
}
]
},
{
"type": "setValue",
"name": "flag:selection",
"value": "0"
},
{
"type": "comment",
"text": "在右下方自绘一个对话框进行显示选择项"
},
{
"type": "previewUI",
"action": [
{
"type": "fillRect",
"x": 230,
"y": 250,
"width": 150,
"height": 142,
"radius": 10,
"style": [
50,
54,
159,
0.85
]
},
{
"type": "strokeRect",
"x": 230,
"y": 250,
"width": 150,
"height": 142,
"radius": 10,
"style": [
255,
255,
255,
1
],
"lineWidth": 2
},
{
"type": "fillBoldText",
"x": 305,
"y": 290,
"style": [
255,
255,
255,
1
],
"font": "bold 25px Verdana",
"text": "开始游戏"
},
{
"type": "fillBoldText",
"x": 305,
"y": 330,
"font": "bold 25px Verdana",
"text": "读取存档"
},
{
"type": "fillBoldText",
"x": 305,
"y": 370,
"font": "bold 25px Verdana",
"text": "回放录像"
}
]
},
{
"type": "while",
"condition": "1",
"data": [
{
"type": "drawSelector",
"image": "winskin.png",
"code": 1,
"x": 245,
"y": "261 + 40*flag:selection",
"width": 120,
"height": 40
},
{
"type": "wait",
"data": [
{
"case": "keyboard",
"keycode": "13,32",
"break": true,
"action": [
{
"type": "switch",
"condition": "flag:selection",
"caseList": [
{
"case": "0",
"action": [
{
"type": "comment",
"text": "在“开始游戏”确定"
},
{
"type": "break",
"n": 1
}
]
},
{
"case": "1",
"action": [
{
"type": "comment",
"text": "在“读取存档”确定"
},
{
"type": "callLoad"
}
]
},
{
"case": "2",
"action": [
{
"type": "comment",
"text": "在“回放录像”确定"
},
{
"type": "if",
"condition": "(!core.isReplaying())",
"true": [
{
"type": "function",
"function": "function(){\ncore.chooseReplayFile()\n}"
}
]
}
]
}
]
}
]
},
{
"case": "keyboard",
"keycode": "38",
"break": true,
"action": [
{
"type": "comment",
"text": "光标上键"
},
{
"type": "setValue",
"name": "flag:selection",
"value": "(flag:selection + 2) % 3"
}
]
},
{
"case": "keyboard",
"keycode": "40",
"break": true,
"action": [
{
"type": "comment",
"text": "光标下键"
},
{
"type": "setValue",
"name": "flag:selection",
"value": "(flag:selection + 1) % 3"
}
]
},
{
"case": "mouse",
"px": [
245,
365
],
"py": [
261,
300
],
"break": true,
"action": [
{
"type": "comment",
"text": "点击“开始游戏”"
},
{
"type": "break",
"n": 1
}
]
},
{
"case": "mouse",
"px": [
245,
365
],
"py": [
301,
340
],
"break": true,
"action": [
{
"type": "comment",
"text": "点击“读取存档”"
},
{
"type": "callLoad"
}
]
},
{
"case": "mouse",
"px": [
245,
365
],
"py": [
341,
380
],
"break": true,
"action": [
{
"type": "comment",
"text": "点击“播放录像”"
},
{
"type": "if",
"condition": "(!core.isReplaying())",
"true": [
{
"type": "function",
"function": "function(){\ncore.chooseReplayFile()\n}"
}
]
}
]
}
]
}
]
},
{
"type": "setValue",
"name": "flag:selection",
"value": "null"
},
{
"type": "drawSelector",
"code": 1
},
{
"type": "clearMap"
},
{
"type": "function",
"function": "function(){\ncore.control.checkBgm()\n}"
},
{
"type": "if",
"condition": "(main.levelChoose.length == 0)",
"true": [
{
"type": "comment",
"text": "没有难度选择:直接开始游戏"
}
],
"false": [
{
"type": "comment",
"text": "难度选择:作为样例,这里只提供了一个显示选择项。"
},
{
"type": "function",
"function": "function(){\nvar choices = [];\nmain.levelChoose.forEach(function (one) {\n\tchoices.push({\n\t\t\"text\": one.title || '',\n\t\t\"action\": [\n\t\t\t{ \"type\": \"function\", \"function\": \"function() { core.status.hard = '\" + (one.name || '') + \"'; }\" }\n\t\t]\n\t});\n})\ncore.insertAction({ \"type\": \"choices\", \"choices\": choices });\n}"
},
{
"type": "comment",
"text": "你也可以仿照上面的样例进行自己创建等待用户操作来处理不同的难度分歧。\n如需自己处理请设置 core.status.hard \n例如自定义js脚本core.status.hard = 'Easy' "
}
]
},
{
"type": "clearMap"
},
{
"type": "comment",
"text": "接下来会执行startText中的事件"
},
{
"type": "comment",
"text": "状态栏默认处于隐藏状态;可以使用“显示状态栏”事件进行显示。"
}
],
"startText": [
{
"type": "comment",
"text": "初始剧情"
},
"Hi欢迎来到 HTML5 魔塔样板!\n\n本样板由艾之葵制作可以让你在不会写任何代码\n的情况下也能做出属于自己的H5魔塔",
"这里游戏开始时的剧情。\n\n你可以在这里写上自己的内容。\n赶快来试一试吧"
],
"shops": [
{
"id": "shop1",
"text": "\t[贪婪之神,moneyShop]勇敢的武士啊, 给我${20+2*flag:shop1}金币就可以:",
"textInList": "1F金币商店",
"mustEnable": false,
"disablePreview": false,
"choices": [
{
"text": "生命+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": "shop2",
"text": "\t[贪婪之神,expShop]勇敢的武士啊, 给我一定经验就可以:",
"textInList": "1F经验商店",
"mustEnable": false,
"disablePreview": true,
"choices": [
{
"text": "等级+1100经验",
"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"
}
]
}
]
},
{
"id": "itemShop",
"item": true,
"textInList": "道具商店",
"use": "money",
"mustEnable": false,
"choices": [
{
"id": "yellowKey",
"number": 10,
"money": "10",
"sell": "5"
}
]
},
{
"id": "keyShop",
"textInList": "回收钥匙商店",
"mustEnable": false,
"commonEvent": "回收钥匙商店"
}
],
"levelUp": [
{
"need": "0",
"title": "",
"action": [
{
"type": "comment",
"text": "此处是初始等级,只需填写称号"
}
]
},
{
"need": "20",
"title": "",
"action": [
{
"type": "setValue",
"name": "status:atk",
"operator": "+=",
"value": "10"
},
{
"type": "setValue",
"name": "status:def",
"operator": "+=",
"value": "10"
}
]
},
{
"need": "40",
"title": "",
"action": [
{
"type": "tip",
"text": "恭喜升级"
}
]
}
]
},
"values": {
"lavaDamage": 100,
"poisonDamage": 10,
"weakValue": 20,
"redGem": 3,
"blueGem": 3,
"greenGem": 5,
"redPotion": 100,
"bluePotion": 250,
"yellowPotion": 500,
"greenPotion": 800,
"breakArmor": 0.9,
"counterAttack": 0.1,
"purify": 3,
"hatred": 2,
"animateSpeed": 300,
"moveSpeed": 100,
"statusCanvasRowsOnMobile": 3,
"floorChangeTime": 500
},
"flags": {
"statusBarItems": [
"enableFloor",
"enableLv",
"enableHP",
"enableMana",
"enableAtk",
"enableDef",
"enableMDef",
"enableMoney",
"enableExp",
"enableKeys",
"enablePZF",
"enableSkill"
],
"autoScale": true,
"extendToolbar": false,
"flyNearStair": false,
"flyRecordPosition": false,
"itemFirstText": false,
"equipboxButton": false,
"enableAddPoint": false,
"enableNegativeDamage": false,
"betweenAttackMax": false,
"useLoop": true,
"startUsingCanvas": false,
"statusCanvas": false,
"enableEnemyPoint": true,
"enableGentleClick": true,
"ignoreChangeFloor": true,
"canGoDeadZone": false,
"enableMoveDirectly": true,
"enableRouteFolding": true,
"disableShopOnDamage": false,
"blurFg": false,
"hideLeftStatusBar": false
}
}

84
project/enemys.js Normal file
View File

@ -0,0 +1,84 @@
var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
{
"greenSlime": {"name":"绿头怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"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},
"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":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"vampire": {"name":"冥灵魔王","hp":888,"atk":888,"def":888,"money":888,"exp":888,"point":0,"special":[6],"n":8},
"skeleton": {"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},
"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":50,"atk":50,"def":0,"money":3,"exp":0,"point":0,"special":3},
"bluePriest": {"name":"初级法师","hp":100,"atk":120,"def":0,"money":3,"exp":0,"point":1,"special":[9]},
"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},
"swordsman": {"name":"双手剑士","hp":100,"atk":120,"def":0,"money":6,"exp":0,"point":0,"special":4},
"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":500,"atk":200,"def":50,"money":0,"exp":0,"point":0,"special":[7]},
"darkKnight": {"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":50,"atk":60,"def":70,"money":80,"exp":0,"point":0,"special":13},
"poisonBat": {"name":"紫蝙蝠","hp":100,"atk":120,"def":0,"money":14,"exp":0,"point":0,"special":13},
"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},
"evilHero": {"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},
"silverSlime": {"name":"银头怪","hp":100,"atk":120,"def":0,"money":15,"exp":0,"point":0,"special":14},
"whiteHornSlime": {"name":"尖角怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"redSwordsman": {"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]},
"octopus": {"name":"血影","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0,"bigImage":"dragon_1.png"},
"princessEnemy": {"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":50,"atk":50,"def":50,"money":0,"exp":0,"point":0,"special":[18],"value":20},
"evilBat": {"name":"邪恶蝙蝠","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"silverSlimelord": {"name":"银怪王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"goldSlimelord": {"name":"金怪王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"skeletonWarrior": {"name":"骷髅士兵","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"whiteSlimeman": {"name":"水银战士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"slimeman": {"name":"影子战士","hp":100,"atk":0,"def":0,"money":11,"exp":0,"point":0,"special":[9],"atkValue":2,"defValue":3},
"yellowGateKeeper": {"name":"初级卫兵","hp":100,"atk":120,"def":0,"money":10,"exp":0,"point":0,"special":0},
"blueGateKeeper": {"name":"中级卫兵","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"redGateKeeper": {"name":"高级卫兵","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"magicMaster": {"name":"黑暗大法师","hp":100,"atk":120,"def":0,"money":12,"exp":0,"point":0,"special":11,"value":0.3333333333333333,"add":true,"notBomb":true},
"devilWarrior": {"name":"魔神武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"fairyEnemy": {"name":"仙子","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"dragon": {"name":"魔龙","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0,"bigImage":"dragon_0.png"},
"skeletonKnight": {"name":"骷髅武士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"skeletonPresbyter": {"name":"骷髅巫师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"ironRock": {"name":"铁面人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"grayRock": {"name":"灰色石头人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"yellowPriest": {"name":"中级法师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"evilPrincess": {"name":"痛苦魔女","hp":1000,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[10]},
"blademaster": {"name":"剑圣","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"evilFairy": {"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},
"bowman": {"name":"初级弓兵","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"watcherSlime": {"name":"邪眼怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"devilKnight": {"name":"恶灵骑士","hp":150,"atk":100,"def":50,"money":0,"exp":0,"point":0,"special":[1,5,7,8]},
"grayPriest": {"name":"混沌法师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"greenGateKeeper": {"name":"卫兵队长","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"ghostSoldier": {"name":"冥队长","hp":200,"atk":100,"def":50,"money":0,"exp":0,"point":0,"special":8},
"frostBat": {"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},
"redKing": {"name":"红衣魔王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"blueKing": {"name":"白衣武士","hp":100,"atk":120,"def":0,"money":17,"exp":0,"point":0,"special":[16]},
"keiskeiFairy": {"name":"铃兰花妖","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"tulipFairy": {"name":"郁金香花妖","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"purpleBowman": {"name":"高级弓兵","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":0},
"bearDown": {"name":"熊出没","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[],"faceIds":{"down":"bearDown","left":"bearLeft","right":"bearRight","up":"bearUp"},"bigImage":"bear.png"},
"bearLeft": {"name":"熊出没","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[],"faceIds":{"down":"bearDown","left":"bearLeft","right":"bearRight","up":"bearUp"}},
"bearRight": {"name":"熊出没","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[],"faceIds":{"down":"bearDown","left":"bearLeft","right":"bearRight","up":"bearUp"}},
"bearUp": {"name":"熊出没","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[],"faceIds":{"down":"bearDown","left":"bearLeft","right":"bearRight","up":"bearUp"}}
}

147
project/events.js Normal file
View File

@ -0,0 +1,147 @@
var events_c12a15a8_c380_4b28_8144_256cba95f760 =
{
"commonEvent": {
"加点事件": [
{
"type": "comment",
"text": "通过传参flag:arg1 表示当前应该的加点数值"
},
{
"type": "choices",
"choices": [
{
"text": "攻击+${1*flag:arg1}",
"action": [
{
"type": "setValue",
"name": "status:atk",
"operator": "+=",
"value": "1*flag:arg1"
}
]
},
{
"text": "防御+${2*flag:arg1}",
"action": [
{
"type": "setValue",
"name": "status:def",
"operator": "+=",
"value": "2*flag:arg1"
}
]
},
{
"text": "生命+${200*flag:arg1}",
"action": [
{
"type": "setValue",
"name": "status:hp",
"operator": "+=",
"value": "200*flag:arg1"
}
]
}
]
}
],
"回收钥匙商店": [
{
"type": "comment",
"text": "此事件在全局商店中被引用了(全局商店keyShop)"
},
{
"type": "comment",
"text": "解除引用前勿删除此事件"
},
{
"type": "comment",
"text": "玩家在快捷列表V键中可以使用本公共事件"
},
{
"type": "while",
"condition": "1",
"data": [
{
"type": "choices",
"text": "\t[商人,trader]你有多余的钥匙想要出售吗?",
"choices": [
{
"text": "黄钥匙10金币",
"color": [
255,
255,
0,
1
],
"action": [
{
"type": "if",
"condition": "item:yellowKey >= 1",
"true": [
{
"type": "setValue",
"name": "item:yellowKey",
"operator": "-=",
"value": "1"
},
{
"type": "setValue",
"name": "status:money",
"operator": "+=",
"value": "10"
}
],
"false": [
"\t[商人,trader]你没有黄钥匙!"
]
}
]
},
{
"text": "蓝钥匙50金币",
"color": [
0,
0,
255,
1
],
"action": [
{
"type": "if",
"condition": "item:blueKey >= 1",
"true": [
{
"type": "setValue",
"name": "item:blueKey",
"operator": "-=",
"value": "1"
},
{
"type": "setValue",
"name": "status:money",
"operator": "+=",
"value": "50"
}
],
"false": [
"\t[商人,trader]你没有蓝钥匙!"
]
}
]
},
{
"text": "离开",
"action": [
{
"type": "exit"
}
]
}
]
}
]
}
]
}
}

74
project/floors/MT0.js Normal file
View File

@ -0,0 +1,74 @@
main.floors.MT0=
{
"floorId": "MT0",
"title": "主塔 0 层",
"name": "0",
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"cannotViewMap": false,
"defaultGround": "ground",
"images": [],
"ratio": 1,
"map": [
[ 89, 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, 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, 94],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 45, 46, 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, 93, 0, 0, 0, 0, 0, 0]
],
"firstArrive": [],
"parallelDo": "",
"events": {
"0,0": [
{
"type": "changeFloor",
"floorId": "MT8",
"loc": [
12,
12
]
}
]
},
"changeFloor": {
"12,6": {
"floorId": "MT3",
"loc": [
0,
6
]
},
"6,12": {
"floorId": "MT1",
"loc": [
6,
0
]
}
},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"cannotMove": {},
"bgmap": [
],
"fgmap": [
],
"width": 13,
"height": 13,
"autoEvent": {},
"beforeBattle": {},
"cannotMoveIn": {},
"areas": "牢狱"
}

74
project/floors/MT1.js Normal file
View File

@ -0,0 +1,74 @@
main.floors.MT1=
{
"floorId": "MT1",
"title": "主塔 1 层",
"name": "1",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
"weather": [
"snow",
6
],
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {
"6,0": {
"floorId": "MT0",
"loc": [
6,
12
]
},
"12,6": {
"floorId": "MT2",
"loc": [
0,
6
]
},
"0,6": {
"floorId": "MT4",
"loc": [
12,
6
]
}
},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[ 0, 0, 0, 0, 0, 0, 91, 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, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0,205, 0, 0, 0, 0],
[ 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94],
[ 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,211, 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]
],
"bgmap": [
],
"fgmap": [
],
"areas": "牢狱"
}

45
project/floors/MT10.js Normal file
View File

@ -0,0 +1,45 @@
main.floors.MT10=
{
"floorId": "MT10",
"title": "主塔 10 层",
"name": "10",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
"weather": [
"snow",
6
],
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"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, 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, 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, 0, 0, 0, 0, 0, 0, 0]
],
}

45
project/floors/MT11.js Normal file
View File

@ -0,0 +1,45 @@
main.floors.MT11=
{
"floorId": "MT11",
"title": "主塔 11 层",
"name": "11",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
"weather": [
"snow",
6
],
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"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, 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, 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, 0, 0, 0, 0, 0, 0, 0]
],
}

67
project/floors/MT2.js Normal file
View File

@ -0,0 +1,67 @@
main.floors.MT2=
{
"floorId": "MT2",
"title": "主塔 2 层",
"name": "2",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
"weather": [
"snow",
6
],
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {
"6,0": {
"floorId": "MT3",
"loc": [
6,
12
]
},
"0,6": {
"floorId": "MT1",
"loc": [
12,
6
]
}
},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[ 0, 0, 0, 0, 0, 0, 91, 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, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 92, 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, 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]
],
"bgmap": [
],
"fgmap": [
],
"areas": "牢狱"
}

67
project/floors/MT3.js Normal file
View File

@ -0,0 +1,67 @@
main.floors.MT3=
{
"floorId": "MT3",
"title": "主塔 3 层",
"name": "3",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
"weather": [
"snow",
6
],
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {
"6,12": {
"floorId": "MT2",
"loc": [
6,
0
]
},
"0,6": {
"floorId": "MT0",
"loc": [
12,
6
]
}
},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 92, 0, 0, 0, 0, 0, 0, 0,206, 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, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 93, 0, 0, 0, 0, 0, 0]
],
"bgmap": [
],
"fgmap": [
],
"areas": "牢狱"
}

67
project/floors/MT4.js Normal file
View File

@ -0,0 +1,67 @@
main.floors.MT4=
{
"floorId": "MT4",
"title": "主塔 4 层",
"name": "4",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
"weather": [
"snow",
6
],
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {
"12,6": {
"floorId": "MT1",
"loc": [
0,
6
]
},
"0,6": {
"floorId": "MT5",
"loc": [
0,
6
]
}
},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94],
[ 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
],
"bgmap": [
],
"fgmap": [
],
"areas": "牢狱"
}

71
project/floors/MT5.js Normal file
View File

@ -0,0 +1,71 @@
main.floors.MT5=
{
"floorId": "MT5",
"title": "主塔 5 层",
"name": "5",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
"weather": [
"snow",
6
],
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {
"7,7": [
{
"type": "changeFloor",
"floorId": "MT6",
"loc": [
6,
12
]
}
]
},
"changeFloor": {
"0,6": {
"floorId": "MT4",
"loc": [
0,
6
]
}
},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 89, 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, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
],
"bgmap": [
],
"fgmap": [
],
"areas": "牢狱"
}

63
project/floors/MT6.js Normal file
View File

@ -0,0 +1,63 @@
main.floors.MT6=
{
"floorId": "MT6",
"title": "主塔 6 层",
"name": "6",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
"weather": [
"snow",
6
],
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {
"6,12": [
{
"type": "changeFloor",
"floorId": "MT5",
"loc": [
7,
7
]
}
]
},
"changeFloor": {},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"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, 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, 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, 89, 0, 0, 0, 0, 0, 0]
],
"bgmap": [
],
"fgmap": [
],
"areas": "牢狱"
}

60
project/floors/MT7.js Normal file
View File

@ -0,0 +1,60 @@
main.floors.MT7=
{
"floorId": "MT7",
"title": "主塔 7 层",
"name": "7",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
"weather": [
"snow",
6
],
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {
"12,6": {
"floorId": "MT8",
"loc": [
0,
6
]
}
},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"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, 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, 94],
[ 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
],
"bgmap": [
],
"fgmap": [
],
"areas": "牢狱"
}

71
project/floors/MT8.js Normal file
View File

@ -0,0 +1,71 @@
main.floors.MT8=
{
"floorId": "MT8",
"title": "主塔 8 层",
"name": "8",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
"weather": [
"snow",
6
],
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {
"12,12": [
{
"type": "changeFloor",
"floorId": "MT0",
"loc": [
0,
0
]
}
]
},
"changeFloor": {
"0,6": {
"floorId": "MT7",
"loc": [
12,
6
]
}
},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 92, 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, 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, 89]
],
"bgmap": [
],
"fgmap": [
],
"areas": "牢狱"
}

45
project/floors/MT9.js Normal file
View File

@ -0,0 +1,45 @@
main.floors.MT9=
{
"floorId": "MT9",
"title": "主塔 9 层",
"name": "9",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "grass",
"weather": [
"snow",
6
],
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"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, 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, 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, 0, 0, 0, 0, 0, 0, 0]
],
}

259
project/floors/sample0.js Normal file
View File

@ -0,0 +1,259 @@
main.floors.sample0=
{
"floorId": "sample0",
"title": "样板 0 层",
"name": "0",
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"defaultGround": "ground",
"images": [],
"bgm": "bgm.mp3",
"ratio": 1,
"map": [
[ 0, 0,220, 0, 0, 20, 87, 3, 58, 59, 60, 61, 64],
[ 0,246, 0,246, 0, 20, 0, 3, 57, 72, 63, 43, 44],
[219, 0, 0, 0,219, 20, 0, 3, 53, 54, 55, 56, 69],
[ 20, 20,125, 20, 20, 20, 0, 3, 49, 50, 51, 52, 68],
[251,247,256,234,248, 6, 0, 3, 35, 36, 46, 47, 48],
[ 6, 6,125, 6, 6, 6, 0, 3, 0, 0, 0, 0, 0],
[208,227,212,216,278, 5, 0, 1, 1, 1,319, 1, 1],
[201,205,217,215,224, 5, 0, 1, 27, 28, 29, 30, 31],
[ 5, 5,125, 5, 5, 5, 0, 1, 21, 22, 23, 24, 26],
[ 0, 0,263, 0, 0, 0, 45, 1, 1, 1,121, 1, 1],
[ 4, 4,133, 4, 4, 4, 0, 36, 43, 0, 0, 85,124],
[ 87, 11, 12, 13, 14, 4, 4, 2, 2,122, 2, 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": {
"2,10": [
"\t[少女,npc0]\b[this]这些是路障、楼梯、传送门。",
"\t[少女,npc1]\b[this]血网的伤害数值、中毒后每步伤害数值、衰弱时攻防下降的数值都在全塔属性快捷键B的全局数值values内定义。\n\n路障同样会尽量被自动寻路绕过。",
"\t[少女,npc2]\b[this]楼梯和传送门需要在地图选点快捷键X的“楼层转换”中定义目标楼层和位置可参见样板里已有的的写法。",
{
"type": "hide",
"time": 500
}
],
"2,5": [
"\t[老人,wizard]\b[this]模仿、吸血、中毒、衰弱、诅咒。\n\n请注意吸血怪需要设置value为吸血数值可参见样板中黑暗大法师的写法。",
{
"type": "hide",
"time": 500
}
],
"2,3": [
"\t[老人,wizard]\b[this]领域、夹击。\n请注意领域怪需要设置value为伤害数值可参见样板中初级巫师的写法。",
"\t[老人,wizard]\b[this]当领域、阻击、激光和夹击同时发生时,先计算领域、阻击、激光(同时计算),再计算夹击。\n自动寻路同样会尽量绕过这些区域。",
{
"type": "hide",
"time": 500
}
],
"12,10": {
"trigger": null,
"enable": false,
"noPass": null,
"displayDamage": true,
"data": [
"\t[仙子,fairy]\b[this]只有楼上启用事件后,才能看到我并可以和我对话来触发事件。",
{
"type": "hide",
"time": 500
}
]
},
"2,8": [
"\t[老人,wizard]\b[this]这些都是各种各样的怪物,所有怪物的数据都在 project 文件夹的 enemys.js 中设置。\n注意是 enemys而非 enemies",
"\t[老人,wizard]\b[this]这批怪物分别为:\n\\i[greenSlime]普通、\\i[bat]先攻、\\i[bluePriest]魔攻、\\i[rock]坚固、\\i[swordsman]2连击、\\i[vampire]多连击、\\i[redKnight]破甲、\\i[ghostSoldier]反击、\\i[slimeman]净化。",
"\t[老人,wizard]\b[this]打败怪物后可触发 afterBattle 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。",
{
"type": "hide",
"time": 500
}
],
"9,11": [
"\t[老人,trader]\b[this]这些是门,需要对应的钥匙打开。\n机关门必须使用特殊的开法。",
"\t[老人,trader]\b[this]开门后可触发 afterOpenDoor 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。",
{
"type": "hide",
"time": 500
}
],
"10,9": [
"\t[老人,man]\b[down,null]这些是部分本样板支持的道具。\n\n道具分为 items、constants、tools、equips 四类。\nitems 为即捡即用类道具,例如宝石、血瓶等。\nconstants 为永久道具,例如怪物手册、楼层传送器、幸运金币等。\ntools 为消耗类道具,例如破墙镐、炸弹、中心对称飞行器等。\nequips 为装备,例如剑盾等。",
"\t[老人,man]\b[up]有关道具效果定义在project文件夹的items.js中。\n目前大多数道具已有默认行为如有自定义的需求请修改道具的图块属性。",
"\t[老人,man]\b[up]拾取道具结束后可触发 afterGetItem 事件。\n\n有关事件的各种信息在下一层会有更为详细的说明。",
{
"type": "hide",
"time": 500
}
]
},
"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[ghostSoldier]\b[this]不可能,你怎么可能打败我!\n一个打败怪物触发的事件"
],
"0,9": [
"这是一个高度为 48 个像素而非 32 个像素的敌人。\n高敌人的素材存放在 materials 文件夹中 enemy48.png 的部分。"
]
},
"afterGetItem": {
"9,1": [
"技能的支持需要依赖状态栏的“魔力”以及脚本编辑的“按键处理”,详见帮助文档“个性化”一节。"
],
"12,2": [
"跳跃靴和支援怪的跳跃音效是用脚本额外添加的,\n如果想为任意跳跃指令添加音效请查阅帮助文档中的“脚本——复写函数”章节。"
],
"8,3": [
"炸弹是只能炸面前的怪物还是四个甚至八个方向的怪物,\n由其图块属性快捷键C中的“使用效果”决定。\n不能被炸的怪物请直接在该怪物的图块属性中勾选“不可炸”\n可参见样板里黑衣魔王和黑暗大法师的写法。\nV2.8.1起,炸弹炸怪可以添加获得金经/触发战后事件,详见其使用效果中的注释。"
],
"10,3": [
"“上楼”和“下楼”的目标层由全塔属性快捷键B的“楼层列表”顺序所决定。"
],
"12,3": [
"如果想制作类似于生命魔杖等可以被批量使用的道具请参照生命魔杖图块属性快捷键B中\n useItemEvent 的写法。\n其基本原理就是使用【接受用户输入】让玩家在弹窗中输入想要使用的物品数量再判断玩家的输入是否合法如果输入合法就扣减相应数量的物品并结算物品效果。\n要注意的是在使用物品时会先消耗一个物品所以记得在编辑 useItemEvent 时先用 core.addItem 恢复一个物品。"
],
"8,4": [
"剑盾的道具类别设为equips才可以装备\n如果设为items则会直接增加属性。",
"在全塔属性快捷键B的系统开关中设置是否启用装备栏按钮。\n如果启用则装备栏按钮会替代楼传按钮。\n无论是否启用玩家都可以双击道具栏按钮呼出装备栏。"
],
"9,4": [
"装备的种类由全塔属性快捷键B中的“装备孔”决定。\n每件装备的“类型”就是在“装备孔”中的索引例如默认情况下 0 代表武器。\n同时只有第一个装备孔中的装备其“普攻动画”属性才会生效。"
],
"10,4": [
"每层楼的“可楼传”勾选框决定了该楼层能否被飞到。\n\n勇士在不能被飞到的楼层也无法使用楼层传送器。",
"飞行的楼层顺序由全塔属性快捷键B中的“楼层列表”所决定。\n\n是否必须在楼梯边使用楼传器由全塔属性中的系统开关所决定。"
],
"11,4": [
"破墙镐是破面前的墙壁还是四个方向的墙壁由其图块属性快捷键C的“使用效果”决定。\n哪些图块怪物和道具除外可以被破震由该图块的图块属性中的“可破震”决定。"
],
"12,4": [
"在 2.8.1 版更新后,能够被破冰镐摧毁的冰块被移动到了 animates 下。\n如果想制作一个可以以特定触发器的方式移除特定图块的道具可以参照破冰镐物品图块属性中\n useItemEffect 和 canUseItemEffect 的写法。"
],
"11,8": [
"由于状态栏放不下,铁门钥匙(根据全塔属性的系统开关勾选与否,可能还有绿钥匙)会被放入道具栏中。\n碰到绿门和铁门时仍然会自动使用钥匙开门。"
],
"12,8": [
"该道具默认是大黄门钥匙如需改为钥匙盒直接修改其图块属性快捷键C的“道具类别”为items即可。"
],
"8,7": [
"如需修改消耗品的效果请前往全塔属性快捷键B找到并修改values全局数值内对应的具体数值即可。\n如果有高级的需求如每个区域宝石数值变化请修改楼层属性快捷键V最下方的“宝石血瓶效果”。\n如果有更高级的需求请查阅帮助文档。"
],
"11,7": [
"与大黄门钥匙类似的是,如果将黄宝石的图块属性设为 items ,那么黄宝石将在被拾取触发 itemEffect 效果。\n\n注意触碰或使用事件useItemEvent对 items、tools、constants 都有效。\n这意味着如果黄宝石的图块属性为 items ,那么在拾取黄宝石时,黄宝石不会进入背包,并且其“即捡即用”和“触碰或使用事件”都会被触发。"
],
"12,7": [
"由于吸血、夹击、净化等属性值的存在,玩家可能希望自动寻路时能尽量绕开血瓶和绿宝石。\n他们可以自行在游戏设置中开关这一功能。"
]
},
"afterOpenDoor": {
"11,12": [
"你打开了一扇绿门,触发了一个 afterOpenDoor 事件。"
],
"10,6": [
"这是一扇高度为 48 个像素而非 32 个像素的门。\n高门和高NPC的素材存放在 materials 文件夹中 npc48.png 的部分。"
]
},
"cannotMove": {},
"bgmap": [
],
"fgmap": [
[ 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,10169, 0,10177, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,10170, 0,10185, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,10169, 0,10179, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,10172, 0,10180, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,10186, 0,10181, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,10187, 0,10182, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0,10188, 0,10183, 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, 0, 0, 0]
],
"width": 13,
"height": 13,
"autoEvent": {},
"beforeBattle": {},
"cannotMoveIn": {}
}

57
project/floors/sample1.js Normal file
View File

@ -0,0 +1,57 @@
main.floors.sample1=
{
"floorId": "sample1",
"title": "样板 1 层",
"name": "1",
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"defaultGround": "grass",
"images": [
{
"name": "bg.jpg",
"canvas": "bg",
"x": 0,
"y": 0
}
],
"weather": [
"snow",
6
],
"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, 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, 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, 0, 0, 0, 0, 0, 0, 0]
],
"firstArrive": [],
"events": {},
"changeFloor": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"cannotMove": {},
"bgmap": [
],
"fgmap": [
],
"autoEvent": {},
"width": 13,
"height": 13,
"beforeBattle": {},
"cannotMoveIn": {},
"eachArrive": []
}

61
project/floors/sample2.js Normal file
View File

@ -0,0 +1,61 @@
main.floors.sample2=
{
"floorId": "sample2",
"title": "样板 2 层",
"name": "2",
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"cannotViewMap": false,
"defaultGround": "ground",
"images": [],
"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, 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, 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, 0, 0, 0, 0, 0, 0, 94, 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, 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, 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, 93, 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, 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, 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, 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, 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, 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, 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": {},
"changeFloor": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"cannotMove": {},
"upFloor": null,
"bgmap": [
],
"fgmap": [
],
"autoEvent": {},
"beforeBattle": {},
"cannotMoveIn": {},
"eachArrive": []
}

BIN
project/fonts/number.ttf Normal file

Binary file not shown.

1637
project/functions.js Normal file

File diff suppressed because it is too large Load Diff

273
project/icons.js Normal file
View File

@ -0,0 +1,273 @@
var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
{
"hero": {
"down": {
"loc": 0,
"stop": 0,
"leftFoot": 1,
"rightFoot": 3
},
"left": {
"loc": 1,
"stop": 0,
"leftFoot": 1,
"rightFoot": 3
},
"right": {
"loc": 2,
"stop": 0,
"leftFoot": 1,
"rightFoot": 3
},
"up": {
"loc": 3,
"stop": 0,
"leftFoot": 1,
"rightFoot": 3
},
"width": 32,
"height": 48
},
"terrains": {
"ground": 0,
"grass": 1,
"grass2": 2,
"ground2": 3,
"ground3": 4,
"downFloor": 5,
"upFloor": 6,
"blueShopLeft": 7,
"pinkShopLeft": 8,
"blueShopRight": 9,
"pinkShopRight": 10,
"arrowUp": 11,
"arrowDown": 12,
"arrowLeft": 13,
"arrowRight": 14,
"light": 15,
"darkLight": 16,
"ski": 17,
"flower": 18,
"box": 19,
"boxed": 20,
"sWallT": 21,
"sWallL": 22,
"sWallR": 23,
"sWallB": 24,
"sWallTL": 25,
"sWallBR": 26,
"sWallTR": 27,
"sWallBL": 28,
"sWallTB": 29,
"sWallLR": 30,
"sWallBLR": 31,
"sWallTLR": 32,
"sWallTBR": 33,
"sWallTBL": 34,
"T331": 35,
"T332": 36
},
"animates": {
"star": 0,
"lava": 1,
"blueLava": 2,
"water": 3,
"yellowDoor": 4,
"blueDoor": 5,
"redDoor": 6,
"greenDoor": 7,
"specialDoor": 8,
"steelDoor": 9,
"yellowWall": 10,
"whiteWall": 11,
"blueWall": 12,
"crystalUp": 13,
"crystalBottom": 14,
"starPortal": 15,
"fire": 16,
"portal": 17,
"switch": 18,
"lavaNet": 19,
"poisonNet": 20,
"weakNet": 21,
"curseNet": 22,
"downPortal": 23,
"leftPortal": 24,
"rightPortal": 25,
"upPortal": 26,
"ice": 27,
"magentaWall": 28
},
"npcs": {
"man": 0,
"trader": 1,
"thief": 2,
"fairy": 3,
"wizard": 4,
"recluse": 5,
"king": 6,
"youngMan": 7,
"sign": 8,
"expShop": 9,
"moneyShop": 10,
"princess": 11,
"greenMan": 12,
"blueTrader": 13
},
"npc48": {
"npc0": 0,
"npc1": 1,
"npc2": 2,
"npc3": 3,
"tallYellowDoor": 4,
"tallBlueDoor": 5,
"tallRedDoor": 6,
"tallGreenDoor": 7,
"tallSpecialDoor": 8,
"tallSteelDoor": 9
},
"enemys": {
"greenSlime": 0,
"redSlime": 1,
"blackSlime": 2,
"slimelord": 3,
"bat": 4,
"bigBat": 5,
"redBat": 6,
"vampire": 7,
"skeleton": 8,
"skeletonCaptain": 10,
"zombie": 12,
"zombieKnight": 13,
"rock": 14,
"bluePriest": 16,
"redPriest": 17,
"brownWizard": 18,
"redWizard": 19,
"swordsman": 23,
"soldier": 24,
"yellowKnight": 25,
"redKnight": 26,
"darkKnight": 27,
"blueKnight": 31,
"goldSlime": 32,
"poisonSkeleton": 33,
"poisonBat": 34,
"skeletonPriest": 36,
"skeletonKing": 37,
"demonPriest": 42,
"goldHornSlime": 43,
"silverSlime": 47,
"whiteHornSlime": 49,
"redSwordsman": 53,
"poisonZombie": 55,
"octopus": 57,
"princessEnemy": 59,
"skeletonWarrior": 9,
"silverSlimelord": 60,
"goldSlimelord": 61,
"whiteSlimeman": 54,
"slimeman": 15,
"yellowGateKeeper": 20,
"blueGateKeeper": 21,
"redGateKeeper": 22,
"magicMaster": 46,
"devilWarrior": 41,
"fairyEnemy": 58,
"dragon": 56,
"skeletonKnight": 39,
"skeletonPresbyter": 38,
"ironRock": 35,
"grayRock": 62,
"yellowPriest": 52,
"evilPrincess": 50,
"blademaster": 48,
"evilFairy": 51,
"greenKnight": 63,
"bowman": 64,
"watcherSlime": 66,
"frostBat": 67,
"devilKnight": 68,
"grayPriest": 69,
"greenGateKeeper": 70,
"ghostSoldier": 11,
"evilHero": 40,
"blackKing": 28,
"yellowKing": 29,
"greenKing": 30,
"redKing": 44,
"blueKing": 45,
"keiskeiFairy": 71,
"tulipFairy": 72,
"purpleBowman": 65
},
"enemy48": {
"angel": 0,
"elemental": 1,
"steelGuard": 2,
"evilBat": 3,
"bearDown": 4,
"bearLeft": 5,
"bearRight": 6,
"bearUp": 7
},
"items": {
"yellowKey": 0,
"blueKey": 1,
"redKey": 2,
"greenKey": 3,
"steelKey": 4,
"bigKey": 6,
"redGem": 16,
"blueGem": 17,
"greenGem": 18,
"yellowGem": 19,
"redPotion": 20,
"bluePotion": 21,
"greenPotion": 22,
"yellowPotion": 23,
"lifeWand": 33,
"sword0": 60,
"sword1": 50,
"sword2": 51,
"sword3": 52,
"sword4": 53,
"sword5": 54,
"shield0": 61,
"shield1": 55,
"shield2": 56,
"shield3": 57,
"shield4": 58,
"shield5": 59,
"book": 9,
"fly": 12,
"pickaxe": 45,
"icePickaxe": 44,
"bomb": 43,
"centerFly": 13,
"upFly": 15,
"downFly": 14,
"coin": 11,
"freezeBadge": 41,
"cross": 40,
"superPotion": 29,
"earthquake": 8,
"poisonWine": 24,
"weakWine": 25,
"curseWine": 27,
"superWine": 28,
"dagger": 42,
"amulet": 47,
"hammer": 48,
"jumpShoes": 49,
"skill1": 30,
"wand": 10,
"pack": 46
},
"autotile": {
"autotile": 0,
"autotile1": 0,
"autotile2": 0,
"autotile3": 0
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
project/images/bear.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
project/images/bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
project/images/bg2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

BIN
project/images/brave.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
project/images/d.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
project/images/dl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
project/images/dlr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
project/images/dr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
project/images/dragon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
project/images/green.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

BIN
project/images/h25.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

BIN
project/images/hero.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
project/images/l.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
project/images/light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
project/images/lock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
project/images/lr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
project/images/maba.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

BIN
project/images/now.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
project/images/null.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
project/images/r.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
project/images/status.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Some files were not shown because too many files have changed in this diff Show More