Compare commits

..

No commits in common. "58db135553e23641a575be3db1df87c6a8989848" and "b547c096a50772e8db57cbc54eaf10c1c41c5f18" have entirely different histories.

12 changed files with 133 additions and 150 deletions

1
.gitignore vendored
View File

@ -3,4 +3,3 @@ project/bgms/
_docs/ _docs/
常用工具/ 常用工具/
/.vs /.vs
_server/config.json

1
_server/config.json Normal file
View File

@ -0,0 +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}]}

View File

@ -17,12 +17,11 @@
<meta name="x5-page-mode" content="app"> <meta name="x5-page-mode" content="app">
<link type='text/css' href='styles.css' rel='stylesheet'> <link type='text/css' href='styles.css' rel='stylesheet'>
</head> </head>
<body> <body>
<div id='startImageBackgroundDiv'> <div id='startImageBackgroundDiv'>
<div id='startImageDiv'></div> <div id='startImageDiv'></div>
<img id='startImageLogo' /> <img id='startImageLogo' />
</div> </div>
<script> <script>
(function () { (function () {
var startImageBackgroundDiv = document.getElementById('startImageBackgroundDiv'); var startImageBackgroundDiv = document.getElementById('startImageBackgroundDiv');
@ -145,62 +144,62 @@
<span class='statusLabel' id='curse' style="color: #C2F4E7;"></span> <span class='statusLabel' id='curse' style="color: #C2F4E7;"></span>
</div> </div>
<!-- 状态栏canvas化 --> <!-- 状态栏canvas化 -->
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0; z-index: 50;"></canvas> <canvas id="statusCanvas" style="position: absolute; left: 0; top: 0;"></canvas>
<canvas id="caidan1" style="position: absolute; left: 0; top: 0;"></canvas> <canvas id="caidan1" style="position: absolute; left: 0; top: 0;"></canvas>
</div>
<div id="toolBar" class="clearfix">
<img class="tools" id='img-book'>
<img class="tools" id='img-fly'>
<img class="tools" id='img-toolbox'>
<img class="tools" id='img-keyboard'>
<img class="tools" id='img-shop'>
<img class="tools" id='img-save'>
<img class="tools" id='img-load'>
<img class="tools" id='img-settings'>
<img class="tools" id='img-btn1' style='display:none'>
<img class="tools" id='img-btn2' style='display:none'>
<img class="tools" id='img-btn3' style='display:none'>
<img class="tools" id='img-btn4' style='display:none'>
<img class="tools" id='img-btn5' style='display:none'>
<img class="tools" id='img-btn6' style='display:none'>
<img class="tools" id='img-btn7' style='display:none'>
<img class="tools" id='img-btn8' style='display:none'>
<p class="statusLabel tools" id="hard"></p>
</div>
<div id="gameDraw">
<div id="gif"></div>
<div id="gif2"></div>
<canvas class='gameCanvas anti-aliasing' id='bg'></canvas>
<canvas class='gameCanvas anti-aliasing' id='event'></canvas>
<canvas class='gameCanvas anti-aliasing' id='hero'></canvas>
<canvas class='gameCanvas anti-aliasing' id='event2'></canvas>
<canvas class='gameCanvas anti-aliasing' id='fg'></canvas>
<canvas class='gameCanvas' id='caidan'></canvas>
<canvas class='gameCanvas' id='damage'></canvas>
<canvas class='gameCanvas' id='animate'></canvas>
<canvas class='gameCanvas' id='curtain'></canvas>
<canvas class='gameCanvas' id='ui'></canvas>
<canvas class='gameCanvas' id='data'>此浏览器不支持HTML5</canvas>
<div id="next"></div>
</div>
</div> </div>
<div id='inputDiv'> <div id="toolBar" class="clearfix">
<div id='inputDialog'> <img class="tools" id='img-book'>
<p id="inputMessage">请输入文字...</p> <img class="tools" id='img-fly'>
<input id='inputBox' type="text" autocomplete="off" /> <img class="tools" id='img-toolbox'>
<button id='inputYes'>确定</button> <img class="tools" id='img-keyboard'>
<button id='inputNo'>取消</button> <img class="tools" id='img-shop'>
</div> <img class="tools" id='img-save'>
<img class="tools" id='img-load'>
<img class="tools" id='img-settings'>
<img class="tools" id='img-btn1' style='display:none'>
<img class="tools" id='img-btn2' style='display:none'>
<img class="tools" id='img-btn3' style='display:none'>
<img class="tools" id='img-btn4' style='display:none'>
<img class="tools" id='img-btn5' style='display:none'>
<img class="tools" id='img-btn6' style='display:none'>
<img class="tools" id='img-btn7' style='display:none'>
<img class="tools" id='img-btn8' style='display:none'>
<p class="statusLabel tools" id="hard"></p>
</div> </div>
<div id="ui-editor"></div> <div id="gameDraw">
<!-- injection --> <div id="gif"></div>
<script src='libs/thirdparty/lz-string.min.js'></script> <div id="gif2"></div>
<script src='libs/thirdparty/priority-queue.min.js'></script> <canvas class='gameCanvas anti-aliasing' id='bg'></canvas>
<script src='libs/thirdparty/localforage.min.js'></script> <canvas class='gameCanvas anti-aliasing' id='event'></canvas>
<script src='libs/thirdparty/zip.min.js'></script> <canvas class='gameCanvas anti-aliasing' id='hero'></canvas>
<script id='mainScript' src='main.js'></script> <canvas class='gameCanvas anti-aliasing' id='event2'></canvas>
<script>main.init('play'); main.listen();</script> <canvas class='gameCanvas anti-aliasing' id='fg'></canvas>
<canvas class='gameCanvas' id='caidan'></canvas>
<canvas class='gameCanvas' id='damage'></canvas>
<canvas class='gameCanvas' id='animate'></canvas>
<canvas class='gameCanvas' id='curtain'></canvas>
<canvas class='gameCanvas' id='ui'></canvas>
<canvas class='gameCanvas' id='data'>此浏览器不支持HTML5</canvas>
<div id="next"></div>
</div>
</div>
<div id='inputDiv'>
<div id='inputDialog'>
<p id="inputMessage">请输入文字...</p>
<input id='inputBox' type="text" autocomplete="off"/>
<button id='inputYes'>确定</button>
<button id='inputNo'>取消</button>
</div>
</div>
<div id="ui-editor"></div>
<!-- injection -->
<script src='libs/thirdparty/lz-string.min.js'></script>
<script src='libs/thirdparty/priority-queue.min.js'></script>
<script src='libs/thirdparty/localforage.min.js'></script>
<script src='libs/thirdparty/zip.min.js'></script>
<script id='mainScript' src='main.js'></script>
<script>main.init('play');main.listen();</script>
</body> </body>

View File

@ -18,7 +18,7 @@ function core () {
this._HALF_WIDTH_ = Math.floor(this._WIDTH_ / 2); this._HALF_WIDTH_ = Math.floor(this._WIDTH_ / 2);
this._HALF_HEIGHT_ = Math.floor(this._HEIGHT_ / 2); this._HALF_HEIGHT_ = Math.floor(this._HEIGHT_ / 2);
this.__SIZE__ = main.mode == 'editor' ? 13 : this._HEIGHT_; this.__SIZE__ = main.mode == 'editor' ? 15 : this._HEIGHT_;
this.__PIXELS__ = this.__SIZE__ * 32; this.__PIXELS__ = this.__SIZE__ * 32;
this.__HALF_SIZE__ = Math.floor(this.__SIZE__ / 2); this.__HALF_SIZE__ = Math.floor(this.__SIZE__ / 2);
this.material = { this.material = {

130
main.js
View File

@ -20,74 +20,68 @@ function main() {
//------------------------ 用户修改内容 END ------------------------// //------------------------ 用户修改内容 END ------------------------//
this.dom = { this.dom = {
body: document.body, 'body': document.body,
gameGroup: document.getElementById('gameGroup'), 'gameGroup': document.getElementById('gameGroup'),
mainTips: document.getElementById('mainTips'), 'mainTips': document.getElementById('mainTips'),
musicBtn: document.getElementById('musicBtn'), 'musicBtn': document.getElementById('musicBtn'),
enlargeBtn: document.createElement('img'), 'enlargeBtn': document.createElement('img'),
startPanel: document.getElementById('startPanel'), 'startPanel': document.getElementById('startPanel'),
startTop: document.getElementById('startTop'), 'startTop': document.getElementById('startTop'),
startTopProgressBar: document.getElementById('startTopProgressBar'), 'startTopProgressBar': document.getElementById('startTopProgressBar'),
startTopProgress: document.getElementById('startTopProgress'), 'startTopProgress': document.getElementById('startTopProgress'),
startTopLoadTips: document.getElementById('startTopLoadTips'), 'startTopLoadTips': document.getElementById('startTopLoadTips'),
startBackground: document.getElementById('startBackground'), 'startBackground': document.getElementById('startBackground'),
startLogo: document.getElementById('startLogo'), 'startLogo': document.getElementById('startLogo'),
startButtonGroup: document.getElementById('startButtonGroup'), 'startButtonGroup': document.getElementById('startButtonGroup'),
floorMsgGroup: document.getElementById('floorMsgGroup'), 'floorMsgGroup': document.getElementById('floorMsgGroup'),
logoLabel: document.getElementById('logoLabel'), 'logoLabel': document.getElementById('logoLabel'),
versionLabel: document.getElementById('versionLabel'), 'versionLabel': document.getElementById('versionLabel'),
floorNameLabel: document.getElementById('floorNameLabel'), 'floorNameLabel': document.getElementById('floorNameLabel'),
statusBar: document.getElementById('statusBar'), 'statusBar': document.getElementById('statusBar'),
status: document.getElementsByClassName('status'), 'status': document.getElementsByClassName('status'),
toolBar: document.getElementById('toolBar'), 'toolBar': document.getElementById('toolBar'),
tools: document.getElementsByClassName('tools'), 'tools': document.getElementsByClassName('tools'),
gameCanvas: document.getElementsByClassName('gameCanvas'), 'gameCanvas': document.getElementsByClassName('gameCanvas'),
gif: document.getElementById('gif'), 'gif': document.getElementById('gif'),
gif2: document.getElementById('gif2'), 'gif2': document.getElementById('gif2'),
gameDraw: document.getElementById('gameDraw'), 'gameDraw': document.getElementById('gameDraw'),
startButtons: document.getElementById('startButtons'), 'startButtons': document.getElementById('startButtons'),
playGame: document.getElementById('playGame'), 'playGame': document.getElementById('playGame'),
loadGame: document.getElementById('loadGame'), 'loadGame': document.getElementById('loadGame'),
replayGame: document.getElementById('replayGame'), 'replayGame': document.getElementById('replayGame'),
levelChooseButtons: document.getElementById('levelChooseButtons'), 'levelChooseButtons': document.getElementById('levelChooseButtons'),
data: document.getElementById('data'), 'data': document.getElementById('data'),
statusLabels: document.getElementsByClassName('statusLabel'), 'statusLabels': document.getElementsByClassName('statusLabel'),
statusTexts: document.getElementsByClassName('statusText'), 'statusTexts': document.getElementsByClassName('statusText'),
floorCol: document.getElementById('floorCol'), 'floorCol': document.getElementById('floorCol'),
nameCol: document.getElementById('nameCol'), 'nameCol': document.getElementById('nameCol'),
lvCol: document.getElementById('lvCol'), 'lvCol': document.getElementById('lvCol'),
hpmaxCol: document.getElementById('hpmaxCol'), 'hpmaxCol': document.getElementById('hpmaxCol'),
hpCol: document.getElementById('hpCol'), 'hpCol': document.getElementById('hpCol'),
manaCol: document.getElementById('manaCol'), 'manaCol': document.getElementById('manaCol'),
atkCol: document.getElementById('atkCol'), 'atkCol': document.getElementById('atkCol'),
defCol: document.getElementById('defCol'), 'defCol': document.getElementById('defCol'),
mdefCol: document.getElementById('mdefCol'), 'mdefCol': document.getElementById('mdefCol'),
moneyCol: document.getElementById('moneyCol'), 'moneyCol': document.getElementById('moneyCol'),
expCol: document.getElementById('expCol'), 'expCol': document.getElementById('expCol'),
upCol: document.getElementById('upCol'), 'upCol': document.getElementById('upCol'),
keyCol: document.getElementById('keyCol'), 'keyCol': document.getElementById('keyCol'),
pzfCol: document.getElementById('pzfCol'), 'pzfCol': document.getElementById('pzfCol'),
debuffCol: document.getElementById('debuffCol'), 'debuffCol': document.getElementById('debuffCol'),
skillCol: document.getElementById('skillCol'), 'skillCol': document.getElementById('skillCol'),
hard: document.getElementById('hard'), 'hard': document.getElementById('hard'),
statusCanvas: document.getElementById('statusCanvas'), 'statusCanvas': document.getElementById('statusCanvas'),
statusCanvasCtx: document 'statusCanvasCtx': document.getElementById('statusCanvas').getContext('2d'),
.getElementById('statusCanvas') 'caidan1': document.getElementById('caidan1'),
.getContext('2d'), 'caidan1Ctx': document.getElementById('caidan1').getContext('2d'),
caidan1: document.getElementById('caidan1'), 'whole': document.getElementById('whole'),
caidan1Ctx: document 'wholeCtx': document.getElementById('whole').getContext('2d'),
.getElementById('caidan1') 'inputDiv': document.getElementById('inputDiv'),
.getContext('2d'), 'inputMessage': document.getElementById('inputMessage'),
whole: document.getElementById('whole'), 'inputBox': document.getElementById('inputBox'),
wholeCtx: document 'inputYes': document.getElementById('inputYes'),
.getElementById('whole') 'inputNo': document.getElementById('inputNo'),
.getContext('2d'), 'next': document.getElementById('next')
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.mode = 'play';
this.loadList = [ this.loadList = [

View File

@ -1132,7 +1132,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"choices": [ "choices": [
{ {
"text": "魔防+${flag:mdefShop}", "text": "魔防+${flag:mdefShop}",
"need": "true", "need": "ture",
"action": [ "action": [
{ {
"type": "if", "type": "if",

View File

@ -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]}, "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}, "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]}]}, "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":null,"add":false,"vampire":0.34}, "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":null,"add":false,"zone":100,"vampire":0.34}, "M303": {"name":"血尾雕像","hp":5000,"atk":100,"def":0,"money":200,"exp":10,"point":0,"special":[15,11],"value":100.34,"add":false},
"E340": {"name":"戾鬼","hp":49999,"atk":18973,"def":1800,"money":5000,"exp":500,"point":0,"special":0}, "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}, "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}, "E342": {"name":"圣狱","hp":30000,"atk":250,"def":180,"money":3000,"exp":300,"point":0,"special":0},

View File

@ -690,11 +690,6 @@ main.floors.MT20=
] ]
} }
] ]
},
{
"type": "setGlobalValue",
"name": "poisonDamage",
"value": 15
} }
] ]
}, },
@ -1083,11 +1078,6 @@ main.floors.MT20=
"function": "function(){\ncore.Confirmskip_Off();\n}" "function": "function(){\ncore.Confirmskip_Off();\n}"
} }
] ]
},
{
"type": "setGlobalValue",
"name": "poisonDamage",
"value": 75
} }
] ]
}, },

View File

@ -50,7 +50,7 @@ main.floors.huxiao1=
{ {
"type": "setValue", "type": "setValue",
"name": "flag:Memories_grayscale", "name": "flag:Memories_grayscale",
"value": "true" "value": "ture"
}, },
{ {
"type": "comment", "type": "comment",

View File

@ -73,7 +73,7 @@ main.floors.nandu=
}, },
{ {
"type": "sleep", "type": "sleep",
"time": 550, "time": 500,
"noSkip": true "noSkip": true
}, },
{ {

View File

@ -1694,7 +1694,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
fill(core.formatBigNumber(core.status.hero.money), 304, 58); fill(core.formatBigNumber(core.status.hero.money), 304, 58);
core.drawImage(ctx, core.statusBar.icons.exp, 6, 70, 25, 25); core.drawImage(ctx, core.statusBar.icons.exp, 6, 70, 25, 25);
fill(core.formatBigNumber(core.status.hero.exp), 42, 90); fill(core.formatBigNumber(core.status.hero.exp), 42, 90);
} else if (!core.flags.hideLeftStatusBar) { // 横屏且未隐藏状态栏 } else if (!core.flags.extendToolbar) { // 横屏且未隐藏状态栏
core.drawImage(ctx, core.material.images.images[flags.hard == 4 ? 'status.png' : 'status2.png'], 0, 63); 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); core.drawImage(ctx, core.statusBar.icons.floor, 124, 24, 32, 32);
ctx.textAlign = 'left'; ctx.textAlign = 'left';
@ -1750,12 +1750,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
setTimeout(function () { core.ui.drawStatusBar(); }, 100); setTimeout(function () { core.ui.drawStatusBar(); }, 100);
} }
if (core.status.floorId == "nandu") { if (core.status.floorId == "nandu") {
core.ui.clearMap(ctx = core.dom.statusCanvasCtx); core.dom.statusCanvas.width *= 1;
core.dom.statusCanvas.style.zIndex=80; core.dom.statusCanvas.style.zIndex=80;
} }
else core.dom.statusCanvas.style.zIndex=50; else core.dom.statusCanvas.style.zIndex=50;
} }
} else if (core.flags.hideLeftStatusBar && !core.domStyle.isVertical) { // 横屏且隐藏状态栏 } else if (core.flags.extendToolbar && !core.domStyle.isVertical) { // 横屏且隐藏状态栏
if (!core.dymCanvas['status']) if (!core.dymCanvas['status'])
core.ui.createCanvas('status', 0, 0, core._PX_, core._PY_, 66); // 刚好盖过显伤层 core.ui.createCanvas('status', 0, 0, core._PX_, core._PY_, 66); // 刚好盖过显伤层
core.ui.clearMap(ctx = core.dymCanvas['status']); core.ui.clearMap(ctx = core.dymCanvas['status']);

View File

@ -3699,7 +3699,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
} }
this.autoBattle = function () { this.autoBattle = function () {
if (!flags.__autoBattle__ || flags.poison) return; if (!flags.__autoBattle__) return;
// 如果勇士当前点有地图伤害,只清周围 // 如果勇士当前点有地图伤害,只清周围
const { x, y } = core.status.hero.loc; const { x, y } = core.status.hero.loc;
const floor = core.floors[core.status.floorId]; const floor = core.floors[core.status.floorId];
@ -3829,7 +3829,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
} }
this.autoGetItem = function () { this.autoGetItem = function () {
if (!flags.__autoGetItem__ || flags.poison) return; if (!flags.__autoGetItem__) return;
var canGetItems = {}; var canGetItems = {};
if (!core.status.floorId || !core.status.checkBlock.damage || core.status.event.id == 'action' || core.status.lockControl) return; if (!core.status.floorId || !core.status.checkBlock.damage || core.status.event.id == 'action' || core.status.lockControl) return;