statistics

This commit is contained in:
oc 2018-05-23 08:33:20 +08:00
parent 0c61b1aa45
commit 868e6c8b32
3 changed files with 16 additions and 2 deletions

View File

@ -1386,6 +1386,7 @@ control.prototype.updateFg = function () {
for (var y=0;y<13;y++) {
var damage = core.status.checkBlock.damage[13*x+y];
if (damage>0) {
damage = core.formatBigNumber(damage);
core.setFillStyle('fg', '#000000');
core.canvas.fg.fillText(damage, 32 * x + 17, 32 * (y + 1) - 13);
core.canvas.fg.fillText(damage, 32 * x + 15, 32 * (y + 1) - 15);

View File

@ -739,7 +739,7 @@ maps.prototype.removeBlock = function (x, y, floorId) {
// 删除Index
core.removeBlockById(index, floorId);
core.updateFg();
core.updateStatusBar();
}
////// 根据block的索引删除该块 //////

View File

@ -1885,10 +1885,23 @@ ui.prototype.drawStatistics = function () {
return text;
}
var formatTime = function (time) {
return core.setTwoDigits(parseInt(time/3600000))
+":"+core.setTwoDigits(parseInt(time/60000)%60)
+":"+core.setTwoDigits(parseInt(time/1000)%60);
}
var statistics = core.status.hero.statistics;
core.drawText([
getText("全塔", total),
getText("当前", current),
"当前总步数为"+core.status.hero.steps+""
"当前总步数:"+core.status.hero.steps+",游戏时长:"+formatTime(statistics.totalTime)
+"。\n瞬间移动次数"+statistics.moveDirectly+",共计少走"+statistics.ignoreSteps+"步。"
+"\n\n总计通过血瓶恢复生命值为"+core.formatBigNumber(statistics.hp)+"点。\n\n"
+"总计受到的伤害为"+core.formatBigNumber(statistics.battleDamage+statistics.poisonDamage+statistics.extraDamage)
+",其中战斗伤害"+core.formatBigNumber(statistics.battleDamage)+"点"
+(core.flags.enableDebuff?(",中毒伤害"+core.formatBigNumber(statistics.poisonDamage)+"点"):"")
+",领域/夹击/阻击/血网伤害"+core.formatBigNumber(statistics.extraDamage)+"点。"
])
}