From 3a83f5b65fb455d1040c785f96c06f12693e8b7f Mon Sep 17 00:00:00 2001 From: oc Date: Tue, 16 Oct 2018 23:27:15 +0800 Subject: [PATCH] vampire damage & drawStatistics B --- libs/actions.js | 4 ++++ libs/control.js | 1 + libs/ui.js | 25 +++++++++++++++++++++++-- project/functions.js | 3 ++- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/libs/actions.js b/libs/actions.js index 7c8a1404..ecccf697 100644 --- a/libs/actions.js +++ b/libs/actions.js @@ -309,6 +309,10 @@ actions.prototype.keyUp = function(keyCode) { if (core.status.heroStop) core.doSL("autoSave", "load"); break; + case 66: // B + if (core.status.heroStop) + core.ui.drawStatistics(); + break; case 83: // S if (core.status.heroStop) core.save(true); diff --git a/libs/control.js b/libs/control.js index f5d1b7d2..c3c94630 100644 --- a/libs/control.js +++ b/libs/control.js @@ -288,6 +288,7 @@ control.prototype.resetStatus = function(hero, hard, floorId, route, maps, value 'totalTime': totalTime, 'currTime': 0, 'hp': 0, + "battle": 0, 'battleDamage': 0, 'poisonDamage': 0, 'extraDamage': 0, diff --git a/libs/ui.js b/libs/ui.js index 0fd8403a..a2eec3d3 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -1440,10 +1440,31 @@ ui.prototype.drawBookDetail = function (index) { var enemyId=enemy.id; var hints=core.enemys.getSpecialHint(core.material.enemys[enemyId]); - if (hints.length==0) hints.push("该怪物无特殊属性。"); + // 吸血怪的最低生命值 + if (core.enemys.hasSpecial(core.material.enemys[enemyId].special, 11)) { + var damage = core.getDamage(enemyId); + if (damage != null) { + // 二分HP + var start = 1, end = 100 * damage; + var nowHp = core.status.hero.hp; + while (start=1?core.values.weakValue+"点":parseInt(core.values.weakValue*100)+"%")], [14, "诅咒", "战斗后,勇士陷入诅咒状态,战斗无法获得金币和经验"],