feat: 修改了主界面、状态栏,加了来自古祠人类塔的章节显示
This commit is contained in:
parent
8fdfe6b4c8
commit
1d204109b7
4
main.js
4
main.js
@ -560,10 +560,10 @@ main.prototype.listen = function () {
|
||||
(main.dom.startButtons.style.display == 'block' ||
|
||||
main.dom.levelChooseButtons.style.display == 'block')
|
||||
) {
|
||||
if (e.keyCode == 38 || e.keyCode == 33)
|
||||
if (e.keyCode == 38 || e.keyCode == 37 || e.keyCode == 33)
|
||||
// up/pgup
|
||||
main.selectButton((main.selectedButton || 0) - 1);
|
||||
else if (e.keyCode == 40 || e.keyCode == 34)
|
||||
else if (e.keyCode == 40 || e.keyCode == 39 || e.keyCode == 34)
|
||||
// down/pgdn
|
||||
main.selectButton((main.selectedButton || 0) + 1);
|
||||
else if (e.keyCode == 67 || e.keyCode == 13 || e.keyCode == 32)
|
||||
|
@ -40,6 +40,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"4.jpg",
|
||||
"5.jpg",
|
||||
"6.jpeg",
|
||||
"641-e.jpg",
|
||||
"641-h.jpg",
|
||||
"7.jpg",
|
||||
"8.jpg",
|
||||
"9.jpeg",
|
||||
@ -172,7 +174,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"startBackground": "project/images/bg.jpg",
|
||||
"startVerticalBackground": "project/images/bg.jpg",
|
||||
"startLogoStyle": "color: white",
|
||||
"startButtonsStyle": "background-color: #32369F; opacity: 0.85; color: #FFFFFF; border: #FFFFFF 2px solid; caret-color: #FFD700;",
|
||||
"startButtonsStyle": "background-color: #32369F00; opacity: 0.85; color: #FFFFFF; border: #FFFFFF 0px solid; caret-color: #FFD700;",
|
||||
"statusLeftBackground": "url(project/materials/ground.png) repeat",
|
||||
"statusTopBackground": "url(project/materials/ground.png) repeat",
|
||||
"toolsBackground": "black",
|
||||
@ -903,9 +905,9 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"enableAddPoint": false,
|
||||
"enableNegativeDamage": false,
|
||||
"betweenAttackMax": false,
|
||||
"useLoop": false,
|
||||
"useLoop": true,
|
||||
"startUsingCanvas": false,
|
||||
"statusCanvas": false,
|
||||
"statusCanvas": true,
|
||||
"enableEnemyPoint": false,
|
||||
"enableGentleClick": false,
|
||||
"ignoreChangeFloor": true,
|
||||
|
@ -72,6 +72,295 @@ main.floors.MT0=
|
||||
2
|
||||
]
|
||||
}
|
||||
],
|
||||
"5,6": [
|
||||
{
|
||||
"type": "if",
|
||||
"condition": "(flag:hard==3)",
|
||||
"true": [
|
||||
{
|
||||
"type": "choices",
|
||||
"text": "\t[bdf,hero]各测塔员成绩",
|
||||
"choices": [
|
||||
{
|
||||
"text": "星宫白 - 1",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "status:mdef",
|
||||
"operator": "+=",
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "鸣 - 过不去",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "-1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "yztm889 - 过不去",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "-2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "顾 - 过不去",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "-3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "Farewell - 过不去",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "-4"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "(主角) bdf - 过不去",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "-5"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "α - 过不去",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "-6"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "(作者) 王州 - 过不去",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "-7"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "迷迭香 - 过不去",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "-8"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"false": [
|
||||
{
|
||||
"type": "choices",
|
||||
"text": "\t[bdf,hero]各测塔员成绩",
|
||||
"choices": [
|
||||
{
|
||||
"text": "星宫白 - 124",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "124"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "鸣 - 114",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "114"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "yztm889 - 112",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "112"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "顾 - 110",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "110"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "Farewell - 102",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "102"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "(主角) bdf - 28",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "28"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "α - 19",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "19"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "(作者) 王州 - 过不去",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "迷迭香 - 过不去",
|
||||
"action": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "-1"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "if",
|
||||
"condition": "(flag:lhjnb>0)",
|
||||
"true": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "status:exp",
|
||||
"operator": "+=",
|
||||
"value": "67"
|
||||
},
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "status:atk",
|
||||
"operator": "+=",
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "status:def",
|
||||
"operator": "+=",
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "status:mdef",
|
||||
"operator": "+=",
|
||||
"value": "81"
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"time": 50
|
||||
},
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "status:hp",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "status:exp",
|
||||
"operator": "+=",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"type": "sleep",
|
||||
"time": 50
|
||||
},
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "status:hp",
|
||||
"operator": "+=",
|
||||
"value": "flag:lhjnb"
|
||||
},
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "status:hp",
|
||||
"operator": "-=",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "4"
|
||||
},
|
||||
{
|
||||
"type": "changeFloor",
|
||||
"floorId": "MT10",
|
||||
"loc": [
|
||||
6,
|
||||
2
|
||||
]
|
||||
}
|
||||
],
|
||||
"false": [
|
||||
{
|
||||
"type": "setValue",
|
||||
"name": "flag:lhjnb",
|
||||
"value": "0"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"changeFloor": {},
|
||||
|
@ -29,7 +29,11 @@ main.floors.MT1=
|
||||
"type": "changePos",
|
||||
"direction": "down"
|
||||
},
|
||||
"从这层开始的三层,到了下一层都不能返回,铁门需要你击败所有的怪物。"
|
||||
"从这层开始的三层,到了下一层都不能返回,铁门需要你击败所有的怪物。",
|
||||
{
|
||||
"type": "function",
|
||||
"function": "function(){\ncore.plugin.displayChapter(\"第一篇\", \"婴儿\")\n}"
|
||||
}
|
||||
],
|
||||
"eachArrive": [],
|
||||
"parallelDo": "var lastTime = core.getFlag('lastTime', 0);\n\nif (timestamp - lastTime > 60) {\n\tvar image = core.material.images.images[\"8.jpg\"];\n\tvar width = 416,\n\t\theight = 416;\n\n\tcore.canvas.bg.translate(width / 2, height / 2);\n\tcore.canvas.bg.rotate(Math.PI / 180 / 6);\n\tcore.canvas.bg.translate(-width / 2, -height / 2);\n\tcore.canvas.bg.drawImage(image, -296, -88);\n\n\tcore.setFlag('lastTime', timestamp);\n\n\tvar rotateTime = core.getFlag('rotateTime', 0);\n\trotateTime += 1;\n\tif (rotateTime >= 6 * 180) {\n\t\trotateTime -= 6 * 180;\n\t}\n\tcore.setFlag('rotateTime', rotateTime);\n}",
|
||||
|
@ -58,7 +58,7 @@ main.floors.ND1=
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": "function(){\ncore.status.hard = 'Easy';\n}"
|
||||
"function": "function(){\ncore.status.hard = 'Easy';\nflags.__hardColor__ = 'green'\n//core.setGlobalAttribute(\"borderColor\", \"#8ee877\");\ncore.setGlobalAttribute(\"statusLeftBackground\", \"url(project/images/641-e.jpg)0% 0%/auto 100% repeat\");\ncore.setGlobalAttribute(\"statusTopBackground\", \"url(project/images/641-e.jpg)0% 0%/auto 100% repeat\");\n}"
|
||||
},
|
||||
{
|
||||
"type": "break",
|
||||
@ -90,7 +90,7 @@ main.floors.ND1=
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": "function(){\ncore.status.hard = 'Hard';\n}"
|
||||
"function": "function(){\ncore.status.hard = 'Hard';\n//core.setGlobalAttribute(\"borderColor\", \"#ea7888\");\ncore.setGlobalAttribute(\"statusLeftBackground\", \"url(project/images/641-h.jpg)0% 0%/auto 100% repeat\");\ncore.setGlobalAttribute(\"statusTopBackground\", \"url(project/images/641-h.jpg)0% 0%/auto 100% repeat\");\n}"
|
||||
},
|
||||
{
|
||||
"type": "break",
|
||||
|
@ -1,4 +1,3 @@
|
||||
///<reference path='../runtime.d.ts'/>
|
||||
var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
{
|
||||
"events": {
|
||||
@ -1578,7 +1577,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (core.getFlag("dynHPneed")) core.updateStatusBar()
|
||||
}
|
||||
},
|
||||
"ui": {
|
||||
"getToolboxItems": function (cls) {
|
||||
@ -1594,9 +1594,15 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
"drawStatusBar": function () {
|
||||
// 这真的是人能写出来的东西?
|
||||
var ctx, fill = function (text, x, y, style) {
|
||||
core.ui.setFont(ctx, (/\w+/.test(text) ? 'italic ' : '') + 'bold 18px Verdana');
|
||||
core.ui.fillBoldText(ctx, text, x, y, style);
|
||||
core.ui.setFont(ctx, (/\w+/.test(text) ? ' ' : '') + '20px 得意黑');
|
||||
core.ui.fillText(ctx, text, x, y, style);
|
||||
},
|
||||
fill1 = function (text, x, y, style) {
|
||||
core.ui.setFont(ctx, (/\w+/.test(text) ? ' ' : '') + '12px 得意黑');
|
||||
core.ui.fillText(ctx, text, x, y, style);
|
||||
};
|
||||
core.ui.clearMap(ctx = core.dom.statusCanvasCtx);
|
||||
if (core.status.hero.flags.hideStatusBar) return;
|
||||
if (core.flags.statusCanvas) { // 系统开关「自绘状态栏」开启
|
||||
core.ui.clearMap(ctx = core.dom.statusCanvasCtx); // 清空状态栏
|
||||
core.ui.setFillStyle(ctx, core.status.globalAttribute.statusBarColor);
|
||||
@ -1616,23 +1622,69 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
core.drawImage(ctx, core.statusBar.icons.exp, 6, 70, 25, 25);
|
||||
fill(core.formatBigNumber(core.status.hero.exp), 42, 90);
|
||||
} else if (!core.flags.hideLeftStatusBar) { // 横屏且未隐藏状态栏
|
||||
core.drawImage(ctx, core.statusBar.icons.floor, 6, 9, 25, 25);
|
||||
fill((core.status.thisMap || {}).name || "Loading", 42, 29);
|
||||
core.drawImage(ctx, core.statusBar.icons.hp, 6, 43, 25, 25);
|
||||
fill(core.formatBigNumber(core.getRealStatus('hp')), 42, 63);
|
||||
core.drawImage(ctx, core.statusBar.icons.atk, 6, 77, 25, 25);
|
||||
fill(core.formatBigNumber(core.getRealStatus('atk')), 42, 97);
|
||||
core.drawImage(ctx, core.statusBar.icons.def, 6, 111, 25, 25);
|
||||
fill(core.formatBigNumber(core.getRealStatus('def')), 42, 131);
|
||||
core.drawImage(ctx, core.statusBar.icons.mdef, 6, 145, 25, 25);
|
||||
fill(core.formatBigNumber(core.getRealStatus('mdef')), 42, 165);
|
||||
core.drawImage(ctx, core.statusBar.icons.money, 6, 179, 25, 25);
|
||||
fill(core.formatBigNumber(core.status.hero.money), 42, 199);
|
||||
core.drawImage(ctx, core.statusBar.icons.exp, 6, 213, 25, 25);
|
||||
fill(core.formatBigNumber(core.status.hero.exp), 42, 233);
|
||||
fill(core.setTwoDigits(core.itemCount('yellowKey')), 11, 267, '#FFCCAA');
|
||||
fill(core.setTwoDigits(core.itemCount('blueKey')), 46, 267, '#AAAADD');
|
||||
fill(core.setTwoDigits(core.itemCount('redKey')), 81, 267, '#FF8888');
|
||||
core.drawIcon(ctx, 18, 6, 5, 25, 25);
|
||||
core.drawIcon(ctx, 34, 6, 35, 25, 25);
|
||||
core.drawIcon(ctx, 27, 6, 65, 25, 25);
|
||||
core.drawIcon(ctx, 28, 6, 95, 25, 25);
|
||||
core.drawIcon(ctx, 29, 6, 125, 25, 25);
|
||||
|
||||
fill((core.status.thisMap || {}).name || "Loading", 42, 25);
|
||||
//core.drawImage(ctx, core.statusBar.icons.hp, 6, 35, 25, 25);
|
||||
fill(flags.dynHP || core.formatBigNumber(core.getRealStatus('hp')), 42, 55);
|
||||
//core.drawImage(ctx, core.statusBar.icons.atk, 6, 65, 25, 25);
|
||||
fill(core.formatBigNumber(core.getRealStatus('atk')), 42, 85, '#FF5555');
|
||||
//core.drawImage(ctx, core.statusBar.icons.def, 6, 95, 25, 25);
|
||||
fill(core.formatBigNumber(core.getRealStatus('def')), 42, 115, '#45D1E0');
|
||||
//core.drawImage(ctx, core.statusBar.icons.mdef, 6, 125, 25, 25);
|
||||
fill(core.formatBigNumber(core.getRealStatus('mdef')), 42, 145, '#00AA00');
|
||||
//core.drawImage(ctx, core.statusBar.icons.money, 6, 155, 25, 25);
|
||||
//fill(core.formatBigNumber(core.status.hero.money), 42, 175);
|
||||
ctx.textAlign = 'center' //文字居中
|
||||
ctx.textBaseline = 'middle'
|
||||
ctx.fillText(core.getLvName(), 40, 180)
|
||||
fill1("Need: " + core.formatBigNumber(core.getNextLvUpNeed()), 40, 195)
|
||||
if (core.getNextLvUpNeed()) {
|
||||
var rat = (core.status.hero.exp) / (core.getNextLvUpNeed() + core.status.hero.exp)
|
||||
/*ctx.moveTo(40, 185);
|
||||
ctx.arc(40, 185, 30, -Math.PI / 2, -Math.PI / 2 + 2 * Math.PI * rat, false);
|
||||
ctx.closePath();
|
||||
ctx.fillStyle = "#FFFF00"
|
||||
ctx.fill();*/
|
||||
ctx.beginPath() //高亮环路径
|
||||
ctx.arc(40, 185, 30, -Math.PI / 2, -Math.PI / 2 + 2 * Math.PI * rat, false)
|
||||
ctx.strokeStyle = 'rgb(255, 255, 0)'
|
||||
ctx.lineWidth = 5
|
||||
ctx.lineCap = 'butt'
|
||||
ctx.stroke()
|
||||
var act = core.firstData.levelUp[core.status.hero.lv].action,
|
||||
_ = { hp: 0, atk: 0, def: 0, mdef: 0 }
|
||||
for (var i of act) {
|
||||
if (i.name.substr(0, 6) == "status") _[i.name.substr(7)] += parseFloat(i.value);
|
||||
}
|
||||
fill1("Next Level", 100, 161, '#FFFFFF');
|
||||
fill1("Atk + " + core.formatBigNumber(_.atk), 100, 185, '#FF5555');
|
||||
fill1("Def + " + core.formatBigNumber(_.def), 100, 197, '#45D1E0');
|
||||
fill1("Mdef + " + core.formatBigNumber(_.mdef), 100, 209, '#00AA00');
|
||||
fill1("Hp + " + core.formatBigNumber(_.hp), 100, 173, '#FFFFFF');
|
||||
|
||||
|
||||
}
|
||||
ctx.textAlign = 'left'
|
||||
ctx.textBaseline = 'alphabetic'
|
||||
//core.drawImage(ctx, core.statusBar.icons.exp, 6, 185, 25, 25);
|
||||
//fill(core.formatBigNumber(core.status.hero.exp), 42, 205);
|
||||
core.drawIcon(ctx, 21, 6, 220, 25, 25);
|
||||
core.drawIcon(ctx, 22, 66, 220, 25, 25);
|
||||
core.drawIcon(ctx, 23, 6, 250, 25, 25);
|
||||
core.drawIcon(ctx, 47, 66, 250, 25, 25);
|
||||
|
||||
fill(core.setTwoDigits(core.itemCount('yellowKey')), 32, 240, '#FFCCAA');
|
||||
fill(core.setTwoDigits(core.itemCount('blueKey')), 92, 240, '#AAAADD');
|
||||
fill(core.setTwoDigits(core.itemCount('redKey')), 32, 270, '#FF8888');
|
||||
fill(core.setTwoDigits(core.itemCount('pickaxe')), 92, 270, '#BC6E27');
|
||||
fill(core.setTwoDigits(core.itemCount('yellowKey') * 2 + core.itemCount('blueKey') * 5 + core.itemCount('redKey') * 15 + core.itemCount('pickaxe') * 30), 32, 300, '#FA1489');
|
||||
fill(core.setTwoDigits(core.getFlag('lhjnb', 0)), 92, 300, '#8D8600');
|
||||
|
||||
}
|
||||
} else if (core.flags.hideLeftStatusBar && !core.domStyle.isVertical) { // 横屏且隐藏状态栏
|
||||
if (!core.dymCanvas['status'])
|
||||
@ -1661,7 +1713,7 @@ 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');
|
||||
}
|
||||
},
|
||||
},
|
||||
"drawStatistics": function () {
|
||||
// 浏览地图时参与的统计项目
|
||||
|
||||
|
@ -64,7 +64,8 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
|
||||
"sWallTLR": 32,
|
||||
"sWallTBR": 33,
|
||||
"sWallTBL": 34,
|
||||
"T362": 35
|
||||
"T362": 35,
|
||||
"location": 36
|
||||
},
|
||||
"animates": {
|
||||
"star": 0,
|
||||
|
BIN
project/images/641-e.jpg
Normal file
BIN
project/images/641-e.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 194 KiB |
BIN
project/images/641-h.jpg
Normal file
BIN
project/images/641-h.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 144 KiB |
@ -16,6 +16,7 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
|
||||
"14": {"cls":"animates","id":"curseNet","canPass":true,"trigger":"null","script":"(function () {\n\tif (!core.hasItem('amulet')) {\n\t\tcore.triggerDebuff('get', 'curse');\n\t\tcore.updateStatusBar();\n\t}\n\n\t// 如果要做一次性咒网,可直接注释掉下面这句话:\n\t// core.removeBlock(core.getHeroLoc('x'), core.getHeroLoc('y'));\n})()","name":"咒网"},
|
||||
"15": {"cls":"animates","id":"blueLava"},
|
||||
"16": {"cls":"animates","id":"water"},
|
||||
"18": {"cls":"terrains","id":"location"},
|
||||
"20": {"cls":"autotile","id":"autotile"},
|
||||
"21": {"cls":"items","id":"yellowKey"},
|
||||
"22": {"cls":"items","id":"blueKey"},
|
||||
@ -68,9 +69,9 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
|
||||
"71": {"cls":"items","id":"shield0"},
|
||||
"72": {"cls":"items","id":"skill1"},
|
||||
"73": {"cls":"items","id":"wand"},
|
||||
"81": {"cls":"animates","id":"yellowDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"yellowKey":1}},"name":"黄门"},
|
||||
"82": {"cls":"animates","id":"blueDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"blueKey":1}},"name":"蓝门"},
|
||||
"83": {"cls":"animates","id":"redDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"redKey":1}},"name":"红门"},
|
||||
"81": {"cls":"animates","id":"yellowDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"yellowKey":1},"afterOpenDoor":[{"type":"setValue","name":"flag:lhjnb","operator":"+=","value":"2"}]},"name":"黄门"},
|
||||
"82": {"cls":"animates","id":"blueDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"blueKey":1},"afterOpenDoor":[{"type":"setValue","name":"flag:lhjnb","operator":"+=","value":"5"}]},"name":"蓝门"},
|
||||
"83": {"cls":"animates","id":"redDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"redKey":1},"afterOpenDoor":[{"type":"setValue","name":"flag:lhjnb","operator":"+=","value":"15"}]},"name":"红门"},
|
||||
"84": {"cls":"animates","id":"greenDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"greenKey":1}},"name":"绿门"},
|
||||
"85": {"cls":"animates","id":"specialDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"specialKey":1}},"name":"机关门"},
|
||||
"86": {"cls":"animates","id":"steelDoor","trigger":"openDoor","animate":1,"doorInfo":{"time":160,"openSound":"door.mp3","closeSound":"door.mp3","keys":{"steelKey":1}},"name":"铁门"},
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 10 KiB |
@ -1814,5 +1814,164 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
}, 1000);
|
||||
}
|
||||
})();
|
||||
},
|
||||
"dynamicHP": function () {
|
||||
|
||||
|
||||
//由于改成了自绘状态栏,又进行了一些魔改,从直接改写core.setStatusBarInnerHTML变成用Flag,,,,,
|
||||
|
||||
// 此插件允许人物血量动态进行变化
|
||||
// 原作:Fux2(老黄鸡)
|
||||
|
||||
//新增:所有属性都动态变化,变化时状态栏字体颜色不同,变化结束后颜色恢复,增加BUFF/DeBUFF的显示
|
||||
|
||||
// 是否开启本插件,默认禁用;将此改成 true 将启用本插件。
|
||||
var __enable = true;
|
||||
if (!__enable) return;
|
||||
|
||||
var speed = 0.05; // 动态血量变化速度,越大越快。
|
||||
|
||||
var hpcolor1 = null;
|
||||
var hpcolor2 = null;
|
||||
var Debuffhp = null;
|
||||
var _currentHp = null;
|
||||
var _lastStatus1 = null;
|
||||
var _check1 = function () {
|
||||
if (_lastStatus1 != core.status.hero) {
|
||||
_lastStatus1 = core.status.hero;
|
||||
_currentHp = core.status.hero.hp;
|
||||
}
|
||||
};
|
||||
|
||||
core.registerAnimationFrame('dynamicHp', true, function () {
|
||||
_check1();
|
||||
if (core.status.hero.hp != _currentHp) {
|
||||
var dis = (_currentHp - core.status.hero.hp) * speed;
|
||||
if (dis > 0 && dis < 1) dis = 1;
|
||||
else if (dis > -1 && dis < 0) dis = -1;
|
||||
if (Math.abs(_currentHp - core.status.hero.hp) < 1) {
|
||||
_currentHp = core.status.hero.hp;
|
||||
} else {
|
||||
_currentHp -= dis;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (core.getRealStatus('hp') == _currentHp) {
|
||||
core.setFlag("dynHP", core.formatBigNumber(_currentHp));
|
||||
core.setFlag("dynHPneed", false);
|
||||
} else {
|
||||
core.setFlag("dynHP", core.formatBigNumber(Math.ceil(_currentHp)));
|
||||
core.setFlag("dynHPneed", true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
////// 设置statusBar的innerHTML,会自动斜体和放缩,也可以增加自定义css //////
|
||||
/*utils.prototype.setStatusBarInnerHTML = function (name, value, css) {
|
||||
if (!core.statusBar[name]) return;
|
||||
var isNumber = false;
|
||||
if (typeof value == 'number') {
|
||||
value = this.formatBigNumber(value);
|
||||
isNumber = true;
|
||||
}
|
||||
// 判定是否斜体
|
||||
var italic = /^[-a-zA-Z`~!@#$%^&*()_=+\[{\]}\\|;:'",<.>\/?]*$/.test(value);
|
||||
var style = 'font-style: ' + (italic ? 'italic' : 'normal') + '; ';
|
||||
style += 'text-shadow: #000 1px 0 0, #000 0 1px 0, #000 -1px 0 0, #000 0 -1px 0; ';
|
||||
// 判定是否需要缩放
|
||||
var length = this.strlen(value) || 1;
|
||||
style += 'font-size: ' + Math.min(1, 7 / length) + 'em; ';
|
||||
if (css) style += css;
|
||||
if (isNumber) {
|
||||
core.statusBar[name].innerHTML = "<span class='_status' style='" + style + "'>" + value + "</span>";
|
||||
} else {
|
||||
core.statusBar[name].innerHTML = "<span class='_status' style='" + style + "'></span>";
|
||||
core.statusBar[name].children[0].innerText = value;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
},
|
||||
"chapter": function () {
|
||||
// 章节显示
|
||||
var chapter = "",
|
||||
description = "";
|
||||
// 核心动画运算
|
||||
this.displayChapter = function (chapter, description) {
|
||||
// 先建画布
|
||||
if (core.isReplaying()) return;
|
||||
core.createCanvas("chapter", 0, 0, 480, 480, 100);
|
||||
var frame = 0,
|
||||
speed = 0,
|
||||
left = -480,
|
||||
down = 240;
|
||||
// 一秒50帧
|
||||
core.lockControl();
|
||||
var interval = setInterval(function () {
|
||||
core.clearMap("chapter");
|
||||
speed = core.hyperbolicCosine((frame - 84) * 0.05);
|
||||
left += speed / 2;
|
||||
// 背景
|
||||
if (frame <= 110) {
|
||||
core.fillRect("chapter", 0, -240 - left, 480, left + 480, "#000000");
|
||||
core.fillRect("chapter", 0, 240, 480, left + 480, "#000000");
|
||||
} else {
|
||||
core.fillRect("chapter", 0, 0, 480, down, "#000000");
|
||||
core.fillRect("chapter", 0, 480 - down, 480, down, "#000000");
|
||||
down -= speed / 2;
|
||||
}
|
||||
// 中间矩形
|
||||
if (frame <= 100) {
|
||||
core.fillRect("chapter", 0, 240 - frame / 5, 480, frame / 2.5, [255, 255, 255, 0.5 + frame / 200]);
|
||||
} else {
|
||||
core.fillRect("chapter", 0, 240 - (2100 / (205 - frame)), 480, 4200 / (205 - frame), [255, 255, 255, (175 - frame) / 75]);
|
||||
}
|
||||
// 上下方线
|
||||
core.fillRect("chapter", left, 210, 300, 10, "#FF4D00");
|
||||
core.fillRect("chapter", 180 - left, 260, 300, 10, "#2DFFFC");
|
||||
core.fillRect("chapter", left + 310, 210, 10, 10, "#FF4D00");
|
||||
core.fillRect("chapter", 160 - left, 260, 10, 10, "#2DFFFC");
|
||||
core.fillPolygon("chapter", [
|
||||
[left + 330, 210],
|
||||
[left + 330, 220],
|
||||
[left + 340, 220]
|
||||
], "#FF4D00");
|
||||
core.fillPolygon("chapter", [
|
||||
[150 - left, 260],
|
||||
[140 - left, 260],
|
||||
[150 - left, 270]
|
||||
], "#2DFFFC");
|
||||
// 闪光条
|
||||
for (var i = 5; i > 0; i--) {
|
||||
if (frame <= 150) {
|
||||
core.drawLine("chapter", 0, 220, left + 320, 220, [255, 255, 255, 0.4], i);
|
||||
core.drawLine("chapter", 480, 260, 160 - left, 260, [255, 255, 255, 0.4], i);
|
||||
} else {
|
||||
core.drawLine("chapter", 0, 220, left + 320, 220, [255, 255, 255, 0.4 - (frame - 150) / 125], i);
|
||||
core.drawLine("chapter", 480, 260, 160 - left, 260, [255, 255, 255, 0.4 - (frame - 150) / 125], i);
|
||||
}
|
||||
}
|
||||
core.fillEllipse("chapter", left + 320, 220, 7, 3, 0, [255, 255, 255, 0.8]);
|
||||
core.fillEllipse("chapter", left + 320, 220, 2, 10, 0, [255, 255, 255, 0.8]);
|
||||
core.fillEllipse("chapter", 160 - left, 260, 7, 3, 0, [255, 255, 255, 0.8]);
|
||||
core.fillEllipse("chapter", 160 - left, 260, 2, 10, 0, [255, 255, 255, 0.8]);
|
||||
// 字
|
||||
core.setTextAlign("chapter", "center");
|
||||
core.fillBoldText("chapter", chapter + " " + description, left + 360, 250, "#ffffff", "#000000", "28px scroll");
|
||||
if (frame >= 200) {
|
||||
clearInterval(interval);
|
||||
core.deleteCanvas("chapter");
|
||||
core.unlockControl();
|
||||
}
|
||||
if (frame == 80) core.playSound("chapter.mp3");
|
||||
frame++;
|
||||
}, 20);
|
||||
};
|
||||
// 返回双曲余弦值
|
||||
this.hyperbolicCosine = function (number) {
|
||||
return 0.5 * (Math.pow(Math.E, number) + Math.pow(Math.E, -number));
|
||||
}
|
||||
}
|
||||
}
|
13
styles.css
13
styles.css
@ -138,6 +138,7 @@
|
||||
border: #FFFFFF 2px solid;
|
||||
caret-color: #FFD700;
|
||||
border-radius: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#startButtons {
|
||||
@ -149,16 +150,20 @@
|
||||
}
|
||||
|
||||
.startButton {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
width: 30%;
|
||||
margin: 5px;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
padding: 4px 0;
|
||||
border-color: transparent;
|
||||
border-width: 2px;
|
||||
border-width: 0px 0px 3px 0px;
|
||||
border-style: solid;
|
||||
border-radius: 6px;
|
||||
font-family: 得意黑;
|
||||
}
|
||||
.startButton:hover {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.onChoiceAnimate {
|
||||
|
Loading…
Reference in New Issue
Block a user