diff --git a/public/js/filters/filters.js b/public/js/filters/filters.js index 2bf7c2d6dd..5064566b1e 100644 --- a/public/js/filters/filters.js +++ b/public/js/filters/filters.js @@ -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; } }) diff --git a/views/options/social/boss.jade b/views/options/social/boss.jade index d364345421..7ea5ee6414 100644 --- a/views/options/social/boss.jade +++ b/views/options/social/boss.jade @@ -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