Merge branch 'noAnimate' into hasAnimate

This commit is contained in:
bdf1 2023-03-16 21:39:48 +13:00
commit 58db135553
12 changed files with 150 additions and 133 deletions

1
.gitignore vendored
View File

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

View File

@ -1 +0,0 @@
{"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,6 +17,7 @@
<meta name="x5-page-mode" content="app">
<link type='text/css' href='styles.css' rel='stylesheet'>
</head>
<body>
<div id='startImageBackgroundDiv'>
<div id='startImageDiv'></div>
@ -145,7 +146,7 @@
</div>
<!-- 状态栏canvas化 -->
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0;"></canvas>
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0; z-index: 50;"></canvas>
<canvas id="caidan1" style="position: absolute; left: 0; top: 0;"></canvas>
</div>
<div id="toolBar" class="clearfix">

View File

@ -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 = {

130
main.js
View File

@ -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 = [

View File

@ -1132,7 +1132,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"choices": [
{
"text": "魔防+${flag:mdefShop}",
"need": "ture",
"need": "true",
"action": [
{
"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]},
"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":null,"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},

View File

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

View File

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

View File

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

View File

@ -1694,7 +1694,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 +1750,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
setTimeout(function () { core.ui.drawStatusBar(); }, 100);
}
if (core.status.floorId == "nandu") {
core.dom.statusCanvas.width *= 1;
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']);

View File

@ -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;