From 1b4e77f23bce46d475b2791072079dc22da858cc Mon Sep 17 00:00:00 2001 From: strawberry42271 <2806566736@qq.com> Date: Thu, 16 Jan 2025 13:17:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=B1=9E=E6=80=A7=E6=98=A0?= =?UTF-8?q?=E5=B0=84=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _server/MotaAction.g4 | 4 +- _server/table/comment.js | 10 +- _server/table/data.comment.js | 33 +- project/data.js | 3203 +++++++------- project/functions.js | 41 +- project/items.js | 10 +- project/plugins.js | 7882 ++++++++++++++++----------------- 7 files changed, 5468 insertions(+), 5715 deletions(-) diff --git a/_server/MotaAction.g4 b/_server/MotaAction.g4 index 4ee806d..10a88d7 100644 --- a/_server/MotaAction.g4 +++ b/_server/MotaAction.g4 @@ -4596,8 +4596,8 @@ EnemyPoint_List /*EnemyPoint_List ['hp','atk','def','money','exp','point','name']*/; Equip_List - : '力量'|'敏捷'|'智力'|'体质'|'生命'|'生命上限'|'攻击'|'物理防御'|'魔法防御'|'魔力'|'魔力上限'|'速度' - /*Equip_List ['str','agi','int','con','hp','hpmax','atk','def','mdef','mana','manamax','speed']*/; + : '生命'|'生命上限'|'攻击'|'防御'|'法强'|'魔力'|'魔力上限'|'速度' + /*Equip_List ['hp','hpmax','atk','def','mdef','mana','manamax','speed']*/; Key_List : '黄钥匙'|'蓝钥匙'|'红钥匙'|'绿钥匙'|'铁门钥匙' diff --git a/_server/table/comment.js b/_server/table/comment.js index b417a50..f8660c0 100644 --- a/_server/table/comment.js +++ b/_server/table/comment.js @@ -187,24 +187,18 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "def": { "_leaf": true, "_type": "textarea", - "_data": "物理防御力" + "_data": "防御力" }, "mdef": { "_leaf": true, "_type": "textarea", - "_data": "魔法防御力" + "_data": "法抗(写为小数)" }, "speed": { "_leaf": true, "_type": "textarea", "_data": "速度" }, - "magic": { - "_leaf": true, - "_type": "checkbox", - "_docs": "是否为魔法攻击", - "_data": "勾选以魔法攻击计算,不勾选以物理攻击计算" - }, "money": { "_leaf": true, "_type": "textarea", diff --git a/_server/table/data.comment.js b/_server/table/data.comment.js index de82674..10e76cf 100644 --- a/_server/table/data.comment.js +++ b/_server/table/data.comment.js @@ -262,44 +262,19 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = { "def": { "_leaf": true, "_type": "textarea", - "_data": "物理防御" + "_data": "防御" }, "mdef": { "_leaf": true, "_type": "textarea", - "_data": "魔法防御" + "_data": "法强" }, "speed": { "_leaf": true, "_type": "textarea", - "_data": "攻击速度" - }, - "str": { - "_leaf": true, - "_type": "textarea", - "_data": "力量" - }, - "agi": { - "_leaf": true, - "_type": "textarea", - "_data": "敏捷" - }, - "int": { - "_leaf": true, - "_type": "textarea", - "_data": "智力" - }, - "con": { - "_leaf": true, - "_type": "textarea", - "_data": "体质" - }, - "magic": { - "_leaf": true, - "_type": "checkbox", - "_docs": "攻击类型", - "_data": "攻击类型是否是魔法" + "_data": "速度" }, + "money": { "_leaf": true, "_type": "textarea", diff --git a/project/data.js b/project/data.js index 95ad3ee..1638c4f 100644 --- a/project/data.js +++ b/project/data.js @@ -1,1644 +1,1559 @@ -var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = -{ - "main": { - "floorIds": [ - "Caimhome", - "jiuguan", - "KTV", - "KTVF2", - "goldkey", - "bihusuo", - "jiaotang", - "shengnvhome", - "shinvhome", - "jiedao", - "street01", - "street02", - "guangchang", - "guangchang2", - "xiaoxiang01", - "xiaoxiang02", - "xiaoxiang3", - "yiqu1", - "yiqu2", - "yiqu3", - "yiqu4", - "yiqu5", - "yiqu6", - "yiqu7", - "yiqu8", - "yiqu9", - "yiqu10" - ], - "floorPartitions": [], - "images": [ - "HPGaugeEnemy_A.webp", - "HPGaugeEnemy_B.webp", - "background.webp", - "backgroundvertical.webp", - "bg_0000.png", - "bg_1511.webp", - "bg_1521.webp", - "bg_2010.webp", - "bg_2011.webp", - "bg_2521.webp", - "bg_3021.webp", - "bg_3026.webp", - "bg_3028.webp", - "bg_3042.webp", - "bg_3531.webp", - "bg_3551.webp", - "bg_3561.webp", - "bg_3563.webp", - "bg_3571.webp", - "bg_3601.webp", - "bg_3721.webp", - "bg_3801.webp", - "bg_5033.webp", - "bg_5043.webp", - "bg_5044.webp", - "bg_6004.webp", - "cao.webp", - "d.webp", - "dl.webp", - "dlr.webp", - "dr.webp", - "eve_010102.webp", - "eve_010203.webp", - "eve_010304.webp", - "eve_010501.webp", - "eve_010601.webp", - "eve_010701.webp", - "eve_010801.webp", - "eve_010902.webp", - "eve_011001.webp", - "eve_011101.webp", - "eve_011202.webp", - "eve_011302.webp", - "eve_011402.webp", - "eve_020102.webp", - "eve_020201.webp", - "eve_020301.webp", - "eve_020401.webp", - "eve_020501.webp", - "eve_020605.webp", - "eve_020701.webp", - "eve_020801.webp", - "eve_030101.webp", - "eve_030206.webp", - "eve_030302.webp", - "eve_030508.webp", - "eve_030601.webp", - "eve_030801.webp", - "eve_030901.webp", - "eve_031002.webp", - "eve_031101.webp", - "eve_040201.webp", - "eve_040401.webp", - "eve_040501.webp", - "eve_040601.webp", - "eve_040702.webp", - "eve_040801.webp", - "eve_050101.webp", - "eve_050201.webp", - "eve_050401.webp", - "eve_050501.webp", - "eve_050601.webp", - "eve_050704.webp", - "eve_050801.webp", - "eve_070101.webp", - "face_020101.webp", - "face_020102.webp", - "face_020103.webp", - "face_020104.webp", - "face_020105.webp", - "face_020106.webp", - "face_020107.webp", - "face_020108.webp", - "face_020109.webp", - "face_020110.webp", - "face_020111.webp", - "face_020112.webp", - "face_020113.webp", - "face_020114.webp", - "face_020115.webp", - "face_020116.webp", - "face_020117.webp", - "face_020118.webp", - "face_020121.webp", - "face_020122.webp", - "face_020123.webp", - "face_020124.webp", - "face_020125.webp", - "face_020126.webp", - "face_020127.webp", - "face_020128.webp", - "face_020129.webp", - "face_020130.webp", - "face_020131.webp", - "face_020132.webp", - "face_020133.webp", - "face_020134.webp", - "face_020135.webp", - "face_020136.webp", - "face_020137.webp", - "face_020141.webp", - "face_020142.webp", - "face_020143.webp", - "face_020144.webp", - "face_020145.webp", - "face_020146.webp", - "face_020147.webp", - "face_020148.webp", - "face_020149.webp", - "face_020150.webp", - "face_020151.webp", - "face_020152.webp", - "face_020153.webp", - "face_020154.webp", - "face_020155.webp", - "face_020156.webp", - "face_020157.webp", - "face_020158.webp", - "face_020159.webp", - "face_030101.webp", - "face_030102.webp", - "face_030103.webp", - "face_030104.webp", - "face_030105.webp", - "face_030107.webp", - "face_030121.webp", - "face_030122.webp", - "face_030123.webp", - "face_030124.webp", - "face_030125.webp", - "face_030127.webp", - "face_030129.webp", - "face_030131.webp", - "face_030132.webp", - "face_030141.webp", - "face_030142.webp", - "face_030143.webp", - "face_030144.webp", - "face_030145.webp", - "face_050101.webp", - "face_050102.webp", - "face_050103.webp", - "face_050104.webp", - "face_050105.webp", - "face_050106.webp", - "face_050107.webp", - "face_050108.webp", - "face_050111.webp", - "face_050112.webp", - "face_050113.webp", - "face_050116.webp", - "face_050121.webp", - "face_050122.webp", - "face_050123.webp", - "face_050124.webp", - "face_050125.webp", - "face_050126.webp", - "face_050127.webp", - "face_050128.webp", - "face_050129.webp", - "face_050130.webp", - "face_050131.webp", - "face_050132.webp", - "face_050134.webp", - "face_050135.webp", - "face_050136.webp", - "face_050137.webp", - "face_050141.webp", - "face_050142.webp", - "face_050143.webp", - "face_050144.webp", - "face_050145.webp", - "face_050146.webp", - "face_050147.webp", - "face_050148.webp", - "face_050150.webp", - "face_050151.webp", - "face_050152.webp", - "face_050201.webp", - "face_050202.webp", - "face_050203.webp", - "face_050204.webp", - "face_050205.webp", - "face_050206.webp", - "face_050210.webp", - "face_050212.webp", - "face_050213.webp", - "face_050214.webp", - "face_050215.webp", - "face_050216.webp", - "face_050221.webp", - "face_050222.webp", - "face_050223.webp", - "face_050224.webp", - "face_050225.webp", - "face_050226.webp", - "face_050229.webp", - "face_050230.webp", - "face_050232.webp", - "face_050234.webp", - "face_050235.webp", - "face_050237.webp", - "face_050241.webp", - "face_050242.webp", - "face_050243.webp", - "face_050244.webp", - "face_050245.webp", - "face_050246.webp", - "face_050249.webp", - "face_050250.webp", - "face_050252.webp", - "face_050301.webp", - "face_050302.webp", - "face_050303.webp", - "face_050304.webp", - "face_050305.webp", - "face_050306.webp", - "face_050307.webp", - "face_050308.webp", - "face_050309.webp", - "face_050310.webp", - "face_050311.webp", - "face_050313.webp", - "face_050314.webp", - "face_050315.webp", - "face_050316.webp", - "face_050317.webp", - "face_050321.webp", - "face_050322.webp", - "face_050323.webp", - "face_050324.webp", - "face_050325.webp", - "face_050326.webp", - "face_050327.webp", - "face_050328.webp", - "face_050329.webp", - "face_050330.webp", - "face_050331.webp", - "face_050332.webp", - "face_050333.webp", - "face_050334.webp", - "face_050335.webp", - "face_050336.webp", - "face_050337.webp", - "face_050338.webp", - "face_050341.webp", - "face_050342.webp", - "face_050343.webp", - "face_050344.webp", - "face_050345.webp", - "face_050346.webp", - "face_050347.webp", - "face_050348.webp", - "face_050349.webp", - "face_050350.webp", - "face_050351.webp", - "face_050352.webp", - "face_050353.webp", - "face_050441.webp", - "face_050442.webp", - "face_050443.webp", - "face_050445.webp", - "face_050446.webp", - "face_050447.webp", - "face_050451.webp", - "face_050452.webp", - "face_120101.webp", - "face_120102.webp", - "face_120103.webp", - "face_120104.webp", - "face_120105.webp", - "face_120106.webp", - "face_120107.webp", - "face_120108.webp", - "face_120111.webp", - "face_120112.webp", - "face_120113.webp", - "face_120121.webp", - "face_120122.webp", - "face_120123.webp", - "face_120124.webp", - "face_120125.webp", - "face_120126.webp", - "face_120127.webp", - "face_120128.webp", - "face_120131.webp", - "face_120132.webp", - "face_130101.webp", - "face_130102.webp", - "face_130103.webp", - "face_130104.webp", - "face_130105.webp", - "face_130106.webp", - "face_130107.webp", - "face_130108.webp", - "face_130109.webp", - "face_130110.webp", - "face_130111.webp", - "face_130112.webp", - "face_130113.webp", - "face_130121.webp", - "face_130122.webp", - "face_130123.webp", - "face_130124.webp", - "face_130125.webp", - "face_130126.webp", - "face_130127.webp", - "face_130128.webp", - "face_130129.webp", - "face_130130.webp", - "face_130131.webp", - "face_130132.webp", - "face_130201.webp", - "face_130202.webp", - "face_130203.webp", - "face_130204.webp", - "face_130205.webp", - "face_130206.webp", - "face_130207.webp", - "face_130208.webp", - "face_130209.webp", - "face_130211.webp", - "face_130212.webp", - "face_130213.webp", - "face_130221.webp", - "face_130222.webp", - "face_130223.webp", - "face_130224.webp", - "face_130225.webp", - "face_130226.webp", - "face_130227.webp", - "face_130228.webp", - "face_130229.webp", - "face_130230.webp", - "face_130231.webp", - "face_320101.webp", - "face_320102.webp", - "face_320103.webp", - "face_320104.webp", - "face_320105.webp", - "face_320106.webp", - "face_320107.webp", - "face_320108.webp", - "face_320109.webp", - "face_320121.webp", - "face_320122.webp", - "face_320123.webp", - "face_320124.webp", - "face_320125.webp", - "face_320127.webp", - "face_430101.webp", - "face_430102.webp", - "face_430103.webp", - "face_430104.webp", - "face_430105.webp", - "face_430106.webp", - "face_430107.webp", - "face_430108.webp", - "face_440101.webp", - "face_440102.webp", - "face_440103.webp", - "face_440104.webp", - "face_440105.webp", - "face_440106.webp", - "face_440107.webp", - "face_440108.webp", - "face_440109.webp", - "face_440110.webp", - "green.webp", - "hero.webp", - "l.webp", - "lane1.webp", - "light.webp", - "lock.webp", - "lr.webp", - "maba.webp", - "null.webp", - "other_0001.webp", - "other_0002.webp", - "other_0003.webp", - "other_0004.webp", - "r.webp", - "status.webp", - "tati_020101.webp", - "tati_020101a.webp", - "tati_020101y.webp", - "tati_020102.webp", - "tati_020102a.webp", - "tati_020103.webp", - "tati_020103y.webp", - "tati_020104.webp", - "tati_020104a.webp", - "tati_020104y.webp", - "tati_020105.webp", - "tati_020105a.webp", - "tati_020105y.webp", - "tati_020106.webp", - "tati_020107.webp", - "tati_020107a.webp", - "tati_020107y.webp", - "tati_020109.webp", - "tati_020110.webp", - "tati_020111.webp", - "tati_020111a.webp", - "tati_020113.webp", - "tati_020113a.webp", - "tati_020114.webp", - "tati_020115.webp", - "tati_020115y.webp", - "tati_020116.webp", - "tati_020116a.webp", - "tati_020117.webp", - "tati_020117a.webp", - "tati_020118.webp", - "tati_020121a.webp", - "tati_020122.webp", - "tati_020123.webp", - "tati_020123y.webp", - "tati_020124.webp", - "tati_020124a.webp", - "tati_020125.webp", - "tati_020125a.webp", - "tati_020125y.webp", - "tati_020126.webp", - "tati_020126y.webp", - "tati_020127.webp", - "tati_020129.webp", - "tati_020130.webp", - "tati_020131.webp", - "tati_020131a.webp", - "tati_020131y.webp", - "tati_020132.webp", - "tati_020133.webp", - "tati_020134.webp", - "tati_020135.webp", - "tati_020135a.webp", - "tati_020136.webp", - "tati_020137.webp", - "tati_020141.webp", - "tati_020141a.webp", - "tati_020142.webp", - "tati_020142a.webp", - "tati_020142y.webp", - "tati_020143.webp", - "tati_020143y.webp", - "tati_020144.webp", - "tati_020144a.webp", - "tati_020145.webp", - "tati_020145a.webp", - "tati_020145y.webp", - "tati_020146.webp", - "tati_020147.webp", - "tati_020149.webp", - "tati_020150.webp", - "tati_020151.webp", - "tati_020151a.webp", - "tati_020152.webp", - "tati_020153.webp", - "tati_020154.webp", - "tati_020157.webp", - "tati_020157a.webp", - "tati_020158.webp", - "tati_050101.webp", - "tati_050101a.webp", - "tati_050101y.webp", - "tati_050102.webp", - "tati_050102y.webp", - "tati_050103.webp", - "tati_050103a.webp", - "tati_050103y.webp", - "tati_050104.webp", - "tati_050104a.webp", - "tati_050105.webp", - "tati_050105a.webp", - "tati_050105y.webp", - "tati_050106.webp", - "tati_050106y.webp", - "tati_050107.webp", - "tati_050107a.webp", - "tati_050107y.webp", - "tati_050110.webp", - "tati_050111.webp", - "tati_050111a.webp", - "tati_050111y.webp", - "tati_050112.webp", - "tati_050113y.webp", - "tati_050116.webp", - "tati_050116a.webp", - "tati_050116y.webp", - "tati_050117.webp", - "tati_050121.webp", - "tati_050121a.webp", - "tati_050121y.webp", - "tati_050122.webp", - "tati_050122y.webp", - "tati_050123.webp", - "tati_050123a.webp", - "tati_050123y.webp", - "tati_050124.webp", - "tati_050124a.webp", - "tati_050124y.webp", - "tati_050125.webp", - "tati_050125a.webp", - "tati_050125y.webp", - "tati_050126.webp", - "tati_050126y.webp", - "tati_050127.webp", - "tati_050127a.webp", - "tati_050128.webp", - "tati_050131.webp", - "tati_050131a.webp", - "tati_050131y.webp", - "tati_050132.webp", - "tati_050134.webp", - "tati_050134y.webp", - "tati_050135.webp", - "tati_050135y.webp", - "tati_050136.webp", - "tati_050137.webp", - "tati_050137y.webp", - "tati_050141.webp", - "tati_050141a.webp", - "tati_050141y.webp", - "tati_050142.webp", - "tati_050142a.webp", - "tati_050142y.webp", - "tati_050143.webp", - "tati_050143a.webp", - "tati_050143y.webp", - "tati_050144.webp", - "tati_050144a.webp", - "tati_050144y.webp", - "tati_050145.webp", - "tati_050145a.webp", - "tati_050145y.webp", - "tati_050146.webp", - "tati_050146y.webp", - "tati_050147.webp", - "tati_050147y.webp", - "tati_050151.webp", - "tati_050151a.webp", - "tati_050151y.webp", - "tati_050152.webp", - "tati_050152y.webp", - "tati_050201.webp", - "tati_050201a.webp", - "tati_050201y.webp", - "tati_050202.webp", - "tati_050202a.webp", - "tati_050202y.webp", - "tati_050203.webp", - "tati_050203y.webp", - "tati_050204a.webp", - "tati_050204y.webp", - "tati_050205.webp", - "tati_050205a.webp", - "tati_050205y.webp", - "tati_050206.webp", - "tati_050206a.webp", - "tati_050206y.webp", - "tati_050210y.webp", - "tati_050215.webp", - "tati_050216.webp", - "tati_050221.webp", - "tati_050221a.webp", - "tati_050221y.webp", - "tati_050222.webp", - "tati_050222a.webp", - "tati_050222y.webp", - "tati_050223.webp", - "tati_050224a.webp", - "tati_050224y.webp", - "tati_050225.webp", - "tati_050225a.webp", - "tati_050225y.webp", - "tati_050226.webp", - "tati_050226a.webp", - "tati_050229.webp", - "tati_050230y.webp", - "tati_050232a.webp", - "tati_050234a.webp", - "tati_050237.webp", - "tati_050241.webp", - "tati_050241a.webp", - "tati_050241y.webp", - "tati_050242.webp", - "tati_050242a.webp", - "tati_050242y.webp", - "tati_050243.webp", - "tati_050243y.webp", - "tati_050244a.webp", - "tati_050244y.webp", - "tati_050245.webp", - "tati_050245a.webp", - "tati_050245y.webp", - "tati_050252.webp", - "tati_050252y.webp", - "tati_050301.webp", - "tati_050301a.webp", - "tati_050301y.webp", - "tati_050302.webp", - "tati_050303.webp", - "tati_050303y.webp", - "tati_050304.webp", - "tati_050304y.webp", - "tati_050305.webp", - "tati_050305a.webp", - "tati_050305y.webp", - "tati_050306.webp", - "tati_050306y.webp", - "tati_050307.webp", - "tati_050307a.webp", - "tati_050307y.webp", - "tati_050308.webp", - "tati_050309.webp", - "tati_050310.webp", - "tati_050311.webp", - "tati_050311y.webp", - "tati_050313.webp", - "tati_050314.webp", - "tati_050315.webp", - "tati_050316.webp", - "tati_050316y.webp", - "tati_050317.webp", - "tati_050321.webp", - "tati_050321a.webp", - "tati_050321y.webp", - "tati_050322.webp", - "tati_050322y.webp", - "tati_050323.webp", - "tati_050324.webp", - "tati_050324a.webp", - "tati_050324y.webp", - "tati_050325.webp", - "tati_050325a.webp", - "tati_050325y.webp", - "tati_050326.webp", - "tati_050327.webp", - "tati_050327y.webp", - "tati_050328.webp", - "tati_050329.webp", - "tati_050331.webp", - "tati_050331y.webp", - "tati_050332.webp", - "tati_050333.webp", - "tati_050334.webp", - "tati_050334a.webp", - "tati_050335.webp", - "tati_050337.webp", - "tati_050338.webp", - "tati_050338y.webp", - "tati_050341.webp", - "tati_050341a.webp", - "tati_050341y.webp", - "tati_050342.webp", - "tati_050343.webp", - "tati_050343y.webp", - "tati_050344.webp", - "tati_050345.webp", - "tati_050345a.webp", - "tati_050345y.webp", - "tati_050346.webp", - "tati_050347.webp", - "tati_050348.webp", - "tati_050349.webp", - "tati_050351.webp", - "tati_050351y.webp", - "tati_050352.webp", - "tati_050353.webp", - "tati_050353y.webp", - "tati_050441.webp", - "tati_050443.webp", - "tati_050443y.webp", - "tati_050445.webp", - "tati_050445a.webp", - "tati_050445y.webp", - "tati_050451.webp", - "tati_050451a.webp", - "tati_050452.webp", - "tati_050452y.webp", - "tati_120101.webp", - "tati_120101y.webp", - "tati_120102.webp", - "tati_120102y.webp", - "tati_120103.webp", - "tati_120103y.webp", - "tati_120104.webp", - "tati_120104y.webp", - "tati_120105.webp", - "tati_120105y.webp", - "tati_120106.webp", - "tati_120107.webp", - "tati_120107y.webp", - "tati_120108.webp", - "tati_120111.webp", - "tati_120111y.webp", - "tati_120112.webp", - "tati_120113.webp", - "tati_120113y.webp", - "tati_120121.webp", - "tati_120121y.webp", - "tati_120122.webp", - "tati_120123.webp", - "tati_120123y.webp", - "tati_120124.webp", - "tati_120125.webp", - "tati_120125y.webp", - "tati_120126.webp", - "tati_120127.webp", - "tati_120127y.webp", - "tati_120128.webp", - "tati_120131.webp", - "tati_120132.webp", - "tati_430101.webp", - "tati_430101a.webp", - "tati_430101y.webp", - "tati_430102.webp", - "tati_430102a.webp", - "tati_430102y.webp", - "tati_430103.webp", - "tati_430103a.webp", - "tati_430103y.webp", - "tati_430105.webp", - "tati_430105a.webp", - "tati_430105y.webp", - "tati_430106.webp", - "tati_430106a.webp", - "tati_430106y.webp", - "tati_430107.webp", - "tati_430107y.webp", - "tati_430108a.webp", - "tati_430108y.webp", - "tati_440101.webp", - "tati_440101y.webp", - "tati_440103.webp", - "tati_440104.webp", - "tati_440105.webp", - "tati_440106.webp", - "tati_440108.webp", - "u.webp", - "ud.webp", - "udl.webp", - "udlr.webp", - "udr.webp", - "ul.webp", - "ulr.webp", - "unknow.webp", - "ur.webp", - "winskin.webp", - "winskin1.webp" - ], - "tilesets": [ - "magictower.webp", - "5.webp", - "4.webp", - "3.webp", - "2.webp", - "1.webp", - "11.webp", - "6.webp", - "12.webp", - "Outside_B.webp", - "C4.webp", - "C3.webp", - "C2.webp", - "C1.webp", - "IconSet.webp", - "9.webp", - "8.webp", - "7.webp", - "10.webp", - "C5.webp" - ], - "animates": [ - "hand", - "jianji", - "sword", - "thunder", - "yongchang", - "zone" - ], - "bgms": [ - "Asphodelus_Ceui.mp3", - "Blind_Alley.mp3", - "Crawler.mp3", - "theme.mp3" - ], - "sounds": [ - "aiy010000010.mp3", - "aiy010000020.mp3", - "aiy010000030.mp3", - "aiy020000005.mp3", - "aiy020000010.mp3", - "aiy020000020.mp3", - "aiy020000030.mp3", - "aiy020000040.mp3", - "aiy020000050.mp3", - "aiy020000060.mp3", - "aiy020000070.mp3", - "aiy020000080.mp3", - "aiy020000090.mp3", - "aiy020000100.mp3", - "aiy020000110.mp3", - "aiy020000120.mp3", - "aiy020000130.mp3", - "aiy020000140.mp3", - "aiy020000150.mp3", - "aiy020000160.mp3", - "aiy020000170.mp3", - "aiy020000180.mp3", - "aiy310000010.mp3", - "aiy310000020.mp3", - "aiy310000030.mp3", - "aiy310000040.mp3", - "aiy310000050.mp3", - "aiy310000060.mp3", - "aiy310000070.mp3", - "aiy310000080.mp3", - "aiy310000090.mp3", - "aiy310000100.mp3", - "aiy310000110.mp3", - "aiy310000120.mp3", - "aiy310000130.mp3", - "aiy310000140.mp3", - "aiy310000150.mp3", - "aiy310000160.mp3", - "aiy310000170.mp3", - "aiy310000180.mp3", - "aiy310000190.mp3", - "aiy310000200.mp3", - "aiy310000210.mp3", - "aiy310000220.mp3", - "aiy310000230.mp3", - "aiy310000240.mp3", - "aiy310000250.mp3", - "aiy310000260.mp3", - "aiy310000280.mp3", - "aiy310000290.mp3", - "aiy310000300.mp3", - "aiy350000010.mp3", - "aiy350000020.mp3", - "aiy350000030.mp3", - "aiy350000040.mp3", - "aiy350000050.mp3", - "aiy350000060.mp3", - "aiy350000070.mp3", - "aiy350000080.mp3", - "aiy350000090.mp3", - "aiy350000100.mp3", - "aiy350000110.mp3", - "aiy350000120.mp3", - "aiy350000130.mp3", - "aiy350000140.mp3", - "aiy350000150.mp3", - "aiy350000160.mp3", - "aiy350000170.mp3", - "aiy350000180.mp3", - "aiy350000190.mp3", - "aiy350000200.mp3", - "aiy350000210.mp3", - "aiy350000220.mp3", - "aiy350000230.mp3", - "aiy710000010.mp3", - "aiy710000020.mp3", - "aiy710000030.mp3", - "aiy710000040.mp3", - "aiy710000050.mp3", - "aiy710000060.mp3", - "aiy710000070.mp3", - "aiy710000080.mp3", - "aiy710000090.mp3", - "aiy710000100.mp3", - "aiy710000110.mp3", - "aiy710000120.mp3", - "aiy710000130.mp3", - "aiy820000010.mp3", - "aiy820000020.mp3", - "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", - "jingbao.mp3", - "jump.mp3", - "load.mp3", - "open_ui.mp3", - "pickaxe.mp3", - "recovery.mp3", - "save.mp3", - "shop.mp3", - "zone.mp3" - ], - "fonts": [ - "HATTEN", - "number", - "pala", - "simhei" - ], - "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.webp", - "商店": "shop.mp3", - "领域": "zone" - }, - "levelChoose": null, - "equipName": [ - "武器", - "武器", - "护具", - "饰品", - "饰品" - ], - "startBgm": "theme.mp3", - "styles": { - "startBackground": "project/images/background.webp", - "startVerticalBackground": "project/images/backgroundvertical.webp", - "startLogoStyle": "color: black", - "startButtonsStyle": "background-color: #000000; opacity: 0.45; color: #FFFFFF; border: #FFFFFF 2px solid; caret-color: #FFD700;", - "statusLeftBackground": "url(project/materials/ground.webp) repeat", - "statusTopBackground": "url(project/materials/ground.webp) repeat", - "toolsBackground": "url(project/materials/ground.webp) repeat", - "floorChangingStyle": "background-color: black; color: white", - "statusBarColor": [ - 255, - 255, - 255, - 1 - ], - "borderColor": [ - 204, - 204, - 204, - 1 - ], - "selectColor": [ - 255, - 215, - 0, - 1 - ], - "font": "pala" - }, - "splitImages": null - }, - "firstData": { - "title": "秽翼的尤斯蒂娅", - "name": "Eustia", - "version": "鸽子窝造塔小队", - "floorId": "street01", - "hero": { - "image": "hero.webp", - "animate": false, - "name": "Caim", - "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": 5, - "y": 11 - }, - "flags": { - "itemDetail": true, - "useBetweenLight": true - }, - "followers": [], - "steps": 0, - "matk": 0, - "speed": 0, - "str": 5, - "agi": 5, - "int": 5, - "con": 5, - "magic": false - }, - "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.webp", - "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": "setValue", - "name": "item:book", - "value": "1" - }, - { - "type": "setValue", - "name": "item:fly", - "value": "1" - } - ], - "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": "等级+1(100经验)", - "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": true, - "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": true, - "hideLeftStatusBar": false - } -} \ No newline at end of file +var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = { + main: { + floorIds: [ + "Caimhome", + "jiuguan", + "KTV", + "KTVF2", + "goldkey", + "bihusuo", + "jiaotang", + "shengnvhome", + "shinvhome", + "jiedao", + "street01", + "street02", + "guangchang", + "guangchang2", + "xiaoxiang01", + "xiaoxiang02", + "xiaoxiang3", + "yiqu1", + "yiqu2", + "yiqu3", + "yiqu4", + "yiqu5", + "yiqu6", + "yiqu7", + "yiqu8", + "yiqu9", + "yiqu10", + ], + floorPartitions: [], + images: [ + "HPGaugeEnemy_A.webp", + "HPGaugeEnemy_B.webp", + "background.webp", + "backgroundvertical.webp", + "bg_0000.png", + "bg_1511.webp", + "bg_1521.webp", + "bg_2010.webp", + "bg_2011.webp", + "bg_2521.webp", + "bg_3021.webp", + "bg_3026.webp", + "bg_3028.webp", + "bg_3042.webp", + "bg_3531.webp", + "bg_3551.webp", + "bg_3561.webp", + "bg_3563.webp", + "bg_3571.webp", + "bg_3601.webp", + "bg_3721.webp", + "bg_3801.webp", + "bg_5033.webp", + "bg_5043.webp", + "bg_5044.webp", + "bg_6004.webp", + "cao.webp", + "d.webp", + "dl.webp", + "dlr.webp", + "dr.webp", + "eve_010102.webp", + "eve_010203.webp", + "eve_010304.webp", + "eve_010501.webp", + "eve_010601.webp", + "eve_010701.webp", + "eve_010801.webp", + "eve_010902.webp", + "eve_011001.webp", + "eve_011101.webp", + "eve_011202.webp", + "eve_011302.webp", + "eve_011402.webp", + "eve_020102.webp", + "eve_020201.webp", + "eve_020301.webp", + "eve_020401.webp", + "eve_020501.webp", + "eve_020605.webp", + "eve_020701.webp", + "eve_020801.webp", + "eve_030101.webp", + "eve_030206.webp", + "eve_030302.webp", + "eve_030508.webp", + "eve_030601.webp", + "eve_030801.webp", + "eve_030901.webp", + "eve_031002.webp", + "eve_031101.webp", + "eve_040201.webp", + "eve_040401.webp", + "eve_040501.webp", + "eve_040601.webp", + "eve_040702.webp", + "eve_040801.webp", + "eve_050101.webp", + "eve_050201.webp", + "eve_050401.webp", + "eve_050501.webp", + "eve_050601.webp", + "eve_050704.webp", + "eve_050801.webp", + "eve_070101.webp", + "face_020101.webp", + "face_020102.webp", + "face_020103.webp", + "face_020104.webp", + "face_020105.webp", + "face_020106.webp", + "face_020107.webp", + "face_020108.webp", + "face_020109.webp", + "face_020110.webp", + "face_020111.webp", + "face_020112.webp", + "face_020113.webp", + "face_020114.webp", + "face_020115.webp", + "face_020116.webp", + "face_020117.webp", + "face_020118.webp", + "face_020121.webp", + "face_020122.webp", + "face_020123.webp", + "face_020124.webp", + "face_020125.webp", + "face_020126.webp", + "face_020127.webp", + "face_020128.webp", + "face_020129.webp", + "face_020130.webp", + "face_020131.webp", + "face_020132.webp", + "face_020133.webp", + "face_020134.webp", + "face_020135.webp", + "face_020136.webp", + "face_020137.webp", + "face_020141.webp", + "face_020142.webp", + "face_020143.webp", + "face_020144.webp", + "face_020145.webp", + "face_020146.webp", + "face_020147.webp", + "face_020148.webp", + "face_020149.webp", + "face_020150.webp", + "face_020151.webp", + "face_020152.webp", + "face_020153.webp", + "face_020154.webp", + "face_020155.webp", + "face_020156.webp", + "face_020157.webp", + "face_020158.webp", + "face_020159.webp", + "face_030101.webp", + "face_030102.webp", + "face_030103.webp", + "face_030104.webp", + "face_030105.webp", + "face_030107.webp", + "face_030121.webp", + "face_030122.webp", + "face_030123.webp", + "face_030124.webp", + "face_030125.webp", + "face_030127.webp", + "face_030129.webp", + "face_030131.webp", + "face_030132.webp", + "face_030141.webp", + "face_030142.webp", + "face_030143.webp", + "face_030144.webp", + "face_030145.webp", + "face_050101.webp", + "face_050102.webp", + "face_050103.webp", + "face_050104.webp", + "face_050105.webp", + "face_050106.webp", + "face_050107.webp", + "face_050108.webp", + "face_050111.webp", + "face_050112.webp", + "face_050113.webp", + "face_050116.webp", + "face_050121.webp", + "face_050122.webp", + "face_050123.webp", + "face_050124.webp", + "face_050125.webp", + "face_050126.webp", + "face_050127.webp", + "face_050128.webp", + "face_050129.webp", + "face_050130.webp", + "face_050131.webp", + "face_050132.webp", + "face_050134.webp", + "face_050135.webp", + "face_050136.webp", + "face_050137.webp", + "face_050141.webp", + "face_050142.webp", + "face_050143.webp", + "face_050144.webp", + "face_050145.webp", + "face_050146.webp", + "face_050147.webp", + "face_050148.webp", + "face_050150.webp", + "face_050151.webp", + "face_050152.webp", + "face_050201.webp", + "face_050202.webp", + "face_050203.webp", + "face_050204.webp", + "face_050205.webp", + "face_050206.webp", + "face_050210.webp", + "face_050212.webp", + "face_050213.webp", + "face_050214.webp", + "face_050215.webp", + "face_050216.webp", + "face_050221.webp", + "face_050222.webp", + "face_050223.webp", + "face_050224.webp", + "face_050225.webp", + "face_050226.webp", + "face_050229.webp", + "face_050230.webp", + "face_050232.webp", + "face_050234.webp", + "face_050235.webp", + "face_050237.webp", + "face_050241.webp", + "face_050242.webp", + "face_050243.webp", + "face_050244.webp", + "face_050245.webp", + "face_050246.webp", + "face_050249.webp", + "face_050250.webp", + "face_050252.webp", + "face_050301.webp", + "face_050302.webp", + "face_050303.webp", + "face_050304.webp", + "face_050305.webp", + "face_050306.webp", + "face_050307.webp", + "face_050308.webp", + "face_050309.webp", + "face_050310.webp", + "face_050311.webp", + "face_050313.webp", + "face_050314.webp", + "face_050315.webp", + "face_050316.webp", + "face_050317.webp", + "face_050321.webp", + "face_050322.webp", + "face_050323.webp", + "face_050324.webp", + "face_050325.webp", + "face_050326.webp", + "face_050327.webp", + "face_050328.webp", + "face_050329.webp", + "face_050330.webp", + "face_050331.webp", + "face_050332.webp", + "face_050333.webp", + "face_050334.webp", + "face_050335.webp", + "face_050336.webp", + "face_050337.webp", + "face_050338.webp", + "face_050341.webp", + "face_050342.webp", + "face_050343.webp", + "face_050344.webp", + "face_050345.webp", + "face_050346.webp", + "face_050347.webp", + "face_050348.webp", + "face_050349.webp", + "face_050350.webp", + "face_050351.webp", + "face_050352.webp", + "face_050353.webp", + "face_050441.webp", + "face_050442.webp", + "face_050443.webp", + "face_050445.webp", + "face_050446.webp", + "face_050447.webp", + "face_050451.webp", + "face_050452.webp", + "face_120101.webp", + "face_120102.webp", + "face_120103.webp", + "face_120104.webp", + "face_120105.webp", + "face_120106.webp", + "face_120107.webp", + "face_120108.webp", + "face_120111.webp", + "face_120112.webp", + "face_120113.webp", + "face_120121.webp", + "face_120122.webp", + "face_120123.webp", + "face_120124.webp", + "face_120125.webp", + "face_120126.webp", + "face_120127.webp", + "face_120128.webp", + "face_120131.webp", + "face_120132.webp", + "face_130101.webp", + "face_130102.webp", + "face_130103.webp", + "face_130104.webp", + "face_130105.webp", + "face_130106.webp", + "face_130107.webp", + "face_130108.webp", + "face_130109.webp", + "face_130110.webp", + "face_130111.webp", + "face_130112.webp", + "face_130113.webp", + "face_130121.webp", + "face_130122.webp", + "face_130123.webp", + "face_130124.webp", + "face_130125.webp", + "face_130126.webp", + "face_130127.webp", + "face_130128.webp", + "face_130129.webp", + "face_130130.webp", + "face_130131.webp", + "face_130132.webp", + "face_130201.webp", + "face_130202.webp", + "face_130203.webp", + "face_130204.webp", + "face_130205.webp", + "face_130206.webp", + "face_130207.webp", + "face_130208.webp", + "face_130209.webp", + "face_130211.webp", + "face_130212.webp", + "face_130213.webp", + "face_130221.webp", + "face_130222.webp", + "face_130223.webp", + "face_130224.webp", + "face_130225.webp", + "face_130226.webp", + "face_130227.webp", + "face_130228.webp", + "face_130229.webp", + "face_130230.webp", + "face_130231.webp", + "face_320101.webp", + "face_320102.webp", + "face_320103.webp", + "face_320104.webp", + "face_320105.webp", + "face_320106.webp", + "face_320107.webp", + "face_320108.webp", + "face_320109.webp", + "face_320121.webp", + "face_320122.webp", + "face_320123.webp", + "face_320124.webp", + "face_320125.webp", + "face_320127.webp", + "face_430101.webp", + "face_430102.webp", + "face_430103.webp", + "face_430104.webp", + "face_430105.webp", + "face_430106.webp", + "face_430107.webp", + "face_430108.webp", + "face_440101.webp", + "face_440102.webp", + "face_440103.webp", + "face_440104.webp", + "face_440105.webp", + "face_440106.webp", + "face_440107.webp", + "face_440108.webp", + "face_440109.webp", + "face_440110.webp", + "green.webp", + "hero.webp", + "l.webp", + "lane1.webp", + "light.webp", + "lock.webp", + "lr.webp", + "maba.webp", + "null.webp", + "other_0001.webp", + "other_0002.webp", + "other_0003.webp", + "other_0004.webp", + "r.webp", + "status.webp", + "tati_020101.webp", + "tati_020101a.webp", + "tati_020101y.webp", + "tati_020102.webp", + "tati_020102a.webp", + "tati_020103.webp", + "tati_020103y.webp", + "tati_020104.webp", + "tati_020104a.webp", + "tati_020104y.webp", + "tati_020105.webp", + "tati_020105a.webp", + "tati_020105y.webp", + "tati_020106.webp", + "tati_020107.webp", + "tati_020107a.webp", + "tati_020107y.webp", + "tati_020109.webp", + "tati_020110.webp", + "tati_020111.webp", + "tati_020111a.webp", + "tati_020113.webp", + "tati_020113a.webp", + "tati_020114.webp", + "tati_020115.webp", + "tati_020115y.webp", + "tati_020116.webp", + "tati_020116a.webp", + "tati_020117.webp", + "tati_020117a.webp", + "tati_020118.webp", + "tati_020121a.webp", + "tati_020122.webp", + "tati_020123.webp", + "tati_020123y.webp", + "tati_020124.webp", + "tati_020124a.webp", + "tati_020125.webp", + "tati_020125a.webp", + "tati_020125y.webp", + "tati_020126.webp", + "tati_020126y.webp", + "tati_020127.webp", + "tati_020129.webp", + "tati_020130.webp", + "tati_020131.webp", + "tati_020131a.webp", + "tati_020131y.webp", + "tati_020132.webp", + "tati_020133.webp", + "tati_020134.webp", + "tati_020135.webp", + "tati_020135a.webp", + "tati_020136.webp", + "tati_020137.webp", + "tati_020141.webp", + "tati_020141a.webp", + "tati_020142.webp", + "tati_020142a.webp", + "tati_020142y.webp", + "tati_020143.webp", + "tati_020143y.webp", + "tati_020144.webp", + "tati_020144a.webp", + "tati_020145.webp", + "tati_020145a.webp", + "tati_020145y.webp", + "tati_020146.webp", + "tati_020147.webp", + "tati_020149.webp", + "tati_020150.webp", + "tati_020151.webp", + "tati_020151a.webp", + "tati_020152.webp", + "tati_020153.webp", + "tati_020154.webp", + "tati_020157.webp", + "tati_020157a.webp", + "tati_020158.webp", + "tati_050101.webp", + "tati_050101a.webp", + "tati_050101y.webp", + "tati_050102.webp", + "tati_050102y.webp", + "tati_050103.webp", + "tati_050103a.webp", + "tati_050103y.webp", + "tati_050104.webp", + "tati_050104a.webp", + "tati_050105.webp", + "tati_050105a.webp", + "tati_050105y.webp", + "tati_050106.webp", + "tati_050106y.webp", + "tati_050107.webp", + "tati_050107a.webp", + "tati_050107y.webp", + "tati_050110.webp", + "tati_050111.webp", + "tati_050111a.webp", + "tati_050111y.webp", + "tati_050112.webp", + "tati_050113y.webp", + "tati_050116.webp", + "tati_050116a.webp", + "tati_050116y.webp", + "tati_050117.webp", + "tati_050121.webp", + "tati_050121a.webp", + "tati_050121y.webp", + "tati_050122.webp", + "tati_050122y.webp", + "tati_050123.webp", + "tati_050123a.webp", + "tati_050123y.webp", + "tati_050124.webp", + "tati_050124a.webp", + "tati_050124y.webp", + "tati_050125.webp", + "tati_050125a.webp", + "tati_050125y.webp", + "tati_050126.webp", + "tati_050126y.webp", + "tati_050127.webp", + "tati_050127a.webp", + "tati_050128.webp", + "tati_050131.webp", + "tati_050131a.webp", + "tati_050131y.webp", + "tati_050132.webp", + "tati_050134.webp", + "tati_050134y.webp", + "tati_050135.webp", + "tati_050135y.webp", + "tati_050136.webp", + "tati_050137.webp", + "tati_050137y.webp", + "tati_050141.webp", + "tati_050141a.webp", + "tati_050141y.webp", + "tati_050142.webp", + "tati_050142a.webp", + "tati_050142y.webp", + "tati_050143.webp", + "tati_050143a.webp", + "tati_050143y.webp", + "tati_050144.webp", + "tati_050144a.webp", + "tati_050144y.webp", + "tati_050145.webp", + "tati_050145a.webp", + "tati_050145y.webp", + "tati_050146.webp", + "tati_050146y.webp", + "tati_050147.webp", + "tati_050147y.webp", + "tati_050151.webp", + "tati_050151a.webp", + "tati_050151y.webp", + "tati_050152.webp", + "tati_050152y.webp", + "tati_050201.webp", + "tati_050201a.webp", + "tati_050201y.webp", + "tati_050202.webp", + "tati_050202a.webp", + "tati_050202y.webp", + "tati_050203.webp", + "tati_050203y.webp", + "tati_050204a.webp", + "tati_050204y.webp", + "tati_050205.webp", + "tati_050205a.webp", + "tati_050205y.webp", + "tati_050206.webp", + "tati_050206a.webp", + "tati_050206y.webp", + "tati_050210y.webp", + "tati_050215.webp", + "tati_050216.webp", + "tati_050221.webp", + "tati_050221a.webp", + "tati_050221y.webp", + "tati_050222.webp", + "tati_050222a.webp", + "tati_050222y.webp", + "tati_050223.webp", + "tati_050224a.webp", + "tati_050224y.webp", + "tati_050225.webp", + "tati_050225a.webp", + "tati_050225y.webp", + "tati_050226.webp", + "tati_050226a.webp", + "tati_050229.webp", + "tati_050230y.webp", + "tati_050232a.webp", + "tati_050234a.webp", + "tati_050237.webp", + "tati_050241.webp", + "tati_050241a.webp", + "tati_050241y.webp", + "tati_050242.webp", + "tati_050242a.webp", + "tati_050242y.webp", + "tati_050243.webp", + "tati_050243y.webp", + "tati_050244a.webp", + "tati_050244y.webp", + "tati_050245.webp", + "tati_050245a.webp", + "tati_050245y.webp", + "tati_050252.webp", + "tati_050252y.webp", + "tati_050301.webp", + "tati_050301a.webp", + "tati_050301y.webp", + "tati_050302.webp", + "tati_050303.webp", + "tati_050303y.webp", + "tati_050304.webp", + "tati_050304y.webp", + "tati_050305.webp", + "tati_050305a.webp", + "tati_050305y.webp", + "tati_050306.webp", + "tati_050306y.webp", + "tati_050307.webp", + "tati_050307a.webp", + "tati_050307y.webp", + "tati_050308.webp", + "tati_050309.webp", + "tati_050310.webp", + "tati_050311.webp", + "tati_050311y.webp", + "tati_050313.webp", + "tati_050314.webp", + "tati_050315.webp", + "tati_050316.webp", + "tati_050316y.webp", + "tati_050317.webp", + "tati_050321.webp", + "tati_050321a.webp", + "tati_050321y.webp", + "tati_050322.webp", + "tati_050322y.webp", + "tati_050323.webp", + "tati_050324.webp", + "tati_050324a.webp", + "tati_050324y.webp", + "tati_050325.webp", + "tati_050325a.webp", + "tati_050325y.webp", + "tati_050326.webp", + "tati_050327.webp", + "tati_050327y.webp", + "tati_050328.webp", + "tati_050329.webp", + "tati_050331.webp", + "tati_050331y.webp", + "tati_050332.webp", + "tati_050333.webp", + "tati_050334.webp", + "tati_050334a.webp", + "tati_050335.webp", + "tati_050337.webp", + "tati_050338.webp", + "tati_050338y.webp", + "tati_050341.webp", + "tati_050341a.webp", + "tati_050341y.webp", + "tati_050342.webp", + "tati_050343.webp", + "tati_050343y.webp", + "tati_050344.webp", + "tati_050345.webp", + "tati_050345a.webp", + "tati_050345y.webp", + "tati_050346.webp", + "tati_050347.webp", + "tati_050348.webp", + "tati_050349.webp", + "tati_050351.webp", + "tati_050351y.webp", + "tati_050352.webp", + "tati_050353.webp", + "tati_050353y.webp", + "tati_050441.webp", + "tati_050443.webp", + "tati_050443y.webp", + "tati_050445.webp", + "tati_050445a.webp", + "tati_050445y.webp", + "tati_050451.webp", + "tati_050451a.webp", + "tati_050452.webp", + "tati_050452y.webp", + "tati_120101.webp", + "tati_120101y.webp", + "tati_120102.webp", + "tati_120102y.webp", + "tati_120103.webp", + "tati_120103y.webp", + "tati_120104.webp", + "tati_120104y.webp", + "tati_120105.webp", + "tati_120105y.webp", + "tati_120106.webp", + "tati_120107.webp", + "tati_120107y.webp", + "tati_120108.webp", + "tati_120111.webp", + "tati_120111y.webp", + "tati_120112.webp", + "tati_120113.webp", + "tati_120113y.webp", + "tati_120121.webp", + "tati_120121y.webp", + "tati_120122.webp", + "tati_120123.webp", + "tati_120123y.webp", + "tati_120124.webp", + "tati_120125.webp", + "tati_120125y.webp", + "tati_120126.webp", + "tati_120127.webp", + "tati_120127y.webp", + "tati_120128.webp", + "tati_120131.webp", + "tati_120132.webp", + "tati_430101.webp", + "tati_430101a.webp", + "tati_430101y.webp", + "tati_430102.webp", + "tati_430102a.webp", + "tati_430102y.webp", + "tati_430103.webp", + "tati_430103a.webp", + "tati_430103y.webp", + "tati_430105.webp", + "tati_430105a.webp", + "tati_430105y.webp", + "tati_430106.webp", + "tati_430106a.webp", + "tati_430106y.webp", + "tati_430107.webp", + "tati_430107y.webp", + "tati_430108a.webp", + "tati_430108y.webp", + "tati_440101.webp", + "tati_440101y.webp", + "tati_440103.webp", + "tati_440104.webp", + "tati_440105.webp", + "tati_440106.webp", + "tati_440108.webp", + "u.webp", + "ud.webp", + "udl.webp", + "udlr.webp", + "udr.webp", + "ul.webp", + "ulr.webp", + "unknow.webp", + "ur.webp", + "winskin.webp", + "winskin1.webp", + ], + tilesets: [ + "magictower.webp", + "5.webp", + "4.webp", + "3.webp", + "2.webp", + "1.webp", + "11.webp", + "6.webp", + "12.webp", + "Outside_B.webp", + "C4.webp", + "C3.webp", + "C2.webp", + "C1.webp", + "IconSet.webp", + "9.webp", + "8.webp", + "7.webp", + "10.webp", + "C5.webp", + ], + animates: ["hand", "jianji", "sword", "thunder", "yongchang", "zone"], + bgms: [ + "Asphodelus_Ceui.mp3", + "Blind_Alley.mp3", + "Crawler.mp3", + "theme.mp3", + ], + sounds: [ + "aiy010000010.mp3", + "aiy010000020.mp3", + "aiy010000030.mp3", + "aiy020000005.mp3", + "aiy020000010.mp3", + "aiy020000020.mp3", + "aiy020000030.mp3", + "aiy020000040.mp3", + "aiy020000050.mp3", + "aiy020000060.mp3", + "aiy020000070.mp3", + "aiy020000080.mp3", + "aiy020000090.mp3", + "aiy020000100.mp3", + "aiy020000110.mp3", + "aiy020000120.mp3", + "aiy020000130.mp3", + "aiy020000140.mp3", + "aiy020000150.mp3", + "aiy020000160.mp3", + "aiy020000170.mp3", + "aiy020000180.mp3", + "aiy310000010.mp3", + "aiy310000020.mp3", + "aiy310000030.mp3", + "aiy310000040.mp3", + "aiy310000050.mp3", + "aiy310000060.mp3", + "aiy310000070.mp3", + "aiy310000080.mp3", + "aiy310000090.mp3", + "aiy310000100.mp3", + "aiy310000110.mp3", + "aiy310000120.mp3", + "aiy310000130.mp3", + "aiy310000140.mp3", + "aiy310000150.mp3", + "aiy310000160.mp3", + "aiy310000170.mp3", + "aiy310000180.mp3", + "aiy310000190.mp3", + "aiy310000200.mp3", + "aiy310000210.mp3", + "aiy310000220.mp3", + "aiy310000230.mp3", + "aiy310000240.mp3", + "aiy310000250.mp3", + "aiy310000260.mp3", + "aiy310000280.mp3", + "aiy310000290.mp3", + "aiy310000300.mp3", + "aiy350000010.mp3", + "aiy350000020.mp3", + "aiy350000030.mp3", + "aiy350000040.mp3", + "aiy350000050.mp3", + "aiy350000060.mp3", + "aiy350000070.mp3", + "aiy350000080.mp3", + "aiy350000090.mp3", + "aiy350000100.mp3", + "aiy350000110.mp3", + "aiy350000120.mp3", + "aiy350000130.mp3", + "aiy350000140.mp3", + "aiy350000150.mp3", + "aiy350000160.mp3", + "aiy350000170.mp3", + "aiy350000180.mp3", + "aiy350000190.mp3", + "aiy350000200.mp3", + "aiy350000210.mp3", + "aiy350000220.mp3", + "aiy350000230.mp3", + "aiy710000010.mp3", + "aiy710000020.mp3", + "aiy710000030.mp3", + "aiy710000040.mp3", + "aiy710000050.mp3", + "aiy710000060.mp3", + "aiy710000070.mp3", + "aiy710000080.mp3", + "aiy710000090.mp3", + "aiy710000100.mp3", + "aiy710000110.mp3", + "aiy710000120.mp3", + "aiy710000130.mp3", + "aiy820000010.mp3", + "aiy820000020.mp3", + "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", + "jingbao.mp3", + "jump.mp3", + "load.mp3", + "open_ui.mp3", + "pickaxe.mp3", + "recovery.mp3", + "save.mp3", + "shop.mp3", + "zone.mp3", + ], + fonts: ["HATTEN", "number", "pala", "simhei"], + 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.webp", + 商店: "shop.mp3", + 领域: "zone", + }, + levelChoose: null, + equipName: ["武器", "武器", "护具", "饰品", "饰品"], + startBgm: "theme.mp3", + styles: { + startBackground: "project/images/background.webp", + startVerticalBackground: "project/images/backgroundvertical.webp", + startLogoStyle: "color: black", + startButtonsStyle: + "background-color: #000000; opacity: 0.45; color: #FFFFFF; border: #FFFFFF 2px solid; caret-color: #FFD700;", + statusLeftBackground: "url(project/materials/ground.webp) repeat", + statusTopBackground: "url(project/materials/ground.webp) repeat", + toolsBackground: "url(project/materials/ground.webp) repeat", + floorChangingStyle: "background-color: black; color: white", + statusBarColor: [255, 255, 255, 1], + borderColor: [204, 204, 204, 1], + selectColor: [255, 215, 0, 1], + font: "pala", + }, + splitImages: null, + }, + firstData: { + title: "秽翼的尤斯蒂娅", + name: "Eustia", + version: "鸽子窝造塔小队", + floorId: "street01", + hero: { + image: "hero.webp", + animate: false, + name: "Caim", + 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: 5, + y: 11, + }, + flags: { + itemDetail: true, + useBetweenLight: true, + }, + followers: [], + steps: 0, + speed: 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.webp", + 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: "setValue", + name: "item:book", + value: "1", + }, + { + type: "setValue", + name: "item:fly", + value: "1", + }, + ], + 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: "等级+1(100经验)", + 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: true, + 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: true, + hideLeftStatusBar: false, + }, +}; diff --git a/project/functions.js b/project/functions.js index 0719015..e90a843 100644 --- a/project/functions.js +++ b/project/functions.js @@ -1088,26 +1088,27 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = }, "getStatusLabel": function (name) { - // 返回某个状态英文名的对应中文标签,如atk -> 攻击,def -> 防御等。 - // 请注意此项仅影响 libs/ 下的内容(如绘制怪物手册、数据统计等) - // 自行定义的(比如获得道具效果)中用到的“攻击+3”等需要自己去对应地方修改 + // 返回某个状态英文名的对应中文标签,如atk -> 攻击,def -> 防御等。 + // 请注意此项仅影响 libs/ 下的内容(如绘制怪物手册、数据统计等) + // 自行定义的(比如获得道具效果)中用到的“攻击+3”等需要自己去对应地方修改 - return { - name: "名称", - lv: "等级", - hpmax: "生命上限", - hp: "生命", - manamax: "魔力上限", - mana: "魔力", - atk: "攻击", - def: "防御", - mdef: "护盾", - money: "金币", - exp: "经验", - point: "加点", - steps: "步数", - }[name] || name; - }, + return { + name: "名称", + lv: "等级", + hpmax: "生命上限", + hp: "生命", + manamax: "魔力上限", + mana: "魔力", + atk: "攻击", + def: "防御", + mdef: "法强", + speed: "速度", + money: "金币", + exp: "经验", + point: "加点", + steps: "步数", + } [name] || name; +}, "triggerDebuff": function (action, type) { // 毒衰咒效果的获得与解除 // action:获得还是解除;'get'表示获得,'remove'表示解除 @@ -1166,8 +1167,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = } }, "updateStatusBar": function () { - //更新属性映射 - core.updateStatus() // 更新状态栏 core.ui.statusBar.update(); // 更新阻激夹域的伤害值 diff --git a/project/items.js b/project/items.js index 385932e..fddc8ac 100644 --- a/project/items.js +++ b/project/items.js @@ -146,12 +146,12 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "sword1": { "cls": "equips", "name": "铁剑", - "text": "一把很普通的铁剑", + "text": "一把普通的铁剑", "equip": { "type": 0, "animate": "sword", "value": { - "str": 10 + "atk": 10 }, "percentage": {} }, @@ -230,11 +230,11 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a = "equip": { "type": 2, "value": { - "str": 10, - "agi": -5 + "mdef": -5, + "def": 10 }, "percentage": { - "str": 10 + "def": 10 } }, "itemEffect": "core.status.hero.def += 0", diff --git a/project/plugins.js b/project/plugins.js index cb4d4b2..95c5192 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -1,213 +1,226 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = { "init": function () { - this._afterLoadResources = function () { - // 本函数将在所有资源加载完毕后,游戏开启前被执行 - core.ui.statusBar.init(); - core.registerEvent("changeMouse", function (data) { - if (!main.replayChecking && !core.isReplaying()) - core.changeMouse( - data.icon, - data.div, - data.translate[0], - data.translate[1], - data.scale[0], - data.scale[1], - data.angel, - data.px, - data.py - ); - core.doAction(); - }); - core.registerEvent("removeMouse", function (data) { - if (!main.replayChecking && !core.isReplaying()) - core.removeMouse(data.div); - core.doAction(); - }); - core.registerEvent("addPop", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - data.value = core.replaceText(data.value); - core.addPop( - data.value, - data.px, - data.py, - data.color, - data.boldColor, - data.left, - data.jump, - data.time, - data.show, - data.font, - data.speed - ); - } - core.doAction(); - }); - core.registerEvent("drawWarning", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - data.text = core.replaceText(data.text); - data.text2 = core.replaceText(data.text2); - core.drawWarning( - data.x, - data.y, - data.size, - data?.text, - data?.text2, - data?.warning - ); - setTimeout(() => core.doAction(), 3100); - } else { - core.doAction(); - } - }); - core.registerEvent("playStereo", function (data) { - if (!main.replayChecking && !core.isReplaying()) - core.playStereo(data.name, data.left, data.right, data.split); - core.doAction(); - }); - core.registerEvent("moveStereo", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - const id = core.playStereo( - data.name, - data.left, - data.right, - data.split - ); - core.moveStereo(id, data.leftTo, data.rightTo, data.time); - } - core.doAction(); - }); - core.registerEvent("over", function (data) { - let image = data.image ?? ""; - let time = data.time ?? 3000; - let sound = data.sound ?? ""; - let textColor = data.textColor ?? "#FFFFFF"; - let boldColor = data.boldColor ?? "#000000"; - let font = data.font ?? "bold 48px Verdana"; - let text = data.text ?? ""; - let hidetime = data.hidetime ?? 100; - if (!main.replayChecking && !core.isReplaying()) { - core.over( - image, - data.memory, - time, - hidetime, - sound, - textColor, - boldColor, - font, - text - ); - } else { - core.doAction(); - } - }); - core.registerEvent("changebg", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - core.changebg( - data.img1, - data.memory1, - data.img2, - data.memory2, - data.time, - data.style - ); - } else { - core.doAction(); - } - }); - core.registerEvent("overlist", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - core.overlist( - data.image, - data.memory, - data.hidetime || 30, - data.list || [{ - text: "", - sound: "", - time: 50, - textColor: "#FFFFFF", - boldColor: "#000000", - font: "bold 48px Verdana", - frame: 0, - }, ] - ); - } else { - core.doAction(); - } - }); - core.registerEvent("op", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - core.openvideo(); - } else { - core.doAction(); - } - }); - core.registerEvent("animationDrawable", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - core.animationDrawable( - data.allFarme, - data.color, - data.globalAlpha, - data.imageList, - data.soundList - ); - } else { - core.doAction(); - } - }); - core.registerEvent("setanimate", function (data) { + this._afterLoadResources = function () { + // 本函数将在所有资源加载完毕后,游戏开启前被执行 + core.ui.statusBar.init(); + core.registerEvent("changeMouse", function (data) { + if (!main.replayChecking && !core.isReplaying()) + core.changeMouse( + data.icon, + data.div, + data.translate[0], + data.translate[1], + data.scale[0], + data.scale[1], + data.angel, + data.px, + data.py + ); + core.doAction(); + }); + core.registerEvent("removeMouse", function (data) { + if (!main.replayChecking && !core.isReplaying()) + core.removeMouse(data.div); + core.doAction(); + }); + core.registerEvent("addPop", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + data.value = core.replaceText(data.value); + core.addPop( + data.value, + data.px, + data.py, + data.color, + data.boldColor, + data.left, + data.jump, + data.time, + data.show, + data.font, + data.speed + ); + } + core.doAction(); + }); + core.registerEvent("drawWarning", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + data.text = core.replaceText(data.text); + data.text2 = core.replaceText(data.text2); + core.drawWarning( + data.x, + data.y, + data.size, + data?.text, + data?.text2, + data?.warning + ); + setTimeout(() => core.doAction(), 3100); + } else { + core.doAction(); + } + }); + core.registerEvent("playStereo", function (data) { + if (!main.replayChecking && !core.isReplaying()) + core.playStereo(data.name, data.left, data.right, data.split); + core.doAction(); + }); + core.registerEvent("moveStereo", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + const id = core.playStereo( + data.name, + data.left, + data.right, + data.split + ); + core.moveStereo(id, data.leftTo, data.rightTo, data.time); + } + core.doAction(); + }); + core.registerEvent("over", function (data) { + let image = data.image ?? ""; + let time = data.time ?? 3000; + let sound = data.sound ?? ""; + let textColor = data.textColor ?? "#FFFFFF"; + let boldColor = data.boldColor ?? "#000000"; + let font = data.font ?? "bold 48px Verdana"; + let text = data.text ?? ""; + let hidetime = data.hidetime ?? 100; + if (!main.replayChecking && !core.isReplaying()) { + core.over( + image, + data.memory, + time, + hidetime, + sound, + textColor, + boldColor, + font, + text + ); + } else { + core.doAction(); + } + }); + core.registerEvent("changebg", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + core.changebg( + data.img1, + data.memory1, + data.img2, + data.memory2, + data.time, + data.style + ); + } else { + core.doAction(); + } + }); + core.registerEvent("overlist", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + core.overlist( + data.image, + data.memory, + data.hidetime || 30, + data.list || [ + { + text: "", + sound: "", + time: 50, + textColor: "#FFFFFF", + boldColor: "#000000", + font: "bold 48px Verdana", + frame: 0, + }, + ] + ); + } else { + core.doAction(); + } + }); + core.registerEvent("op", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + core.openvideo(); + } else { + core.doAction(); + } + }); + core.registerEvent("animationDrawable", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + core.animationDrawable( + data.allFarme, + data.color, + data.globalAlpha, + data.imageList, + data.soundList + ); + } else { + core.doAction(); + } + }); + core.registerEvent("setanimate", function (data) { + data.px = data.px ?? 0; + data.py = data.py ?? 0; + core.setanimate( + data.name, + data.px, + data.py, + data.width, + data.height, + data.allFarme, + data.imageList, + data.soundList + ); + core.doAction(); + }); + core.registerEvent("clearanimate", function (data) { + core.plugin.playing.clear(); - data.px = data.px ?? 0; - data.py = data.py ?? 0; - core.setanimate(data.name, data.px, data.py, data.width, data.height, data.allFarme, data.imageList, data.soundList) - core.doAction(); - - - }); - core.registerEvent("clearanimate", function (data) { - core.plugin.playing.clear() - - core.doAction(); - - - }); - core.registerEvent("deleteanimate", function (data) { - core.deleteanimate(data.name) - core.doAction(); - }); - core.registerEvent("playanimate", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - data.x = data.x ?? 0 - data.y = data.y ?? 0 - data.scalex = data.scalex ?? 1 - data.scaley = data.scaley ?? 1 - core.playanimate(data.name, data.x, data.y, data.hero, data.scalex, data.scaley) - core.doAction(); - } else { - core.doAction(); - } - }); - core.registerEvent("cgtext", function (data) { - if (!main.replayChecking && !core.isReplaying()) { - core.ui.cgText.image = data.bg; - core.ui.cgText.memory = data.memory; - core.ui.cgText.head = core.clone(data.head); - core.ui.cgText.name = data.name; - core.ui.cgText.text = data.text; - core.ui.cgText.time = data.time; - core.ui.cgText.wait = data.wait; - core.ui.cgText.WindowSkin = data.WindowSkin; - core.ui.cgText.sound = data.sound || ""; - core.ui.cgText.bodyList = core.clone(data.bodyList); - main.dom.cgText.style.display = "block"; - core.ui.cgText.update(); - } else { - core.doAction(); - } - }); - }; -}, + core.doAction(); + }); + core.registerEvent("deleteanimate", function (data) { + core.deleteanimate(data.name); + core.doAction(); + }); + core.registerEvent("playanimate", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + data.x = data.x ?? 0; + data.y = data.y ?? 0; + data.scalex = data.scalex ?? 1; + data.scaley = data.scaley ?? 1; + core.playanimate( + data.name, + data.x, + data.y, + data.hero, + data.scalex, + data.scaley + ); + core.doAction(); + } else { + core.doAction(); + } + }); + core.registerEvent("cgtext", function (data) { + if (!main.replayChecking && !core.isReplaying()) { + core.ui.cgText.image = data.bg; + core.ui.cgText.memory = data.memory; + core.ui.cgText.head = core.clone(data.head); + core.ui.cgText.name = data.name; + core.ui.cgText.text = data.text; + core.ui.cgText.time = data.time; + core.ui.cgText.wait = data.wait; + core.ui.cgText.WindowSkin = data.WindowSkin; + core.ui.cgText.sound = data.sound || ""; + core.ui.cgText.bodyList = core.clone(data.bodyList); + main.dom.cgText.style.display = "block"; + core.ui.cgText.update(); + } else { + core.doAction(); + } + }); + }; + }, "drawLight": function () { // 绘制灯光/漆黑层效果。调用方式 core.plugin.drawLight(...) // 【参数说明】 @@ -2471,1208 +2484,1210 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = })(); }, "statusBar": function () { - main.dom.floorMsgGroup.style.display = "none"; - main.dom.statusBar.style.display = "none"; - main.dom.toolBar.style.display = "none"; - //所有数据*3是为了实现高清画布 - const GAMEVIEW_WIDTH = 676 * 3; //横屏画面宽度 - const GAMEVIEW_HEIGHT = 416 * 3; //横屏画面高度 + main.dom.floorMsgGroup.style.display = "none"; + main.dom.statusBar.style.display = "none"; + main.dom.toolBar.style.display = "none"; + //所有数据*3是为了实现高清画布 + const GAMEVIEW_WIDTH = 676 * 3; //横屏画面宽度 + const GAMEVIEW_HEIGHT = 416 * 3; //横屏画面高度 - const GAMEVIEW_WIDTH_VERTICAL = 416 * 3; //竖屏画面宽度 - const GAMEVIEW_HEIGHT_VERTICAL = 676 * 3; //竖屏画面高度 + const GAMEVIEW_WIDTH_VERTICAL = 416 * 3; //竖屏画面宽度 + const GAMEVIEW_HEIGHT_VERTICAL = 676 * 3; //竖屏画面高度 - const BAR_WIDTH = 130 * 3; //横屏左侧额外距离(即边栏宽度) - const BAR_HEIGHT_VERTICAL = 130 * 3; //竖屏上侧额外距离(即边栏高度) - const BORDER_WIDTH = 0; //游戏画面左侧偏移距离 - const BORDER_HEIGHT = 0; //游戏画面上侧偏移距离 + const BAR_WIDTH = 130 * 3; //横屏左侧额外距离(即边栏宽度) + const BAR_HEIGHT_VERTICAL = 130 * 3; //竖屏上侧额外距离(即边栏高度) + const BORDER_WIDTH = 0; //游戏画面左侧偏移距离 + const BORDER_HEIGHT = 0; //游戏画面上侧偏移距离 - const ITEM_BOX_LEFT = 549 * 3; //横屏道具栏左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) - const ITEM_BOX_TOP = 155 * 3; //横屏道具栏上侧距离 - const ITEM_BOX_LEFT_VERTICAL = 160 * 3; //竖屏道具栏左侧距离 - const ITEM_BOX_TOP_VERTICAL = 549 * 3; //竖屏道具栏上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) + const ITEM_BOX_LEFT = 549 * 3; //横屏道具栏左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) + const ITEM_BOX_TOP = 155 * 3; //横屏道具栏上侧距离 + const ITEM_BOX_LEFT_VERTICAL = 160 * 3; //竖屏道具栏左侧距离 + const ITEM_BOX_TOP_VERTICAL = 549 * 3; //竖屏道具栏上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) - const EQUIP_BLOCK_LEFT = 549 * 3; //横屏装备栏左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) - const EQUIP_BLOCK_TOP = 10 * 3; //横屏装备栏上侧距离 - const EQUIP_BLOCK_LEFT_VERTICAL = 10 * 3; //竖屏装备栏左侧距离 - const EQUIP_BLOCK_TOP_VERTICAL = 549 * 3; //竖屏装备栏上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) + const EQUIP_BLOCK_LEFT = 549 * 3; //横屏装备栏左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) + const EQUIP_BLOCK_TOP = 10 * 3; //横屏装备栏上侧距离 + const EQUIP_BLOCK_LEFT_VERTICAL = 10 * 3; //竖屏装备栏左侧距离 + const EQUIP_BLOCK_TOP_VERTICAL = 549 * 3; //竖屏装备栏上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) - const MAP_BLOCK_LEFT = 551 * 3; //横屏小地图左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) - const MAP_BLOCK_TOP = 0; //横屏小地图上侧距离 - const MAP_BLOCK_LEFT_VERTICAL = 0; //竖屏小地图左侧距离 - const MAP_BLOCK_TOP_VERTICAL = 551 * 3; //竖屏小地图上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) + const MAP_BLOCK_LEFT = 551 * 3; //横屏小地图左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) + const MAP_BLOCK_TOP = 0; //横屏小地图上侧距离 + const MAP_BLOCK_LEFT_VERTICAL = 0; //竖屏小地图左侧距离 + const MAP_BLOCK_TOP_VERTICAL = 551 * 3; //竖屏小地图上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) - const KEY_BLOCK_LEFT = EQUIP_BLOCK_LEFT; //横屏钥匙栏左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) - const KEY_BLOCK_TOP = 110 * 3; //横屏钥匙栏上侧距离 - const KEY_BLOCK_LEFT_VERTICAL = 110 * 3; //竖屏钥匙栏左侧距离 - const KEY_BLOCK_TOP_VERTICAL = EQUIP_BLOCK_TOP_VERTICAL; //竖屏钥匙栏上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) + const KEY_BLOCK_LEFT = EQUIP_BLOCK_LEFT; //横屏钥匙栏左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) + const KEY_BLOCK_TOP = 110 * 3; //横屏钥匙栏上侧距离 + const KEY_BLOCK_LEFT_VERTICAL = 110 * 3; //竖屏钥匙栏左侧距离 + const KEY_BLOCK_TOP_VERTICAL = EQUIP_BLOCK_TOP_VERTICAL; //竖屏钥匙栏上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) - const INFO_BLOCK_LEFT = 10 * 3; //横屏道具说明左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) - const INFO_BLOCK_TOP = 180 * 3; //横屏道具说明上侧距离 - const INFO_BLOCK_LEFT_VERTICAL = 113 * 3; //竖屏道具说明左侧距离 - const INFO_BLOCK_TOP_VERTICAL = 8 * 3; //竖屏道具说明上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) + const INFO_BLOCK_LEFT = 10 * 3; //横屏道具说明左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) + const INFO_BLOCK_TOP = 180 * 3; //横屏道具说明上侧距离 + const INFO_BLOCK_LEFT_VERTICAL = 113 * 3; //竖屏道具说明左侧距离 + const INFO_BLOCK_TOP_VERTICAL = 8 * 3; //竖屏道具说明上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) - const TOOL_BOX_LEFT = EQUIP_BLOCK_LEFT; //横屏工具栏左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) - const TOOL_BOX_TOP = 348 * 3; //横屏工具栏上侧距离 - const TOOL_BOX_LEFT_VERTICAL = 348 * 3; //竖屏工具栏左侧距离 - const TOOL_BOX_TOP_VERTICAL = 549 * 3; //竖屏工具栏上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) + const TOOL_BOX_LEFT = EQUIP_BLOCK_LEFT; //横屏工具栏左侧距离(右侧边栏需增加BAR_WIDTH+GAMEVIEW_HEIGHT) + const TOOL_BOX_TOP = 348 * 3; //横屏工具栏上侧距离 + const TOOL_BOX_LEFT_VERTICAL = 348 * 3; //竖屏工具栏左侧距离 + const TOOL_BOX_TOP_VERTICAL = 549 * 3; //竖屏工具栏上侧距离(下侧边栏需增加BAR_HEIGHT_VERTICAL+GAMEVIEW_WIDTH_VERTICAL) - const TOOL_ICON_OUTER_SIZE = 34 * 3; + const TOOL_ICON_OUTER_SIZE = 34 * 3; - const TEXT_COLOR = "#FFFFFF"; //默认文字颜色 - const globalAlpha = 0.7; //默认底框透明度 - const FORCE_COUNTABLE_ITEMS = ["centerFly"]; //常态显示数量的非永久道具,如果道具不在此数组中,则只有道具多余1时显示数量 + const TEXT_COLOR = "#FFFFFF"; //默认文字颜色 + const globalAlpha = 0.7; //默认底框透明度 + const FORCE_COUNTABLE_ITEMS = ["centerFly"]; //常态显示数量的非永久道具,如果道具不在此数组中,则只有道具多余1时显示数量 - const outerBackground = document.createElement("canvas"); //背景画布设置 - let globalAlphafloor = 0, - globalAlphafloorStatus = 4; - outerBackground.style.position = "absolute"; - outerBackground.style.zIndex = 5; - outerBackground.id = "outerBackground"; - main.dom.outerBackground = outerBackground; - main.dom.startPanel.insertAdjacentElement("afterend", outerBackground); + const outerBackground = document.createElement("canvas"); //背景画布设置 + let globalAlphafloor = 0, + globalAlphafloorStatus = 4; + outerBackground.style.position = "absolute"; + outerBackground.style.zIndex = 5; + outerBackground.id = "outerBackground"; + main.dom.outerBackground = outerBackground; + main.dom.startPanel.insertAdjacentElement("afterend", outerBackground); - const outerUI = document.createElement("canvas"); //额外ui画布设置(状态栏所有绘制、点击都在额外ui上) - outerUI.style.position = "absolute"; - outerUI.style.zIndex = 165; - outerUI.id = "outerUI"; + const outerUI = document.createElement("canvas"); //额外ui画布设置(状态栏所有绘制、点击都在额外ui上) + outerUI.style.position = "absolute"; + outerUI.style.zIndex = 165; + outerUI.id = "outerUI"; - main.dom.outerUI = outerUI; - outerBackground.insertAdjacentElement("afterend", outerUI); - setTimeout(function () { - // Should be executed immediately after init() - main.canvas.outerUI = outerUI.getContext("2d"); - }); - outerUI.onclick = function (e) { - try { - e.preventDefault(); - if (!core.isPlaying()) return false; - const left = core.dom.gameGroup.offsetLeft; - const top = core.dom.gameGroup.offsetTop; - const px = Math.floor((e.clientX - left) / core.domStyle.scale), - py = Math.floor((e.clientY - top) / core.domStyle.scale); - core.ui.statusBar.onclick(px * 3, py * 3); - } catch (ee) { - main.log(ee); - } - }; + main.dom.outerUI = outerUI; + outerBackground.insertAdjacentElement("afterend", outerUI); + setTimeout(function () { + // Should be executed immediately after init() + main.canvas.outerUI = outerUI.getContext("2d"); + }); + outerUI.onclick = function (e) { + try { + e.preventDefault(); + if (!core.isPlaying()) return false; + const left = core.dom.gameGroup.offsetLeft; + const top = core.dom.gameGroup.offsetTop; + const px = Math.floor((e.clientX - left) / core.domStyle.scale), + py = Math.floor((e.clientY - top) / core.domStyle.scale); + core.ui.statusBar.onclick(px * 3, py * 3); + } catch (ee) { + main.log(ee); + } + }; - const _resize_gameGroup = function (obj) { - //游戏画面自适应调节 - const gameGroup = core.dom.gameGroup; - gameGroup.style.width = obj.totalWidth + "px"; - gameGroup.style.height = obj.totalHeight + "px"; - gameGroup.style.left = (obj.clientWidth - obj.totalWidth) / 2 + "px"; - gameGroup.style.top = (obj.clientHeight - obj.totalHeight) / 2 + "px"; - //floorMsgGroup为切换楼层中生效,显示时间可通过‘全塔属性’——‘切换楼层时间’或游戏内设置调整 - //显示内容为游戏名/版本号/楼层名 - // floorMsgGroup - var floorMsgGroup = core.dom.floorMsgGroup; - var globalAttribute = - core.status.globalAttribute || core.initStatus.globalAttribute; - floorMsgGroup.style = globalAttribute.floorChangingStyle; - floorMsgGroup.style.height = floorMsgGroup.style.width = - (GAMEVIEW_HEIGHT / 3) * core.domStyle.scale + "px"; - floorMsgGroup.style.fontSize = 16 * core.domStyle.scale + "px"; + const _resize_gameGroup = function (obj) { + //游戏画面自适应调节 + const gameGroup = core.dom.gameGroup; + gameGroup.style.width = obj.totalWidth + "px"; + gameGroup.style.height = obj.totalHeight + "px"; + gameGroup.style.left = (obj.clientWidth - obj.totalWidth) / 2 + "px"; + gameGroup.style.top = (obj.clientHeight - obj.totalHeight) / 2 + "px"; + //floorMsgGroup为切换楼层中生效,显示时间可通过‘全塔属性’——‘切换楼层时间’或游戏内设置调整 + //显示内容为游戏名/版本号/楼层名 + // floorMsgGroup + var floorMsgGroup = core.dom.floorMsgGroup; + var globalAttribute = + core.status.globalAttribute || core.initStatus.globalAttribute; + floorMsgGroup.style = globalAttribute.floorChangingStyle; + floorMsgGroup.style.height = floorMsgGroup.style.width = + (GAMEVIEW_HEIGHT / 3) * core.domStyle.scale + "px"; + floorMsgGroup.style.fontSize = 16 * core.domStyle.scale + "px"; - if (core.domStyle.isVertical) { - floorMsgGroup.style.left = "0px"; - floorMsgGroup.style.top = - ((GAMEVIEW_HEIGHT_VERTICAL / 3 - GAMEVIEW_WIDTH_VERTICAL / 3) * - core.domStyle.scale) / - 2 + - "px"; - } else { - floorMsgGroup.style.left = - ((GAMEVIEW_WIDTH / 3 - GAMEVIEW_HEIGHT / 3) * core.domStyle.scale) / - 2 + - "px"; - floorMsgGroup.style.top = "0px"; - } - core.dom.musicBtn.style.right = - (obj.clientWidth - obj.totalWidth) / 2 + "px"; - core.dom.musicBtn.style.bottom = - (obj.clientHeight - obj.totalHeight) / 2 - 27 + "px"; - let startBackground = core.domStyle.isVertical ? - main.styles.startVerticalBackground || main.styles.startBackground : - main.styles.startBackground; - if (main.dom.startBackground.getAttribute("__src__") != startBackground) { - main.dom.startBackground.setAttribute("__src__", startBackground); - main.dom.startBackground.src = startBackground; - } - const span = document - .getElementById("startButtons") - .getElementsByTagName("span"); - let font = (GAMEVIEW_WIDTH / 100) * core.domStyle.scale; - if (core.domStyle.isVertical) - font = ((GAMEVIEW_WIDTH_VERTICAL * 2) / 100) * core.domStyle.scale; + if (core.domStyle.isVertical) { + floorMsgGroup.style.left = "0px"; + floorMsgGroup.style.top = + ((GAMEVIEW_HEIGHT_VERTICAL / 3 - GAMEVIEW_WIDTH_VERTICAL / 3) * + core.domStyle.scale) / + 2 + + "px"; + } else { + floorMsgGroup.style.left = + ((GAMEVIEW_WIDTH / 3 - GAMEVIEW_HEIGHT / 3) * core.domStyle.scale) / + 2 + + "px"; + floorMsgGroup.style.top = "0px"; + } + core.dom.musicBtn.style.right = + (obj.clientWidth - obj.totalWidth) / 2 + "px"; + core.dom.musicBtn.style.bottom = + (obj.clientHeight - obj.totalHeight) / 2 - 27 + "px"; + let startBackground = core.domStyle.isVertical + ? main.styles.startVerticalBackground || main.styles.startBackground + : main.styles.startBackground; + if (main.dom.startBackground.getAttribute("__src__") != startBackground) { + main.dom.startBackground.setAttribute("__src__", startBackground); + main.dom.startBackground.src = startBackground; + } + const span = document + .getElementById("startButtons") + .getElementsByTagName("span"); + let font = (GAMEVIEW_WIDTH / 100) * core.domStyle.scale; + if (core.domStyle.isVertical) + font = ((GAMEVIEW_WIDTH_VERTICAL * 2) / 100) * core.domStyle.scale; - core.dom.playGame.style.fontSize = font + "px"; - core.dom.loadGame.style.fontSize = font + "px"; - core.dom.CGMode.style.fontSize = font + "px"; - core.dom.musicMode.style.fontSize = font + "px"; - core.dom.replayGame.style.fontSize = font + "px"; - core.dom.startButtonGroup.style.padding = font * 0.3 + "px 25px"; - }; - const _resize_canvas = function (obj) { - //自适应画布 - main.dom.outerBackground.style.width = obj.totalWidth + "px"; - main.dom.outerBackground.style.height = obj.totalHeight + "px"; - main.dom.outerUI.style.width = obj.totalWidth + "px"; - main.dom.outerUI.style.height = obj.totalHeight + "px"; - if (main.dom.CGUI) { - main.dom.CGUI.style.width = obj.totalWidth + 3 + "px"; - main.dom.CGUI.style.height = obj.totalHeight + 3 + "px"; - } - if (main.dom.music) { - main.dom.music.style.width = obj.totalWidth + 3 + "px"; - main.dom.music.style.height = obj.totalHeight + 3 + "px"; - } - if (main.dom.cgText) { - main.dom.cgText.style.width = obj.totalWidth + 3 + "px"; - main.dom.cgText.style.height = obj.totalHeight + 3 + "px"; - } - if (main.dom.over) { - main.dom.over.style.width = obj.totalWidth + 3 + "px"; - main.dom.over.style.height = obj.totalHeight + 3 + "px"; - } - if (main.dom.video) { - main.dom.video.style.width = obj.totalWidth + 3 + "px"; - main.dom.video.style.height = obj.totalHeight + 3 + "px"; - if (core.domStyle.isVertical) - main.dom.video.style.width = obj.totalHeight + 3 + "px"; - if (core.domStyle.isVertical) - main.dom.video.style.height = obj.totalWidth + 3 + "px"; - main.dom.video.style.top = "50%"; - main.dom.video.style.left = "50%"; + core.dom.playGame.style.fontSize = font + "px"; + core.dom.loadGame.style.fontSize = font + "px"; + core.dom.CGMode.style.fontSize = font + "px"; + core.dom.musicMode.style.fontSize = font + "px"; + core.dom.replayGame.style.fontSize = font + "px"; + core.dom.startButtonGroup.style.padding = font * 0.3 + "px 25px"; + }; + const _resize_canvas = function (obj) { + //自适应画布 + main.dom.outerBackground.style.width = obj.totalWidth + "px"; + main.dom.outerBackground.style.height = obj.totalHeight + "px"; + main.dom.outerUI.style.width = obj.totalWidth + "px"; + main.dom.outerUI.style.height = obj.totalHeight + "px"; + if (main.dom.CGUI) { + main.dom.CGUI.style.width = obj.totalWidth + 3 + "px"; + main.dom.CGUI.style.height = obj.totalHeight + 3 + "px"; + } + if (main.dom.music) { + main.dom.music.style.width = obj.totalWidth + 3 + "px"; + main.dom.music.style.height = obj.totalHeight + 3 + "px"; + } + if (main.dom.cgText) { + main.dom.cgText.style.width = obj.totalWidth + 3 + "px"; + main.dom.cgText.style.height = obj.totalHeight + 3 + "px"; + } + if (main.dom.over) { + main.dom.over.style.width = obj.totalWidth + 3 + "px"; + main.dom.over.style.height = obj.totalHeight + 3 + "px"; + } + if (main.dom.video) { + main.dom.video.style.width = obj.totalWidth + 3 + "px"; + main.dom.video.style.height = obj.totalHeight + 3 + "px"; + if (core.domStyle.isVertical) + main.dom.video.style.width = obj.totalHeight + 3 + "px"; + if (core.domStyle.isVertical) + main.dom.video.style.height = obj.totalWidth + 3 + "px"; + main.dom.video.style.top = "50%"; + main.dom.video.style.left = "50%"; - main.dom.video.style.transform = "translate(-50%,-50%)"; + main.dom.video.style.transform = "translate(-50%,-50%)"; - if (core.domStyle.isVertical) - main.dom.video.style.transform = "translate(-50%,-50%) rotate(90deg)"; - } - if (main.dom.video1) { - main.dom.video1.style.width = obj.totalWidth + 3 + "px"; - main.dom.video1.style.height = obj.totalHeight + 3 + "px"; - } + if (core.domStyle.isVertical) + main.dom.video.style.transform = "translate(-50%,-50%) rotate(90deg)"; + } + if (main.dom.video1) { + main.dom.video1.style.width = obj.totalWidth + 3 + "px"; + main.dom.video1.style.height = obj.totalHeight + 3 + "px"; + } - const innerSize = obj.canvasWidth * core.domStyle.scale + "px"; - for (let i = 0; i < core.dom.gameCanvas.length; ++i) - core.dom.gameCanvas[i].style.width = core.dom.gameCanvas[ - i - ].style.height = innerSize; - core.dom.gif.style.width = core.dom.gif.style.height = innerSize; - core.dom.gif2.style.width = core.dom.gif2.style.height = innerSize; + const innerSize = obj.canvasWidth * core.domStyle.scale + "px"; + for (let i = 0; i < core.dom.gameCanvas.length; ++i) + core.dom.gameCanvas[i].style.width = core.dom.gameCanvas[ + i + ].style.height = innerSize; + core.dom.gif.style.width = core.dom.gif.style.height = innerSize; + core.dom.gif2.style.width = core.dom.gif2.style.height = innerSize; - core.dom.gameDraw.style.width = core.dom.gameDraw.style.height = - innerSize; - core.dom.gameDraw.style.top = - obj.gameDrawBox.top * core.domStyle.scale + "px"; - core.dom.gameDraw.style.left = - obj.gameDrawBox.left * core.domStyle.scale + "px"; - // resize bigmap - core.bigmap.canvas.forEach(function (cn) { - const ratio = core.canvas[cn].canvas.hasAttribute("isHD") ? - core.domStyle.ratio : - 1; - core.canvas[cn].canvas.style.width = - (innerSize / ratio) * core.domStyle.scale + "px"; - core.canvas[cn].canvas.style.height = - (innerSize / ratio) * core.domStyle.scale + "px"; - }); - // resize dynamic canvas - for (const name in core.dymCanvas) { - const ctx = core.dymCanvas[name], - canvas = ctx.canvas; - const ratio = canvas.hasAttribute("isHD") ? core.domStyle.ratio : 1; - canvas.style.width = (innerSize / ratio) * core.domStyle.scale + "px"; - canvas.style.height = (innerSize / ratio) * core.domStyle.scale + "px"; - canvas.style.left = - parseFloat(canvas.getAttribute("_left")) * core.domStyle.scale + "px"; - canvas.style.top = - parseFloat(canvas.getAttribute("_top")) * core.domStyle.scale + "px"; - } - // resize next - main.dom.next.style.width = main.dom.next.style.height = - 5 * core.domStyle.scale + "px"; - main.dom.next.style.borderBottomWidth = - main.dom.next.style.borderRightWidth = 4 * core.domStyle.scale + "px"; - }; - const bgctx = main.dom.outerBackground.getContext("2d"); - const uictx = main.dom.outerUI.getContext("2d"); - let now = 0; - core.registerAnimationFrame("lightFloor", true, function (timestamp) { - if (timestamp - now > 1000 / 60) { - now = timestamp; - globalAlphafloor += globalAlphafloorStatus; - if (globalAlphafloor === 100) globalAlphafloorStatus = -2; - if (globalAlphafloor === 0) globalAlphafloorStatus = 2; + core.dom.gameDraw.style.width = core.dom.gameDraw.style.height = + innerSize; + core.dom.gameDraw.style.top = + obj.gameDrawBox.top * core.domStyle.scale + "px"; + core.dom.gameDraw.style.left = + obj.gameDrawBox.left * core.domStyle.scale + "px"; + // resize bigmap + core.bigmap.canvas.forEach(function (cn) { + const ratio = core.canvas[cn].canvas.hasAttribute("isHD") + ? core.domStyle.ratio + : 1; + core.canvas[cn].canvas.style.width = + (innerSize / ratio) * core.domStyle.scale + "px"; + core.canvas[cn].canvas.style.height = + (innerSize / ratio) * core.domStyle.scale + "px"; + }); + // resize dynamic canvas + for (const name in core.dymCanvas) { + const ctx = core.dymCanvas[name], + canvas = ctx.canvas; + const ratio = canvas.hasAttribute("isHD") ? core.domStyle.ratio : 1; + canvas.style.width = (innerSize / ratio) * core.domStyle.scale + "px"; + canvas.style.height = (innerSize / ratio) * core.domStyle.scale + "px"; + canvas.style.left = + parseFloat(canvas.getAttribute("_left")) * core.domStyle.scale + "px"; + canvas.style.top = + parseFloat(canvas.getAttribute("_top")) * core.domStyle.scale + "px"; + } + // resize next + main.dom.next.style.width = main.dom.next.style.height = + 5 * core.domStyle.scale + "px"; + main.dom.next.style.borderBottomWidth = + main.dom.next.style.borderRightWidth = 4 * core.domStyle.scale + "px"; + }; + const bgctx = main.dom.outerBackground.getContext("2d"); + const uictx = main.dom.outerUI.getContext("2d"); + let now = 0; + core.registerAnimationFrame("lightFloor", true, function (timestamp) { + if (timestamp - now > 1000 / 60) { + now = timestamp; + globalAlphafloor += globalAlphafloorStatus; + if (globalAlphafloor === 100) globalAlphafloorStatus = -2; + if (globalAlphafloor === 0) globalAlphafloorStatus = 2; - if (core.domStyle.isVertical) { - core.clearMap( - uictx, - MAP_BLOCK_LEFT_VERTICAL, - MAP_BLOCK_TOP_VERTICAL, - 340, - 360 - ); - if (core.status.event.id === "viewMaps") { - core.ui.statusBar._update_map(core.status.event.data.floorId); - } else { - core.ui.statusBar._update_map(); - } + if (core.domStyle.isVertical) { + core.clearMap( + uictx, + MAP_BLOCK_LEFT_VERTICAL, + MAP_BLOCK_TOP_VERTICAL, + 340, + 360 + ); + if (core.status.event.id === "viewMaps") { + core.ui.statusBar._update_map(core.status.event.data.floorId); + } else { + core.ui.statusBar._update_map(); + } - uictx.globalAlpha = globalAlphafloor / 100; - core.drawImage( - uictx, - "green.webp", - MAP_BLOCK_LEFT_VERTICAL + 135, - MAP_BLOCK_TOP_VERTICAL + 170 - ); - uictx.globalAlpha = 1; - } else { - core.clearMap(uictx, MAP_BLOCK_LEFT, MAP_BLOCK_TOP, 340, 360); - if (core.status.event.id === "viewMaps") { - core.ui.statusBar._update_map(core.status.event.data.floorId); - } else { - core.ui.statusBar._update_map(); - } - uictx.globalAlpha = globalAlphafloor / 100; - core.drawImage( - uictx, - "green.webp", - MAP_BLOCK_LEFT + 150, - MAP_BLOCK_TOP + 180 - ); - uictx.globalAlpha = 1; - } - } - }); + uictx.globalAlpha = globalAlphafloor / 100; + core.drawImage( + uictx, + "green.webp", + MAP_BLOCK_LEFT_VERTICAL + 135, + MAP_BLOCK_TOP_VERTICAL + 170 + ); + uictx.globalAlpha = 1; + } else { + core.clearMap(uictx, MAP_BLOCK_LEFT, MAP_BLOCK_TOP, 340, 360); + if (core.status.event.id === "viewMaps") { + core.ui.statusBar._update_map(core.status.event.data.floorId); + } else { + core.ui.statusBar._update_map(); + } + uictx.globalAlpha = globalAlphafloor / 100; + core.drawImage( + uictx, + "green.webp", + MAP_BLOCK_LEFT + 150, + MAP_BLOCK_TOP + 180 + ); + uictx.globalAlpha = 1; + } + } + }); - core.control.resize = function () { - //自适应,可实现横竖屏切换 - if (main.mode == "editor") return; + core.control.resize = function () { + //自适应,可实现横竖屏切换 + if (main.mode == "editor") return; - const clientWidth = main.dom.body.clientWidth, - clientHeight = main.dom.body.clientHeight; - const canvasWidth = core.__PIXELS__; + const clientWidth = main.dom.body.clientWidth, + clientHeight = main.dom.body.clientHeight; + const canvasWidth = core.__PIXELS__; - const isVertical = clientHeight > clientWidth; - core.domStyle.isVertical = isVertical; + const isVertical = clientHeight > clientWidth; + core.domStyle.isVertical = isVertical; - const totalWidth = isVertical ? - GAMEVIEW_WIDTH_VERTICAL / 3 : - GAMEVIEW_WIDTH / 3, - totalHeight = isVertical ? - GAMEVIEW_HEIGHT_VERTICAL / 3 : - GAMEVIEW_HEIGHT / 3; + const totalWidth = isVertical + ? GAMEVIEW_WIDTH_VERTICAL / 3 + : GAMEVIEW_WIDTH / 3, + totalHeight = isVertical + ? GAMEVIEW_HEIGHT_VERTICAL / 3 + : GAMEVIEW_HEIGHT / 3; - const maxRatio = Math.min( - clientWidth / totalWidth, - clientHeight / totalHeight - ); + const maxRatio = Math.min( + clientWidth / totalWidth, + clientHeight / totalHeight + ); - core.domStyle.availableScale = []; - [1, 1.25, 1.5, 1.75, 2].forEach(function (v) { - if (maxRatio >= v) { - core.domStyle.availableScale.push(v); - } - }); + core.domStyle.availableScale = []; + [1, 1.25, 1.5, 1.75, 2].forEach(function (v) { + if (maxRatio >= v) { + core.domStyle.availableScale.push(v); + } + }); - if (core.domStyle.availableScale.indexOf(core.domStyle.scale) < 0) { - core.domStyle.scale = Math.min(1, maxRatio); - } else if ( - core.getLocalStorage("scale") == null && - core.domStyle.availableScale.length >= 2 - ) { - core.domStyle.scale = - core.domStyle.availableScale[core.domStyle.availableScale.length - 2]; - core.setLocalStorage("scale", core.domStyle.scale); - } + if (core.domStyle.availableScale.indexOf(core.domStyle.scale) < 0) { + core.domStyle.scale = Math.min(1, maxRatio); + } else if ( + core.getLocalStorage("scale") == null && + core.domStyle.availableScale.length >= 2 + ) { + core.domStyle.scale = + core.domStyle.availableScale[core.domStyle.availableScale.length - 2]; + core.setLocalStorage("scale", core.domStyle.scale); + } - const totalWidthScaled = totalWidth * core.domStyle.scale, - totalHeightScaled = totalHeight * core.domStyle.scale; + const totalWidthScaled = totalWidth * core.domStyle.scale, + totalHeightScaled = totalHeight * core.domStyle.scale; - const gameDrawBox = isVertical ? { - left: BORDER_WIDTH / 3, - top: BAR_HEIGHT_VERTICAL / 3 + BORDER_HEIGHT / 3, - } : { left: BAR_WIDTH / 3 + BORDER_WIDTH / 3, top: BORDER_HEIGHT / 3 }; + const gameDrawBox = isVertical + ? { + left: BORDER_WIDTH / 3, + top: BAR_HEIGHT_VERTICAL / 3 + BORDER_HEIGHT / 3, + } + : { left: BAR_WIDTH / 3 + BORDER_WIDTH / 3, top: BORDER_HEIGHT / 3 }; - const obj = { - clientWidth: clientWidth, - clientHeight: clientHeight, - canvasWidth: canvasWidth, - totalWidth: totalWidthScaled, - totalHeight: totalHeightScaled, - gameDrawBox: gameDrawBox, - globalAttribute: core.status.globalAttribute || core.initStatus.globalAttribute, - }; + const obj = { + clientWidth: clientWidth, + clientHeight: clientHeight, + canvasWidth: canvasWidth, + totalWidth: totalWidthScaled, + totalHeight: totalHeightScaled, + gameDrawBox: gameDrawBox, + globalAttribute: + core.status.globalAttribute || core.initStatus.globalAttribute, + }; - _resize_gameGroup(obj); - _resize_canvas(obj); + _resize_gameGroup(obj); + _resize_canvas(obj); - if (core.status.automaticRoute == null) core.status.automaticRoute = {}; - core.updateStatusBar(); - if (main.dom.CGUI && main.dom.CGUI.style.display === "block") - core.ui.CG.update(); - if (main.dom.music && main.dom.music.style.display === "block") - core.ui.music.update(); - if (main.dom.cgText && main.dom.cgText.style.display === "block") - core.ui.cgText.update(); - }; + if (core.status.automaticRoute == null) core.status.automaticRoute = {}; + core.updateStatusBar(); + if (main.dom.CGUI && main.dom.CGUI.style.display === "block") + core.ui.CG.update(); + if (main.dom.music && main.dom.music.style.display === "block") + core.ui.music.update(); + if (main.dom.cgText && main.dom.cgText.style.display === "block") + core.ui.cgText.update(); + }; - class StatusBar { - constructor() { - //道具栏列表 - this.itemMx = [ - //空位用‘none’填充,当前ui至多4列6行 - ["book", "wand", "none", "fly"], - ["cross", "superPotion", "pickaxe"], - ["bomb", "centerFly", "upFly"], - ["none", "none", "none"], - ["downFly", "knife", "snow"], - ["bigKey", "earthquake", "coin"], - ]; - } - //初始化内容(工具栏/录像操作执行函数) - init() { - this.toolbarAction = [ - [ - main.core.openKeyBoard, - main.core.openQuickShop, - core.openToolbox, - core.doSL, - ], - [main.core.openSettings, main.core.save, main.core.load, core.doSL], - ]; - this.replayAction = [ - [core.triggerReplay, core.stopReplay, core.rewindReplay], - [core.speedDownReplay, core.speedUpReplay, core.saveReplay], - ]; - } - //更新 - update() { - this._update_background(); //更新背景 - this._update_props(); //更新属性 - //this._update_items(); //更新道具 - //this._update_equips(); //更新装备 - //this._update_keys(); //更新钥匙 - //this._update_infoWindow(); //更新道具说明 - this._update_toolBox(); //更新工具栏 - this._redrawMap(); - } - _redrawMap() { - if (core.domStyle.isVertical) { - core.clearMap( - uictx, - MAP_BLOCK_LEFT_VERTICAL, - MAP_BLOCK_TOP_VERTICAL, - 340, - 360 - ); - this._update_map(); - uictx.globalAlpha = globalAlphafloor / 100; - core.drawImage( - uictx, - "green.webp", - MAP_BLOCK_LEFT_VERTICAL + 125, - MAP_BLOCK_TOP_VERTICAL + 170 - ); - uictx.globalAlpha = 1; - } else { - core.clearMap(uictx, MAP_BLOCK_LEFT, MAP_BLOCK_TOP, 340, 360); - this._update_map(); - uictx.globalAlpha = globalAlphafloor / 100; - core.drawImage( - uictx, - "green.webp", - MAP_BLOCK_LEFT + 150, - MAP_BLOCK_TOP + 170 - ); - uictx.globalAlpha = 1; - } - } - //更新背景 - _update_background() { - if (core.domStyle.isVertical) { - bgctx.canvas.width = GAMEVIEW_WIDTH_VERTICAL; - bgctx.canvas.height = GAMEVIEW_HEIGHT_VERTICAL; - uictx.canvas.width = GAMEVIEW_WIDTH_VERTICAL; - uictx.canvas.height = GAMEVIEW_HEIGHT_VERTICAL; + class StatusBar { + constructor() { + //道具栏列表 + this.itemMx = [ + //空位用‘none’填充,当前ui至多4列6行 + ["book", "wand", "none", "fly"], + ["cross", "superPotion", "pickaxe"], + ["bomb", "centerFly", "upFly"], + ["none", "none", "none"], + ["downFly", "knife", "snow"], + ["bigKey", "earthquake", "coin"], + ]; + } + //初始化内容(工具栏/录像操作执行函数) + init() { + this.toolbarAction = [ + [ + main.core.openKeyBoard, + main.core.openQuickShop, + core.openToolbox, + core.doSL, + ], + [main.core.openSettings, main.core.save, main.core.load, core.doSL], + ]; + this.replayAction = [ + [core.triggerReplay, core.stopReplay, core.rewindReplay], + [core.speedDownReplay, core.speedUpReplay, core.saveReplay], + ]; + } + //更新 + update() { + this._update_background(); //更新背景 + this._update_props(); //更新属性 + //this._update_items(); //更新道具 + //this._update_equips(); //更新装备 + //this._update_keys(); //更新钥匙 + //this._update_infoWindow(); //更新道具说明 + this._update_toolBox(); //更新工具栏 + this._redrawMap(); + } + _redrawMap() { + if (core.domStyle.isVertical) { + core.clearMap( + uictx, + MAP_BLOCK_LEFT_VERTICAL, + MAP_BLOCK_TOP_VERTICAL, + 340, + 360 + ); + this._update_map(); + uictx.globalAlpha = globalAlphafloor / 100; + core.drawImage( + uictx, + "green.webp", + MAP_BLOCK_LEFT_VERTICAL + 125, + MAP_BLOCK_TOP_VERTICAL + 170 + ); + uictx.globalAlpha = 1; + } else { + core.clearMap(uictx, MAP_BLOCK_LEFT, MAP_BLOCK_TOP, 340, 360); + this._update_map(); + uictx.globalAlpha = globalAlphafloor / 100; + core.drawImage( + uictx, + "green.webp", + MAP_BLOCK_LEFT + 150, + MAP_BLOCK_TOP + 170 + ); + uictx.globalAlpha = 1; + } + } + //更新背景 + _update_background() { + if (core.domStyle.isVertical) { + bgctx.canvas.width = GAMEVIEW_WIDTH_VERTICAL; + bgctx.canvas.height = GAMEVIEW_HEIGHT_VERTICAL; + uictx.canvas.width = GAMEVIEW_WIDTH_VERTICAL; + uictx.canvas.height = GAMEVIEW_HEIGHT_VERTICAL; - const bg = core.material.images.images["status.webp"]; //竖屏背景(上) - bgctx.drawImage( - bg, - 0, - 0, - GAMEVIEW_WIDTH_VERTICAL, - BAR_HEIGHT_VERTICAL - ); - const bg2 = core.material.images.images["status.webp"]; //竖屏背景(下) - bgctx.drawImage( - bg2, - 0, - BAR_HEIGHT_VERTICAL + GAMEVIEW_WIDTH_VERTICAL, - GAMEVIEW_WIDTH_VERTICAL, - BAR_HEIGHT_VERTICAL - ); - bgctx.globalAlpha = globalAlpha; - bgctx.globalAlpha = 1; - core.setTextAlign("outerUI", "center"); - } else { - bgctx.canvas.width = GAMEVIEW_WIDTH; - bgctx.canvas.height = GAMEVIEW_HEIGHT; - uictx.canvas.width = GAMEVIEW_WIDTH; - uictx.canvas.height = GAMEVIEW_HEIGHT; + const bg = core.material.images.images["status.webp"]; //竖屏背景(上) + bgctx.drawImage( + bg, + 0, + 0, + GAMEVIEW_WIDTH_VERTICAL, + BAR_HEIGHT_VERTICAL + ); + const bg2 = core.material.images.images["status.webp"]; //竖屏背景(下) + bgctx.drawImage( + bg2, + 0, + BAR_HEIGHT_VERTICAL + GAMEVIEW_WIDTH_VERTICAL, + GAMEVIEW_WIDTH_VERTICAL, + BAR_HEIGHT_VERTICAL + ); + bgctx.globalAlpha = globalAlpha; + bgctx.globalAlpha = 1; + core.setTextAlign("outerUI", "center"); + } else { + bgctx.canvas.width = GAMEVIEW_WIDTH; + bgctx.canvas.height = GAMEVIEW_HEIGHT; + uictx.canvas.width = GAMEVIEW_WIDTH; + uictx.canvas.height = GAMEVIEW_HEIGHT; - const bg = core.material.images.images["status.webp"]; //横屏背景(左) - bgctx.drawImage(bg, 0, 0, BAR_WIDTH, GAMEVIEW_HEIGHT); - const bg2 = core.material.images.images["status.webp"]; //横屏背景(右) - bgctx.drawImage( - bg2, - BAR_WIDTH + GAMEVIEW_HEIGHT, - 0, - BAR_WIDTH, - GAMEVIEW_HEIGHT - ); - bgctx.globalAlpha = globalAlpha; + const bg = core.material.images.images["status.webp"]; //横屏背景(左) + bgctx.drawImage(bg, 0, 0, BAR_WIDTH, GAMEVIEW_HEIGHT); + const bg2 = core.material.images.images["status.webp"]; //横屏背景(右) + bgctx.drawImage( + bg2, + BAR_WIDTH + GAMEVIEW_HEIGHT, + 0, + BAR_WIDTH, + GAMEVIEW_HEIGHT + ); + bgctx.globalAlpha = globalAlpha; - bgctx.globalAlpha = 1; - core.setTextAlign("outerUI", "center"); - } - } - // 更新属性 - _update_props(updatedFloorTitle) { - if (!updatedFloorTitle && core.status.floorId) { - updatedFloorTitle = core.status.maps[core.status.floorId].title; - } - const statusList = ["hp", "atk", "def", "money"]; //属性列表,图标在函数复写core.statusBar.icons中声明,数字为project\materials\icons.png中的图标序号(可使用便捷ps追加,第一个序号为0) - const drawStatusList = (baseX, baseY) => { - let curh = baseY; - core.setTextAlign("outerUI", "right"); - statusList.forEach((item) => { - // 绘制图标 - core.drawIcon( - "outerUI", - item, - baseX - 95 * 3, - curh - 18 * 3, - 22 * 3, - 22 * 3 - ); + bgctx.globalAlpha = 1; + core.setTextAlign("outerUI", "center"); + } + } + // 更新属性 + _update_props(updatedFloorTitle) { + if (!updatedFloorTitle && core.status.floorId) { + updatedFloorTitle = core.status.maps[core.status.floorId].title; + } + const statusList = ["hp", "atk", "def", "money"]; //属性列表,图标在函数复写core.statusBar.icons中声明,数字为project\materials\icons.png中的图标序号(可使用便捷ps追加,第一个序号为0) + const drawStatusList = (baseX, baseY) => { + let curh = baseY; + core.setTextAlign("outerUI", "right"); + statusList.forEach((item) => { + // 绘制图标 + core.drawIcon( + "outerUI", + item, + baseX - 95 * 3, + curh - 18 * 3, + 22 * 3, + 22 * 3 + ); - // 四舍五入 - core.status.hero[item] = Math.round(core.status.hero[item]); - // 大数据格式化 - core.fillBoldText1( - "outerUI", - core.getRealStatus(item), - baseX, - curh, - TEXT_COLOR, - "#000000", - 6 - ); - curh += 24 * 3; - if (curh > 130 * 3 && core.domStyle.isVertical) { - curh = 24 * 3; - baseX += 105 * 3; - } - }); - core.setTextAlign("outerUI", "center"); - }; - if (core.domStyle.isVertical) { - core.clearMap("outerUI", 10 * 3, 0, 210 * 3, 120 * 3); - core.setFont("outerUI", "bold 42px Verdana"); - if (updatedFloorTitle) { - core.fillBoldText1( - "outerUI", - updatedFloorTitle, - 60 * 3, - 22 * 3, - TEXT_COLOR, - "#000000", - 6 - ); - } - //drawStatusList(96 * 3, 46 * 3); - //core.drawImage("outerUI", "lane1.png", 0, 0) - core.drawImage("outerUI", "cao.webp", 0, 0); - } else { - core.clearMap("outerUI", 10 * 3, 40 * 3, 105 * 3, 250 * 3); - core.setFont("outerUI", "bold 48px Verdana"); - if (updatedFloorTitle) { - core.fillBoldText1( - "outerUI", - updatedFloorTitle, - 62 * 3, - 41 * 3, - TEXT_COLOR, - "#000000", - 6 - ); - } - //drawStatusList(110 * 3, 93 * 3); - //core.drawImage("outerUI", "lane1.png", 0, 30) - core.drawImage( - "outerUI", - "cao.webp", - 0, - 0, - 400, - 350, - 0, - 30, - 360, - 315 - ); - } - } - _update_items() { - //更新道具栏 - const drawItemMx = (drawFn) => { - for (let i = 0; i < this.itemMx.length; i++) { - for (let j = 0; j < this.itemMx[i].length; j++) { - var item = this.itemMx[i][j]; - drawFn(i, j, item); - } - } - }; - const drawItem = (item, posx, posy) => { - const icon = core.material.icons.items[item], - image = core.material.images.items; - core.drawImage( - "outerUI", - image, - 0, - 32 * icon, - 32, - 32, - posx, - posy, - 30 * 3, - 30 * 3 - ); - const cnt = core.itemCount(item); - if ( - (core.items.items[item].cls === "tools" && cnt > 1) || - FORCE_COUNTABLE_ITEMS.includes(item) - ) { - core.fillText( - "outerUI", - cnt, - posx + 25 * 3, - posy + 28 * 3, - "#FFFFFF", - "bold 36px Verdana" - ); - } - }; - if (core.domStyle.isVertical) { - core.clearMap( - "outerUI", - ITEM_BOX_LEFT_VERTICAL, - ITEM_BOX_TOP_VERTICAL, - 185 * 3, - 125 * 3 - ); + // 四舍五入 + core.status.hero[item] = Math.round(core.status.hero[item]); + // 大数据格式化 + core.fillBoldText1( + "outerUI", + core.getRealStatus(item), + baseX, + curh, + TEXT_COLOR, + "#000000", + 6 + ); + curh += 24 * 3; + if (curh > 130 * 3 && core.domStyle.isVertical) { + curh = 24 * 3; + baseX += 105 * 3; + } + }); + core.setTextAlign("outerUI", "center"); + }; + if (core.domStyle.isVertical) { + core.clearMap("outerUI", 10 * 3, 0, 210 * 3, 120 * 3); + core.setFont("outerUI", "bold 42px Verdana"); + if (updatedFloorTitle) { + core.fillBoldText1( + "outerUI", + updatedFloorTitle, + 60 * 3, + 22 * 3, + TEXT_COLOR, + "#000000", + 6 + ); + } + //drawStatusList(96 * 3, 46 * 3); + //core.drawImage("outerUI", "lane1.png", 0, 0) + core.drawImage("outerUI", "cao.webp", 0, 0); + } else { + core.clearMap("outerUI", 10 * 3, 40 * 3, 105 * 3, 250 * 3); + core.setFont("outerUI", "bold 48px Verdana"); + if (updatedFloorTitle) { + core.fillBoldText1( + "outerUI", + updatedFloorTitle, + 62 * 3, + 41 * 3, + TEXT_COLOR, + "#000000", + 6 + ); + } + //drawStatusList(110 * 3, 93 * 3); + //core.drawImage("outerUI", "lane1.png", 0, 30) + core.drawImage( + "outerUI", + "cao.webp", + 0, + 0, + 400, + 350, + 0, + 30, + 360, + 315 + ); + } + } + _update_items() { + //更新道具栏 + const drawItemMx = (drawFn) => { + for (let i = 0; i < this.itemMx.length; i++) { + for (let j = 0; j < this.itemMx[i].length; j++) { + var item = this.itemMx[i][j]; + drawFn(i, j, item); + } + } + }; + const drawItem = (item, posx, posy) => { + const icon = core.material.icons.items[item], + image = core.material.images.items; + core.drawImage( + "outerUI", + image, + 0, + 32 * icon, + 32, + 32, + posx, + posy, + 30 * 3, + 30 * 3 + ); + const cnt = core.itemCount(item); + if ( + (core.items.items[item].cls === "tools" && cnt > 1) || + FORCE_COUNTABLE_ITEMS.includes(item) + ) { + core.fillText( + "outerUI", + cnt, + posx + 25 * 3, + posy + 28 * 3, + "#FFFFFF", + "bold 36px Verdana" + ); + } + }; + if (core.domStyle.isVertical) { + core.clearMap( + "outerUI", + ITEM_BOX_LEFT_VERTICAL, + ITEM_BOX_TOP_VERTICAL, + 185 * 3, + 125 * 3 + ); - drawItemMx((i, j, item) => { - if (core.hasItem(item)) { - const posx = ITEM_BOX_LEFT_VERTICAL + i * 30 * 3, - posy = ITEM_BOX_TOP_VERTICAL + j * 31 * 3; - drawItem(item, posx, posy); - } - }); - } else { - core.clearMap( - "outerUI", - ITEM_BOX_LEFT, - ITEM_BOX_TOP, - 125 * 3, - 185 * 3 - ); + drawItemMx((i, j, item) => { + if (core.hasItem(item)) { + const posx = ITEM_BOX_LEFT_VERTICAL + i * 30 * 3, + posy = ITEM_BOX_TOP_VERTICAL + j * 31 * 3; + drawItem(item, posx, posy); + } + }); + } else { + core.clearMap( + "outerUI", + ITEM_BOX_LEFT, + ITEM_BOX_TOP, + 125 * 3, + 185 * 3 + ); - drawItemMx((i, j, item) => { - if (core.hasItem(item)) { - const posx = ITEM_BOX_LEFT + j * 30 * 3, - posy = ITEM_BOX_TOP + i * 31 * 3; - drawItem(item, posx, posy); - } - }); - } - } + drawItemMx((i, j, item) => { + if (core.hasItem(item)) { + const posx = ITEM_BOX_LEFT + j * 30 * 3, + posy = ITEM_BOX_TOP + i * 31 * 3; + drawItem(item, posx, posy); + } + }); + } + } - _update_map(floorId = core.status.floorId) { - const x = core.domStyle.isVertical ? - MAP_BLOCK_LEFT_VERTICAL : - MAP_BLOCK_LEFT; - const y = core.domStyle.isVertical ? - MAP_BLOCK_TOP_VERTICAL : - MAP_BLOCK_TOP; + _update_map(floorId = core.status.floorId) { + const x = core.domStyle.isVertical + ? MAP_BLOCK_LEFT_VERTICAL + : MAP_BLOCK_LEFT; + const y = core.domStyle.isVertical + ? MAP_BLOCK_TOP_VERTICAL + : MAP_BLOCK_TOP; - if (!floorId) return; - const info = core.plugin.getMapDrawInfo(floorId, Infinity, true); - core.setTextAlign("outerUI", "center"); + if (!floorId) return; + const info = core.plugin.getMapDrawInfo(floorId, Infinity, true); + core.setTextAlign("outerUI", "center"); - core.plugin.drawSmallMap(uictx, info, floorId, x, y, 300, 300); - } + core.plugin.drawSmallMap(uictx, info, floorId, x, y, 300, 300); + } - _update_equips() { - return; - core.setFont("outerUI", "bold 48px Verdana"); - const drawEquip = (baseX, baseY, id, color, back) => { - if (!id) - core.fillText( - "outerUI", - back, - baseX + 20 * 3, - baseY + 22 * 3, - color - ); - else { - var icon = core.material.icons.items[id]; - core.drawImage( - "outerUI", - core.material.images.items, - 0, - 32 * icon, - 32, - 32, - baseX + 5 * 3, - baseY, - 32 * 3, - 32 * 3 - ); - } - }; - if (core.domStyle.isVertical) { - core.clearMap( - "outerUI", - EQUIP_BLOCK_LEFT_VERTICAL, - EQUIP_BLOCK_TOP_VERTICAL, - 90 * 3, - 130 * 3 - ); - drawEquip( - EQUIP_BLOCK_LEFT_VERTICAL, - EQUIP_BLOCK_TOP_VERTICAL, - core.getEquip(0), - "#D1CEFF", - "无" - ); - drawEquip( - EQUIP_BLOCK_LEFT_VERTICAL + 45 * 3, - EQUIP_BLOCK_TOP_VERTICAL, - core.getEquip(1), - "#D1CEFF", - "无" - ); - drawEquip( - EQUIP_BLOCK_LEFT_VERTICAL, - EQUIP_BLOCK_TOP_VERTICAL + 45 * 3, - core.getEquip(2), - "#D1CEFF", - "无" - ); - drawEquip( - EQUIP_BLOCK_LEFT_VERTICAL + 45 * 3, - EQUIP_BLOCK_TOP_VERTICAL + 45 * 3, - core.getEquip(3), - "#D1CEFF", - "无" - ); - drawEquip( - EQUIP_BLOCK_LEFT_VERTICAL, - EQUIP_BLOCK_TOP_VERTICAL + 90 * 3, - core.getEquip(4), - "#D1CEFF", - "无" - ); - drawEquip( - EQUIP_BLOCK_LEFT_VERTICAL + 45 * 3, - EQUIP_BLOCK_TOP_VERTICAL + 90 * 3, - core.getEquip(5), - "#D1CEFF", - "无" - ); - } else { - core.clearMap( - "outerUI", - EQUIP_BLOCK_LEFT, - EQUIP_BLOCK_TOP, - 130 * 3, - 95 * 3 - ); - drawEquip( - EQUIP_BLOCK_LEFT, - EQUIP_BLOCK_TOP, - core.getEquip(0), - "#D1CEFF", - "无" - ); - drawEquip( - EQUIP_BLOCK_LEFT + 42 * 3, - EQUIP_BLOCK_TOP, - core.getEquip(1), - "#D1CEFF", - "无" - ); - drawEquip( - EQUIP_BLOCK_LEFT + 85 * 3, - EQUIP_BLOCK_TOP, - core.getEquip(2), - "#D1CEFF", - "无" - ); - drawEquip( - EQUIP_BLOCK_LEFT, - EQUIP_BLOCK_TOP + 45 * 3, - core.getEquip(3), - "#D1CEFF", - "无" - ); - drawEquip( - EQUIP_BLOCK_LEFT + 42 * 3, - EQUIP_BLOCK_TOP + 45 * 3, - core.getEquip(4), - "#D1CEFF", - "无" - ); - drawEquip( - EQUIP_BLOCK_LEFT + 85 * 3, - EQUIP_BLOCK_TOP + 45 * 3, - core.getEquip(5), - "#D1CEFF", - "无" - ); - } - } - _update_keys() { - const drawKeyList = (baseX, baseY) => { - const todraw = [], - keyList = ["yellowKey", "blueKey", "redKey", "greenKey"]; - let total = 0; - keyList.forEach(function (key, i) { - todraw[i] = core.itemCount(key); - total += todraw[i]; - }); + _update_equips() { + return; + core.setFont("outerUI", "bold 48px Verdana"); + const drawEquip = (baseX, baseY, id, color, back) => { + if (!id) + core.fillText( + "outerUI", + back, + baseX + 20 * 3, + baseY + 22 * 3, + color + ); + else { + var icon = core.material.icons.items[id]; + core.drawImage( + "outerUI", + core.material.images.items, + 0, + 32 * icon, + 32, + 32, + baseX + 5 * 3, + baseY, + 32 * 3, + 32 * 3 + ); + } + }; + if (core.domStyle.isVertical) { + core.clearMap( + "outerUI", + EQUIP_BLOCK_LEFT_VERTICAL, + EQUIP_BLOCK_TOP_VERTICAL, + 90 * 3, + 130 * 3 + ); + drawEquip( + EQUIP_BLOCK_LEFT_VERTICAL, + EQUIP_BLOCK_TOP_VERTICAL, + core.getEquip(0), + "#D1CEFF", + "无" + ); + drawEquip( + EQUIP_BLOCK_LEFT_VERTICAL + 45 * 3, + EQUIP_BLOCK_TOP_VERTICAL, + core.getEquip(1), + "#D1CEFF", + "无" + ); + drawEquip( + EQUIP_BLOCK_LEFT_VERTICAL, + EQUIP_BLOCK_TOP_VERTICAL + 45 * 3, + core.getEquip(2), + "#D1CEFF", + "无" + ); + drawEquip( + EQUIP_BLOCK_LEFT_VERTICAL + 45 * 3, + EQUIP_BLOCK_TOP_VERTICAL + 45 * 3, + core.getEquip(3), + "#D1CEFF", + "无" + ); + drawEquip( + EQUIP_BLOCK_LEFT_VERTICAL, + EQUIP_BLOCK_TOP_VERTICAL + 90 * 3, + core.getEquip(4), + "#D1CEFF", + "无" + ); + drawEquip( + EQUIP_BLOCK_LEFT_VERTICAL + 45 * 3, + EQUIP_BLOCK_TOP_VERTICAL + 90 * 3, + core.getEquip(5), + "#D1CEFF", + "无" + ); + } else { + core.clearMap( + "outerUI", + EQUIP_BLOCK_LEFT, + EQUIP_BLOCK_TOP, + 130 * 3, + 95 * 3 + ); + drawEquip( + EQUIP_BLOCK_LEFT, + EQUIP_BLOCK_TOP, + core.getEquip(0), + "#D1CEFF", + "无" + ); + drawEquip( + EQUIP_BLOCK_LEFT + 42 * 3, + EQUIP_BLOCK_TOP, + core.getEquip(1), + "#D1CEFF", + "无" + ); + drawEquip( + EQUIP_BLOCK_LEFT + 85 * 3, + EQUIP_BLOCK_TOP, + core.getEquip(2), + "#D1CEFF", + "无" + ); + drawEquip( + EQUIP_BLOCK_LEFT, + EQUIP_BLOCK_TOP + 45 * 3, + core.getEquip(3), + "#D1CEFF", + "无" + ); + drawEquip( + EQUIP_BLOCK_LEFT + 42 * 3, + EQUIP_BLOCK_TOP + 45 * 3, + core.getEquip(4), + "#D1CEFF", + "无" + ); + drawEquip( + EQUIP_BLOCK_LEFT + 85 * 3, + EQUIP_BLOCK_TOP + 45 * 3, + core.getEquip(5), + "#D1CEFF", + "无" + ); + } + } + _update_keys() { + const drawKeyList = (baseX, baseY) => { + const todraw = [], + keyList = ["yellowKey", "blueKey", "redKey", "greenKey"]; + let total = 0; + keyList.forEach(function (key, i) { + todraw[i] = core.itemCount(key); + total += todraw[i]; + }); - let dn = 3; - for (let i = 0; i <= dn; i++) { - let delta = i * 32 * 3; + let dn = 3; + for (let i = 0; i <= dn; i++) { + let delta = i * 32 * 3; - if (core.domStyle.isVertical) { - this.drawKey(keyList[i], baseX, baseY + delta); - } else { - this.drawKey(keyList[i], baseX + delta, baseY); - } + if (core.domStyle.isVertical) { + this.drawKey(keyList[i], baseX, baseY + delta); + } else { + this.drawKey(keyList[i], baseX + delta, baseY); + } - core.setFont("outerUI", "bold 48px Verdana"); - core.setTextAlign("outerUI", "left"); - if (core.domStyle.isVertical) { - core.fillText( - "outerUI", - todraw[i], - baseX + 20 * 3, - baseY + 14 * 3 + delta, - TEXT_COLOR - ); - } else { - core.fillText( - "outerUI", - todraw[i], - baseX + delta, - baseY + 32 * 3, - TEXT_COLOR - ); - } - } - }; - if (core.domStyle.isVertical) { - core.clearMap( - "outerUI", - KEY_BLOCK_LEFT_VERTICAL, - KEY_BLOCK_TOP_VERTICAL, - 45 * 3, - 130 * 3 - ); - drawKeyList( - KEY_BLOCK_LEFT_VERTICAL + 3 * 3, - KEY_BLOCK_TOP_VERTICAL + 5 * 3 - ); - } else { - core.clearMap( - "outerUI", - KEY_BLOCK_LEFT, - KEY_BLOCK_TOP, - 130 * 3, - 45 * 3 - ); - drawKeyList(KEY_BLOCK_LEFT + 10 * 3, KEY_BLOCK_TOP); - } - } - drawKey(key, x, y) { - let sx = 0, - sy = 0; + core.setFont("outerUI", "bold 48px Verdana"); + core.setTextAlign("outerUI", "left"); + if (core.domStyle.isVertical) { + core.fillText( + "outerUI", + todraw[i], + baseX + 20 * 3, + baseY + 14 * 3 + delta, + TEXT_COLOR + ); + } else { + core.fillText( + "outerUI", + todraw[i], + baseX + delta, + baseY + 32 * 3, + TEXT_COLOR + ); + } + } + }; + if (core.domStyle.isVertical) { + core.clearMap( + "outerUI", + KEY_BLOCK_LEFT_VERTICAL, + KEY_BLOCK_TOP_VERTICAL, + 45 * 3, + 130 * 3 + ); + drawKeyList( + KEY_BLOCK_LEFT_VERTICAL + 3 * 3, + KEY_BLOCK_TOP_VERTICAL + 5 * 3 + ); + } else { + core.clearMap( + "outerUI", + KEY_BLOCK_LEFT, + KEY_BLOCK_TOP, + 130 * 3, + 45 * 3 + ); + drawKeyList(KEY_BLOCK_LEFT + 10 * 3, KEY_BLOCK_TOP); + } + } + drawKey(key, x, y) { + let sx = 0, + sy = 0; - if (key == "yellowKey") sx += 13; - else if (key == "blueKey") sx += 26; - else if (key == "greenKey") sx += 39; + if (key == "yellowKey") sx += 13; + else if (key == "blueKey") sx += 26; + else if (key == "greenKey") sx += 39; - core.drawImage( - "outerUI", - "maba.webp", - sx, - sy, - 13, - 26, - x, - y, - 13 * 3, - 26 * 3 - ); - } - _update_infoWindow() { - const itemId = this.selectedItem; - let text = ""; - if (this.selectedItem) { - text = core.replaceText(core.material.items[itemId]?.text); - if (text[0] == "," || text[0] == ",") text = text.substring(1); - } - if (core.domStyle.isVertical) { - core.clearMap( - "outerUI", - INFO_BLOCK_LEFT_VERTICAL, - INFO_BLOCK_TOP_VERTICAL, - 300 * 3, - 120 * 3 - ); + core.drawImage( + "outerUI", + "maba.webp", + sx, + sy, + 13, + 26, + x, + y, + 13 * 3, + 26 * 3 + ); + } + _update_infoWindow() { + const itemId = this.selectedItem; + let text = ""; + if (this.selectedItem) { + text = core.replaceText(core.material.items[itemId]?.text); + if (text[0] == "," || text[0] == ",") text = text.substring(1); + } + if (core.domStyle.isVertical) { + core.clearMap( + "outerUI", + INFO_BLOCK_LEFT_VERTICAL, + INFO_BLOCK_TOP_VERTICAL, + 300 * 3, + 120 * 3 + ); - if (this.selectedItem) { - const icon = core.material.icons.items[itemId]; - core.setTextAlign("outerUI", "left"); - core.fillText( - "outerUI", - core.material.items[itemId].name, - INFO_BLOCK_LEFT_VERTICAL + 50 * 3, - INFO_BLOCK_TOP_VERTICAL + 27 * 3, - "#D1CEFF" - ); - core.drawImage( - "outerUI", - core.material.images.items, - 0, - 32 * icon, - 32, - 32, - INFO_BLOCK_LEFT_VERTICAL + 10 * 3, - INFO_BLOCK_TOP_VERTICAL + 8 * 3, - 32 * 3, - 32 * 3 - ); - core.ui.drawTextContent("outerUI", text, { - left: INFO_BLOCK_LEFT_VERTICAL + 10 * 3, - top: INFO_BLOCK_TOP_VERTICAL + 40 * 3, - maxWidth: 275 * 3, - color: "#D1CEFF", - fontSize: 36, - }); - } - } else { - core.clearMap( - "outerUI", - INFO_BLOCK_LEFT, - INFO_BLOCK_TOP, - 115 * 3, - 230 * 3 - ); + if (this.selectedItem) { + const icon = core.material.icons.items[itemId]; + core.setTextAlign("outerUI", "left"); + core.fillText( + "outerUI", + core.material.items[itemId].name, + INFO_BLOCK_LEFT_VERTICAL + 50 * 3, + INFO_BLOCK_TOP_VERTICAL + 27 * 3, + "#D1CEFF" + ); + core.drawImage( + "outerUI", + core.material.images.items, + 0, + 32 * icon, + 32, + 32, + INFO_BLOCK_LEFT_VERTICAL + 10 * 3, + INFO_BLOCK_TOP_VERTICAL + 8 * 3, + 32 * 3, + 32 * 3 + ); + core.ui.drawTextContent("outerUI", text, { + left: INFO_BLOCK_LEFT_VERTICAL + 10 * 3, + top: INFO_BLOCK_TOP_VERTICAL + 40 * 3, + maxWidth: 275 * 3, + color: "#D1CEFF", + fontSize: 36, + }); + } + } else { + core.clearMap( + "outerUI", + INFO_BLOCK_LEFT, + INFO_BLOCK_TOP, + 115 * 3, + 230 * 3 + ); - if (this.selectedItem) { - const icon = core.material.icons.items[itemId]; - core.setTextAlign("outerUI", "center"); - core.fillText( - "outerUI", - core.material.items[itemId].name, - INFO_BLOCK_LEFT + 60 * 3, - INFO_BLOCK_TOP + 25 * 3, - "#D1CEFF" - ); - core.drawImage( - "outerUI", - core.material.images.items, - 0, - 32 * icon, - 32, - 32, - INFO_BLOCK_LEFT + 45 * 3, - INFO_BLOCK_TOP + 30 * 3, - 32 * 3, - 32 * 3 - ); - core.ui.drawTextContent("outerUI", text, { - left: INFO_BLOCK_LEFT + 10 * 3, - top: INFO_BLOCK_TOP + 60 * 3, - maxWidth: 105 * 3, - color: "#D1CEFF", - fontSize: 36, - }); - } - } - } - showItemInfo(itemId) { - //展示道具说明 - this.selectedItem = itemId; - this._update_infoWindow(); - } - clearItemInfo() { - //清除道具说明 - this.selectedItem = null; - this._update_infoWindow(); - } - _update_toolBox() { - const tools = core.isReplaying() ? [ - [core.status.replay.pausing ? "play" : "pause", "stop", "rewind"], - ["speedDown", "speedUp", "save"], - ] : [ - ["keyboard", "shop", "pack", "T332"], - ["settings", "save", "load", "T331"], - ]; - if (core.domStyle.isVertical) { - core.clearMap( - "outerUI", - TOOL_BOX_LEFT_VERTICAL, - TOOL_BOX_TOP_VERTICAL, - 115, - 130 - ); + if (this.selectedItem) { + const icon = core.material.icons.items[itemId]; + core.setTextAlign("outerUI", "center"); + core.fillText( + "outerUI", + core.material.items[itemId].name, + INFO_BLOCK_LEFT + 60 * 3, + INFO_BLOCK_TOP + 25 * 3, + "#D1CEFF" + ); + core.drawImage( + "outerUI", + core.material.images.items, + 0, + 32 * icon, + 32, + 32, + INFO_BLOCK_LEFT + 45 * 3, + INFO_BLOCK_TOP + 30 * 3, + 32 * 3, + 32 * 3 + ); + core.ui.drawTextContent("outerUI", text, { + left: INFO_BLOCK_LEFT + 10 * 3, + top: INFO_BLOCK_TOP + 60 * 3, + maxWidth: 105 * 3, + color: "#D1CEFF", + fontSize: 36, + }); + } + } + } + showItemInfo(itemId) { + //展示道具说明 + this.selectedItem = itemId; + this._update_infoWindow(); + } + clearItemInfo() { + //清除道具说明 + this.selectedItem = null; + this._update_infoWindow(); + } + _update_toolBox() { + const tools = core.isReplaying() + ? [ + [core.status.replay.pausing ? "play" : "pause", "stop", "rewind"], + ["speedDown", "speedUp", "save"], + ] + : [ + ["keyboard", "shop", "pack", "T332"], + ["settings", "save", "load", "T331"], + ]; + if (core.domStyle.isVertical) { + core.clearMap( + "outerUI", + TOOL_BOX_LEFT_VERTICAL, + TOOL_BOX_TOP_VERTICAL, + 115, + 130 + ); - for (let i = 0; i < tools.length; i++) { - for (let j = 0; j < tools[i].length; j++) { - core.drawIcon( - "outerUI", - tools[i][j], - TOOL_BOX_LEFT_VERTICAL + i * 31 * 3, - TOOL_BOX_TOP_VERTICAL + j * 31 * 3, - 30 * 3, - 30 * 3 - ); - } - } - } else { - core.clearMap( - "outerUI", - TOOL_BOX_LEFT, - TOOL_BOX_TOP, - 130 * 3, - 80 * 3 - ); + for (let i = 0; i < tools.length; i++) { + for (let j = 0; j < tools[i].length; j++) { + core.drawIcon( + "outerUI", + tools[i][j], + TOOL_BOX_LEFT_VERTICAL + i * 31 * 3, + TOOL_BOX_TOP_VERTICAL + j * 31 * 3, + 30 * 3, + 30 * 3 + ); + } + } + } else { + core.clearMap( + "outerUI", + TOOL_BOX_LEFT, + TOOL_BOX_TOP, + 130 * 3, + 80 * 3 + ); - for (let i = 0; i < tools.length; i++) { - for (let j = 0; j < tools[i].length; j++) { - core.drawIcon( - "outerUI", - tools[i][j], - TOOL_BOX_LEFT + j * 31 * 3, - TOOL_BOX_TOP + i * 31 * 3, - 30 * 3, - 30 * 3 - ); - } - } - } - } - onclick(x, y) { - const makeBox = ([x, y], [w, h]) => { - return [ - [x, y], - [x + w, y + h], - ]; - }; - const gridify = ([x, y], [gw, gh]) => { - return [Math.floor(x / gw), Math.floor(y / gh)]; - }; - const useItem = (itemId) => { - if (!core.hasItem(itemId)) return; + for (let i = 0; i < tools.length; i++) { + for (let j = 0; j < tools[i].length; j++) { + core.drawIcon( + "outerUI", + tools[i][j], + TOOL_BOX_LEFT + j * 31 * 3, + TOOL_BOX_TOP + i * 31 * 3, + 30 * 3, + 30 * 3 + ); + } + } + } + } + onclick(x, y) { + const makeBox = ([x, y], [w, h]) => { + return [ + [x, y], + [x + w, y + h], + ]; + }; + const gridify = ([x, y], [gw, gh]) => { + return [Math.floor(x / gw), Math.floor(y / gh)]; + }; + const useItem = (itemId) => { + if (!core.hasItem(itemId)) return; - if (itemId != this.selectedItem) { - this.showItemInfo(itemId); - } else { - switch (itemId) { - case "centerFly": - core.ui._drawCenterFly(); - break; - case "book": - core.openBook(true); - break; - case "wand": - core.insertAction({ - type: "useItem", - id: itemId, - }); - break; - case "fly": - core.useItem(itemId, true); - break; - default: - core.useItem(itemId); - } - } - }; - const inRect = ([x, y], [ - [sx, sy], - [dx, dy] - ]) => { - return sx <= x && x <= dx && sy <= y && y <= dy; - }; - const relativeTo = ([x, y], [ax, ay]) => { - return [x - ax, y - ay]; - }; - const pos = [x, y]; - if (core.domStyle.isVertical) { - const itemBox = makeBox( - [ITEM_BOX_LEFT_VERTICAL, ITEM_BOX_TOP_VERTICAL], - [30 * 6 * 3, 31 * 4 * 3] - ); - if (inRect(pos, itemBox)) { - const [gx, gy] = gridify(relativeTo(pos, itemBox[0]), [ - 30 * 3, - 31 * 3, - ]); - const itemId = this.itemMx[gx][gy]; - if ( - (core.status.event.id == "viewMaps" || - core.status.event.id == "fly") && - itemId === "book" - ) - core.openBook(true); - if ( - core.isReplaying() || - core.status.lockControl || - core.isMoving() - ) - return; - useItem(itemId); - return; - } - const toolBox = makeBox( - [TOOL_BOX_LEFT_VERTICAL, TOOL_BOX_TOP_VERTICAL], - [31 * 2 * 3, 31 * 4 * 3] - ); - if (inRect(pos, toolBox)) { - const [col, row] = gridify(relativeTo(pos, toolBox[0]), [ - 31 * 3, - 31 * 3, - ]); - if (core.isReplaying()) { - this.replayAction[col][row].call(core); - } else if (core.isPlaying()) { - if (col === 0 && row === 3) { - core.doSL("autoSave", "load"); - } else if (col === 1 && row === 3) { - core.doSL("autoSave", "reload"); - } else { - this.toolbarAction[col][row].call(core, true); - } - } - return; - } - const mapBox = makeBox( - [MAP_BLOCK_LEFT_VERTICAL, MAP_BLOCK_TOP_VERTICAL], - [350, 350] - ); - if (inRect(pos, mapBox)) { - if ( - core.isReplaying() || - core.status.lockControl || - core.isMoving() - ) - return; - core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId)); - return; - } - /*const equipBox = makeBox([EQUIP_BLOCK_LEFT_VERTICAL, EQUIP_BLOCK_TOP_VERTICAL], [90 * 3, 130 * 3]) + if (itemId != this.selectedItem) { + this.showItemInfo(itemId); + } else { + switch (itemId) { + case "centerFly": + core.ui._drawCenterFly(); + break; + case "book": + core.openBook(true); + break; + case "wand": + core.insertAction({ + type: "useItem", + id: itemId, + }); + break; + case "fly": + core.useItem(itemId, true); + break; + default: + core.useItem(itemId); + } + } + }; + const inRect = ([x, y], [[sx, sy], [dx, dy]]) => { + return sx <= x && x <= dx && sy <= y && y <= dy; + }; + const relativeTo = ([x, y], [ax, ay]) => { + return [x - ax, y - ay]; + }; + const pos = [x, y]; + if (core.domStyle.isVertical) { + const itemBox = makeBox( + [ITEM_BOX_LEFT_VERTICAL, ITEM_BOX_TOP_VERTICAL], + [30 * 6 * 3, 31 * 4 * 3] + ); + if (inRect(pos, itemBox)) { + const [gx, gy] = gridify(relativeTo(pos, itemBox[0]), [ + 30 * 3, + 31 * 3, + ]); + const itemId = this.itemMx[gx][gy]; + if ( + (core.status.event.id == "viewMaps" || + core.status.event.id == "fly") && + itemId === "book" + ) + core.openBook(true); + if ( + core.isReplaying() || + core.status.lockControl || + core.isMoving() + ) + return; + useItem(itemId); + return; + } + const toolBox = makeBox( + [TOOL_BOX_LEFT_VERTICAL, TOOL_BOX_TOP_VERTICAL], + [31 * 2 * 3, 31 * 4 * 3] + ); + if (inRect(pos, toolBox)) { + const [col, row] = gridify(relativeTo(pos, toolBox[0]), [ + 31 * 3, + 31 * 3, + ]); + if (core.isReplaying()) { + this.replayAction[col][row].call(core); + } else if (core.isPlaying()) { + if (col === 0 && row === 3) { + core.doSL("autoSave", "load"); + } else if (col === 1 && row === 3) { + core.doSL("autoSave", "reload"); + } else { + this.toolbarAction[col][row].call(core, true); + } + } + return; + } + const mapBox = makeBox( + [MAP_BLOCK_LEFT_VERTICAL, MAP_BLOCK_TOP_VERTICAL], + [350, 350] + ); + if (inRect(pos, mapBox)) { + if ( + core.isReplaying() || + core.status.lockControl || + core.isMoving() + ) + return; + core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId)); + return; + } + /*const equipBox = makeBox([EQUIP_BLOCK_LEFT_VERTICAL, EQUIP_BLOCK_TOP_VERTICAL], [90 * 3, 130 * 3]) if (inRect(pos, equipBox)) { if (core.isReplaying() || core.status.lockControl || core.isMoving()) return; core.openEquipbox(true) return; }*/ - } else { - const mapBox = makeBox([MAP_BLOCK_LEFT, MAP_BLOCK_TOP], [350, 350]); - if (inRect(pos, mapBox)) { - if ( - core.isReplaying() || - core.status.lockControl || - core.isMoving() - ) - return; - core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId)); - return; - } - /* + } else { + const mapBox = makeBox([MAP_BLOCK_LEFT, MAP_BLOCK_TOP], [350, 350]); + if (inRect(pos, mapBox)) { + if ( + core.isReplaying() || + core.status.lockControl || + core.isMoving() + ) + return; + core.ui._drawViewMaps(core.floorIds.indexOf(core.status.floorId)); + return; + } + /* const equipBox = makeBox([EQUIP_BLOCK_LEFT, EQUIP_BLOCK_TOP], [130, 95]) if (inRect(pos, equipBox)) { if (core.isReplaying() || core.status.lockControl || core.isMoving()) return; core.openEquipbox(true) return; }*/ - const itemBox = makeBox( - [ITEM_BOX_LEFT, ITEM_BOX_TOP], - [31 * 4 * 3, 30 * 6 * 3] - ); - if (inRect(pos, itemBox)) { - const [gx, gy] = gridify(relativeTo(pos, itemBox[0]), [ - 31 * 3, - 30 * 3, - ]); - const itemId = this.itemMx[gy][gx]; - if ( - (core.status.event.id == "viewMaps" || - core.status.event.id == "fly") && - itemId === "book" - ) - core.openBook(true); - if ( - core.isReplaying() || - core.status.lockControl || - core.isMoving() - ) - return; - useItem(itemId); - return; - } - const toolBox = makeBox( - [TOOL_BOX_LEFT, TOOL_BOX_TOP], - [31 * 4 * 3, 31 * 2 * 3] - ); - if (inRect(pos, toolBox)) { - const [row, col] = gridify(relativeTo(pos, toolBox[0]), [ - 31 * 3, - 31 * 3, - ]); - if (core.isReplaying()) { - this.replayAction[col][row].call(core); - } else if (core.isPlaying()) { - if (col === 0 && row === 3) { - core.doSL("autoSave", "load"); - } else if (col === 1 && row === 3) { - core.doSL("autoSave", "reload"); - } else { - this.toolbarAction[col][row].call(core, true); - } - } - return; - } - } - } - } + const itemBox = makeBox( + [ITEM_BOX_LEFT, ITEM_BOX_TOP], + [31 * 4 * 3, 30 * 6 * 3] + ); + if (inRect(pos, itemBox)) { + const [gx, gy] = gridify(relativeTo(pos, itemBox[0]), [ + 31 * 3, + 30 * 3, + ]); + const itemId = this.itemMx[gy][gx]; + if ( + (core.status.event.id == "viewMaps" || + core.status.event.id == "fly") && + itemId === "book" + ) + core.openBook(true); + if ( + core.isReplaying() || + core.status.lockControl || + core.isMoving() + ) + return; + useItem(itemId); + return; + } + const toolBox = makeBox( + [TOOL_BOX_LEFT, TOOL_BOX_TOP], + [31 * 4 * 3, 31 * 2 * 3] + ); + if (inRect(pos, toolBox)) { + const [row, col] = gridify(relativeTo(pos, toolBox[0]), [ + 31 * 3, + 31 * 3, + ]); + if (core.isReplaying()) { + this.replayAction[col][row].call(core); + } else if (core.isPlaying()) { + if (col === 0 && row === 3) { + core.doSL("autoSave", "load"); + } else if (col === 1 && row === 3) { + core.doSL("autoSave", "reload"); + } else { + this.toolbarAction[col][row].call(core, true); + } + } + return; + } + } + } + } - core.ui.statusBar = new StatusBar(); + core.ui.statusBar = new StatusBar(); - core.control.clearStatusBar = function () { - core.clearMap("outerUI"); - }; - // init() called in `afterLoadResources`. -}, + core.control.clearStatusBar = function () { + core.clearMap("outerUI"); + }; + // init() called in `afterLoadResources`. + }, "override": function () { core.statusBar.icons = { floor: 0, @@ -5264,15 +5279,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = itemText = core.replaceText(itemText); if (itemText[0] == "," || itemText[0] == ",") itemText = itemText.substring(1); - if (itemCls === 'equips' && item.id) { - let text = "" - - switch (item.id) { //此处写道具效果描述\n表示换行 - case 'sword1': - text = "普通攻击属性:物理\n作为主手时:物理攻击=力量+敏捷(" + (core.getRealStatusOrDefault(hero, 'str') + core.getRealStatusOrDefault(hero, 'agi')) + ")\n作为副手时:物理攻击+敏捷(" + core.getRealStatusOrDefault(hero, 'agi') + ")" - break; - } - itemText = text ? '【装备效果】\n' + text : "" + if (itemCls === "equips" && item.id) { + itemText = itemText ? "【装备效果】\n" + itemText : ""; } /* 一个根据道具id修改道具名字(右栏)的例子 * if (item.id == "xxx") itemNameColor = "red"; @@ -5301,8 +5309,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = ); core.setTextAlign(ctx, "left"); core.setTextBaseline(ctx, "middle"); - if (itemCls === 'equips' && item.id) { - itemName = "【" + item.equipCls + "】" + itemName + if (itemCls === "equips" && item.id) { + itemName = "【" + item.equipCls + "】" + itemName; } core.fillText( ctx, @@ -5313,135 +5321,39 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = itemNameFont, itemNameMaxWidth ); - if (!item.equip) core.fillText( - ctx, - "【" + itemClsName + "】", - itemCls_x, - itemCls_middle, - itemClsColor, - itemClsFont - ); + if (!item.equip) + core.fillText( + ctx, + "【" + itemClsName + "】", + itemCls_x, + itemCls_middle, + itemClsColor, + itemClsFont + ); - /*if (core.status.event.id == "equipbox") { + var statusText = ""; + if (core.status.event.id == "equipbox") { var type = item.equip.type; if (typeof type == "string") type = core.getEquipTypeByName(type); var compare = core.compareEquipment(item.id, core.getEquip(type)); + var compare2 + if (item.equipCls === "双手剑") compare2 = core.compareEquipment(null, core.getEquip(1)) if (info.select.action == "unload") compare = core.compareEquipment(null, item.id); // --- 变化值... for (var name in core.status.hero) { if (typeof core.status.hero[name] != 'number') continue; var nowValue = core.getRealStatus(name); // 查询新值 - var newValue = Math.floor((core.getStatus(name) + (compare.value[name] || 0)) * - (core.getBuff(name) * 100 + (compare.percentage[name] || 0)) / 100); + var newValue = Math.floor((core.getStatus(name) + (compare.value[name] || 0) + (compare2?.value[name] || 0)) * + (core.getBuff(name) * 100 + (compare.percentage[name] || 0) + (compare2?.percentage[name] || 0)) / 100); if (nowValue == newValue) continue; var color = newValue > nowValue ? '#00FF00' : '#FF0000'; nowValue = core.formatBigNumber(nowValue); newValue = core.formatBigNumber(newValue); statusText += core.getStatusLabel(name) + " " + nowValue + "->\r[" + color + "]" + newValue + "\r\n"; } - }*/ - const equipValue = core.material.items[item.id]?.equip - if (equipValue) { - let value = "" - for (const a in equipValue.value) { - switch (a) { - case "str": - value += equipValue.value[a] > 0 ? "力量+" + equipValue.value[a] + '\n' : "力量" + equipValue.value[a] + '\n' - break; - case "agi": - value += equipValue.value[a] > 0 ? "敏捷+" + equipValue.value[a] + '\n' : "敏捷" + equipValue.value[a] + '\n' - break; - case "int": - value += equipValue.value[a] > 0 ? "智力+" + equipValue.value[a] + '\n' : "智力" + equipValue.value[a] + '\n' - break; - case "con": - value += equipValue.value[a] > 0 ? "体质+" + equipValue.value[a] + '\n' : "体质" + equipValue.value[a] + '\n' - break; - case "hpmax": - value += equipValue.value[a] > 0 ? "生命上限+" + equipValue.value[a] + '\n' : "生命上限" + equipValue.value[a] + '\n' - break; - case "manamax": - value += equipValue.value[a] > 0 ? "魔力上限+" + equipValue.value[a] + '\n' : "魔力上限" + equipValue.value[a] + '\n' - break; - case "atk": - value += equipValue.value[a] > 0 ? "攻击+" + equipValue.value[a] + '\n' : "攻击" + equipValue.value[a] + '\n' - break; - case "def": - value += equipValue.value[a] > 0 ? "物理防御+" + equipValue.value[a] + '\n' : "物理防御" + equipValue.value[a] + '\n' - break; - case "mdef": - value += equipValue.value[a] > 0 ? "魔法防御+" + equipValue.value[a] + '\n' : "魔法防御" + equipValue.value[a] + '\n' - break; - case "speed": - value += equipValue.value[a] > 0 ? "速度+" + equipValue.value[a] + '\n' : "速度" + equipValue.value[a] + '\n' - break; - - } - } - for (const a in equipValue.percentage) { - switch (a) { - case "str": - value += equipValue.percentage[a] > 0 ? "力量+" + equipValue.percentage[a] + '%\n' : "力量" + equipValue.percentage[a] + '%\n' - break; - case "agi": - value += equipValue.percentage[a] > 0 ? "敏捷+" + equipValue.percentage[a] + '%\n' : "敏捷" + equipValue.percentage[a] + '%\n' - break; - case "int": - value += equipValue.percentage[a] > 0 ? "智力+" + equipValue.percentage[a] + '%\n' : "智力" + equipValue.percentage[a] + '%\n' - break; - case "con": - value += equipValue.percentage[a] > 0 ? "体质+" + equipValue.percentage[a] + '%\n' : "体质" + equipValue.percentage[a] + '%\n' - break; - case "hpmax": - value += equipValue.percentage[a] > 0 ? "生命上限+" + equipValue.percentage[a] + '%\n' : "生命上限" + equipValue.percentage[a] + '%\n' - break; - case "manamax": - value += equipValue.percentage[a] > 0 ? "魔力上限+" + equipValue.percentage[a] + '%\n' : "魔力上限" + equipValue.percentage[a] + '%\n' - break; - case "atk": - value += equipValue.percentage[a] > 0 ? "攻击+" + equipValue.percentage[a] + '%\n' : "攻击" + equipValue.percentage[a] + '%\n' - break; - case "def": - value += equipValue.percentage[a] > 0 ? "物理防御+" + equipValue.percentage[a] + '%\n' : "物理防御" + equipValue.percentage[a] + '%\n' - break; - case "mdef": - value += equipValue.percentage[a] > 0 ? "魔法防御+" + equipValue.percentage[a] + '%\n' : "魔法防御" + equipValue.percentage[a] + '%\n' - break; - case "speed": - value += equipValue.percentage[a] > 0 ? "速度+" + equipValue.percentage[a] + '%\n' : "速度" + equipValue.percentage[a] + '%\n' - break; - - } - } - if (value !== '') itemText += "\n\n【装备属性】\n" + value } - - - - let needText = '\n【装备需求】\n' - - const need = core.plugin.equipNeed[item.id] - if (need) { - for (const a in need) { - switch (a) { - case "str": - needText += "力量【" + need[a] + '】\n' - break; - case "agi": - needText += "敏捷【" + need[a] + '】\n' - break; - case "int": - needText += "智力【" + need[a] + '】\n' - break; - case "con": - needText += "体质【" + need[a] + '】\n' - break; - - } - } - } - itemText = need ? itemText + needText : itemText + itemText = statusText + itemText; if (item.equip) { core.drawTextContent(ctx, itemText, { left: itemText_x, @@ -5450,7 +5362,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = color: "white", align: "left", fontSize: itemTextFontSize, - maxWidth: rightbar_width - (itemText_x - rightbar_x) * 2 + itemTextFontSize / 2, + maxWidth: rightbar_width - + (itemText_x - rightbar_x) * 2 + + itemTextFontSize / 2, }); } else { core.drawTextContent(ctx, itemText, { @@ -5460,7 +5374,9 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = color: "white", align: "left", fontSize: itemTextFontSize, - maxWidth: rightbar_width - (itemText_x - rightbar_x) * 2 + itemTextFontSize / 2, + maxWidth: rightbar_width - + (itemText_x - rightbar_x) * 2 + + itemTextFontSize / 2, }); } @@ -5535,7 +5451,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = len = toDrawList.length; ///// *** 装备格设置 - var maxItem = 4; + var maxItem = 2; var box_width = 32, box_height = 32, box_borderStyle = "#fff", @@ -5561,8 +5477,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = var space_y = (equipList_height - maxLine * oneBoxHeight) / (1 + maxLine), space_x = (equipList_width - maxItem * oneBoxWidth) / (1 + maxItem); var box_x = equipList_x + space_x, - box_y = equipList_y + space_y; - for (var i = 0; i < len; i++) { + box_y = equipList_y + space_y + 12; + for (var i = 0; i < 2; i++) { var id = core.getEquip(i), name = toDrawList[i]; if (i === 0) name = "主手"; @@ -5606,28 +5522,92 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.drawLine( ctx, equipList_x + space_x + space_x + oneBoxWidth, - equipList_y + space_y, + equipList_y + space_y + 12, equipList_x + space_x + space_x + oneBoxWidth + box_width + box_borderWidth, - equipList_y + space_y + box_height + equipList_y + space_y + box_height + 12 ); core.drawLine( ctx, equipList_x + space_x + space_x + oneBoxWidth, - equipList_y + space_y + box_height, + equipList_y + space_y + box_height + 12, equipList_x + space_x + space_x + oneBoxWidth + box_width + box_borderWidth, - equipList_y + space_y + equipList_y + space_y + 12 ); } + ///// *** 装备格设置 + var maxItem = 3; + var box_width = 32, + box_height = 32, + box_borderStyle = "#fff", + box_selectBorderStyle = "gold", // 选中的装备格的颜色 + box_borderWidth = 2; + var boxName_fontSize = 14, + boxName_space = 2, + boxName_color = "#fff"; // 装备格名称与上面的装备格框的距离 + var maxLine = Math.ceil(len / maxItem); + ///// *** + var l = Math.sqrt(len); + if (Math.pow(l) == len && len != 4) { + if (l <= maxItem) maxItem = l; + } + maxItem = Math.min(toDrawList.length, maxItem); + info.equips = maxItem; + + var boxName_font = core.ui._buildFont(boxName_fontSize); + // 总宽高减去所有装备格宽高得到空隙大小 + var oneBoxWidth = box_width + box_borderWidth * 2; + var oneBoxHeight = + box_height + boxName_fontSize + boxName_space + 2 * box_borderWidth; + var space_y = (equipList_height - maxLine * oneBoxHeight) / (1 + maxLine), + space_x = (equipList_width - maxItem * oneBoxWidth) / (1 + maxItem); + var box_x = equipList_x + space_x, + box_y = equipList_y + space_y + space_y + oneBoxHeight; + for (var i = 2; i < len; i++) { + var id = core.getEquip(i), + name = toDrawList[i]; + var selectBorder = false; + if (core.status.thisUIEventInfo.select.type == i) selectBorder = true; + var borderStyle = selectBorder ? + box_selectBorderStyle : + box_borderStyle; + core.drawEquipbox_drawOne( + ctx, + name, + id, + box_x, + box_y, + box_width, + box_height, + boxName_space, + boxName_font, + boxName_color, + borderStyle, + box_borderWidth + ); + var todo = new Function( + "core.clickOneEquipbox('" + id + "'," + i + ")" + ); + core.addUIEventListener( + box_x - box_borderWidth / 2, + box_y - box_borderWidth / 2, + oneBoxWidth, + oneBoxHeight, + todo + ); + box_x += space_x + oneBoxWidth; + + } + }; this.drawToolbox = function (ctx) { @@ -5932,103 +5912,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.status.route.push("unEquip:" + 1); }); } - if (equipClsid === "单手剑") { - if ( - equipCls1 !== "单手剑" && - equipCls1 !== "匕首" && - equipCls1 !== "盾牌" - ) { - core.unloadEquip(0, function () { - core.status.route.push("unEquip:" + 0); - }); - core.unloadEquip(1, function () { - core.status.route.push("unEquip:" + 1); - }); - } else if (equipCls0 !== "单手剑") { - core.unloadEquip(0, function () { - core.status.route.push("unEquip:" + 0); - }); - } - } - if (equipClsid === "法杖") { - if (equipCls1 !== "匕首" && equipCls1 !== "盾牌") { - core.unloadEquip(0, function () { - core.status.route.push("unEquip:" + 0); - }); - core.unloadEquip(1, function () { - core.status.route.push("unEquip:" + 1); - }); - } else { - core.unloadEquip(0, function () { - core.status.route.push("unEquip:" + 0); - }); - } - } - if (equipClsid === "双手剑") { - core.unloadEquip(0, function () { - core.status.route.push("unEquip:" + 0); - }); - core.unloadEquip(1, function () { - core.status.route.push("unEquip:" + 1); - }); - } - if (equipClsid === "匕首") { - if (equipCls0 !== "匕首") { - core.unloadEquip(0, function () { - core.status.route.push("unEquip:" + 0); - }); - core.unloadEquip(1, function () { - core.status.route.push("unEquip:" + 1); - }); - } else { - core.unloadEquip(1, function () { - core.status.route.push("unEquip:" + 1); - }); - } - } - if (equipClsid === "盾牌") { - if (equipCls0 !== "单手剑" && equipCls0 !== "法杖") { - core.unloadEquip(0, function () { - core.status.route.push("unEquip:" + 0); - }); - core.unloadEquip(1, function () { - core.status.route.push("unEquip:" + 1); - }); - } else { - core.unloadEquip(1, function () { - core.status.route.push("unEquip:" + 1); - }); - } - } - if (equipClsid === "护具") { - core.unloadEquip(2, function () { - core.status.route.push("unEquip:" + 2); - }); - } - if (equipClsid === "饰品" && core.getEquip(3) && core.getEquip(4)) { + core.loadEquip(id, function () { + core.status.route.push("equip:" + id); + info.select.type = type; + core.setIndexAndSelect("select"); + core.drawEquipbox(); + }); - core.unloadEquip(4, function () { - core.status.route.push("unEquip:" + 4); - }); - } - - const idneed = core.plugin.equipNeed[id] - let canload = true - if (core.plugin.equipNeed[id]) { - for (const a in idneed) { - if (core.status.hero[a] < idneed[a]) canload = false - } - } - if (canload) { - core.loadEquip(id, function () { - core.status.route.push("equip:" + id); - info.select.type = type; - core.setIndexAndSelect("select"); - core.drawEquipbox(); - }); - } else { - core.drawTip("未达装备需求") - } } else { var type = info.select.type; core.unloadEquip(type, function () { @@ -8794,21 +8684,21 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = }; }, "自定义常用事件": function () { - // editorBlocklyconfigPlus.js - // 自訂常見事件模板插件 - // 本插件引用了通用函數插件(Utility.js) - // 適用樣板:2.10.3 - // 請注意: - // 此插件對事件編輯器(editor_blocklyconfig)進行複寫,若還有其它針對事件編輯器做複寫的插件,請謹慎使用! - // 此插件對表格操作行為(editor_mode.doActionList)進行複寫,若還有其它對表格操作行為做複寫的插件,請謹慎使用! - // 使用方法: - // 現在在主頁下拉選單多了個常用事件模版,在那邊可以自由設定常用事件模板。 - // 設定完後按F5刷新,再到事件編輯器看就有你設定好的常用事件模板了。 + // editorBlocklyconfigPlus.js + // 自訂常見事件模板插件 + // 本插件引用了通用函數插件(Utility.js) + // 適用樣板:2.10.3 + // 請注意: + // 此插件對事件編輯器(editor_blocklyconfig)進行複寫,若還有其它針對事件編輯器做複寫的插件,請謹慎使用! + // 此插件對表格操作行為(editor_mode.doActionList)進行複寫,若還有其它對表格操作行為做複寫的插件,請謹慎使用! + // 使用方法: + // 現在在主頁下拉選單多了個常用事件模版,在那邊可以自由設定常用事件模板。 + // 設定完後按F5刷新,再到事件編輯器看就有你設定好的常用事件模板了。 - if (main.mode == "editor") { - //#region 配置表格初始化 - let TableFileName = "project/table/CommonEventTemplate_comment.js"; - let TableRow = ` + if (main.mode == "editor") { + //#region 配置表格初始化 + let TableFileName = "project/table/CommonEventTemplate_comment.js"; + let TableRow = ` var CommonEventTemplate_comment = {"_type": "object", "_data": { "CommonEventTemplate": { @@ -8851,221 +8741,241 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } }} `; - if (!events_c12a15a8_c380_4b28_8144_256cba95f760.CommonEventTemplate) { - /** - * @type {{[EvnetName:actionParserJson]}} - */ - events_c12a15a8_c380_4b28_8144_256cba95f760.CommonEventTemplate = { - 检测音乐如果没有开启则系统提示开启: [{ - type: "if", - condition: "!core.musicStatus.bgmStatus", - true: [ - "\t[系统提示]你当前音乐处于关闭状态,本塔开音乐游戏效果更佳", - ], - false: [], - }, ], - 仿新新魔塔一次性商人: [{ - type: "if", - condition: "switch:A", - true: [ - "\t[行商,trader]\b[this]这是购买我的道具后我给玩家的提示。", - { - type: "comment", - text: "下一条指令可视情况使用或不使用", - }, - { - type: "hide", - remove: true, - time: 250, - }, - ], - false: [{ - type: "confirm", - text: "我有3把黄钥匙,\n你出50金币就卖给你。", - yes: [{ - type: "if", - condition: "status:money>=50", - true: [{ - type: "setValue", - name: "status:money", - operator: "-=", - value: "50", - }, - { - type: "setValue", - name: "item:yellowKey", - operator: "+=", - value: "3", - }, - { - type: "playSound", - name: "确定", - stop: true, - }, - { - type: "setValue", - name: "switch:A", - value: "true", - }, - ], - false: [{ - type: "playSound", - name: "操作失败", - }, - "\t[行商,trader]\b[this]你的金币不足!", - ], - }, ], - no: [], - }, ], - }, ], - 全地图选中一个点: [{ - type: "comment", - text: "全地图选中一个点,需要用鼠标或触屏操作", - }, - { - type: "setValue", - name: "temp:X", - value: "status:x", - }, - { - type: "setValue", - name: "temp:Y", - value: "status:y", - }, - { - type: "tip", - text: "再次点击闪烁位置确认", - }, - { - type: "while", - condition: "true", - data: [{ - type: "drawSelector", - image: "winskin.webp", - code: 1, - x: "32*temp:X", - y: "32*temp:Y", - width: 32, - height: 32, - }, - { - type: "wait", - }, - { - type: "if", - condition: "(flag:type === 1)", - true: [{ - type: "if", - condition: "((temp:X===flag:x)&&(temp:Y===flag:y))", - true: [{ - type: "break", - n: 1, - }, ], - }, - { - type: "setValue", - name: "temp:X", - value: "flag:x", - }, - { - type: "setValue", - name: "temp:Y", - value: "flag:y", - }, - ], - }, - ], - }, - { - type: "drawSelector", - code: 1, - }, - { - type: "comment", - text: "流程进行到这里可以对[X,Y]点进行处理,比如", - }, - { - type: "closeDoor", - id: "yellowDoor", - loc: ["temp:X", "temp:Y"], - }, - ], - 多阶段Boss战斗: [{ - type: "comment", - text: "多阶段boss,请直接作为战后事件使用", - }, - { - type: "setValue", - name: "switch:A", - operator: "+=", - value: "1", - }, - { - type: "switch", - condition: "switch:A", - caseList: [{ - case: "1", - action: [{ - type: "setBlock", - number: "redSlime", - }, - "\t[2阶段boss,redSlime]\b[this]你以为你已经打败我了吗?没听说过史莱姆有九条命吗?", - ], - }, - { - case: "2", - action: [{ - type: "setBlock", - number: "blackSlime", - }, - "\t[3阶段boss,blackSlime]\b[this]不能消灭我的,只会让我更强大!", - ], - }, - { - case: "3", - action: [{ - type: "setBlock", - number: "slimelord", - }, - "\t[4阶段boss,slimelord]\b[this]我还能打!", - ], - }, - { - case: "4", - action: ["\t[4阶段boss,slimelord]我一定会回来的!"], - }, - ], - }, - ], - }; - } - //#endregion + if (!events_c12a15a8_c380_4b28_8144_256cba95f760.CommonEventTemplate) { + /** + * @type {{[EvnetName:actionParserJson]}} + */ + events_c12a15a8_c380_4b28_8144_256cba95f760.CommonEventTemplate = { + 检测音乐如果没有开启则系统提示开启: [ + { + type: "if", + condition: "!core.musicStatus.bgmStatus", + true: [ + "\t[系统提示]你当前音乐处于关闭状态,本塔开音乐游戏效果更佳", + ], + false: [], + }, + ], + 仿新新魔塔一次性商人: [ + { + type: "if", + condition: "switch:A", + true: [ + "\t[行商,trader]\b[this]这是购买我的道具后我给玩家的提示。", + { + type: "comment", + text: "下一条指令可视情况使用或不使用", + }, + { + type: "hide", + remove: true, + time: 250, + }, + ], + false: [ + { + type: "confirm", + text: "我有3把黄钥匙,\n你出50金币就卖给你。", + yes: [ + { + type: "if", + condition: "status:money>=50", + true: [ + { + type: "setValue", + name: "status:money", + operator: "-=", + value: "50", + }, + { + type: "setValue", + name: "item:yellowKey", + operator: "+=", + value: "3", + }, + { + type: "playSound", + name: "确定", + stop: true, + }, + { + type: "setValue", + name: "switch:A", + value: "true", + }, + ], + false: [ + { + type: "playSound", + name: "操作失败", + }, + "\t[行商,trader]\b[this]你的金币不足!", + ], + }, + ], + no: [], + }, + ], + }, + ], + 全地图选中一个点: [ + { + type: "comment", + text: "全地图选中一个点,需要用鼠标或触屏操作", + }, + { + type: "setValue", + name: "temp:X", + value: "status:x", + }, + { + type: "setValue", + name: "temp:Y", + value: "status:y", + }, + { + type: "tip", + text: "再次点击闪烁位置确认", + }, + { + type: "while", + condition: "true", + data: [ + { + type: "drawSelector", + image: "winskin.webp", + code: 1, + x: "32*temp:X", + y: "32*temp:Y", + width: 32, + height: 32, + }, + { + type: "wait", + }, + { + type: "if", + condition: "(flag:type === 1)", + true: [ + { + type: "if", + condition: "((temp:X===flag:x)&&(temp:Y===flag:y))", + true: [ + { + type: "break", + n: 1, + }, + ], + }, + { + type: "setValue", + name: "temp:X", + value: "flag:x", + }, + { + type: "setValue", + name: "temp:Y", + value: "flag:y", + }, + ], + }, + ], + }, + { + type: "drawSelector", + code: 1, + }, + { + type: "comment", + text: "流程进行到这里可以对[X,Y]点进行处理,比如", + }, + { + type: "closeDoor", + id: "yellowDoor", + loc: ["temp:X", "temp:Y"], + }, + ], + 多阶段Boss战斗: [ + { + type: "comment", + text: "多阶段boss,请直接作为战后事件使用", + }, + { + type: "setValue", + name: "switch:A", + operator: "+=", + value: "1", + }, + { + type: "switch", + condition: "switch:A", + caseList: [ + { + case: "1", + action: [ + { + type: "setBlock", + number: "redSlime", + }, + "\t[2阶段boss,redSlime]\b[this]你以为你已经打败我了吗?没听说过史莱姆有九条命吗?", + ], + }, + { + case: "2", + action: [ + { + type: "setBlock", + number: "blackSlime", + }, + "\t[3阶段boss,blackSlime]\b[this]不能消灭我的,只会让我更强大!", + ], + }, + { + case: "3", + action: [ + { + type: "setBlock", + number: "slimelord", + }, + "\t[4阶段boss,slimelord]\b[this]我还能打!", + ], + }, + { + case: "4", + action: ["\t[4阶段boss,slimelord]我一定会回来的!"], + }, + ], + }, + ], + }; + } + //#endregion - // 新增模板選項 - let editModeSelect = document.getElementById("editModeSelect"); - let newEditModeOption = document.createElement("option"); - newEditModeOption.value = "CommonEventTemplate"; - newEditModeOption.text = "常見事件模板"; - editModeSelect.add(newEditModeOption); + // 新增模板選項 + let editModeSelect = document.getElementById("editModeSelect"); + let newEditModeOption = document.createElement("option"); + newEditModeOption.value = "CommonEventTemplate"; + newEditModeOption.text = "常見事件模板"; + editModeSelect.add(newEditModeOption); - //檢查可用的編輯模板ID - let leftIDNumber = 11 - 1; - let ExistLeftElement = document.querySelector(".main"); - while (ExistLeftElement) { - leftIDNumber++; - ExistLeftElement = document.getElementById(`left${leftIDNumber}`); - } + //檢查可用的編輯模板ID + let leftIDNumber = 11 - 1; + let ExistLeftElement = document.querySelector(".main"); + while (ExistLeftElement) { + leftIDNumber++; + ExistLeftElement = document.getElementById(`left${leftIDNumber}`); + } - //新增編輯模板 - let MainDiv = document.querySelector(".main"); + //新增編輯模板 + let MainDiv = document.querySelector(".main"); - let CommonEventTemplateMainDiv = document.createElement("div"); - CommonEventTemplateMainDiv.id = `left${leftIDNumber}`; - CommonEventTemplateMainDiv.className = "leftTab"; - CommonEventTemplateMainDiv.style.zIndex = "-1"; - CommonEventTemplateMainDiv.style.opacity = "0"; + let CommonEventTemplateMainDiv = document.createElement("div"); + CommonEventTemplateMainDiv.id = `left${leftIDNumber}`; + CommonEventTemplateMainDiv.className = "leftTab"; + CommonEventTemplateMainDiv.style.zIndex = "-1"; + CommonEventTemplateMainDiv.style.opacity = "0"; - CommonEventTemplateMainDiv.innerHTML = ` + CommonEventTemplateMainDiv.innerHTML = `