diff --git a/libs/control.js b/libs/control.js index e345f6c4..8253b5e7 100644 --- a/libs/control.js +++ b/libs/control.js @@ -63,6 +63,7 @@ control.prototype.setRequestAnimationFrame = function () { if (core.isPlaying() && core.isset(core.status) && core.isset(core.status.hero) && core.isset(core.status.hero.statistics)) { core.status.hero.statistics.totalTime += timestamp-(core.status.hero.statistics.start||timestamp); + core.status.hero.statistics.currTime += timestamp-(core.status.hero.statistics.start||timestamp); core.status.hero.statistics.start=timestamp; } @@ -266,6 +267,7 @@ control.prototype.resetStatus = function(hero, hard, floorId, route, maps) { if (!core.isset(core.status.hero.statistics)) core.status.hero.statistics = { 'totalTime': totalTime, + 'currTime': 0, 'hp': 0, 'battleDamage': 0, 'poisonDamage': 0, @@ -2317,6 +2319,8 @@ control.prototype.updateStatusBar = function () { var statusList = ['hpmax', 'hp', 'atk', 'def', 'mdef', 'money', 'experience']; statusList.forEach(function (item) { + if (core.isset(core.status.hero[item])) + core.status.hero[item] = Math.floor(core.status.hero[item]); core.statusBar[item].innerHTML = core.formatBigNumber(core.getStatus(item)); }); diff --git a/libs/events.js b/libs/events.js index 9a61fc10..78681b6f 100644 --- a/libs/events.js +++ b/libs/events.js @@ -187,6 +187,7 @@ events.prototype.gameOver = function (ending, fromReplay) { formData.append('experience', core.status.hero.experience); formData.append('steps', core.status.hero.steps); formData.append('seed', core.getFlag('seed')); + formData.append('totalTime', Math.floor(core.status.hero.statistics.totalTime)); formData.append('route', core.encodeRoute(core.status.route)); if (main.isCompetition)