Adjusted amount of items you can buy so that you can theoretically spend much more than you earn, while still not unlocking powerful stuff too early.

This commit is contained in:
Nick Winter 2014-11-24 09:05:59 -08:00
parent b87cf462fc
commit a1ebdb7101

View file

@ -435,7 +435,7 @@ module.exports = class ThangType extends CocoModel
name: name, display: display
isSilhouettedItem: ->
return console.error "Trying to determine whether #{@get('name')} should be a silhouetted item, but it has no gem cost." unless @get 'gems'
return console.error "Trying to determine whether #{@get('name')} should be a silhouetted item, but it has no gem cost." unless @get('gems') or @get('tier')
console.info "Add (or make sure you have fetched) a tier for #{@get('name')} to more accurately determine whether it is silhouetted." unless @get('tier')?
tier = @get 'tier'
if tier?
@ -446,5 +446,8 @@ module.exports = class ThangType extends CocoModel
levelRequiredForItem: ->
return console.error "Trying to determine what level is required for #{@get('name')}, but it has no tier." unless @get('tier')?
tier = @get 'tier'
me.constructor.levelForTier(Math.pow(tier, 0.7))
itemTier = @get 'tier'
playerTier = itemTier / 2
playerLevel = me.constructor.levelForTier playerTier
#console.log 'Level required for', @get('name'), 'is', playerLevel, 'player tier', playerTier, 'because it is itemTier', itemTier, 'which is normally level', me.constructor.levelForTier(itemTier)
playerLevel