fix(dilatory): round boss hp/rage to bil/mil/thou, fixes #3667
This commit is contained in:
@@ -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;
|
||||
}
|
||||
})
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user