fix(dilatory): round boss hp/rage to bil/mil/thou, fixes #3667

This commit is contained in:
Tyler Renelle
2014-06-30 21:28:09 -06:00
parent de2ba36274
commit 9c55bfb498
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -16,6 +16,8 @@ angular.module('habitrpg')
})
.filter('goldRoundThousandsToK', function(){
return function (gp) {
return (gp > 999) ? (Math.floor(gp / 100) / 10.0 + 'k') : gp;
return (gp > 999999999) ? (gp / Math.pow(10, 9)).toFixed(1) + "b" :
(gp > 999999) ? (gp / Math.pow(10, 6)).toFixed(1) + "m" :
(gp > 999) ? (gp / Math.pow(10, 3)).toFixed(1) + "k" : gp;
}
})
+2 -2
View File
@@ -33,14 +33,14 @@ mixin boss(tavern)
span.glyphicon.glyphicon-heart
| HP
span.meter-text.value
| {{Math.ceil(progress.hp)}} / {{boss.hp}}
| {{Math.ceil(progress.hp) | goldRoundThousandsToK}} / {{boss.hp | goldRoundThousandsToK}}
.meter.mana(ng-if='boss.rage',popover="{{::boss.rage.description()}}",popover-title="{{::boss.rage.title()}}",popover-trigger='mouseenter',popover-placement='right')
.bar(style='width: {{Shared.percent(progress.rage, boss.rage.value)}}%;')
span.meter-text.title
span.glyphicon.glyphicon-fire
| Rage
span.meter-text.value
| {{Math.ceil(progress.rage)}} / {{boss.rage.value}}
| {{Math.ceil(progress.rage) | goldRoundThousandsToK}} / {{boss.rage.value | goldRoundThousandsToK}}
div(ng-if='::Content.quests[group.quest.key].collect')
h4=env.t('collected') + ':'
table.table.table-striped