Files
habitica/website/views/shared/profiles/stats/attributes.jade
T
Travis f8cfdfa37d Updating attribute calculation to look at all equipment #8188 (#8202)
* Taking all equipped items into account when calculating attributes instead of just head, weapon, sheild, and armor. closes #8185

* Refactored the stat calculations a bit so that all stat calculations are handled in the same location in the same way to try and reduce duplicate logic.
This commit also adds a number of tests to test this new behavior.

* spelling fixes
2017-02-07 12:04:12 -07:00

30 lines
1.5 KiB
Plaintext

h4(class=mobile?'item item-divider':'')=env.t('attributes')
table.table.table-striped
each statInfo, stat in { str: {title:"strength",popover:'strengthText'},int: {title:"intelligence",popover:'intText'},con: {title:"constitution",popover:'conText'},per: {title:"perception",popover:'perText'} }
tr
td
span.hint(popover-title=env.t(statInfo.title), popover-placement='right',
popover=env.t(statInfo.popover), popover-trigger='mouseenter')
strong=env.t(statInfo.title)
strong : {{profile.fns.statsComputed().#{stat}}}
td: ul.list-unstyled
+statList('profile.fns.statsComputed().levelBonus.' + stat, 'levelBonus', 'level', true)
+statList('profile.fns.statsComputed().gearBonus.' + stat, 'equipmentBonus', 'equipment', true)
+statList('profile.fns.statsComputed().classBonus.' + stat, 'classBonus', 'classEquipBonus')
+statList('profile.stats.' + stat, 'allocatedPoints', 'allocated')
+statList('profile.stats.buffs.' + stat, 'buffs', 'buffs', true)
tr(ng-if='profile.stats.buffs.stealth')
td(colspan='2')
strong.hint(popover-title=env.t('stealth'), popover-trigger='mouseenter',
popover-placement='right', popover=env.t('stealthNewDay'))
=env.t('stealth')
strong : {{profile.stats.buffs.stealth}} 
tr(ng-if='profile.stats.buffs.streaks')
td(colspan='2')
strong.hint(popover-title=env.t('streaksFrozen'), popover-trigger='mouseenter',
popover-placement='right', popover=env.t('streaksFrozenText'))
=env.t('streaksFrozen')