手册内容
This commit is contained in:
parent
a709ceb77b
commit
420a87b700
@ -1241,18 +1241,19 @@ actions.prototype._clickBook = function (x, y) {
|
|||||||
|
|
||||||
////// 怪物手册界面时,按下某个键的操作 //////
|
////// 怪物手册界面时,按下某个键的操作 //////
|
||||||
actions.prototype._keyDownBook = function (keycode) {
|
actions.prototype._keyDownBook = function (keycode) {
|
||||||
var pageinfo = core.ui._drawBook_pageinfo();
|
if (core.book.isAnimate) return
|
||||||
if (keycode == 37) { core.playSound('光标移动'); core.ui.drawBook(core.status.event.data - pageinfo.per_page); }
|
if (keycode == 37) { core.book.turnleft() }
|
||||||
if (keycode == 38) { core.playSound('光标移动'); core.ui.drawBook(core.status.event.data - 1); }
|
if (keycode == 38) { core.book.turnleft() }
|
||||||
if (keycode == 39) { core.playSound('光标移动'); core.ui.drawBook(core.status.event.data + pageinfo.per_page); }
|
if (keycode == 39) { core.book.turnright() }
|
||||||
if (keycode == 40) { core.playSound('光标移动'); core.ui.drawBook(core.status.event.data + 1); }
|
if (keycode == 40) { core.book.turnright() }
|
||||||
if (keycode == 33) { core.playSound('光标移动'); core.ui.drawBook(core.status.event.data - pageinfo.per_page); }
|
if (keycode == 33) { core.book.turnleft() }
|
||||||
if (keycode == 34) { core.playSound('光标移动'); core.ui.drawBook(core.status.event.data + pageinfo.per_page); }
|
if (keycode == 34) { core.book.turnright()}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
////// 怪物手册界面时,放开某个键的操作 //////
|
////// 怪物手册界面时,放开某个键的操作 //////
|
||||||
actions.prototype._keyUpBook = function (keycode) {
|
actions.prototype._keyUpBook = function (keycode) {
|
||||||
|
if (core.book.isAnimate) return
|
||||||
if (keycode == 27 || keycode == 88) {
|
if (keycode == 27 || keycode == 88) {
|
||||||
core.playSound('取消');
|
core.playSound('取消');
|
||||||
if (core.events.recoverEvents(core.status.event.interval)) {
|
if (core.events.recoverEvents(core.status.event.interval)) {
|
||||||
@ -1263,15 +1264,16 @@ actions.prototype._keyUpBook = function (keycode) {
|
|||||||
core.ui._drawViewMaps(core.status.event.ui);
|
core.ui._drawViewMaps(core.status.event.ui);
|
||||||
}
|
}
|
||||||
else core.ui.closePanel();
|
else core.ui.closePanel();
|
||||||
|
core.book.close()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (keycode == 13 || keycode == 32 || keycode == 67) {
|
/*if (keycode == 13 || keycode == 32 || keycode == 67) {
|
||||||
var data = core.status.event.data;
|
var data = core.status.event.data;
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
core.ui._drawBookDetail(data);
|
core.ui._drawBookDetail(data);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
////// 怪物手册属性显示界面时的点击操作 //////
|
////// 怪物手册属性显示界面时的点击操作 //////
|
||||||
|
@ -233,6 +233,7 @@ control.prototype._animationFrame_globalAnimate = function (timestamp) {
|
|||||||
}
|
}
|
||||||
// Box animate
|
// Box animate
|
||||||
core.drawBoxAnimate();
|
core.drawBoxAnimate();
|
||||||
|
if(core.status.event.id==="book"&&!core.book.isAnimate)core.book.update()
|
||||||
core.animateFrame.globalTime = timestamp;
|
core.animateFrame.globalTime = timestamp;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1439,7 +1440,7 @@ control.prototype.checkBlock = function () {
|
|||||||
if (damage) {
|
if (damage) {
|
||||||
core.status.hero.hp -= damage;
|
core.status.hero.hp -= damage;
|
||||||
core.taskSystem.tasksInfo.forEach(v => v.tasks.forEach(a => {
|
core.taskSystem.tasksInfo.forEach(v => v.tasks.forEach(a => {
|
||||||
if (a.type==="specialBlock"&&core.status.checkBlock.type[loc][a.specialType])a.has++
|
if (a.type==="specialBlock"&&(!a.floorIds||a.floorIds.includes(core.status.floorId)) &&(core.status.checkBlock.type[loc]|| {})[a.specialType])a.has++
|
||||||
}))
|
}))
|
||||||
var text =
|
var text =
|
||||||
Object.keys(core.status.checkBlock.type[loc] || {}).join(",") || "伤害";
|
Object.keys(core.status.checkBlock.type[loc] || {}).join(",") || "伤害";
|
||||||
|
@ -2974,7 +2974,6 @@ maps.prototype.drawBoxAnimate = function () {
|
|||||||
core.createCanvas('ui2', 0, 0, core._PX_, core._PY_, 142);
|
core.createCanvas('ui2', 0, 0, core._PX_, core._PY_, 142);
|
||||||
}
|
}
|
||||||
core.clearMap('ui2');
|
core.clearMap('ui2');
|
||||||
|
|
||||||
core.status.boxAnimateObjs.forEach(function (obj) {
|
core.status.boxAnimateObjs.forEach(function (obj) {
|
||||||
if (obj.bigImage) {
|
if (obj.bigImage) {
|
||||||
var ctx = obj.ctx || 'ui2';
|
var ctx = obj.ctx || 'ui2';
|
||||||
@ -2983,14 +2982,18 @@ maps.prototype.drawBoxAnimate = function () {
|
|||||||
var actual_width = Math.min(per_width, obj.max_width || per_width), actual_height = per_height * actual_width / per_width;
|
var actual_width = Math.min(per_width, obj.max_width || per_width), actual_height = per_height * actual_width / per_width;
|
||||||
var x = obj.centerX - actual_width / 2, y = obj.centerY - actual_height / 2;
|
var x = obj.centerX - actual_width / 2, y = obj.centerY - actual_height / 2;
|
||||||
core.clearMap(ctx, x, y, actual_width, actual_height);
|
core.clearMap(ctx, x, y, actual_width, actual_height);
|
||||||
|
if(!obj.nobackground){
|
||||||
core.fillRect(ctx, x, y, actual_width, actual_height, core.material.groundPattern);
|
core.fillRect(ctx, x, y, actual_width, actual_height, core.material.groundPattern);
|
||||||
core.strokeRect(ctx, x, y, actual_width, actual_height, 'gold', 2);
|
core.strokeRect(ctx, x, y, actual_width, actual_height, 'gold', 2)
|
||||||
|
};
|
||||||
core.drawImage(ctx, obj.bigImage, sx, sy, per_width, per_height,
|
core.drawImage(ctx, obj.bigImage, sx, sy, per_width, per_height,
|
||||||
obj.centerX - actual_width / 2, obj.centerY - actual_height / 2, actual_width, actual_height);
|
obj.centerX - actual_width / 2, obj.centerY - actual_height / 2, actual_width, actual_height);
|
||||||
} else {
|
} else {
|
||||||
var ctx = obj.ctx || 'ui';
|
var ctx = obj.ctx || 'ui';
|
||||||
core.clearMap(ctx, obj.bgx, obj.bgy, obj.bgWidth, obj.bgHeight);
|
core.clearMap(ctx, obj.bgx, obj.bgy, obj.bgWidth, obj.bgHeight);
|
||||||
core.fillRect(ctx, obj.bgx, obj.bgy, obj.bgWidth, obj.bgHeight, core.material.groundPattern);
|
if(!obj.nobackground){
|
||||||
|
core.fillRect(ctx, obj.bgx, obj.bgy, obj.bgWidth, obj.bgHeight,core.material.groundPattern);
|
||||||
|
}
|
||||||
core.drawImage(ctx, obj.image, core.status.globalAnimateStatus % obj.animate * 32, obj.pos,
|
core.drawImage(ctx, obj.image, core.status.globalAnimateStatus % obj.animate * 32, obj.pos,
|
||||||
32, obj.height, obj.x, obj.y, obj.dw || 32, obj.dh || obj.height);
|
32, obj.height, obj.x, obj.y, obj.dw || 32, obj.dh || obj.height);
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
core.taskSystem.tasksInfo.forEach(v => v.tasks.forEach(a => {
|
core.taskSystem.tasksInfo.forEach(v => v.tasks.forEach(a => {
|
||||||
switch (a.type) {
|
switch (a.type) {
|
||||||
case "changeFloor":
|
case "changeFloor":
|
||||||
a.has++
|
if (!a.floorIds || a.floorId.includes(floorId)) a.has++
|
||||||
break;
|
break;
|
||||||
case "arrival":
|
case "arrival":
|
||||||
if (a.floorId === floorId) a.has = 1
|
if (a.floorId === floorId) a.has = 1
|
||||||
@ -433,9 +433,11 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
if (a.kill === enemyId && (!a.floorIds || a.floorIds.includes(core.status.floorId))) a.has++
|
if (a.kill === enemyId && (!a.floorIds || a.floorIds.includes(core.status.floorId))) a.has++
|
||||||
break
|
break
|
||||||
case "killLocs":
|
case "killLocs":
|
||||||
|
if (core.status.floorId === a.floorId) {
|
||||||
a.killLocs.forEach(b => {
|
a.killLocs.forEach(b => {
|
||||||
if (x === b[0] && y === b[1] && core.status.floorId === b[2]) a.has++
|
if (x === b[0] && y === b[1]) a.has++
|
||||||
})
|
})
|
||||||
|
}
|
||||||
break
|
break
|
||||||
case "killCount":
|
case "killCount":
|
||||||
if (!a.floorIds || a.floorIds.includes(core.status.floorId)) a.has++
|
if (!a.floorIds || a.floorIds.includes(core.status.floorId)) a.has++
|
||||||
|
@ -2915,7 +2915,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
113,
|
113,
|
||||||
120
|
120
|
||||||
);
|
);
|
||||||
if (core.status.event.id === "viewMaps") {
|
if (core.status.event.id === "viewMaps" && core.status.event.data) {
|
||||||
core.ui.statusBar._update_map(core.status.event.data.floorId);
|
core.ui.statusBar._update_map(core.status.event.data.floorId);
|
||||||
} else {
|
} else {
|
||||||
core.ui.statusBar._update_map();
|
core.ui.statusBar._update_map();
|
||||||
@ -2931,7 +2931,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
uictx.globalAlpha = 1;
|
uictx.globalAlpha = 1;
|
||||||
} else {
|
} else {
|
||||||
core.clearMap(uictx, MAP_BLOCK_LEFT, MAP_BLOCK_TOP, 113, 120);
|
core.clearMap(uictx, MAP_BLOCK_LEFT, MAP_BLOCK_TOP, 113, 120);
|
||||||
if (core.status.event.id === "viewMaps") {
|
if (core.status.event.id === "viewMaps" && core.status.event.data) {
|
||||||
core.ui.statusBar._update_map(core.status.event.data.floorId);
|
core.ui.statusBar._update_map(core.status.event.data.floorId);
|
||||||
} else {
|
} else {
|
||||||
core.ui.statusBar._update_map();
|
core.ui.statusBar._update_map();
|
||||||
@ -3028,8 +3028,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
core.overupdate()
|
core.overupdate()
|
||||||
if (main.dom.saveLoad && main.dom.saveLoad.style.display === "block")
|
if (main.dom.saveLoad && main.dom.saveLoad.style.display === "block")
|
||||||
core.saveLoad.update();
|
core.saveLoad.update();
|
||||||
if (main.dom.book && main.dom.book.style.display === "block")
|
|
||||||
core.book.update()
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class StatusBar {
|
class StatusBar {
|
||||||
@ -5232,7 +5230,7 @@ let time=0
|
|||||||
|
|
||||||
var enemyInfo = this.getEnemyInfo(enemy, null, null, null, floorId);
|
var enemyInfo = this.getEnemyInfo(enemy, null, null, null, floorId);
|
||||||
var locEnemyInfo = this.getEnemyInfo(enemy, null, x, y, floorId);
|
var locEnemyInfo = this.getEnemyInfo(enemy, null, x, y, floorId);
|
||||||
if (
|
/*if (
|
||||||
!core.flags.enableEnemyPoint ||
|
!core.flags.enableEnemyPoint ||
|
||||||
(locEnemyInfo.atk == enemyInfo.atk &&
|
(locEnemyInfo.atk == enemyInfo.atk &&
|
||||||
locEnemyInfo.def == enemyInfo.def &&
|
locEnemyInfo.def == enemyInfo.def &&
|
||||||
@ -5241,7 +5239,7 @@ let time=0
|
|||||||
) {
|
) {
|
||||||
x = null;
|
x = null;
|
||||||
y = null;
|
y = null;
|
||||||
} else {
|
} else {*/
|
||||||
// 检查enemys里面是否使用了存在的内容
|
// 检查enemys里面是否使用了存在的内容
|
||||||
for (var i = 0; i < enemys.length; ++i) {
|
for (var i = 0; i < enemys.length; ++i) {
|
||||||
var one = enemys[i];
|
var one = enemys[i];
|
||||||
@ -5258,7 +5256,7 @@ let time=0
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
enemyInfo = locEnemyInfo;
|
enemyInfo = locEnemyInfo;
|
||||||
}
|
// }
|
||||||
|
|
||||||
var id = enemy.id + ":" + x + ":" + y;
|
var id = enemy.id + ":" + x + ":" + y;
|
||||||
if (used[id]) return;
|
if (used[id]) return;
|
||||||
@ -22113,6 +22111,254 @@ let time=0
|
|||||||
|
|
||||||
|
|
||||||
const { Animation, linear, sleep, trigo } = core.plugin.animate
|
const { Animation, linear, sleep, trigo } = core.plugin.animate
|
||||||
|
class BookInfo {
|
||||||
|
constructor() {
|
||||||
|
this.width = 300
|
||||||
|
this.height = 400
|
||||||
|
this.enemys = []
|
||||||
|
this.page = 0
|
||||||
|
this.floorId = ""
|
||||||
|
this.left = document.createElement("canvas")
|
||||||
|
this.right = document.createElement("canvas")
|
||||||
|
this.tempLeft = document.createElement("canvas")
|
||||||
|
this.tempRight = document.createElement("canvas")
|
||||||
|
this.left.width = 300;
|
||||||
|
this.left.height = 400;
|
||||||
|
this.right.width = 300;
|
||||||
|
this.right.height = 400;
|
||||||
|
this.tempLeft.width = 300;
|
||||||
|
this.tempLeft.height = 400;
|
||||||
|
this.tempRight.width = 300;
|
||||||
|
this.tempRight.height = 400;
|
||||||
|
this.left = this.left.getContext("2d")
|
||||||
|
this.right = this.right.getContext("2d")
|
||||||
|
this.tempLeft = this.tempLeft.getContext("2d")
|
||||||
|
this.tempRight = this.tempRight.getContext("2d")
|
||||||
|
this.animateObjs = {}
|
||||||
|
|
||||||
|
}
|
||||||
|
getCurrentEnemys(floorId) {
|
||||||
|
this.floorId = floorId
|
||||||
|
this.enemys = core.enemys.getCurrentEnemys(floorId)
|
||||||
|
}
|
||||||
|
drawEmpty() {
|
||||||
|
core.clearMap(this.left)
|
||||||
|
core.clearMap(this.right)
|
||||||
|
core.setTextAlign(this.left, 'center');
|
||||||
|
core.setTextAlign(this.right, 'center');
|
||||||
|
core.fillText(this.left, "无恶意目标", 150, 214, '#999999', core.ui._buildFont(34, true));
|
||||||
|
core.fillText(this.right, "合上书本", 254, 380, '#000000', core.ui._buildFont(16, true));
|
||||||
|
}
|
||||||
|
drawBoxAnimate(ctx, dir) {
|
||||||
|
const blockInfo = core.getBlockInfo(this.enemys[this.page + dir].id)
|
||||||
|
if (blockInfo.bigImage) {
|
||||||
|
core.status.boxAnimateObjs.push({
|
||||||
|
bigImage: blockInfo.bigImage,
|
||||||
|
face: blockInfo.face,
|
||||||
|
centerX: 150,
|
||||||
|
centerY: 50,
|
||||||
|
max_width: 60,
|
||||||
|
ctx: ctx,
|
||||||
|
nobackground: true
|
||||||
|
});
|
||||||
|
} else if (blockInfo.height >= 48) {
|
||||||
|
var originEnemy = core.material.enemys[this.enemys[this.page + dir]] || {};
|
||||||
|
if (originEnemy.is32x32 == null) {
|
||||||
|
originEnemy.is32x32 = core.ui._drawBook_is32x32(blockInfo);
|
||||||
|
}
|
||||||
|
if (originEnemy.is32x32) {
|
||||||
|
core.status.boxAnimateObjs.push({
|
||||||
|
'bgx': 134,
|
||||||
|
'bgy': 34,
|
||||||
|
'bgWidth': 32,
|
||||||
|
'bgHeight': 32,
|
||||||
|
'x': 134,
|
||||||
|
'y': 34,
|
||||||
|
'height': 32,
|
||||||
|
'animate': blockInfo.animate,
|
||||||
|
'image': blockInfo.image,
|
||||||
|
'pos': blockInfo.posY * blockInfo.height + blockInfo.height - 32,
|
||||||
|
ctx: ctx,
|
||||||
|
nobackground: true
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var drawWidth = 32 * 32 / blockInfo.height;
|
||||||
|
core.status.boxAnimateObjs.push({
|
||||||
|
'bgx': 134,
|
||||||
|
'bgy': 34,
|
||||||
|
'bgWidth': 32,
|
||||||
|
'bgHeight': 48,
|
||||||
|
'x': 134,
|
||||||
|
'y': 34,
|
||||||
|
'dw': 32,
|
||||||
|
'dh': 48,
|
||||||
|
'height': blockInfo.height,
|
||||||
|
'animate': blockInfo.animate,
|
||||||
|
'image': blockInfo.image,
|
||||||
|
'pos': blockInfo.posY * blockInfo.height,
|
||||||
|
ctx: ctx,
|
||||||
|
nobackground: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
core.status.boxAnimateObjs.push({
|
||||||
|
'bgx': 134,
|
||||||
|
'bgy': 34,
|
||||||
|
'bgWidth': 32,
|
||||||
|
'bgHeight': 32,
|
||||||
|
'x': 134,
|
||||||
|
'y': 34,
|
||||||
|
'height': 32,
|
||||||
|
'animate': blockInfo.animate,
|
||||||
|
'image': blockInfo.image,
|
||||||
|
'pos': blockInfo.posY * blockInfo.height,
|
||||||
|
ctx: ctx,
|
||||||
|
nobackground: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
pageinfo() {
|
||||||
|
|
||||||
|
}
|
||||||
|
drawTempLeft(dir) {
|
||||||
|
core.clearMap(this.tempLeft)
|
||||||
|
const enemy = this.enemys[this.page + dir]
|
||||||
|
core.setTextAlign(this.tempLeft, 'center')
|
||||||
|
core.fillText(this.tempLeft, enemy.name, 150, 120, "#000000", core.ui._buildFont(20, true))
|
||||||
|
core.fillText(this.tempLeft, "基础属性", 150, 150, "#000000", core.ui._buildFont(14, true))
|
||||||
|
core.setTextAlign(this.tempLeft, 'left')
|
||||||
|
core.fillText(this.tempLeft, "生命 " + enemy.hp, 30, 170, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.tempLeft, "攻击 " + enemy.atk, 120, 170, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.tempLeft, "防御 " + enemy.def, 210, 170, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.tempLeft, "法强 " + enemy.spell, 30, 190, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.tempLeft, "法抗 " + enemy.mdef + '%', 120, 190, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.tempLeft, "速度 " + enemy.speed, 210, 190, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.tempLeft, "金币 " + enemy.money, 30, 210, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.tempLeft, "经验 " + enemy.exp, 120, 210, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.setTextAlign(this.tempLeft, 'center')
|
||||||
|
core.fillText(this.tempLeft, "特殊属性", 150, 230, "#000000", core.ui._buildFont(14, true))
|
||||||
|
const specials = core.getSpecials()
|
||||||
|
core.enemys._calSpecialContent(enemy.id)
|
||||||
|
const hints = [];
|
||||||
|
for (let i = 0; i < specials.length; i++) {
|
||||||
|
if (core.hasSpecial(enemy, specials[i][0]))
|
||||||
|
hints.push(core.enemys._calSpecialContent(enemy.id, specials[i][1]) +
|
||||||
|
":" + core.enemys._calSpecialContent(enemy.id, specials[i][2]));
|
||||||
|
}
|
||||||
|
if (hints.length == 0) hints.push("该怪物无特殊属性。");
|
||||||
|
core.drawTextContent(this.tempLeft, hints.join('\n'), {
|
||||||
|
left: 30,
|
||||||
|
top: 240,
|
||||||
|
maxWidth: 220,
|
||||||
|
fontSize: 14,
|
||||||
|
lineHeight: 20,
|
||||||
|
color: "#000000"
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
drawTempRight(dir) {
|
||||||
|
core.clearMap(this.tempRight)
|
||||||
|
const enemy = this.enemys[this.page + dir]
|
||||||
|
core.maps.drawThumbnail(this.floorId, null, { ctx: this.tempRight, size: 0.4, x: 10, y: 220 })
|
||||||
|
enemy.locs.forEach(v => {
|
||||||
|
this.tempRight.beginPath()
|
||||||
|
this.tempRight.moveTo(10 + (32 * v[0] + 16) * 0.4, 220 + 32 * v[1] * 0.4)
|
||||||
|
this.tempRight.lineTo(10 + (32 * v[0] + 24) * 0.4, 220 + 32 * v[1] * 0.4 - 16 * 0.4)
|
||||||
|
this.tempRight.lineTo(10 + (32 * v[0] + 8) * 0.4, 220 + 32 * v[1] * 0.4 - 16 * 0.4)
|
||||||
|
this.tempRight.closePath()
|
||||||
|
this.tempRight.fillStyle = "#DD0000"
|
||||||
|
this.tempRight.fill()
|
||||||
|
})
|
||||||
|
core.setTextAlign(this.tempRight, 'left')
|
||||||
|
core.fillText(this.tempRight, "出手 " + (core.getDamageInfo(enemy, null) ? core.getDamageInfo(enemy, null).hero_turn : '???'), 30, 50, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.tempRight, "受击 " + (core.getDamageInfo(enemy, null) ? core.getDamageInfo(enemy, null).mon_turn : '???'), 130, 50, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.tempRight, enemy.damage === "???" ? "你会死的哦~杂鱼❤~" : enemy.damage, 230, 50, "#FF0000", core.ui._buildFont(12, true))
|
||||||
|
core.setTextAlign(this.tempRight, 'center');
|
||||||
|
core.fillText(this.tempRight, "当前战斗情况", 150, 25, "#000000", core.ui._buildFont(16, true))
|
||||||
|
core.fillText(this.tempRight, "合上书本", 254, 380, '#000000', core.ui._buildFont(16, true));
|
||||||
|
}
|
||||||
|
drawLeft() {
|
||||||
|
core.clearMap(this.left)
|
||||||
|
const enemy = this.enemys[this.page]
|
||||||
|
core.setTextAlign(this.left, 'center')
|
||||||
|
core.fillText(this.left, enemy.name, 150, 120, "#000000", core.ui._buildFont(20, true))
|
||||||
|
core.fillText(this.left, "基础属性", 150, 150, "#000000", core.ui._buildFont(14, true))
|
||||||
|
core.setTextAlign(this.left, 'left')
|
||||||
|
core.fillText(this.left, "生命 " + enemy.hp, 30, 170, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.left, "攻击 " + enemy.atk, 120, 170, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.left, "防御 " + enemy.def, 210, 170, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.left, "法强 " + enemy.spell, 30, 190, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.left, "法抗 " + enemy.mdef + '%', 120, 190, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.left, "速度 " + enemy.speed, 210, 190, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.left, "金币 " + enemy.money, 30, 210, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.left, "经验 " + enemy.exp, 120, 210, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.setTextAlign(this.left, 'center')
|
||||||
|
core.fillText(this.left, "特殊属性", 150, 230, "#000000", core.ui._buildFont(14, true))
|
||||||
|
const specials = core.getSpecials()
|
||||||
|
core.enemys._calSpecialContent(enemy.id)
|
||||||
|
const hints = [];
|
||||||
|
for (let i = 0; i < specials.length; i++) {
|
||||||
|
if (core.hasSpecial(enemy, specials[i][0]))
|
||||||
|
hints.push(core.enemys._calSpecialContent(enemy.id, specials[i][1]) +
|
||||||
|
":" + core.enemys._calSpecialContent(enemy.id, specials[i][2]));
|
||||||
|
}
|
||||||
|
if (hints.length == 0) hints.push("该怪物无特殊属性。");
|
||||||
|
core.drawTextContent(this.left, hints.join('\n'), {
|
||||||
|
left: 30,
|
||||||
|
top: 240,
|
||||||
|
maxWidth: 220,
|
||||||
|
fontSize: 14,
|
||||||
|
lineHeight: 20,
|
||||||
|
color: "#000000"
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
drawRight() {
|
||||||
|
core.clearMap(this.right)
|
||||||
|
const enemy = this.enemys[this.page]
|
||||||
|
core.maps.drawThumbnail(this.floorId, null, { ctx: this.right, size: 0.4, x: 10, y: 220 })
|
||||||
|
enemy.locs.forEach(v => {
|
||||||
|
this.right.beginPath()
|
||||||
|
this.right.moveTo(10 + (32 * v[0] + 16) * 0.4, 220 + 32 * v[1] * 0.4)
|
||||||
|
this.right.lineTo(10 + (32 * v[0] + 24) * 0.4, 220 + 32 * v[1] * 0.4 - 16 * 0.4)
|
||||||
|
this.right.lineTo(10 + (32 * v[0] + 8) * 0.4, 220 + 32 * v[1] * 0.4 - 16 * 0.4)
|
||||||
|
this.right.closePath()
|
||||||
|
this.right.fillStyle = "#DD0000"
|
||||||
|
this.right.fill()
|
||||||
|
})
|
||||||
|
core.setTextAlign(this.right, 'left')
|
||||||
|
core.fillText(this.right, "出手 " + (core.getDamageInfo(enemy, null) ? core.getDamageInfo(enemy, null).hero_turn : '???'), 30, 50, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.right, "受击 " + (core.getDamageInfo(enemy, null) ? core.getDamageInfo(enemy, null).mon_turn : '???'), 130, 50, "#000000", core.ui._buildFont(12, true))
|
||||||
|
core.fillText(this.right, enemy.damage === "???" ? "你会死的哦~杂鱼❤~" : enemy.damage, 230, 50, "#FF0000", core.ui._buildFont(12, true))
|
||||||
|
core.setTextAlign(this.right, 'center');
|
||||||
|
core.fillText(this.right, "当前战斗情况", 150, 25, "#000000", core.ui._buildFont(16, true))
|
||||||
|
core.fillText(this.right, "合上书本", 254, 380, '#000000', core.ui._buildFont(16, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
clear() {
|
||||||
|
core.clearUI()
|
||||||
|
core.clearMap(this.left)
|
||||||
|
core.clearMap(this.right)
|
||||||
|
core.clearMap(this.tempLeft)
|
||||||
|
core.clearMap(this.tempRight)
|
||||||
|
}
|
||||||
|
|
||||||
|
init(floorId) {
|
||||||
|
this.page = 0
|
||||||
|
this.getCurrentEnemys(floorId)
|
||||||
|
if (this.enemys.length == 0) {
|
||||||
|
return this.drawEmpty();
|
||||||
|
}
|
||||||
|
this.drawLeft()
|
||||||
|
this.drawRight()
|
||||||
|
this.drawBoxAnimate(this.left, 0)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const bookInfo = new BookInfo()
|
||||||
|
core.bookInfo = bookInfo
|
||||||
class Book {
|
class Book {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.width = 300
|
this.width = 300
|
||||||
@ -22139,8 +22385,19 @@ let time=0
|
|||||||
};
|
};
|
||||||
const leftbox = makeBox([(676 - this.width * 2) / 2, (416 - this.height) / 2], [this.width, this.height])
|
const leftbox = makeBox([(676 - this.width * 2) / 2, (416 - this.height) / 2], [this.width, this.height])
|
||||||
const rightbox = makeBox([338, (416 - this.height) / 2], [this.width, this.height])
|
const rightbox = makeBox([338, (416 - this.height) / 2], [this.width, this.height])
|
||||||
|
const exitbox = makeBox([555, 365], [70, 35])
|
||||||
if (this.isAnimate) return
|
if (this.isAnimate) return
|
||||||
if (inRect(pos, leftbox)) {
|
if (inRect(pos, exitbox)) {
|
||||||
|
core.playSound('取消');
|
||||||
|
if (core.events.recoverEvents(core.status.event.interval)) {
|
||||||
|
return;
|
||||||
|
} else if (core.status.event.ui != null) {
|
||||||
|
core.status.boxAnimateObjs = [];
|
||||||
|
core.ui._drawViewMaps(core.status.event.ui);
|
||||||
|
} else core.ui.closePanel();
|
||||||
|
core.book.close()
|
||||||
|
return;
|
||||||
|
} else if (inRect(pos, leftbox)) {
|
||||||
|
|
||||||
this.turnleft()
|
this.turnleft()
|
||||||
} else if (inRect(pos, rightbox)) {
|
} else if (inRect(pos, rightbox)) {
|
||||||
@ -22151,6 +22408,10 @@ let time=0
|
|||||||
async turnleft() {
|
async turnleft() {
|
||||||
if (this.page <= 1) return
|
if (this.page <= 1) return
|
||||||
this.isAnimate = true
|
this.isAnimate = true
|
||||||
|
bookInfo.drawTempLeft(-1)
|
||||||
|
bookInfo.drawTempRight(-1)
|
||||||
|
bookInfo.drawBoxAnimate(bookInfo.tempLeft, -1)
|
||||||
|
core.drawBoxAnimate()
|
||||||
await this.ani.time(1)
|
await this.ani.time(1)
|
||||||
.absolute()
|
.absolute()
|
||||||
.mode(linear()).move(0, 0).n(1)
|
.mode(linear()).move(0, 0).n(1)
|
||||||
@ -22754,18 +23015,39 @@ let time=0
|
|||||||
ctx.shadowBlur = 10;
|
ctx.shadowBlur = 10;
|
||||||
ctx.shadowOffsetX = 0;
|
ctx.shadowOffsetX = 0;
|
||||||
ctx.shadowOffsetY = 0;
|
ctx.shadowOffsetY = 0;
|
||||||
|
core.drawBoxAnimate()
|
||||||
// 绘制左页
|
// 绘制左页
|
||||||
core.drawImage(ctx, this.paperpages[this.page - 1][0], 0, 0, 300, 400, dx, dy, this.width, this.height);
|
core.drawImage(ctx, this.paperpages[this.page - 1][0], 0, 0, 300, 400, dx, dy, this.width, this.height);
|
||||||
|
ctx.shadowColor = "transparent";
|
||||||
|
core.drawImage(ctx, bookInfo.left.canvas, 0, 0, 300, 400, dx, dy, this.width, this.height);
|
||||||
|
ctx.shadowColor = "rgba(0,0,0,0.5)";
|
||||||
|
ctx.shadowBlur = 10;
|
||||||
|
ctx.shadowOffsetX = 0;
|
||||||
|
ctx.shadowOffsetY = 0;
|
||||||
// 绘制右页
|
// 绘制右页
|
||||||
core.drawImage(ctx, this.paperpages[this.page - 1][1], 0, 0, 300, 400, dx + this.width, dy, this.width, this.height);
|
core.drawImage(ctx, this.paperpages[this.page - 1][1], 0, 0, 300, 400, dx + this.width, dy, this.width, this.height);
|
||||||
|
ctx.shadowColor = "transparent";
|
||||||
|
core.drawImage(ctx, bookInfo.right.canvas, 0, 0, 300, 400, dx + this.width, dy, this.width, this.height);
|
||||||
|
ctx.shadowColor = "rgba(0,0,0,0.5)";
|
||||||
|
ctx.shadowBlur = 10;
|
||||||
|
ctx.shadowOffsetX = 0;
|
||||||
|
ctx.shadowOffsetY = 0;
|
||||||
//绘制上一页左页
|
//绘制上一页左页
|
||||||
core.drawImage(ctx, this.paperpages[this.page - 2][0], 0, 0, this.ani.x / (this.width * 2) * 300, 400, dx, dy, this.ani.x / 2, this.height);
|
core.drawImage(ctx, this.paperpages[this.page - 2][0], 0, 0, this.ani.x / (this.width * 2) * 300, 400, dx, dy, this.ani.x / 2, this.height);
|
||||||
|
ctx.shadowColor = "transparent";
|
||||||
|
core.drawImage(ctx, bookInfo.tempLeft.canvas, 0, 0, this.ani.x / (this.width * 2) * 300, 400, dx, dy, this.ani.x / 2, this.height);
|
||||||
|
ctx.shadowColor = "rgba(0,0,0,0.5)";
|
||||||
|
ctx.shadowBlur = 10;
|
||||||
|
ctx.shadowOffsetX = 0;
|
||||||
|
ctx.shadowOffsetY = 0;
|
||||||
//绘制翻起的右页
|
//绘制翻起的右页
|
||||||
core.drawImage(ctx, this.paperpages[this.page - 2][1], 300 - this.ani.x / (this.width * 2) * 300, 0, this.ani.x / (this.width * 2) * 300, 400, this.ani.x / 2 + dx, dy, this.ani.x / 2, this.height);
|
core.drawImage(ctx, this.paperpages[this.page - 2][1], 300 - this.ani.x / (this.width * 2) * 300, 0, this.ani.x / (this.width * 2) * 300, 400, this.ani.x / 2 + dx, dy, this.ani.x / 2, this.height);
|
||||||
|
ctx.shadowColor = "transparent";
|
||||||
|
core.drawImage(ctx, bookInfo.tempRight.canvas, 300 - this.ani.x / (this.width * 2) * 300, 0, this.ani.x / (this.width * 2) * 300, 400, this.ani.x / 2 + dx, dy, this.ani.x / 2, this.height);
|
||||||
|
ctx.shadowColor = "rgba(0,0,0,0.5)";
|
||||||
|
ctx.shadowBlur = 10;
|
||||||
|
ctx.shadowOffsetX = 0;
|
||||||
|
ctx.shadowOffsetY = 0;
|
||||||
const gradientleft = ctx.createLinearGradient(dx + this.ani.x / 2 - 20, (416 - this.height) / 2, dx + this.ani.x / 2 + 10, (416 - this.height) / 2)
|
const gradientleft = ctx.createLinearGradient(dx + this.ani.x / 2 - 20, (416 - this.height) / 2, dx + this.ani.x / 2 + 10, (416 - this.height) / 2)
|
||||||
gradientleft.addColorStop(0, "rgba(0,0,0,0)")
|
gradientleft.addColorStop(0, "rgba(0,0,0,0)")
|
||||||
gradientleft.addColorStop(0.67, "rgba(0,0,0,0.2)")
|
gradientleft.addColorStop(0.67, "rgba(0,0,0,0.2)")
|
||||||
@ -22779,8 +23061,6 @@ let time=0
|
|||||||
|
|
||||||
// 重置阴影
|
// 重置阴影
|
||||||
ctx.shadowColor = "transparent";
|
ctx.shadowColor = "transparent";
|
||||||
|
|
||||||
|
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
}
|
}
|
||||||
this.ani.ticker.add(fn)
|
this.ani.ticker.add(fn)
|
||||||
@ -22791,11 +23071,24 @@ let time=0
|
|||||||
this.ani.ticker.clear()
|
this.ani.ticker.clear()
|
||||||
this.isAnimate = false
|
this.isAnimate = false
|
||||||
this.page--
|
this.page--
|
||||||
|
bookInfo.page--;
|
||||||
|
[bookInfo.left, bookInfo.tempLeft] = [bookInfo.tempLeft, bookInfo.left];
|
||||||
|
[bookInfo.right, bookInfo.tempRight] = [bookInfo.tempRight, bookInfo.right]
|
||||||
|
core.clearUI()
|
||||||
|
bookInfo.drawBoxAnimate(bookInfo.left, 0)
|
||||||
|
core.drawBoxAnimate()
|
||||||
this.update()
|
this.update()
|
||||||
|
core.clearMap(bookInfo.tempLeft)
|
||||||
|
core.clearMap(bookInfo.tempRight)
|
||||||
|
|
||||||
}
|
}
|
||||||
async turnright() {
|
async turnright() {
|
||||||
if (this.page >= this.pagemax) return
|
if (this.page >= this.pagemax) return
|
||||||
this.isAnimate = true
|
this.isAnimate = true
|
||||||
|
bookInfo.drawTempLeft(1)
|
||||||
|
bookInfo.drawTempRight(1)
|
||||||
|
bookInfo.drawBoxAnimate(bookInfo.tempLeft, 1)
|
||||||
|
core.drawBoxAnimate()
|
||||||
await this.ani.time(1)
|
await this.ani.time(1)
|
||||||
.absolute()
|
.absolute()
|
||||||
.mode(linear()).move(0, 0).n(1)
|
.mode(linear()).move(0, 0).n(1)
|
||||||
@ -23399,16 +23692,41 @@ let time=0
|
|||||||
ctx.shadowBlur = 10;
|
ctx.shadowBlur = 10;
|
||||||
ctx.shadowOffsetX = 0;
|
ctx.shadowOffsetX = 0;
|
||||||
ctx.shadowOffsetY = 0;
|
ctx.shadowOffsetY = 0;
|
||||||
|
core.drawBoxAnimate()
|
||||||
// 绘制左页
|
// 绘制左页
|
||||||
core.drawImage(ctx, this.paperpages[this.page - 1][0], 0, 0, 300, 400, dx, dy, this.width, this.height);
|
core.drawImage(ctx, this.paperpages[this.page - 1][0], 0, 0, 300, 400, dx, dy, this.width, this.height);
|
||||||
|
ctx.shadowColor = "transparent";
|
||||||
|
core.drawImage(ctx, bookInfo.left.canvas, 0, 0, 300, 400, dx, dy, this.width, this.height);
|
||||||
|
ctx.shadowColor = "rgba(0,0,0,0.5)";
|
||||||
|
ctx.shadowBlur = 10;
|
||||||
|
ctx.shadowOffsetX = 0;
|
||||||
|
ctx.shadowOffsetY = 0;
|
||||||
// 绘制右页
|
// 绘制右页
|
||||||
core.drawImage(ctx, this.paperpages[this.page - 1][1], 0, 0, 300, 400, dx + this.width, dy, this.width, this.height);
|
core.drawImage(ctx, this.paperpages[this.page - 1][1], 0, 0, 300, 400, dx + this.width, dy, this.width, this.height);
|
||||||
|
ctx.shadowColor = "transparent";
|
||||||
|
core.drawImage(ctx, bookInfo.right.canvas, 0, 0, 300, 400, dx + this.width, dy, this.width, this.height);
|
||||||
|
ctx.shadowColor = "rgba(0,0,0,0.5)";
|
||||||
|
ctx.shadowBlur = 10;
|
||||||
|
ctx.shadowOffsetX = 0;
|
||||||
|
ctx.shadowOffsetY = 0;
|
||||||
//绘制翻起的左页
|
//绘制翻起的左页
|
||||||
core.drawImage(ctx, this.paperpages[this.page][0], 0, 0, this.ani.x / (this.width * 2) * 300, 400, 676 - dx - this.ani.x, dy, this.ani.x / 2, this.height);
|
core.drawImage(ctx, this.paperpages[this.page][0], 0, 0, this.ani.x / (this.width * 2) * 300, 400, 676 - dx - this.ani.x, dy, this.ani.x / 2, this.height);
|
||||||
|
ctx.shadowColor = "transparent";
|
||||||
|
core.drawImage(ctx, bookInfo.tempLeft.canvas, 0, 0, this.ani.x / (this.width * 2) * 300, 400, 676 - dx - this.ani.x, dy, this.ani.x / 2, this.height);
|
||||||
|
ctx.shadowColor = "rgba(0,0,0,0.5)";
|
||||||
|
ctx.shadowBlur = 10;
|
||||||
|
ctx.shadowOffsetX = 0;
|
||||||
|
ctx.shadowOffsetY = 0;
|
||||||
//绘制下一页右页
|
//绘制下一页右页
|
||||||
core.drawImage(ctx, this.paperpages[this.page][1], 300 - this.ani.x / (this.width * 2) * 300, 0, this.ani.x / (this.width * 2) * 300, 400, 676 - dx - this.ani.x / 2, dy, this.ani.x / 2, this.height);
|
core.drawImage(ctx, this.paperpages[this.page][1], 300 - this.ani.x / (this.width * 2) * 300, 0, this.ani.x / (this.width * 2) * 300, 400, 676 - dx - this.ani.x / 2, dy, this.ani.x / 2, this.height);
|
||||||
|
ctx.shadowColor = "transparent";
|
||||||
|
core.drawImage(ctx, bookInfo.tempRight.canvas, 300 - this.ani.x / (this.width * 2) * 300, 0, this.ani.x / (this.width * 2) * 300, 400, 676 - dx - this.ani.x / 2, dy, this.ani.x / 2, this.height);
|
||||||
|
ctx.shadowColor = "rgba(0,0,0,0.5)";
|
||||||
|
ctx.shadowBlur = 10;
|
||||||
|
ctx.shadowOffsetX = 0;
|
||||||
|
ctx.shadowOffsetY = 0;
|
||||||
|
|
||||||
|
|
||||||
const gradientleft = ctx.createLinearGradient(676 - dx - this.ani.x, (416 - this.height) / 2, 676 - dx - this.ani.x - 20, (416 - this.height) / 2)
|
const gradientleft = ctx.createLinearGradient(676 - dx - this.ani.x, (416 - this.height) / 2, 676 - dx - this.ani.x - 20, (416 - this.height) / 2)
|
||||||
gradientleft.addColorStop(1, "rgba(0,0,0,0)")
|
gradientleft.addColorStop(1, "rgba(0,0,0,0)")
|
||||||
gradientleft.addColorStop(0.2, "rgba(0,0,0,0.2)")
|
gradientleft.addColorStop(0.2, "rgba(0,0,0,0.2)")
|
||||||
@ -23419,10 +23737,9 @@ let time=0
|
|||||||
gradientright.addColorStop(0.33, "rgba(0,0,0,0.2)")
|
gradientright.addColorStop(0.33, "rgba(0,0,0,0.2)")
|
||||||
gradientright.addColorStop(0, "rgba(0,0,0,0)")
|
gradientright.addColorStop(0, "rgba(0,0,0,0)")
|
||||||
core.fillRect(ctx, 676 - dx - this.ani.x / 2 - 10, (416 - this.height) / 2, 30, this.height, gradientright)
|
core.fillRect(ctx, 676 - dx - this.ani.x / 2 - 10, (416 - this.height) / 2, 30, this.height, gradientright)
|
||||||
|
|
||||||
// 重置阴影
|
// 重置阴影
|
||||||
ctx.shadowColor = "transparent";
|
ctx.shadowColor = "transparent";
|
||||||
|
|
||||||
|
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
}
|
}
|
||||||
this.ani.ticker.add(fn)
|
this.ani.ticker.add(fn)
|
||||||
@ -23433,7 +23750,15 @@ let time=0
|
|||||||
this.ani.ticker.clear()
|
this.ani.ticker.clear()
|
||||||
this.isAnimate = false
|
this.isAnimate = false
|
||||||
this.page++
|
this.page++
|
||||||
|
bookInfo.page++;
|
||||||
|
[bookInfo.left, bookInfo.tempLeft] = [bookInfo.tempLeft, bookInfo.left];
|
||||||
|
[bookInfo.right, bookInfo.tempRight] = [bookInfo.tempRight, bookInfo.right]
|
||||||
|
core.clearUI()
|
||||||
|
bookInfo.drawBoxAnimate(bookInfo.left, 0)
|
||||||
|
core.drawBoxAnimate()
|
||||||
this.update()
|
this.update()
|
||||||
|
core.clearMap(bookInfo.tempLeft)
|
||||||
|
core.clearMap(bookInfo.tempRight)
|
||||||
}
|
}
|
||||||
|
|
||||||
paperTexture(dir, num = 0) {
|
paperTexture(dir, num = 0) {
|
||||||
@ -24728,21 +25053,26 @@ let time=0
|
|||||||
// 绘制左页
|
// 绘制左页
|
||||||
core.drawImage(ctx, this.paperpages[this.page - 1][0], 0, 0, 300, 400, dx, dy, this.width, this.height);
|
core.drawImage(ctx, this.paperpages[this.page - 1][0], 0, 0, 300, 400, dx, dy, this.width, this.height);
|
||||||
|
|
||||||
|
|
||||||
// 绘制右页
|
// 绘制右页
|
||||||
core.drawImage(ctx, this.paperpages[this.page - 1][1], 0, 0, 300, 400, dx + this.width, dy, this.width, this.height);
|
core.drawImage(ctx, this.paperpages[this.page - 1][1], 0, 0, 300, 400, dx + this.width, dy, this.width, this.height);
|
||||||
|
|
||||||
// 重置阴影
|
// 重置阴影
|
||||||
ctx.shadowColor = "transparent";
|
ctx.shadowColor = "transparent";
|
||||||
|
core.drawImage(ctx, bookInfo.left.canvas, 0, 0, 300, 400, dx, dy, this.width, this.height)
|
||||||
|
core.drawImage(ctx, bookInfo.right.canvas, 0, 0, 300, 400, dx + this.width, dy, this.width, this.height)
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
}
|
}
|
||||||
setPage(num) {
|
setPage(num) {
|
||||||
const a = []
|
if (num === 1) {
|
||||||
for (let i = 0; i < num; i++) {
|
this.paperpages = [
|
||||||
a.push([this.paperTexture('left'), this.paperTexture('right')])
|
[this.paperTexture('left'), this.paperTexture('right')]
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
for (let i = 1; i < num; i++) {
|
||||||
|
this.paperpages.push([this.paperTexture('left'), this.paperTexture('right')])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.paperpages = a
|
|
||||||
this.pagemax = num
|
this.pagemax = num
|
||||||
}
|
}
|
||||||
clearPage() {
|
clearPage() {
|
||||||
@ -24762,12 +25092,31 @@ let time=0
|
|||||||
if (this.page < 1) this.page = 1
|
if (this.page < 1) this.page = 1
|
||||||
this.background()
|
this.background()
|
||||||
}
|
}
|
||||||
|
close() {
|
||||||
|
this.clearPage()
|
||||||
|
bookInfo.clear()
|
||||||
|
this.page = 1
|
||||||
|
book.style.display = 'none'
|
||||||
|
this.setPage(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
core.book = new Book()
|
core.book = new Book()
|
||||||
|
|
||||||
|
|
||||||
|
////// 绘制怪物手册 //////
|
||||||
|
ui.prototype.drawBook = function (index) {
|
||||||
|
var floorId = core.floorIds[(core.status.event.ui || {}).index] || core.status.floorId;
|
||||||
|
// 清除浏览地图时的光环缓存
|
||||||
|
if (floorId != core.status.floorId && core.status.checkBlock) {
|
||||||
|
core.status.checkBlock.cache = {};
|
||||||
|
}
|
||||||
|
core.clearUI()
|
||||||
|
bookInfo.init(floorId)
|
||||||
|
core.book.update()
|
||||||
|
if (bookInfo.enemys.length > 1) core.book.setPage(bookInfo.enemys.length)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"存读档": function () {
|
"存读档": function () {
|
||||||
// 在此增加新插件
|
// 在此增加新插件
|
||||||
@ -27562,20 +27911,24 @@ let time=0
|
|||||||
this.floorIds = info.floorIds
|
this.floorIds = info.floorIds
|
||||||
this.has = info.has ?? core.searchBlockWithFilter(block => block.event.cls.startsWith("enemy") && block.event.type === this.checkEnemyType, this.floorIds).length
|
this.has = info.has ?? core.searchBlockWithFilter(block => block.event.cls.startsWith("enemy") && block.event.type === this.checkEnemyType, this.floorIds).length
|
||||||
} else if (info.type === "kill") {
|
} else if (info.type === "kill") {
|
||||||
|
this.floorIds = info.floorIds
|
||||||
this.kill = info.kill
|
this.kill = info.kill
|
||||||
this.count = info.count
|
this.count = info.count
|
||||||
this.has = info.has ?? 0
|
this.has = info.has ?? 0
|
||||||
this.operator = info.operator
|
this.operator = info.operator
|
||||||
} else if (info.type === "killLocs") {
|
} else if (info.type === "killLocs") {
|
||||||
this.killLocs = info.killLocs
|
this.killLocs = info.killLocs
|
||||||
|
this.floorId = info.floorId
|
||||||
this.count = info.count
|
this.count = info.count
|
||||||
this.has = info.has ?? 0
|
this.has = info.has ?? 0
|
||||||
this.operator = info.operator
|
this.operator = info.operator
|
||||||
} else if (info.type === "killCount") {
|
} else if (info.type === "killCount") {
|
||||||
|
this.floorIds = info.floorIds
|
||||||
this.count = info.count
|
this.count = info.count
|
||||||
this.has = info.has ?? 0
|
this.has = info.has ?? 0
|
||||||
this.operator = info.operator
|
this.operator = info.operator
|
||||||
} else if (info.type === "killSpecial") {
|
} else if (info.type === "killSpecial") {
|
||||||
|
this.floorIds = info.floorIds
|
||||||
this.killSpecial = info.killSpecial
|
this.killSpecial = info.killSpecial
|
||||||
this.count = info.count
|
this.count = info.count
|
||||||
this.has = info.has ?? 0
|
this.has = info.has ?? 0
|
||||||
@ -27584,11 +27937,13 @@ let time=0
|
|||||||
this.floorIds = info.floorIds
|
this.floorIds = info.floorIds
|
||||||
this.has = info.has ?? core.searchBlockWithFilter(block => block.event.cls.startsWith("enemy"), this.floorIds).length
|
this.has = info.has ?? core.searchBlockWithFilter(block => block.event.cls.startsWith("enemy"), this.floorIds).length
|
||||||
} else if (info.type === "specialBlock") {
|
} else if (info.type === "specialBlock") {
|
||||||
|
this.floorIds = info.floorIds
|
||||||
this.specialType = info.specialType
|
this.specialType = info.specialType
|
||||||
this.count = info.count
|
this.count = info.count
|
||||||
this.has = info.has ?? 0
|
this.has = info.has ?? 0
|
||||||
this.operator = info.operator
|
this.operator = info.operator
|
||||||
} else if (info.type === "changeFloor") {
|
} else if (info.type === "changeFloor") {
|
||||||
|
this.floorIds = info.floorIds
|
||||||
this.count = info.count
|
this.count = info.count
|
||||||
this.has = info.has ?? 0
|
this.has = info.has ?? 0
|
||||||
this.operator = info.operator
|
this.operator = info.operator
|
||||||
@ -27655,20 +28010,24 @@ let time=0
|
|||||||
info.floorIds = this.floorIds
|
info.floorIds = this.floorIds
|
||||||
info.has = this.has
|
info.has = this.has
|
||||||
} else if (info.type === "kill") {
|
} else if (info.type === "kill") {
|
||||||
|
info.floorIds = this.floorIds
|
||||||
info.kill = this.kill
|
info.kill = this.kill
|
||||||
info.count = this.count
|
info.count = this.count
|
||||||
info.has = this.has
|
info.has = this.has
|
||||||
info.operator = this.operator
|
info.operator = this.operator
|
||||||
} else if (info.type === "killLocs") {
|
} else if (info.type === "killLocs") {
|
||||||
info.killLocs = this.killLocs
|
info.killLocs = this.killLocs
|
||||||
|
info.floorId = this.floorId
|
||||||
info.count = this.locs.length
|
info.count = this.locs.length
|
||||||
info.has = this.has
|
info.has = this.has
|
||||||
info.operator = this.operator
|
info.operator = this.operator
|
||||||
} else if (info.type === "killCount") {
|
} else if (info.type === "killCount") {
|
||||||
|
info.floorIds = this.floorIds
|
||||||
info.count = this.count
|
info.count = this.count
|
||||||
info.has = this.has
|
info.has = this.has
|
||||||
info.operator = this.operator
|
info.operator = this.operator
|
||||||
} else if (info.type === "killSpecial") {
|
} else if (info.type === "killSpecial") {
|
||||||
|
info.floorIds = this.floorIds
|
||||||
info.killSpecial = this.killSpecial
|
info.killSpecial = this.killSpecial
|
||||||
info.count = this.count
|
info.count = this.count
|
||||||
info.has = this.has
|
info.has = this.has
|
||||||
@ -27678,11 +28037,13 @@ let time=0
|
|||||||
info.has = this.has
|
info.has = this.has
|
||||||
} else if (info.type === "specialBlock") {
|
} else if (info.type === "specialBlock") {
|
||||||
info.specialType = this.specialType
|
info.specialType = this.specialType
|
||||||
|
info.floorIds = this.floorIds
|
||||||
info.count = this.count
|
info.count = this.count
|
||||||
info.has = this.has
|
info.has = this.has
|
||||||
info.operator = this.operator
|
info.operator = this.operator
|
||||||
} else if (info.type === "changeFloor") {
|
} else if (info.type === "changeFloor") {
|
||||||
info.count = this.count
|
info.count = this.count
|
||||||
|
info.floorIds = this.floorIds
|
||||||
info.has = this.has
|
info.has = this.has
|
||||||
info.operator = this.operator
|
info.operator = this.operator
|
||||||
} else if (info.type === "arrival") {
|
} else if (info.type === "arrival") {
|
||||||
|
Loading…
Reference in New Issue
Block a user