diff --git a/.gitignore b/.gitignore index e941fc1..9f97cd3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ _saves/ project/bgms/ _docs/ 常用工具/ -/.vs \ No newline at end of file +/.vs +_server/config.json \ No newline at end of file diff --git a/_server/config.json b/_server/config.json index a77e904..f22fdf2 100644 --- a/_server/config.json +++ b/_server/config.json @@ -1 +1 @@ -{"viewportLoc":[0,0],"editorLastFloorId":"MT9","lastUsed":[{"idnum":554,"id":"N554","images":"npcs","y":42,"recent":1668243635497,"frequent":2},{"idnum":551,"id":"N551","images":"npcs","y":41,"recent":1668243645267,"frequent":2},{"idnum":46,"id":"fly","images":"items","y":12,"recent":1668239925419,"frequent":1},{"idnum":45,"id":"book","images":"items","y":9,"recent":1668238365160,"frequent":1}]} \ No newline at end of file +{"viewportLoc":[0,0],"editorLastFloorId":"U1"} \ No newline at end of file diff --git a/index.html b/index.html index 6631c12..0787209 100644 --- a/index.html +++ b/index.html @@ -17,11 +17,12 @@ + -
-
- -
+
+
+ +
- - - - - +
+ + + + + + + diff --git a/libs/core.js b/libs/core.js index 9617d07..3d1788f 100644 --- a/libs/core.js +++ b/libs/core.js @@ -18,7 +18,7 @@ function core () { this._HALF_WIDTH_ = Math.floor(this._WIDTH_ / 2); this._HALF_HEIGHT_ = Math.floor(this._HEIGHT_ / 2); - this.__SIZE__ = main.mode == 'editor' ? 15 : this._HEIGHT_; + this.__SIZE__ = main.mode == 'editor' ? 13 : this._HEIGHT_; this.__PIXELS__ = this.__SIZE__ * 32; this.__HALF_SIZE__ = Math.floor(this.__SIZE__ / 2); this.material = { diff --git a/main.js b/main.js index 1c7ee1a..0493edc 100644 --- a/main.js +++ b/main.js @@ -20,68 +20,74 @@ function main() { //------------------------ 用户修改内容 END ------------------------// this.dom = { - 'body': document.body, - 'gameGroup': document.getElementById('gameGroup'), - 'mainTips': document.getElementById('mainTips'), - 'musicBtn': document.getElementById('musicBtn'), - 'enlargeBtn': document.createElement('img'), - 'startPanel': document.getElementById('startPanel'), - 'startTop': document.getElementById('startTop'), - 'startTopProgressBar': document.getElementById('startTopProgressBar'), - 'startTopProgress': document.getElementById('startTopProgress'), - 'startTopLoadTips': document.getElementById('startTopLoadTips'), - 'startBackground': document.getElementById('startBackground'), - 'startLogo': document.getElementById('startLogo'), - 'startButtonGroup': document.getElementById('startButtonGroup'), - 'floorMsgGroup': document.getElementById('floorMsgGroup'), - 'logoLabel': document.getElementById('logoLabel'), - 'versionLabel': document.getElementById('versionLabel'), - 'floorNameLabel': document.getElementById('floorNameLabel'), - 'statusBar': document.getElementById('statusBar'), - 'status': document.getElementsByClassName('status'), - 'toolBar': document.getElementById('toolBar'), - 'tools': document.getElementsByClassName('tools'), - 'gameCanvas': document.getElementsByClassName('gameCanvas'), - 'gif': document.getElementById('gif'), - 'gif2': document.getElementById('gif2'), - 'gameDraw': document.getElementById('gameDraw'), - 'startButtons': document.getElementById('startButtons'), - 'playGame': document.getElementById('playGame'), - 'loadGame': document.getElementById('loadGame'), - 'replayGame': document.getElementById('replayGame'), - 'levelChooseButtons': document.getElementById('levelChooseButtons'), - 'data': document.getElementById('data'), - 'statusLabels': document.getElementsByClassName('statusLabel'), - 'statusTexts': document.getElementsByClassName('statusText'), - 'floorCol': document.getElementById('floorCol'), - 'nameCol': document.getElementById('nameCol'), - 'lvCol': document.getElementById('lvCol'), - 'hpmaxCol': document.getElementById('hpmaxCol'), - 'hpCol': document.getElementById('hpCol'), - 'manaCol': document.getElementById('manaCol'), - 'atkCol': document.getElementById('atkCol'), - 'defCol': document.getElementById('defCol'), - 'mdefCol': document.getElementById('mdefCol'), - 'moneyCol': document.getElementById('moneyCol'), - 'expCol': document.getElementById('expCol'), - 'upCol': document.getElementById('upCol'), - 'keyCol': document.getElementById('keyCol'), - 'pzfCol': document.getElementById('pzfCol'), - 'debuffCol': document.getElementById('debuffCol'), - 'skillCol': document.getElementById('skillCol'), - 'hard': document.getElementById('hard'), - 'statusCanvas': document.getElementById('statusCanvas'), - 'statusCanvasCtx': document.getElementById('statusCanvas').getContext('2d'), - 'caidan1': document.getElementById('caidan1'), - 'caidan1Ctx': document.getElementById('caidan1').getContext('2d'), - 'whole': document.getElementById('whole'), - 'wholeCtx': document.getElementById('whole').getContext('2d'), - 'inputDiv': document.getElementById('inputDiv'), - 'inputMessage': document.getElementById('inputMessage'), - 'inputBox': document.getElementById('inputBox'), - 'inputYes': document.getElementById('inputYes'), - 'inputNo': document.getElementById('inputNo'), - 'next': document.getElementById('next') + body: document.body, + gameGroup: document.getElementById('gameGroup'), + mainTips: document.getElementById('mainTips'), + musicBtn: document.getElementById('musicBtn'), + enlargeBtn: document.createElement('img'), + startPanel: document.getElementById('startPanel'), + startTop: document.getElementById('startTop'), + startTopProgressBar: document.getElementById('startTopProgressBar'), + startTopProgress: document.getElementById('startTopProgress'), + startTopLoadTips: document.getElementById('startTopLoadTips'), + startBackground: document.getElementById('startBackground'), + startLogo: document.getElementById('startLogo'), + startButtonGroup: document.getElementById('startButtonGroup'), + floorMsgGroup: document.getElementById('floorMsgGroup'), + logoLabel: document.getElementById('logoLabel'), + versionLabel: document.getElementById('versionLabel'), + floorNameLabel: document.getElementById('floorNameLabel'), + statusBar: document.getElementById('statusBar'), + status: document.getElementsByClassName('status'), + toolBar: document.getElementById('toolBar'), + tools: document.getElementsByClassName('tools'), + gameCanvas: document.getElementsByClassName('gameCanvas'), + gif: document.getElementById('gif'), + gif2: document.getElementById('gif2'), + gameDraw: document.getElementById('gameDraw'), + startButtons: document.getElementById('startButtons'), + playGame: document.getElementById('playGame'), + loadGame: document.getElementById('loadGame'), + replayGame: document.getElementById('replayGame'), + levelChooseButtons: document.getElementById('levelChooseButtons'), + data: document.getElementById('data'), + statusLabels: document.getElementsByClassName('statusLabel'), + statusTexts: document.getElementsByClassName('statusText'), + floorCol: document.getElementById('floorCol'), + nameCol: document.getElementById('nameCol'), + lvCol: document.getElementById('lvCol'), + hpmaxCol: document.getElementById('hpmaxCol'), + hpCol: document.getElementById('hpCol'), + manaCol: document.getElementById('manaCol'), + atkCol: document.getElementById('atkCol'), + defCol: document.getElementById('defCol'), + mdefCol: document.getElementById('mdefCol'), + moneyCol: document.getElementById('moneyCol'), + expCol: document.getElementById('expCol'), + upCol: document.getElementById('upCol'), + keyCol: document.getElementById('keyCol'), + pzfCol: document.getElementById('pzfCol'), + debuffCol: document.getElementById('debuffCol'), + skillCol: document.getElementById('skillCol'), + hard: document.getElementById('hard'), + statusCanvas: document.getElementById('statusCanvas'), + statusCanvasCtx: document + .getElementById('statusCanvas') + .getContext('2d'), + caidan1: document.getElementById('caidan1'), + caidan1Ctx: document + .getElementById('caidan1') + .getContext('2d'), + whole: document.getElementById('whole'), + wholeCtx: document + .getElementById('whole') + .getContext('2d'), + inputDiv: document.getElementById('inputDiv'), + inputMessage: document.getElementById('inputMessage'), + inputBox: document.getElementById('inputBox'), + inputYes: document.getElementById('inputYes'), + inputNo: document.getElementById('inputNo'), + next: document.getElementById('next') }; this.mode = 'play'; this.loadList = [ diff --git a/project/data.js b/project/data.js index e785825..70cfb71 100644 --- a/project/data.js +++ b/project/data.js @@ -1132,7 +1132,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = "choices": [ { "text": "魔防+${flag:mdefShop}", - "need": "ture", + "need": "true", "action": [ { "type": "if", diff --git a/project/enemys.js b/project/enemys.js index a2c7533..7b430ad 100644 --- a/project/enemys.js +++ b/project/enemys.js @@ -66,8 +66,8 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 = "evilBat": {"name":"邪恶蝙蝠","hp":1000,"atk":1,"def":0,"money":0,"exp":0,"point":0,"special":[2,3]}, "M300": {"name":"墙妖","hp":50,"atk":420,"def":300,"money":100,"exp":10,"point":0,"special":3}, "M301": {"name":"汪洋","hp":10000,"atk":300,"def":0,"money":1000,"exp":100,"point":0,"special":0,"beforeBattle":[{"type":"animate","name":"hainazhijian","loc":[6,5]}],"afterBattle":[{"type":"setValue","name":"flag:255","value":"1"},{"type":"setValue","name":"flag:bofang","value":"0"},{"type":"trigger","loc":[0,1]}]}, - "M302": {"name":"毒尾","hp":1000,"atk":140,"def":30,"money":100,"exp":20,"point":0,"special":[11,12],"value":0.34,"add":false}, - "M303": {"name":"血尾雕像","hp":5000,"atk":100,"def":0,"money":200,"exp":10,"point":0,"special":[15,11],"value":100.34,"add":false}, + "M302": {"name":"毒尾","hp":1000,"atk":140,"def":30,"money":100,"exp":20,"point":0,"special":[11,12],"value":0.34,"add":false,"vampire":0.34}, + "M303": {"name":"血尾雕像","hp":5000,"atk":100,"def":0,"money":200,"exp":10,"point":0,"special":[15,11],"value":null,"add":false,"zone":100,"vampire":0.34}, "E340": {"name":"戾鬼","hp":49999,"atk":18973,"def":1800,"money":5000,"exp":500,"point":0,"special":0}, "E341": {"name":"媚儿","hp":25000,"atk":250,"def":180,"money":2500,"exp":250,"point":0,"special":0}, "E342": {"name":"圣狱","hp":30000,"atk":250,"def":180,"money":3000,"exp":300,"point":0,"special":0}, diff --git a/project/floors/MT20.js b/project/floors/MT20.js index 501da10..76366fd 100644 --- a/project/floors/MT20.js +++ b/project/floors/MT20.js @@ -690,6 +690,11 @@ main.floors.MT20= ] } ] + }, + { + "type": "setGlobalValue", + "name": "poisonDamage", + "value": 15 } ] }, @@ -1078,6 +1083,11 @@ main.floors.MT20= "function": "function(){\ncore.Confirmskip_Off();\n}" } ] + }, + { + "type": "setGlobalValue", + "name": "poisonDamage", + "value": 75 } ] }, diff --git a/project/floors/huxiao1.js b/project/floors/huxiao1.js index 457212f..8b49162 100644 --- a/project/floors/huxiao1.js +++ b/project/floors/huxiao1.js @@ -50,7 +50,7 @@ main.floors.huxiao1= { "type": "setValue", "name": "flag:Memories_grayscale", - "value": "ture" + "value": "true" }, { "type": "comment", @@ -69,11 +69,6 @@ main.floors.huxiao1= ], "textfont": 20 }, - { - "type": "setGlobalAttribute", - "name": "borderColor", - "value": "null" - }, "\r[#fb928b]从今天起,嗜骨,你就是我们妖社的中坚力量了。", "\r[#fb928b]你很好强,各方面素质都很不错。", "\r[#fb928b]我相信你能够胜任你的位置。", diff --git a/project/floors/huxiao3.js b/project/floors/huxiao3.js index 6efe31f..9088e08 100644 --- a/project/floors/huxiao3.js +++ b/project/floors/huxiao3.js @@ -82,11 +82,6 @@ main.floors.huxiao3= "name": "flag:Memories_grayscale", "value": "false" }, - { - "type": "setGlobalAttribute", - "name": "borderColor", - "value": "204,204,204,1" - }, { "type": "function", "function": "function(){\ncore.maskFliter(500,'013-Square01.png')\n}" diff --git a/project/floors/nandu.js b/project/floors/nandu.js index d0863c2..7729b32 100644 --- a/project/floors/nandu.js +++ b/project/floors/nandu.js @@ -73,7 +73,7 @@ main.floors.nandu= }, { "type": "sleep", - "time": 500, + "time": 550, "noSkip": true }, { diff --git a/project/functions.js b/project/functions.js index f770d70..5f48e75 100644 --- a/project/functions.js +++ b/project/functions.js @@ -1661,12 +1661,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = core.ui.fillText(ctx, text, x, y, style); }; - //回忆画面 - if (core.status.hero.flags.Memories_grayscale) { - core.drawImage('caidan', 'caidan_grayscale.png', -161, 0); - core.dom.caidan1Ctx.drawImage(core.material.images.images['caidan_grayscale.png'], 0, 0) - return; - } + //手册和道具栏画面背景 if (core.status.event.id === 'book' || core.status.event.id === 'book-detail' || core.status.event.id === 'toolbox') { core.dom.caidan1Ctx.drawImage(core.material.images.images['black.png'], 0, 0) @@ -1694,7 +1689,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = fill(core.formatBigNumber(core.status.hero.money), 304, 58); core.drawImage(ctx, core.statusBar.icons.exp, 6, 70, 25, 25); fill(core.formatBigNumber(core.status.hero.exp), 42, 90); - } else if (!core.flags.extendToolbar) { // 横屏且未隐藏状态栏 + } else if (!core.flags.hideLeftStatusBar) { // 横屏且未隐藏状态栏 core.drawImage(ctx, core.material.images.images[flags.hard == 4 ? 'status.png' : 'status2.png'], 0, 63); core.drawImage(ctx, core.statusBar.icons.floor, 124, 24, 32, 32); ctx.textAlign = 'left'; @@ -1750,12 +1745,11 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = setTimeout(function () { core.ui.drawStatusBar(); }, 100); } if (core.status.floorId == "nandu") { - core.dom.statusCanvas.width *= 1; - core.dom.statusCanvas.style.zIndex=80; - } - else core.dom.statusCanvas.style.zIndex=50; + core.ui.clearMap(ctx = core.dom.statusCanvasCtx); + core.dom.statusCanvas.style.zIndex = 80; + } else core.dom.statusCanvas.style.zIndex = 50; } - } else if (core.flags.extendToolbar && !core.domStyle.isVertical) { // 横屏且隐藏状态栏 + } else if (core.flags.hideLeftStatusBar && !core.domStyle.isVertical) { // 横屏且隐藏状态栏 if (!core.dymCanvas['status']) core.ui.createCanvas('status', 0, 0, core._PX_, core._PY_, 66); // 刚好盖过显伤层 core.ui.clearMap(ctx = core.dymCanvas['status']); @@ -1782,6 +1776,13 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = fill(core.setTwoDigits(core.itemCount('blueKey')), 46 + offset, 267, '#AAAADD'); fill(core.setTwoDigits(core.itemCount('redKey')), 81 + offset, 267, '#FF8888'); } + + //回忆画面 + if (core.status.hero.flags.Memories_grayscale) { + core.drawImage('caidan', 'caidan_grayscale.png', -161, 0); + core.dom.caidan1Ctx.drawImage(core.material.images.images['caidan_grayscale.png'], 0, 0) + core.ui.clearMap(ctx = core.dom.statusCanvasCtx); // 清空状态栏 + } }, "drawStatistics": function () { // 浏览地图时参与的统计项目 diff --git a/project/plugins.js b/project/plugins.js index c064b9a..a0d544c 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -3699,7 +3699,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } this.autoBattle = function () { - if (!flags.__autoBattle__) return; + if (!flags.__autoBattle__ || flags.poison) return; // 如果勇士当前点有地图伤害,只清周围 const { x, y } = core.status.hero.loc; const floor = core.floors[core.status.floorId]; @@ -3829,7 +3829,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = } this.autoGetItem = function () { - if (!flags.__autoGetItem__) return; + if (!flags.__autoGetItem__ || flags.poison) return; var canGetItems = {}; if (!core.status.floorId || !core.status.checkBlock.damage || core.status.event.id == 'action' || core.status.lockControl) return;