import { AchievementType , AchievementRewardType , Achievement , PermanentUpgrade } from '../../../../shared/interfaces' ; import { Player } from '../../../../shared/models' ; export class Divine extends Achievement { static readonly base = 10 ; static readonly statWatches = [ 'Character/Movement/Steps/Divine' ] ; static readonly type = AchievementType . Special ; static descriptionForTier ( tier ) { let baseStr = `Gain +${ tier } stamina for moving divinely ${ Math . pow ( Divine . base , tier ) . toLocaleString ( ) } times.` ; if ( tier >= 6 ) { baseStr = `${ baseStr } Title: Divine Dog.` ; } return baseStr ; } static calculateTier ( player ) { const steps = player . $statistics . get ( 'Character/Movement/Steps/Divine' ) ; return Math . floor ( Achievement . log ( steps , Divine . base ) ) ; } static rewardsForTier ( tier ) { const baseRewards = [ { type : AchievementRewardType . PermanentUpgrade , upgrades : { [ PermanentUpgrade . MaxStaminaBoost ] : tier } } ] ; if ( tier >= 6 ) { baseRewards . push ( { type : AchievementRewardType . Title , title : 'Divine Dog' } ) ; } return baseRewards ; } }