Monster Detail

This commit is contained in:
ckcz123 2017-12-30 18:05:21 +08:00
parent f2bfa7cd84
commit 2d9278f8f6
4 changed files with 21 additions and 4 deletions

View File

@ -614,6 +614,10 @@ core.prototype.keyUp = function(keyCode) {
core.events.keyUpBook(keyCode);
return;
}
if (core.status.event.id=='book-detail' && (keyCode==13 || keyCode==32 || keyCode==67)) {
core.events.clickBookDetail();
return;
}
if (core.status.event.id=='fly') {
core.events.keyUpFly(keyCode);
return;
@ -856,6 +860,12 @@ core.prototype.onclick = function (x, y, stepPostfix) {
return;
}
// 怪物详细信息
if (core.status.event.id == 'book-detail') {
core.events.clickBookDetail(x,y);
return;
}
// 楼层飞行器
if (core.status.event.id == 'fly') {
core.events.clickFly(x,y);
@ -2081,7 +2091,7 @@ core.prototype.nearStair = function() {
core.prototype.enemyExists = function (x, y, id,floorId) {
var block = core.getBlock(x,y,floorId);
if (block==null) return false;
return block.block.event.cls=='enemys' && block.block.event.id==id;
return block.block.event.cls=='enemys' && (core.isset(id)?block.block.event.id==id:true);
}
core.prototype.getBlock = function (x, y, floorId, needEnable) {

View File

@ -136,7 +136,7 @@ enemys.prototype.getSpecialHint = function (enemy, special) {
case 12: return "中毒:战斗后,勇士陷入中毒状态,每一步损失生命"+core.values.poisonDamage+"点";
case 13: return "衰弱:战斗后,勇士陷入衰弱状态,攻防暂时下降"+core.values.weakValue+"点";
case 14: return "诅咒:战斗后,勇士陷入诅咒状态,战斗无法获得金币和经验";
case 15: return "领域:经过怪物周围"+(enemy.range||1)+"格时自动减生命"+enemy.damage+"点";
case 15: return "领域:经过怪物周围"+(enemy.range||1)+"格时自动减生命"+enemy.value+"点";
case 16: return "夹击:经过两只相同的怪物中间,勇士生命值变成一半";
case 17: return "仇恨:战斗前,怪物附加之前积累的仇恨值作为伤害;战斗后,释放一半的仇恨值。(每杀死一个怪物获得"+core.values.hatred+"点仇恨值)";
case 18: return "阻击:经过怪物的十字领域时自动减生命"+enemy.value+"点,同时怪物后退一格";

View File

@ -825,7 +825,7 @@ events.prototype.clickBook = function(x,y) {
var page=parseInt(data/6);
var index=6*page+parseInt(y/2);
core.ui.drawEnemyBook(index);
core.ui.drawEnemyDetail(index);
core.ui.drawBookDetail(index);
}
return;
}
@ -854,6 +854,13 @@ events.prototype.keyUpBook = function (keycode) {
}
}
events.prototype.clickBookDetail = function (x,y) {
core.clearMap('data', 0, 0, 416, 416);
core.status.event.id = 'book';
}
events.prototype.clickFly = function(x,y) {
if ((x==10 || x==11) && y==9) core.ui.drawFly(core.status.event.data-1);
if ((x==10 || x==11) && y==5) core.ui.drawFly(core.status.event.data+1);

View File

@ -844,7 +844,7 @@ ui.prototype.drawEnemyBook = function (index) {
this.drawPagination(page, totalPage);
}
ui.prototype.drawEnemyDetail = function (index) {
ui.prototype.drawBookDetail = function (index) {
var enemys = core.enemys.getCurrentEnemys();
if (enemys.length==0) return;
if (index<0) index=0;